• 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.

IceGod64

In the Lost & Found bin!
  • 624
    Posts
    15
    Years
    Lol, I make little syntax errors like that all the time. Makes programming more difficult than it has to be. Anyways, I tried removing the @opponent && and it didn't catch the pokemon. That should have fixed it. When you said re-breaks, what exactly does it do? When I made that little change, it ignores the ball throw animation (just like in trainer battles in the kit), and the wild pokemon keeps fighting.

    Okay, so imagine you try to catch a pokemon - Regardless of whether the switch is on or off. You select the pokeball, and it'll say "Trainer threw one pokeball!" and then without playing any animation or anything else, it'll go right back to the fight menu. If you try to use a move, switch pokemon, etc., everything else still works.
     

    KitsuneKouta

    狐 康太
  • 442
    Posts
    14
    Years
    • Seen Nov 20, 2017
    Okay, so imagine you try to catch a pokemon - Regardless of whether the switch is on or off. You select the pokeball, and it'll say "Trainer threw one pokeball!" and then without playing any animation or anything else, it'll go right back to the fight menu. If you try to use a move, switch pokemon, etc., everything else still works.
    I just tested it, and when the switch is on, it does what you said (that's what it's supposed to do), and when it's off you can catch pokemon normally. I guess try copy/pasting the code, I indcluded some of the code around it too:
    Spoiler:
    This is exactly what I have. Are you testing it on a wild pokemon event, or on random encounters? If it's an event, make sure the switch actually activates before the battle.
     
  • 48
    Posts
    13
    Years
    • Seen Jun 16, 2013
    What I've done will place the graphic in the data box, so it won't be covered by it.

    Thanks....
    I tried putting the code to different placed in the script, but it always got covered by the box, AND moved from bottom to position! i still don't get why, but since you solved both....
    Thanks again =)

    Sichlor
     

    tasmania12

    Mewtwo Master
  • 57
    Posts
    16
    Years
    Hey, I have a problem with shadow Pokemon. The script works fine and all, but one major problem is that when I capture the Shadow Pokemon, the trainer i caught it from won't send out any other Pokemon. It will stay there in a battle screen and when I attack it says "There is no target". I just need him to send out more Pokemon if he has them, and if he doesn't, then treat the capture of his Shadow a win.

    Another thing. How do I change the graphic for the snag ball when i throw it at the pokemon. It just looks like a normal pokeball.
     

    IceGod64

    In the Lost & Found bin!
  • 624
    Posts
    15
    Years
    I just tested it, and when the switch is on, it does what you said (that's what it's supposed to do), and when it's off you can catch pokemon normally. I guess try copy/pasting the code, I indcluded some of the code around it too:

    Basically, in the test area I set up a sign. If you check it once, it'll say you shouldn't be able to catch pokemon now and activates switch 28(Yes, I did change the switch in the script). If you check it again, it'll deactivate it. Right beside that I have a patch of grass with just a bunch of level 20 Bulbasaur.

    Well, now seems to have fixed it, actually. I don't know what the difference in our code was, as I didn't notice anything obvious, but I just added a message line and now if the switch is on it'll say "Trainer used one Pokéball!" "But the ball had no effect...". Basically, it actually works.

    Thanks for the help!
     

    Maruno

    Lead Dev of Pokémon Essentials
  • 5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    @Maruno: Thanks much. That will save me some time to get back to working on stuff. Also, do you mind if I make a tutorial of it (you'll be given the credit)? A few pages from now people will probably start asking about it again because they won't want to look through the older pages, so then I could just put the link to it in my signature.

    @thepsynergist: Maruno already got it, so you should use his. If I ever feel like it I may change it from having to use a switch, but I don't see any need for it right now so I'll leave it as is (and it might take a while to change it anyways).
    Go ahead. A good place for the tutorial would be the wiki (see my signature). I'll need to think of a way to incorporate tutorials into the wiki, but for now you can just make a Battles page.


    Thanks....
    I tried putting the code to different placed in the script, but it always got covered by the box, AND moved from bottom to position! i still don't get why, but since you solved both....
    Thanks again =)

    Sichlor
    If the icon appears in the data box, it's always a good idea to put the icon in the data box. ;)


    Hey, I have a problem with shadow Pokemon. The script works fine and all, but one major problem is that when I capture the Shadow Pokemon, the trainer i caught it from won't send out any other Pokemon. It will stay there in a battle screen and when I attack it says "There is no target". I just need him to send out more Pokemon if he has them, and if he doesn't, then treat the capture of his Shadow a win.

    Another thing. How do I change the graphic for the snag ball when i throw it at the pokemon. It just looks like a normal pokeball.
    I don't know exactly how Snag Balls work, so I can't answer the first part of your question.

    A Snag Ball can be (and should be) a separate item to any other Poké Ball. As such, it has its own icons just like each other Poké Ball. In particular, the throwing/capturing animation uses three ball pictures located in Graphics/Pictures called "ball00_0.png" and so forth. Just edit the ones that relate to your Snag Ball.
     

    IceGod64

    In the Lost & Found bin!
  • 624
    Posts
    15
    Years
    Here we go. I have one more

    Code:
    def pbCommandMenu(index)
    # Use this method to display the list of commands.
    #  Return values:
    #  0 - Fight
    #  1 - Pokémon
    #  2 - Bag
    #  3 - Run
     shadowTrainer=(hasConst?(PBTypes,:SHADOW) && @opponent)
     ret=pbCommandMenuEx(index,[
      _INTL("What will\n{1} do?",@battle.battlers[index].name),
      _INTL("FIGHT"),
      _INTL("PARTY"),
      _INTL("BAG"),
      shadowTrainer ? _INTL("CALL") : _INTL("RUN")
     ])
     if ret==3 && shadowTrainer
      ret=4 # convert "Run" to "Call"
     end
     return ret
    end
    I'm not really sure what to input here at all. What I'm trying to do is have the run function be "Call" in any trainer battle. Can anyone help with this? I know PBTypes,:SHADOW wouldn't have to be there, but I tried just making it "shadowTrainer = (@opponent)", and it's not correct. I have no idea what I'm doing wrong, but I'd rather not resort to a switch for every trainer battle in the game.


    I resolved it. Explanation on how below.
     
    Last edited:

    Conan Edogawa

    One Truth Prevails
  • 1,061
    Posts
    15
    Years
    I have two rather simple questions, but I've been having troubles with them. First off, I've been trying to create an event where your rival is standing in the lab and says something upon interacting with them. But once you get your pokemon he goes up to you and says a new batch of text before walking out. I had both events working separately, but then when I attempted to use self switches to connect them both events disappeared.

    Secondly, I want to have a double battle for a gym leader. I've messed with the gym leader event, but to no prevail.
     

    IceGod64

    In the Lost & Found bin!
  • 624
    Posts
    15
    Years
    I'm not really sure what to input here at all. What I'm trying to do is have the run function be "Call" in any trainer battle. Can anyone help with this? I know PBTypes,:SHADOW wouldn't have to be there, but I tried just making it "shadowTrainer = (@opponent)", and it's not correct. I have no idea what I'm doing wrong, but I'd rather not resort to a switch for every trainer battle in the game.

    Ignore that enitre post. I figured something out.

    I used Maruno's script to check if you've already caught wild pokemon or not, using switch 49 to check if it's a wild battle or not. I then added this afterward:

    Code:
      if $game_switches[49] == true
        $game_switches[48] = false
      else
        $game_switches[48] = true
      end
    And edited the other script likeso:

    Code:
    shadowTrainer = $game_switches[48]
    ret=pbCommandMenuEx(index,[
      _INTL("What will\n{1} do?",@battle.battlers[index].name),
      _INTL("FIGHT"),
      _INTL("POKé"),
      _INTL("BAG"),
      shadowTrainer ? _INTL("CALL") : _INTL("RUN")
     ])
     if ret==3 && shadowTrainer
      ret=4 # convert "Run" to "Call"
     end
     return ret
    end
    And it works. Thank you, Maruno!

    Now I just need to edit the call script. It was bugged up for me (As it it skipped the turn), but that's an easy fix in the case.
     
    Last edited:

    KitsuneKouta

    狐 康太
  • 442
    Posts
    14
    Years
    • Seen Nov 20, 2017
    Go ahead. A good place for the tutorial would be the wiki (see my signature). I'll need to think of a way to incorporate tutorials into the wiki, but for now you can just make a Battles page.
    All right, I'll get right on it.

    @IceGod64: Glad it worked. It should probably be expanded though to actually show the ball being thrown. I don't know why it wasn't put in in the first place, since the method was actually called pbThrowAndDeflect, and yet there's a complete lack of throwing or deflecting...
     

    Maruno

    Lead Dev of Pokémon Essentials
  • 5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    I have two rather simple questions, but I've been having troubles with them. First off, I've been trying to create an event where your rival is standing in the lab and says something upon interacting with them. But once you get your pokemon he goes up to you and says a new batch of text before walking out. I had both events working separately, but then when I attempted to use self switches to connect them both events disappeared.

    Secondly, I want to have a double battle for a gym leader. I've messed with the gym leader event, but to no prevail.
    1) Simple. At the end of the event that gives you your Pokémon, put in a move route for the rival, then some text messages, then another move route to make it walk off-screen. Once it's off, delete the rival event. There's no need to use self-switches, I think.

    2) The wiki shows how to make a double trainer battle. Just put a "DoubleBattle: true" comment in the Gym Leader event.
     

    Conan Edogawa

    One Truth Prevails
  • 1,061
    Posts
    15
    Years
    1) Simple. At the end of the event that gives you your Pokémon, put in a move route for the rival, then some text messages, then another move route to make it walk off-screen. Once it's off, delete the rival event. There's no need to use self-switches, I think.

    2) The wiki shows how to make a double trainer battle. Just put a "DoubleBattle: true" comment in the Gym Leader event.

    Thank you for the answer. I originally used the switches because I had the event set up differently, but when I posted I decided this format would be better. I didn't know the comments worked the same for gym leaders, so I figured it's be better to ask. Thank you again for the help.
     

    Vociferocity

    [ bad girls do it well ]
  • 269
    Posts
    15
    Years
    I have two questions today relating to partner trainers/dependent events.

    1) when I dismiss the partner trainer when inside (like, in a non-outdoor map), I get this error and the game crashes. the error looks vaguely familiar, but I have nooo idea what it means.

    Spoiler:


    2) so the partner trainer is supposed to constantly be in a specific place (obviously except for when she's walking around with you), and you can go up and get her to walk around with you whenever you want. and if you dismiss her while on another map, she's back where she's supposed to be when you go to her home map, but if you dismiss her in her home map, she doesn't show up in her spot. she does show up if you then go to a new map and return, but it's still mildly inconvenient. any way to make it so you don't have to uhhh leave + come back before she'll show up again?
     

    KitsuneKouta

    狐 康太
  • 442
    Posts
    14
    Years
    • Seen Nov 20, 2017
    I have two questions today relating to partner trainers/dependent events.

    1) when I dismiss the partner trainer when inside (like, in a non-outdoor map), I get this error and the game crashes. the error looks vaguely familiar, but I have nooo idea what it means.

    Spoiler:


    2) so the partner trainer is supposed to constantly be in a specific place (obviously except for when she's walking around with you), and you can go up and get her to walk around with you whenever you want. and if you dismiss her while on another map, she's back where she's supposed to be when you go to her home map, but if you dismiss her in her home map, she doesn't show up in her spot. she does show up if you then go to a new map and return, but it's still mildly inconvenient. any way to make it so you don't have to uhhh leave + come back before she'll show up again?
    I tried it out real quick with the default dependent event, and didn't get the error you mentioned when dismissing them indoors. Try the default one real quick, since it could be a problem somewhere with the one you made. For the second issue, I'll look into it.
     

    Vociferocity

    [ bad girls do it well ]
  • 269
    Posts
    15
    Years
    I tried it out real quick with the default dependent event, and didn't get the error you mentioned when dismissing them indoors. Try the default one real quick, since it could be a problem somewhere with the one you made. For the second issue, I'll look into it.

    I have like...five dependent events, and this is the only one that has this error (although actually, thinking about it? this is the only one where the player chooses when to split up with the partner - the others are all plot related! - so actually I don't think any of the others have even had the opportunity to break indoors! I think I'll go see if any of those have the same error), so yeahhh clearly I've done something crazy with it, but honestly I have no idea what! it's exactly the same code >:(

    Code:
    pbRegisterPartner(
     PBTrainers::PSYCHIC_Female,"Amy",0)
    Kernel.pbAddDependency2(@event_id, 
     "amy2", 9)
    to start, and

    Code:
    pbDeregisterPartner
    Kernel.pbRemoveDependency2("amy2")
    to finish. augh this is so infuriating! I don't understand why it only happens on inside maps
     
  • 490
    Posts
    16
    Years
    • Seen Sep 27, 2021
    Can someone Please Help me with this error?

    Exception: TypeError
    Message: cannot convert nil into String
    PokemonScreen:765:in `se_play'
    PokemonScreen:765:in `pbChoosePokemon'
    PokemonScreen:751:in `loop'
    PokemonScreen:778:in `pbChoosePokemon'
    PokemonScreen:1237:in `pbPokemonScreen'
    PokemonScreen:1235:in `loop'
    PokemonScreen:1482:in `pbPokemonScreen'
    PokemonMenu:155:in `pbStartPokemonMenu'
    PokemonMenu:154:in `pbFadeOutIn'
    PokemonMenu:154:in `pbStartPokemonMenu'


    Does anyone know what this means?

    Script 'PokemonDefaultItems'line 10: NameError occured.
    Uninitialized constant ItemHandlers::UseFromBag
     
    Last edited:

    KitsuneKouta

    狐 康太
  • 442
    Posts
    14
    Years
    • Seen Nov 20, 2017
    Code:
    pbRegisterPartner(
     PBTrainers::PSYCHIC_Female,"Amy",0)
    Kernel.pbAddDependency2(@event_id, 
     "amy2", 9)

    Code:
    pbDeregisterPartner
    Kernel.pbRemoveDependency2("amy2")
    Comparing it to the example dependent event, there's 2 things that are off: one is the 0 after the trainer's name, which is a 2 in the example, and the pbDeregisterPartner line, which should be pbDeregisterPartner()
     

    Vociferocity

    [ bad girls do it well ]
  • 269
    Posts
    15
    Years
    Comparing it to the example dependent event, there's 2 things that are off: one is the 0 after the trainer's name, which is a 2 in the example, and the pbDeregisterPartner line, which should be pbDeregisterPartner()

    the thing is, neither of those should be a problem. the number is for like, referencing different trainers who share the same trainer class/name (and there's only one of this trainer, so if anything I could probably get rid of the 0 with no problems. and deregister partner has no actual parameters, because there's only one partner at a time (which actually brings up an interesting problem I'll have later. hmm, I should look into that now and save future!me the headache), so I don't think the () are needed. but I mean, even so, when I try adding a (), it breaks in exactly the same way. so bizarre! if only I could have a delicious "if inside, don't have the option to leave, else have the option to leave" code, but I don't think that's even possible, is it?
     

    IceGod64

    In the Lost & Found bin!
  • 624
    Posts
    15
    Years
    Has nobody else noticed that the animated Pokemon script breaks the summary and Pokedex screens?

    The summary screen is easy to fix.
    Go into PokeBattle_ActualScene, and search for ".setPokemonBitmap", replace this with ".bitmap = pbLoadPokemonBitmap". Now repeat that search as many times as you have to, in order to replace all ".setPokemonBitmap" definitions within PokeBattle_ActualScene with ".bitmap = pbLoadPokemonBitmap".

    You'll want to do this step in PokemonSummary as well.

    As for the Pokedex screen, I don't know how to make that work properly right off. It checks the battlers folder and not the frames, but I'd rather not have a THIRD copy of every pokemon sprite in the battlers golder, as I want to try to conserve as much space as possible.
     

    KitsuneKouta

    狐 康太
  • 442
    Posts
    14
    Years
    • Seen Nov 20, 2017


    the thing is, neither of those should be a problem. the number is for like, referencing different trainers who share the same trainer class/name (and there's only one of this trainer, so if anything I could probably get rid of the 0 with no problems. and deregister partner has no actual parameters, because there's only one partner at a time (which actually brings up an interesting problem I'll have later. hmm, I should look into that now and save future!me the headache), so I don't think the () are needed. but I mean, even so, when I try adding a (), it breaks in exactly the same way. so bizarre! if only I could have a delicious "if inside, don't have the option to leave, else have the option to leave" code, but I don't think that's even possible, is it?
    It is bizarre. Has there been any modifications to the DependentEvents script? Also, it should be possible to remove the option to make the partner leave when indoors, but it's somewhat awkward. I can somewhat fix the issue with dismissing the partner in their original map (I don't think the method I'm using is the best), so the partner does stay behind wherever you leave them, but they become passable and can't be interacted with (until you leave and return).
     
    Status
    Not open for further replies.
    Back
    Top