• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Custom Feature Question] IDEA OF CREATING GUILD IN THE GAME

etique

etique
  • 266
    Posts
    7
    Years
    • Seen Oct 30, 2022
    I'm thinking of how to create guild event in my game, I made some images of my idea, I need help how I could do this, if someone already did or has an idea send a message![/ATTACH]
     

    Attachments

    • [PokeCommunity.com] IDEA OF CREATING GUILD IN THE GAME
      GUILDA1.png
      20.4 KB · Views: 30
    I speak in a complexity in relation to who can be allies (npc) example paula is part of the guild when to find not the battle battle for being of the same guida and in the training card appear the symbol of the guild ... cheaper items in the guild, trainings
     
    Idea:
    Try giving the player an item like a Guild Card. Make it a Key Item so the player cannot lose it. While the player has the card, he or she is considered a member of the guild.

    While the player has this card, guildmates will behave differently towards you. If Paula wants to train with a fellow guild member, they check to see if she has the Guild Card in her inventory. If she does, they accept her request for training. If she does not, they decline and turn her away.

    Like this:

    Code:
    Conditional Branch: Script: $PokemonBag.pbHasItem(:GUILDCARD)
       Text: Oh! You have the Guild Card. Of course I will battle.
    Else
       Text: You do not have the Guild Card. I won't battle you.
       Text: Sorry.
    Branch End


    https://www.pokecommunity.com/threads/420994

    The above link fowards to a thread that shows how to change the Trainer Card's graphic when a condition is met.

    I hope it helps some.
     
    Last edited:
    was more or less what I was thinking of putting a guild symbol on the coach card, I want to have advantages in being part of a guild I'll put training rooms per floor, and other things, thanks for helping to clarify the idea . the problem is going to be to change the trainer card ...
     
    Badges normally go on Trainer Cards. Maybe copy how they work in PScreen_TrainerCard? Under pbDrawTextPositions.
     
    I basically wanted it to look this way ...[PokeCommunity.com] IDEA OF CREATING GUILD IN THE GAME
    if anyone can help me leave the guild's coat of arms behind my character[PokeCommunity.com] IDEA OF CREATING GUILD IN THE GAME
     
    So I can't give a full answer because I don't exactly know what variables you have available. But I'll give it a shot anyway.
    under the badge loop code, above pbDrawImagePositions(overlay,imagePositions) put the following
    Code:
    guild=GUILD DETERMINING LINE HERE I DON'T KNOW HOW YOU SAVE WHAT GUILD THE PLAYER IS IN.
    imagePositions.push(["FILE LOCATION GOES HERE",336,112,guild*WIDTH OF ONE GUILD BACKGROUND CELL,0,WIDTH,HEIGHT]) if PLAYER IS IN A GUILD AT ALL

    Of course, you'll either need to replace my place holder stuff or give more details on how your game lays out some of its variables as well as the graphic istself before I can help further. You'll also need to play with the 336,112 as it's only an approximate location, and might need to be adjusted, as it's not the top left corner like it should be.
     
    Vendily, It was you who set up my trainer card.
     
    Last edited:
    I really like your idea, I'll try to do it, I hope to get it.
     
    So I can't give a full answer because I don't exactly know what variables you have available. But I'll give it a shot anyway.
    under the badge loop code, above pbDrawImagePositions(overlay,imagePositions) put the following
    Code:
    guild=GUILD DETERMINING LINE HERE I DON'T KNOW HOW YOU SAVE WHAT GUILD THE PLAYER IS IN.
    imagePositions.push(["FILE LOCATION GOES HERE",336,112,guild*WIDTH OF ONE GUILD BACKGROUND CELL,0,WIDTH,HEIGHT]) if PLAYER IS IN A GUILD AT ALL

    Of course, you'll either need to replace my place holder stuff or give more details on how your game lays out some of its variables as well as the graphic istself before I can help further. You'll also need to play with the 336,112 as it's only an approximate location, and might need to be adjusted, as it's not the top left corner like it should be.

    I wanted to leave between 3 guild options.
     
    Eu fiz o brasão do tamanho ideal que caiba no quadro do personagem no trainer card[PokeCommunity.com] IDEA OF CREATING GUILD IN THE GAME
     
    Inside 'PScreen_TrainerCard', 'def pbStartScene' add:
    Code:
        @sprites["guildicon"]=IconSprite.new(336,112,@viewport)
        @sprites["guildicon"].setBitmap("Graphics/Pictures/articuno") if $Trainer.PLAYER IS IN A GUILD AT ALL
        @sprites["guildicon"].setBitmap("Graphics/Pictures/zapdos") if $Trainer.PLAYER IS IN A GUILD AT ALL
        @sprites["guildicon"].setBitmap("Graphics/Pictures/moltres") if $Trainer.PLAYER IS IN A GUILD AT ALL
        @sprites["guildicon"].z = 2    
        @sprites["trainer"] = IconSprite.new(336,112,@viewport)
        @sprites["trainer"].setBitmap(pbPlayerSpriteFile($Trainer.trainertype))    
        @sprites["trainer"].x -= (@sprites["trainer"].bitmap.width-128)/2
        @sprites["trainer"].y -= (@sprites["trainer"].bitmap.height-128) - 8
        @sprites["trainer"].z = 2
    Example.
    You may need to adjust its x (336) and y(112) to put into the square.
    X<0 = to the left; X>0 = to the right; Y>0=downside; Y<0=upside.

    In my case, '@sprites["guildicon"]=IconSprite.new(326,89,@viewport)'.
     
    Last edited:
    Dude that's what I want !!!! No meu caso, '@sprites ["guildicon"] = IconSprite.new (326,89, @ viewport)' .
     
    Last edited:
    Code:
    class PokemonTrainerCardScene
      def update
        pbUpdateSpriteHash(@sprites)
      end
    
      def pbStartScene
        @sprites={}
        @viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
        @viewport.z=99999
        background=pbResolveBitmap(sprintf("Graphics/Pictures/trainercardbgf"))
        if $Trainer.isFemale? && background
          addBackgroundPlane(@sprites,"bg","trainercardbgf",@viewport)
        else
          addBackgroundPlane(@sprites,"bg","trainercardbg",@viewport)
        end
        cardexists=pbResolveBitmap(sprintf("Graphics/Pictures/trainercardf"))
        @sprites["card"]=IconSprite.new(0,0,@viewport)
        if $Trainer.isFemale? && cardexists
          @sprites["card"].setBitmap("Graphics/Pictures/trainercardf")
        else
          @sprites["card"].setBitmap("Graphics/Pictures/trainercard")
        end
        @sprites["overlay"]=BitmapSprite.new(Graphics.width,Graphics.height,@viewport)
        @sprites["trainer"]=IconSprite.new(336,98,@viewport)
        @sprites["trainer"].setBitmap(pbPlayerSpriteFile($Trainer.trainertype))
        @sprites["trainer"].x-=(@sprites["trainer"].bitmap.width-128)/2
        @sprites["trainer"].y-=(@sprites["trainer"].bitmap.height-128)
        @sprites["trainer"].z=2
        pbSetSystemFont(@sprites["overlay"].bitmap)
        pbDrawTrainerCardFront
        if $PokemonGlobal.trainerRecording
          $PokemonGlobal.trainerRecording.play
        end
        pbFadeInAndShow(@sprites) { update }
      end
    
      def pbDrawTrainerCardFront
        overlay=@sprites["overlay"].bitmap
        overlay.clear
        totalsec = Graphics.frame_count / Graphics.frame_rate
        hour = totalsec / 60 / 60
        min = totalsec / 60 % 60
        time=_ISPRINTF("{1:02d}:{2:02d}",hour,min)
        $PokemonGlobal.startTime=pbGetTimeNow if !$PokemonGlobal.startTime
        starttime=_ISPRINTF("{1:s} {2:d}, {3:d}",
           pbGetAbbrevMonthName($PokemonGlobal.startTime.mon),
           $PokemonGlobal.startTime.day,
           $PokemonGlobal.startTime.year)
        pubid=sprintf("%05d",$Trainer.publicID($Trainer.id))
        baseColor=Color.new(248,248,248)
        shadowColor=Color.new(72,80,88)
        textPositions=[
           [_INTL("Name"),34,51,0,baseColor,shadowColor],
           [_INTL("{1}",$Trainer.name),302,51,1,baseColor,shadowColor],
           [_INTL("ID No."),332,51,0,baseColor,shadowColor],
           [_INTL("{1}",pubid),468,51,1,baseColor,shadowColor],
           [_INTL("Money"),34,98,0,baseColor,shadowColor],
           [_INTL("${1}",$Trainer.money),302,98,1,baseColor,shadowColor],
           [_INTL("Pokédex"),34,148,0,baseColor,shadowColor],
           [_ISPRINTF("{1:d}/{2:d}",$Trainer.pokedexOwned,$Trainer.pokedexSeen),302,148,1,baseColor,shadowColor],
           [_INTL("Time"),34,194,0,baseColor,shadowColor],
           [time,302,194,1,baseColor,shadowColor],
        ]
        pbDrawTextPositions(overlay,textPositions)
        x=72 # x coordinate of left most badge slot
        y=243 # y coordinate of top most badge slot
        imagePositions=[]
        for i in 0...3 #change 3 to total number of regions
          for j in 0...8
            if $Trainer.badges[j+i*8]
              imagePositions.push(["Graphics/Pictures/badges",x,y,j*32,i*32,32,32])
            end
            x+=48 # distance between the top left corners of two badge slots beside each other
          end
          x=72
          y+=38 # distance between the top left corners of two badge slots on top of each other
        end
        pbDrawImagePositions(overlay,imagePositions)
      end
    
      def pbTrainerCard
        loop do
          Graphics.update
          Input.update
          self.update
          if Input.trigger?(Input::B)
            break
          end
        end 
      end
    
      def pbEndScene
        pbFadeOutAndHide(@sprites) { update }
        pbDisposeSpriteHash(@sprites)
        @viewport.dispose
      end
    end
    
    
    
    class PokemonTrainerCard
      def initialize(scene)
        @scene=scene
      end
    
      def pbStartScreen
        @scene.pbStartScene
        @scene.pbTrainerCard
        @scene.pbEndScene
      end
    end
     
    What??? Follow the step than i sent: above '@sprites["trainer"]=IconSprite.new(336,98,@viewport)', paste what i wrote:
    Code:
        @sprites["guildicon"]=IconSprite.new(326,89,@viewport)
        @sprites["guildicon"].setBitmap("Graphics/Pictures/articuno") if $Trainer.PLAYER IS IN A GUILD AT ALL
        @sprites["guildicon"].setBitmap("Graphics/Pictures/zapdos") if $Trainer.PLAYER IS IN A GUILD AT ALL
        @sprites["guildicon"].setBitmap("Graphics/Pictures/moltres") if $Trainer.PLAYER IS IN A GUILD AT ALL
        @sprites["guildicon"].z = 2
     
    Last edited:
    Guys excuse my ignorance, but I must do something wrong ... can you see what I can be doing? I created an item called a guildcard and I also edited the script, but I think there is something wrong
     
    Back
    Top