Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.

Closed Thread
 
Thread Tools
  #9601    
Old January 4th, 2012 (5:23 AM).
thepsynergist's Avatar
thepsynergist thepsynergist is offline
A Gym Leader, Kyushu Region
     
    Join Date: Mar 2009
    Location: California, USA
    Age: 27
    Gender: Male
    Nature: Adamant
    Posts: 748
    Hey guys, I've a question for you all.

    I'm trying to make a push block puzzle for Pokemon Pyrite, and I've hit a bit of a snag.

    I have a block that is set to Event Touch, and an event that tells it to move away from the player by one square. This works great but for one thing. When I am up against a wall, and I continue to push it, it stays there. This is what I want it to do, but, when I move away from it, up or down for example, it then moves away from me.

    This can be problematic, as this means you could push the block when its stuck in a corner.

    Any thoughts?
    __________________




    Pokemon Pyrite is now complete, check out the trailer/download link here: https://www.youtube.com/watch?v=X6g5pXPXyV4

    Relevant Advertising!

      #9602    
    Old January 4th, 2012 (1:54 PM).
    Ratty524's Avatar
    Ratty524 Ratty524 is offline
       
      Join Date: Jan 2011
      Gender: Male
      Nature: Calm
      Posts: 303
      Hello. For my game, I am trying to give the player a starter that is holding an Oran Berry. When I attempted it, following the wiki, I got this error:
      Code:
      ---------------------------
      Pokemon PC Version
      ---------------------------
      Exception: RuntimeError
      
      Message: Script error within event 14, map 89 (lecture1):
      
      Exception: SyntaxError
      
      Message: (eval):4:in `pbExecuteScript'compile error
      (eval):2: syntax error
      (PBSpecies::TADOLEDON,5,$Trainer) 
                              ^
      
      ***Line '(PBSpecies::TADOLEDON,5,$Trainer)' shouldn't begin with '(', try
      
      putting '(' at the end of the last line
      
      ***Full script:
      
      poke=PokeBattle_Pokemon.new
      (PBSpecies::TADOLEDON,5,$Trainer) 
      poke.item=PBItems::ORANBERRY
      pbAddToParty(poke)
      
      
      
      
      Interpreter:275:in `pbExecuteScript'
      
      Interpreter:1592:in `command_355'
      
      Interpreter:493:in `execute_command'
      
      Interpreter:193:in `update'
      
      Interpreter:106:in `loop'
      
      Interpreter:198:in `update'
      
      Scene_Map:103:in `update'
      
      Scene_Map:101:in `loop'
      
      Scene_Map:114:in `update'
      
      Scene_Map:68:in `main'
      
      
      
      This exception was logged in 
      
      C:\Users\Jordan\Saved Games/Pokemon PC Version/errorlog.txt.
      
      Press Ctrl+C to copy this message to the clipboard.
      ---------------------------
      OK   
      ---------------------------

      This is the exact script I have in the event:
      Code:
      poke=PokeBattle_Pokemon.new
      (PBSpecies::TADOLEDON,5,$Trainer) 
      poke.item=PBItems::ORANBERRY
      pbAddToParty(poke)
      Did I do something wrong here? D:
        #9603    
      Old January 4th, 2012 (2:22 PM).
      Maruno's Avatar
      Maruno Maruno is offline
      Lead Dev of Pokémon Essentials
         
        Join Date: Jan 2008
        Location: England
        Posts: 5,171
        Quote:
        Originally Posted by Ratty524 View Post
        Hello. For my game, I am trying to give the player a starter that is holding an Oran Berry. When I attempted it, following the wiki, I got this error:
        Code:
        ---------------------------
        Pokemon PC Version
        ---------------------------
        Exception: RuntimeError
        Message: Script error within event 14, map 89 (lecture1):
        Exception: SyntaxError
        Message: (eval):4:in `pbExecuteScript'compile error
        (eval):2: syntax error  (PBSpecies::TADOLEDON,5,$Trainer) 
                                ^
        ***Line '(PBSpecies::TADOLEDON,5,$Trainer)' shouldn't begin with '(', try
        putting '(' at the end of the last line
        
        ***Full script:
        poke=PokeBattle_Pokemon.new
        (PBSpecies::TADOLEDON,5,$Trainer) 
        poke.item=PBItems::ORANBERRY
        pbAddToParty(poke)
        
        Interpreter:275:in `pbExecuteScript'
        Interpreter:1592:in `command_355'
        Interpreter:493:in `execute_command'
        Interpreter:193:in `update'
        Interpreter:106:in `loop'
        Interpreter:198:in `update'
        Scene_Map:103:in `update'
        Scene_Map:101:in `loop'
        Scene_Map:114:in `update'
        Scene_Map:68:in `main'
        
        This exception was logged in
        C:\Users\Jordan\Saved Games/Pokemon PC Version/errorlog.txt.
        Press Ctrl+C to copy this message to the clipboard.
        ---------------------------
        OK   
        ---------------------------
        This is the exact script I have in the event:
        Code:
        poke=PokeBattle_Pokemon.new
        (PBSpecies::TADOLEDON,5,$Trainer) 
        poke.item=PBItems::ORANBERRY
        pbAddToParty(poke)
        Did I do something wrong here? D:
        The error message you deftly posted contains both the error, cause and solution. I would say what you did wrong was not read it.
        __________________
        Go to the Pokémon Essentials Wiki

        | Downloads | Tutorials | Fangames |
        | All Animations Project |

        Follow me on Twitter: @maruno42


          #9604    
        Old January 4th, 2012 (3:51 PM).
        Ratty524's Avatar
        Ratty524 Ratty524 is offline
           
          Join Date: Jan 2011
          Gender: Male
          Nature: Calm
          Posts: 303
          It's not that I didn't read it, is that usually when I get that message, there is something more fundamentally wrong with the way I called the script. Anyway, I removed the parenthesis at the beginning, and got another syntax error:
          Code:
          ---------------------------
          Pokemon PC Version
          ---------------------------
          Exception: RuntimeError
          
          Message: Script error within event 14, map 89 (lecture1):
          
          Exception: SyntaxError
          
          Message: (eval):2:in `pbExecuteScript'compile error
          (eval):2: syntax error
          PBSpecies::TADOLEDON,5,$Trainer) 
                                 ^
          
          ***Full script:
          
          poke=PokeBattle_Pokemon.new
          PBSpecies::TADOLEDON,5,$Trainer) 
          poke.item=PBItems::ORANBERRY
          pbAddToParty(poke)
          
          
          
          
          Interpreter:275:in `pbExecuteScript'
          
          Interpreter:1592:in `command_355'
          
          Interpreter:493:in `execute_command'
          
          Interpreter:193:in `update'
          
          Interpreter:106:in `loop'
          
          Interpreter:198:in `update'
          
          Scene_Map:103:in `update'
          
          Scene_Map:101:in `loop'
          
          Scene_Map:114:in `update'
          
          Scene_Map:68:in `main'
          
          
          
          This exception was logged in 
          
          C:\Users\Jordan\Saved Games/Pokemon PC Version/errorlog.txt.
          
          Press Ctrl+C to copy this message to the clipboard.
          ---------------------------
          OK   
          ---------------------------
            #9605    
          Old January 4th, 2012 (4:20 PM). Edited January 4th, 2012 by Nickalooose.
          Nickalooose Nickalooose is offline
          --------------------
             
            Join Date: Mar 2008
            Gender: Female
            Posts: 1,309
            Quote:
            Originally Posted by Ratty524 View Post
            It's not that I didn't read it, is that usually when I get that message, there is something more fundamentally wrong with the way I called the script. Anyway, I removed the parenthesis at the beginning, and got another syntax error:
            Code:
            ---------------------------
            Pokemon PC Version
            ---------------------------
            Exception: RuntimeError
            Message: Script error within event 14, map 89 (lecture1):
            Exception: SyntaxError
            Message: (eval):2:in `pbExecuteScript'compile error
            (eval):2: syntax error
            PBSpecies::TADOLEDON,5,$Trainer) 
                                   ^
            ***Full script:
            poke=PokeBattle_Pokemon.new
            PBSpecies::TADOLEDON,5,$Trainer) 
            poke.item=PBItems::ORANBERRY
            pbAddToParty(poke)
            Interpreter:275:in `pbExecuteScript'
            Interpreter:1592:in `command_355'
            Interpreter:493:in `execute_command'
            Interpreter:193:in `update'
            Interpreter:106:in `loop'
            Interpreter:198:in `update'
            Scene_Map:103:in `update'
            Scene_Map:101:in `loop'
            Scene_Map:114:in `update'
            Scene_Map:68:in `main'
            This exception was logged in 
            C:\Users\Jordan\Saved Games/Pokemon PC Version/errorlog.txt.
            Press Ctrl+C to copy this message to the clipboard.
            OK
            The highlighted red needs to be;

            poke=PokeBattle_Pokemon.new(
            PBSpecies::TADOLEDON,5,$Trainer)
            poke.item=PBItems::ORANBERRY
            pbAddToParty(poke)

            notice where the bracket starts... The error itself soley explains, as Maruno so nicely said... Again, all you needed to do was READ the error... Although error messages are quite cryptic, the solution is sometimes within the error, I fix LOTS of my errors by reading them. x
              #9606    
            Old January 4th, 2012 (4:46 PM). Edited January 4th, 2012 by Ratty524.
            Ratty524's Avatar
            Ratty524 Ratty524 is offline
               
              Join Date: Jan 2011
              Gender: Male
              Nature: Calm
              Posts: 303
              Quote:
              Originally Posted by Nickalooose View Post
              The highlighted red needs to be;

              poke=PokeBattle_Pokemon.new(
              PBSpecies::TADOLEDON,5,$Trainer)
              poke.item=PBItems::ORANBERRY
              pbAddToParty(poke)

              notice where the bracket starts... The error itself soley explains, as Maruno so nicely said... Again, all you needed to do was READ the error... Although error messages are quite cryptic, the solution is sometimes within the error, I fix LOTS of my errors by reading them. x
              Isn't that back to what I originally did? Anyway, I'll try that.
              EDIT: It actually worked. It's weird, though. So it makes a difference if the bracket starts at the top line as oppose to the same one as pbwhatever. When the error states "Line '(PBSpecies::TADOLEDON,5,$Trainer)' shouldn't begin with '('" I figured it meant that I was to move the beginning bracket to the last line on the bottom and the beginning bracket shouldn't be before PB at all.
                #9607    
              Old January 4th, 2012 (7:56 PM). Edited January 5th, 2012 by Ho-oh 112.
              Ho-oh 112's Avatar
              Ho-oh 112 Ho-oh 112 is offline
              Advance Scripter
                 
                Join Date: Feb 2011
                Age: 21
                Gender: Male
                Nature: Hasty
                Posts: 311
                Ok, a new one.... The Pokemon/levels get screwed up after it reaches 100+ (3 digits)


                Spoiler:
                def pbWriteGift
                shiny = 1 # shiny 1 anything else no
                form = 0 # which form it is
                species=pbChooseSpecies(1)
                if species!=0
                Kernel.pbMessage(_INTL("{1}", species))
                params=ChooseNumberParams.new
                params.setRange(1,PBExperience::MAXLEVEL)
                params.setInitialValue(5)
                params.setCancelValue(0)
                level=Kernel.pbMessageChooseNumber(
                _INTL("Set the Pokémon's level."),params)
                if level>0
                end
                end
                dat1=[species, level, shiny, form]
                dat2=dat1.pack("CvM^*07")
                filename="Gifts/Gift.MG"
                File.open(filename,"wb"){|f|
                f.write(i)
                f.write(dat2)
                }
                end

                def pbLoadMGift
                data = nil
                if $Trainer.party.length==6
                Kernel.pbMessage(_INTL("Sorry, you have 6 pokemon in the party."))
                return
                end
                File.open("Gifts/Gift.MG","rb"){|f|
                data=f.read
                }
                if data == nil
                Kernel.pbMessage(_INTL("Data is corrupt."))
                return false
                end
                # decompiles
                species=dat[0]
                level=dat[1]
                shiny=dat[2]
                form=dat[3]
                # checks
                if level > PBExperience::MAXLEVEL || level < 0
                Kernel.pbMessage(_INTL("gift is corrupt. {1}", level))
                return false
                end
                if species > 493 || species < 0
                Kernel.pbMessage(_INTL("Gift is corrupt. {1}", species))
                return false
                end
                # the gift passed
                Kernel.pbMessage(_INTL("A gift was found"))
                p=PokeBattle_Pokemon.new(species,level,$Trainer)
                p.form = form
                if shiny = 2
                p.makeShiny
                end
                pbAddToParty(p)
                end

                  #9608    
                Old January 5th, 2012 (9:22 AM).
                Maruno's Avatar
                Maruno Maruno is offline
                Lead Dev of Pokémon Essentials
                   
                  Join Date: Jan 2008
                  Location: England
                  Posts: 5,171
                  Quote:
                  Originally Posted by Ratty524 View Post
                  Isn't that back to what I originally did? Anyway, I'll try that.
                  EDIT: It actually worked. It's weird, though. So it makes a difference if the bracket starts at the top line as oppose to the same one as pbwhatever. When the error states "Line '(PBSpecies::TADOLEDON,5,$Trainer)' shouldn't begin with '('" I figured it meant that I was to move the beginning bracket to the last line on the bottom and the beginning bracket shouldn't be before PB at all.
                  I pre-empted your confusion, and changed that error message in future versions to be a bit clearer.

                  The opening bracket tells the game to expect some parameters, so it looks to the next line to find them, rather than assume the next line is a separate command in itself. It will only stop looking for parameters once it hits the closing bracket at the end of the second line. In effect, it treats the two lines as one as required.

                  Or, y'know, use the Extend Text thingy.
                  __________________
                  Go to the Pokémon Essentials Wiki

                  | Downloads | Tutorials | Fangames |
                  | All Animations Project |

                  Follow me on Twitter: @maruno42


                    #9609    
                  Old January 5th, 2012 (9:35 AM).
                  Maruno's Avatar
                  Maruno Maruno is offline
                  Lead Dev of Pokémon Essentials
                     
                    Join Date: Jan 2008
                    Location: England
                    Posts: 5,171
                    Line 87, which reads File.open(Gifts/Gift.MG,"rb"){|f|. Put quote marks around "Gifts/Gift.MG" like I just did.

                    I may just be reading this wrong, but it looks like your pbWriteGift will end up writing the details of the gift Pokémon over 8 million times (899*8999). I can't help but think that's not right.

                    Finally, one of your checks is
                    if @level < 101 || @level < 0
                    , when it probably should be if @level > PBExperience::MAXLEVEL || @level < 0. And you don't need PBSpecies:: when adding the new Pokémon, because species is a number.

                    Just a few observations.
                    __________________
                    Go to the Pokémon Essentials Wiki

                    | Downloads | Tutorials | Fangames |
                    | All Animations Project |

                    Follow me on Twitter: @maruno42


                      #9610    
                    Old January 5th, 2012 (9:48 AM).
                    Ho-oh 112's Avatar
                    Ho-oh 112 Ho-oh 112 is offline
                    Advance Scripter
                       
                      Join Date: Feb 2011
                      Age: 21
                      Gender: Male
                      Nature: Hasty
                      Posts: 311
                      Quote:
                      Originally Posted by Maruno View Post
                      Line 87, which reads File.open(Gifts/Gift.MG,"rb"){|f|. Put quote marks around "Gifts/Gift.MG" like I just did.

                      I may just be reading this wrong, but it looks like your pbWriteGift will end up writing the details of the gift Pokémon over 8 million times (899*8999). I can't help but think that's not right.

                      Finally, one of your checks is
                      if @level < 101 || @level < 0
                      , when it probably should be if @level > PBExperience::MAXLEVEL || @level < 0. And you don't need PBSpecies:: when adding the new Pokémon, because species is a number.

                      Just a few observations.
                      Wow lot's of errors, anyways I'll try them.
                        #9611    
                      Old January 5th, 2012 (11:17 AM).
                      Ratty524's Avatar
                      Ratty524 Ratty524 is offline
                         
                        Join Date: Jan 2011
                        Gender: Male
                        Nature: Calm
                        Posts: 303
                        Quote:
                        Originally Posted by Maruno View Post
                        I pre-empted your confusion, and changed that error message in future versions to be a bit clearer.

                        The opening bracket tells the game to expect some parameters, so it looks to the next line to find them, rather than assume the next line is a separate command in itself. It will only stop looking for parameters once it hits the closing bracket at the end of the second line. In effect, it treats the two lines as one as required.

                        Or, y'know, use the Extend Text thingy.
                        Oooh-kay. It's helpful that I understand how the compiler is reading these things, thank you.
                          #9612    
                        Old January 5th, 2012 (11:38 AM).
                        Nickalooose Nickalooose is offline
                        --------------------
                           
                          Join Date: Mar 2008
                          Gender: Female
                          Posts: 1,309
                          I have a 2 questions... not sure if this one is supposed to be here;
                          my extendtext.exe, doesn't want to work! Any reasons why, you think?
                          It doesn't do anything with a text box open... For those smart asses out there haha!

                          Also, I'm trying to do and learn something new! Learning the way Abillities and Moves work, by checking how to read .txt files, but I can't seem to get my game to read the text within my .txt file, and print in-game...

                          I have my file, I add which ever name to my pokemon.txt file, it does absolutely nothing, but if I remove my .txt file, it errors because it can't find said name in suchandsuch.txt...? And the new line within pokemon.txt causes an error due to an extra "unneccassary" line... So to speak! Any help on how this works is well apprechiated. X
                            #9613    
                          Old January 5th, 2012 (12:16 PM).
                          Maruno's Avatar
                          Maruno Maruno is offline
                          Lead Dev of Pokémon Essentials
                             
                            Join Date: Jan 2008
                            Location: England
                            Posts: 5,171
                            Quote:
                            Originally Posted by Nickalooose View Post
                            I have a 2 questions... not sure if this one is supposed to be here;
                            my extendtext.exe, doesn't want to work! Any reasons why, you think?
                            It doesn't do anything with a text box open... For those smart asses out there haha!
                            Simply double-clicking extendtext.exe while a text box or script box in RMXP is open should work. I don't know why it isn't, unless you're missing out some important piece of information (but I don't even know what that might be).


                            Quote:
                            Originally Posted by Nickalooose View Post
                            Also, I'm trying to do and learn something new! Learning the way Abillities and Moves work, by checking how to read .txt files, but I can't seem to get my game to read the text within my .txt file, and print in-game...

                            I have my file, I add which ever name to my pokemon.txt file, it does absolutely nothing, but if I remove my .txt file, it errors because it can't find said name in suchandsuch.txt...? And the new line within pokemon.txt causes an error due to an extra "unneccassary" line... So to speak! Any help on how this works is well apprechiated. X
                            Abilities/moves/items/Pokémon/etc. are defined by writing them in the PBS files. When the game is compiled, it reads this information, converts it into another form it can use later on, and writes it to one (or more) of the VCD files in the Data folder. When running the game, it is actually using these VCD files to get the required information about a move or ability.

                            Now, that will only define a "thing" in the game (e.g. Quick Feet is a "thing" it calls an "ability"). It does not define what a particular "thing" actually does (i.e. what the effect of Quick Feet is). Those effects need to be scripted, and are not part of the PBS files.

                            The PBS files need to remain where they are, because they are checked whenever the game is run from RMXP to see if they've changed. If they've changed, the game recompiles itself. If it can't find a PBS file in the first place, it throws a wobbly.

                            What the game does when it compiles (i.e. how it moves information around) is very complicated, and easy to muck up. I don't like to touch it, and I'm running the kit!

                            That's all just for your interest.

                            You've been unhelpfully non-specific in what you've been trying to add, and what errors you end up with. The best I can guess is that you're trying to give a Pokémon a new move or ability, but it's saying such a move/ability doesn't exist. You need to define them in their respective PBS files as well. You can't just type "GIGADRILLBREAKER" into a Pokémon's moveset and expect it to work - what makes Giga Drill Breaker a move is being defined in moves.txt.

                            When the game is compiled, there is a specific order to which PBS files are compiled. Moves are compiled before Pokémon (for instance), because the latter depends on having an up-to-date former. First Giga Drill Breaker becomes a "thing" known as a "move", and then the Pokémon are compiled where the moves are checked for the existence of a move called Giga Drill Breaker.

                            Basically, define your "things" in the appropriate PBS files first (moves in moves.txt, etc.), and then assign moves/abilities to particular Pokémon species (in pokemon.txt).
                            __________________
                            Go to the Pokémon Essentials Wiki

                            | Downloads | Tutorials | Fangames |
                            | All Animations Project |

                            Follow me on Twitter: @maruno42


                              #9614    
                            Old January 5th, 2012 (1:01 PM).
                            Nickalooose Nickalooose is offline
                            --------------------
                               
                              Join Date: Mar 2008
                              Gender: Female
                              Posts: 1,309
                              Quote:
                              Originally Posted by Maruno View Post
                              Simply double-clicking extendtext.exe while a text box or script box in RMXP is open should work. I don't know why it isn't, unless you're missing out some important piece of information (but I don't even know what that might be).



                              Abilities/moves/items/Pokémon/etc. are defined by writing them in the PBS files. When the game is compiled, it reads this information, converts it into another form it can use later on, and writes it to one (or more) of the VCD files in the Data folder. When running the game, it is actually using these VCD files to get the required information about a move or ability.

                              Now, that will only define a "thing" in the game (e.g. Quick Feet is a "thing" it calls an "ability"). It does not define what a particular "thing" actually does (i.e. what the effect of Quick Feet is). Those effects need to be scripted, and are not part of the PBS files.

                              The PBS files need to remain where they are, because they are checked whenever the game is run from RMXP to see if they've changed. If they've changed, the game recompiles itself. If it can't find a PBS file in the first place, it throws a wobbly.

                              What the game does when it compiles (i.e. how it moves information around) is very complicated, and easy to muck up. I don't like to touch it, and I'm running the kit!

                              That's all just for your interest.

                              You've been unhelpfully non-specific in what you've been trying to add, and what errors you end up with. The best I can guess is that you're trying to give a Pokémon a new move or ability, but it's saying such a move/ability doesn't exist. You need to define them in their respective PBS files as well. You can't just type "GIGADRILLBREAKER" into a Pokémon's moveset and expect it to work - what makes Giga Drill Breaker a move is being defined in moves.txt.

                              When the game is compiled, there is a specific order to which PBS files are compiled. Moves are compiled before Pokémon (for instance), because the latter depends on having an up-to-date former. First Giga Drill Breaker becomes a "thing" known as a "move", and then the Pokémon are compiled where the moves are checked for the existence of a move called Giga Drill Breaker.

                              Basically, define your "things" in the appropriate PBS files first (moves in moves.txt, etc.), and then assign moves/abilities to particular Pokémon species (in pokemon.txt).
                              I figured it's this stupid laptop, Windows Vista, I hate the program, I prefer XP... Anyways...

                              Okay, say for arguments sake, I want;

                              Spoiler:

                              [1]
                              Name=BULBASAUR
                              InternalName=BULBASAUR
                              Kind=SEED
                              Pokedex=BULBASAUR can be seen napping in bright sunlight. There is a seed on its back. By soaking up the sun's rays, the seed grows progressively larger.
                              Type1=GRASS
                              Type2=POISON
                              BaseStats=45,49,49,45,65,65
                              Rareness=45
                              BaseEXP=64
                              Happiness=70
                              GrowthRate=Parabolic
                              StepsToHatch=5120
                              Color=Green
                              Habitat=Grassland
                              EffortPoints=0,0,0,0,1,0
                              Abilities=OVERGROW
                              Likes=RUNNING
                              Compatibility=1,7
                              Height=0.7
                              Weight=6.9
                              GenderRate=FemaleOneEighth
                              Moves=1,TACKLE,4,GROWL,7,LEECHSEED,10,VINEWHIP
                              EggMoves=LIGHTSCREEN,SKULLBASH,SAFEGUARD,CHARM
                              Evolutions=IVYSAUR,Level,16
                              BattlerPlayerY=17
                              BattlerEnemyY=15
                              BattlerAltitude=0


                              Then, within a text file called, likes.txt, it looks somewhat like this

                              1,RUNNING,Running,The Pokemon may attack first.
                              2,BANANAS,Bananas,The Pokemon may become confused.
                              3,SOCKS,Socks,The Pokemon will defrost itself if frozen.


                              I know adding Abillities is a pain, and you say make edits of already scripted abillities if you are goin to add any... So using how Quick Attack would work would be how this is easily scripted obviously with some edit so the Pokémon doesn't always attack first... But the problem I am getting, everything compiles and errors correctly, if RUNNING is spelt wrong or .txt file is missing, but the game itself, is not registering the info about the "thing" or the name, within the Pokédex and the move itself doesn't do anything... For the Pokédex thing, i literally just replaced the "Abillity" scripts with "Likes" info to check if this works, but nothin comes up, if I rename my likes.txt, to abillities.txt... It works! X
                                #9615    
                              Old January 5th, 2012 (1:39 PM).
                              Maruno's Avatar
                              Maruno Maruno is offline
                              Lead Dev of Pokémon Essentials
                                 
                                Join Date: Jan 2008
                                Location: England
                                Posts: 5,171
                                You're trying to do what I feared you might be trying to do: create a new "thing".

                                The effects of these Likes aren't important, and can be scripted just fine. That would be the very very easy part.

                                PBS files aren't things you just write and they'll be compiled just because they're in the PBS folder. Search the scripts for "pokemon.txt", and you'll see it mentioned in the Compiler script section. The scripts know beforehand which PBS files it expects, and there are extensive scripts that deal with them and do the compiling. Any files in the PBS folder that it doesn't expect aren't looked at at all.

                                The same goes for lines within pokemon.txt. The scripts don't say what to do with a line beginning "Likes=", so it ignores that line. The information in the Likes line is never compiled and saved elsewhere for actual use. You can write whatever nonsense you want in pokemon.txt, but the only lines that are actually looked at are the ones beginning "blah=", where "blah" are the words in the tables in the wiki's Defining a species page.

                                You can add some code to make the game recognise a "Likes=" line, and say what to do with the information therein. However, this requires that the information is meaningful (a number or an already-defined "thing"), and that you also know the data structure of a Pokémon species to make sure you save the information correctly and in the right format. You would then need to load the appropriate information later on using this knowledge, and find the appropriate sub-information (i.e. the description based on the ID number), and then display it/use it to determine an effect. That's at the very least. If you want to define a new "thing" for Likes, that's a whole new and much larger kettle of fish in itself.

                                The reason you got something to work when you renamed "likes.txt" to "abilities.txt" is because the game decided that Bananas and Socks were abilities, and you just happened to use the same PBS data structure to "define" them. That's not a sign that you've done anything right, just that you can edit the list of possible abilities (which frankly, isn't hard).

                                My point is that there's a lot more involved than you think, and you shouldn't be trying to do anything like this. At all. It's way too easy to mess up, even for me who just explained all this.
                                __________________
                                Go to the Pokémon Essentials Wiki

                                | Downloads | Tutorials | Fangames |
                                | All Animations Project |

                                Follow me on Twitter: @maruno42


                                  #9616    
                                Old January 5th, 2012 (2:20 PM).
                                Cilerba Cilerba is offline
                                the hearts of lonely people
                                • Silver Tier
                                 
                                Join Date: Feb 2010
                                Location: Massachusetts
                                Age: 20
                                Gender: Male
                                Nature: Quiet
                                Posts: 1,171
                                @Ho-oh 112 - I've moved your thread into the Essentials thread, where it belongs. Post one more thing in the wrong section and it'll just get locked.
                                __________________
                                  #9617    
                                Old January 5th, 2012 (2:30 PM).
                                Nickalooose Nickalooose is offline
                                --------------------
                                   
                                  Join Date: Mar 2008
                                  Gender: Female
                                  Posts: 1,309
                                  Spoiler:
                                  Quote:
                                  Originally Posted by Maruno View Post
                                  You're trying to do what I feared you might be trying to do: create a new "thing".

                                  The effects of these Likes aren't important, and can be scripted just fine. That would be the very very easy part.

                                  PBS files aren't things you just write and they'll be compiled just because they're in the PBS folder. Search the scripts for "pokemon.txt", and you'll see it mentioned in the Compiler script section. The scripts know beforehand which PBS files it expects, and there are extensive scripts that deal with them and do the compiling. Any files in the PBS folder that it doesn't expect aren't looked at at all.

                                  The same goes for lines within pokemon.txt. The scripts don't say what to do with a line beginning "Likes=", so it ignores that line. The information in the Likes line is never compiled and saved elsewhere for actual use. You can write whatever nonsense you want in pokemon.txt, but the only lines that are actually looked at are the ones beginning "blah=", where "blah" are the words in the tables in the wiki's Defining a species page.

                                  You can add some code to make the game recognise a "Likes=" line, and say what to do with the information therein. However, this requires that the information is meaningful (a number or an already-defined "thing"), and that you also know the data structure of a Pokémon species to make sure you save the information correctly and in the right format. You would then need to load the appropriate information later on using this knowledge, and find the appropriate sub-information (i.e. the description based on the ID number), and then display it/use it to determine an effect. That's at the very least. If you want to define a new "thing" for Likes, that's a whole new and much larger kettle of fish in itself.

                                  The reason you got something to work when you renamed "likes.txt" to "abilities.txt" is because the game decided that Bananas and Socks were abilities, and you just happened to use the same PBS data structure to "define" them. That's not a sign that you've done anything right, just that you can edit the list of possible abilities (which frankly, isn't hard).

                                  My point is that there's a lot more involved than you think, and you shouldn't be trying to do anything like this. At all. It's way too easy to mess up, even for me who just explained all this.


                                  I see, it was deffinatly worth the question I think! I did think it would be hard, but to learn is to play, I think... But, nevertheless, it was an idea I had, and decided to attempt! If yourself would'nt attempt this, I think I should'nt
                                    #9618    
                                  Old January 5th, 2012 (5:27 PM).
                                  1ninjadude1701's Avatar
                                  1ninjadude1701 1ninjadude1701 is offline
                                     
                                    Join Date: Oct 2008
                                    Age: 21
                                    Gender: Male
                                    Nature: Quiet
                                    Posts: 202
                                    How do i create a Rival Trainer and then a Battle?
                                    __________________
                                    Spartan ID




                                    My new pokemon rp

                                    http://pokemonchallengersrp.proboards.com/index.cgi

                                    Join if you like a challenge.
                                    Closed Thread
                                    Quick Reply

                                    Sponsored Links
                                    Thread Tools

                                    Posting Rules
                                    You may not post new threads
                                    You may not post replies
                                    You may not post attachments
                                    You may not edit your posts

                                    BB code is On
                                    Smilies are On
                                    [IMG] code is On
                                    HTML code is Off

                                    Forum Jump


                                    All times are GMT -8. The time now is 4:08 PM.