• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

[Archive] Pokemon Essentials: Starter Kit for RPG Maker XP

Status
Not open for further replies.

Cilerba

the hearts of lonely people
1,162
Posts
14
Years
  • Is there a way to check if a player has a Pokémon that's a certain type in their party?
    For example, an NPC that checks if the player has any Rock-type Pokémon in his/her party.
     

    Curt200718

    Intermediate Game Developer
    87
    Posts
    16
    Years
  • Maruno posted a fix to that a LONG time ago. I guess you weren't kidding when you said "long time no see." Anyways, it was added to the wiki to make it easier to find. Look under the Data box section on that page. And Poccils site has been down for a long time (I'm assuming he didn't get enough donations yet).

    Ah I will have to take a good look through the material there...yes i have been away for over 1 year..

    Thanks a huge amount for the post...i got the addition added :)
     

    IceGod64

    In the Lost & Found bin!
    624
    Posts
    15
    Years
  • 1: How do I count the number of able Pokemon?

    2: I'm trying to make a variable that's basically a step counter that only counts while you're moving and resets to 0 if you stop or turn (Reason being is to allow for the bicycle to accelerate). And tips?

    3: Still having my HM issue from before. I have an array set up with all the moves I want to be able to be substituted for cut, but I don't know how to utilize that array.

    4: Not really an essentials question, but more a question of Pokemon design in general, IV's no longer are used in my game, but are still there. Any opinions on what might be cool to do with those 6 random numbers of 0-31 that are useless as of now?
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen today
    1: How do I count the number of able Pokemon?

    2: I'm trying to make a variable that's basically a step counter that only counts while you're moving and resets to 0 if you stop or turn (Reason being is to allow for the bicycle to accelerate). And tips?

    3: Still having my HM issue from before. I have an array set up with all the moves I want to be able to be substituted for cut, but I don't know how to utilize that array.

    4: Not really an essentials question, but more a question of Pokemon design in general, IV's no longer are used in my game, but are still there. Any opinions on what might be cool to do with those 6 random numbers of 0-31 that are useless as of now?
    1) Use the following code. "count" is the number of able Pokémon.
    Code:
    count=0
    for i in $Trainer.party
     count+=1 if i.hp>0 && !i.egg?
    end
    Depending on what you want, there may be an existing def already. For example, pbCheckAble(index) decides whether you'll still have any able Pokémon left if you get rid of the one given by "index".

    2) I don't know. You might want to have a look at how the game knows when to display the player's running sprites, though, because they're only used when moving. The check is in the script section Walk_Run.

    3) Just use the below. The only change you need to make is the array of moves (with a colon before each one). Please credit me if used.
    Code:
    def Kernel.pbCut
     possiblemoves=[[COLOR=Red]:CUT[/COLOR],[COLOR=Red]:LEAFBLADE[/COLOR],[COLOR=Red]:SLASH[/COLOR]]
     if $DEBUG || $Trainer.badges[BADGEFORCUT]
      for i in possiblemoves
       move=getID(PBMoves,i)
       movefinder=Kernel.pbCheckMove(move)
       if movefinder
        Kernel.pbMessage(_INTL("This tree looks like it can be cut down!\1"))
        if Kernel.pbConfirmMessage(_INTL("Would you like to cut it?"))
          speciesname=!movefinder ? $Trainer.name : movefinder.name
          Kernel.pbMessage(_INTL("{1} used {2}!",speciesname,PBMoves.getName(move)))
          pbHiddenMoveAnimation(movefinder)
          return true
        end
       else
        Kernel.pbMessage(_INTL("This tree looks like it can be cut down.")) if i==possiblemoves[possiblemoves.length-1]
       end
      end
     else
      Kernel.pbMessage(_INTL("This tree looks like it can be cut down."))
     end
     return false
    end
    Note that this is only for when the player interacts with a tree. You will also need to edit HiddenMoveHandlers::UseMove.add(:CUT,proc for when you use the move from the party screen (and you don't have an animation showing the Pokémon using the move).

    Further, the handler above is only for the move Cut. You will need to copy-paste it for each of the other moves - this way the option "Slash", etc. will show up in the party menu.

    4) I have no ideas.
     

    IceGod64

    In the Lost & Found bin!
    624
    Posts
    15
    Years
  • 1) I'll need to work with that a bit. For some reason $Trainer.party generates a No Method error.

    2) Alright, I'll look into it. It shouldn't be too hard.

    3) Thank you. Don't worry, I already have you listed in the credits for all your help.
     

    Ryan Hekk

    Game Developer
    62
    Posts
    13
    Years
  • I've got a small question about talking to NPC's. How do you make it so that when an NPC asks you a question, instead of choosing from a list of choices, you can write in text input, and the text input is then checked to see if it matches pre-defined text. I'm doing this so that I can put a "cheater", who you write codes to and they check them in their conditional branch and return speech back and an item. I know how to do the conditional branch, I just don't know how to get text input from the user.

    It doesn't even need to be written text. If you could even tell me how to get a screen up like when your inputting your name at the beginning with the letters being selectable for giving an answer, it would really help alot.
     

    Cilerba

    the hearts of lonely people
    1,162
    Posts
    14
    Years
  • I've got a small question about talking to NPC's. How do you make it so that when an NPC asks you a question, instead of choosing from a list of choices, you can write in text input, and the text input is then checked to see if it matches pre-defined text. I'm doing this so that I can put a "cheater", who you write codes to and they check them in their conditional branch and return speech back and an item. I know how to do the conditional branch, I just don't know how to get text input from the user.

    It doesn't even need to be written text. If you could even tell me how to get a screen up like when your inputting your name at the beginning with the letters being selectable for giving an answer, it would really help alot.

    You can use pbTextEntry(helptext,minlength,maxlength,variableNumber)

    • helptext - The text that shows on the screen. (Example: "Rival Name?" when inputting name of a rival)
    • minlength - The minimum length of text you can input.
    • maxlength - The maximum length of text you can input.
    • variableNumber - The number of the variable that the text gets stored in.

    If you want to display the text that the player entered, then use \v[n] and replace 'n' with the number of the variable.

    Hope that helps. :)
     

    Ryan Hekk

    Game Developer
    62
    Posts
    13
    Years
  • Thanks. That's so helpful. My next question is how do you pre-define a variable to hold a string. I know you might need to program it into the script but where in the script would I put it?
     

    WackyTurtle

    Developer
    124
    Posts
    13
    Years
  • Hello everybody, can I please have some help on changing the battlebg on the metadata for a map?

    I'm using the September 2010 (the latest) version of Pokémon Essentials, and I've tried to changed the battlebg to a D/P version (called "battlebgForest") but whenever I try to change the battlebg on the metadata option on the editor it simply comes out black. I've included the enemybase and playerbase too.

    I'm sure I'm just being stupid, but can I please have some help on what it is I'm doing wrong? Thanks.
     

    FL

    Pokémon Island Creator
    2,449
    Posts
    13
    Years
    • Seen today
    1: How do I count the number of able Pokemon?

    2: I'm trying to make a variable that's basically a step counter that only counts while you're moving and resets to 0 if you stop or turn (Reason being is to allow for the bicycle to accelerate). And tips?

    3: Still having my HM issue from before. I have an array set up with all the moves I want to be able to be substituted for cut, but I don't know how to utilize that array.

    4: Not really an essentials question, but more a question of Pokemon design in general, IV's no longer are used in my game, but are still there. Any opinions on what might be cool to do with those 6 random numbers of 0-31 that are useless as of now?
    1-Use $Trainer.ablePokemonCount
    4-You can put in the minigames like Pokéathlon performance stats, Triple Triad values, a customizable Hidden Power and some new move attack that compares users and opponent certain IVs and the power can varies like 40 to 120.

    Thanks. That's so helpful. My next question is how do you pre-define a variable to hold a string. I know you might need to program it into the script but where in the script would I put it?
    In the Oak event you can make (I use the variable 78 in this example).
    Code:
    $game_variables[78]="Blablabla"
    The below and above lines do the same thing:
    Code:
    pbSet(78,"Blablabla")
    You can change for string to numeric and vice-versa with no major problems since you don't sum a number with a string.
    Hello everybody, can I please have some help on changing the battlebg on the metadata for a map?

    I'm using the September 2010 (the latest) version of Pokémon Essentials, and I've tried to changed the battlebg to a D/P version (called "battlebgForest") but whenever I try to change the battlebg on the metadata option on the editor it simply comes out black. I've included the enemybase and playerbase too.

    I'm sure I'm just being stupid, but can I please have some help on what it is I'm doing wrong? Thanks.
    The page 333 have a talk about this.
    ---------------------------------
    There is a way that I can give the player a item with internal name stored in one variable?
     
    Last edited:

    IRC

    Internet Relay Chat
    6
    Posts
    14
    Years
    • Seen Feb 5, 2014
    Error

    I keep getting an error when I enter the inner floor of my Lab

    It confuses me, I have no clue what it means.

    Exception: NoMethodError
    Message: undefined method `+' for nil:NilClass
    PokemonUtilities:289:in `getRoughLatLon'
    PokemonUtilities:386:in `getLatLong'
    PokemonUtilities:586:in `getToneInternal'
    PokemonUtilities:584:in `each'
    PokemonUtilities:584:in `getToneInternal'
    PokemonUtilities:353:in `getTone'
    PokemonUtilities:2095:in `pbDayNightTint'
    Sprite_Character:124:in `update_or'
    PerspectiveTilemap:408:in `shadow_update'
    Shadow:179:in `update'
     

    Gero50

    闇の下呂
    115
    Posts
    13
    Years
    • Age 34
    • Seen Sep 10, 2011
    This looks very well done. I am just starting to get back into RPG maker so this should help a lot. If I have any issues I'll be sure to let you know.
     

    FL

    Pokémon Island Creator
    2,449
    Posts
    13
    Years
    • Seen today
    I keep getting an error when I enter the inner floor of my Lab

    It confuses me, I have no clue what it means.

    Exception: NoMethodError
    Message: undefined method `+' for nil:NilClass
    PokemonUtilities:289:in `getRoughLatLon'
    PokemonUtilities:386:in `getLatLong'
    PokemonUtilities:586:in `getToneInternal'
    PokemonUtilities:584:in `each'
    PokemonUtilities:584:in `getToneInternal'
    PokemonUtilities:353:in `getTone'
    PokemonUtilities:2095:in `pbDayNightTint'
    Sprite_Character:124:in `update_or'
    PerspectiveTilemap:408:in `shadow_update'
    Shadow:179:in `update'
    Essentials Wikia said:
    Also known as the getRoughLatLon error due to the def that caused the problem, this is a common error associated with a newer version of Essentials. It occurs immediately when a game is started.
    This error is caused by the day/night system. There is no easy fix, and the only way to get around it is to use a different version of Essentials instead.
    You can also set all maps to be Outdoor=false if you don't like to use the night/day thing.
    ----------------------------------------------
    Hey, did anyone notice that, unlike the normal RPG Maker XP Debug, changing switches or variables via Debug don't refresh the map (the line $game_map.need_refresh = true)? To fix you only need to add this line on debug.
     
    Last edited:

    Zadow

    Pokemon Ebony Developer
    82
    Posts
    14
    Years
  • Hi, I was wondering if someone could lend me a hand in adding some new terrain tags.
    I'll propose them in a sensible order
    Tag 14 - Ash Covered Grass
    Like in RSE I want to be able to set a tag for ash covered grass.
    I guess one way to do it would be to have the tile just disappear when walked upon(with normal grass on a lower layer) along with an animation which I can make, using a placeholder of the normal grass animation.
    I want it to check for the soot sack switch (not item) and if ON it should add 1 to the variable Soot (variable 40 currently in my game).
    (I tried doing this with events but it was much too laggy with all those events on the map >.< )
    Tag 15 - Puddles
    Reflection but not surfable, plays animation when walked upon, again I guess I could use a placeholder animation until I make one.
    Tag 16 - Beach Sand
    Just plays an animation (footprints) when walked upon (Beneath player not above)

    I also wondered if it's possible to change the Terrain tag 10 Tall grass to disable passage if the player is riding a bike? (possibly disable running too)

    Any and all help is appreciated, as I'm not a scripter but have a vague general understanding clear instructions or tips are the most helpful. Thank you for reading (and hopefully helping)!
     
    Status
    Not open for further replies.
    Back
    Top