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

Gym Leaders?

  • 19
    Posts
    11
    Years
    • Seen Jul 25, 2012
    Aaaaaand back with another. Sorry if I'm annoying you guys XD

    So I've tried and tried and tried to get this working, looked up tutorials and searched these forums...I must just be missing something.

    How do I set up a gym leader and afterwards she/he gives a badge, tells the player a few things, give the player the ability to use, say, cut, outside of battle and then give the player a choice of one of three prizes? (prizes being a thunderstone, waterstone and firestone)

    I've tried a few things, but to no avail D=
     
  • 585
    Posts
    11
    Years
    • Seen Feb 7, 2017
    Unlike other trainers, don't change the name of the event that is the gym leader to Trainer(x). Make him an Action Button event.

    First, you want to create a speech before the battle begins. After that, create the battle command (Conditional Branch => Script => pbTrainerBattle....).

    The script that gives the trainer a badge is $Trainer.badges[x]=true, where x is the number of the badge (0 is the first badge, 1 is the second, and so on). It'd be good if a message appeared that says that the player got the badge.

    Next, use the "Show Choices" command to make the player choose between his prizes. Under each of the choices, create a command that gives the player the chosen prize. After that, trigger a "Beat gym leader" switch ON. That'd be about it.

    Here's an example (Without the choice command):
    Gym Leaders?
     
  • 19
    Posts
    11
    Years
    • Seen Jul 25, 2012
    Works perfectly! Thanks!

    One thing though. This happens with all trainers. In the 'conditional branch' part of the event for trainers, where you put in the bit of script and fill out things like trainer name and stuff, there's a part that says '...'. I assumed you replace that (because that's what shows before you get out of battle but once you beat the trainer, if you keep the ...)

    But it still shows up like that no matter what, I even notice it being replaced again by '...'. So I thought maybe it was the 'EndBattle' part of the comments thing that replaces the ..., so I've tried changing that and nothing is different. I even tried changing both...

    What am I doing wrong here? XD

    -------
    *edit*
    Okay for whatever reason, it suddenly started working! I'm baffled, have no idea what change...but anyway...I seem to have another problem when given the three choices of prizes. The choices pop up no problem, but when I pick one the whole thing crashes. I assume I'm using the wrong script thing to give an item? I'm using Kernel.pbReceiveItem(PBItems::THUNDERS
    TONE)
    to give the player a thunderstone when they pick that option.

    Is that wrong?
     
    Last edited:

    Nickalooose

    --------------------
  • 1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    I wonder if you've seen the (broken link removed) ;)

    The Wiki said:
    @>Script: pbTrainerIntro(:CAMPER)
    @>Script: Kernel.pbNoticePlayer(get_character(0))
    @>Text: Battle me now!
    @>Conditional Branch: Script: pbTrainerBattle(PBTrainers::CAMPER,"Dave",_I("I enjoyed it."),false,0,false)
    @>Control Self Switch: A =ON
    @>
    : Branch End
    @>Script: pbTrainerEnd
    The red part is the end battle comment, change this to anything.


    Spoiler:


    Edit EndBattle: if it has "..."
    ;)
    The Wiki is there for such help on things like this.

    What is the error you're getting?
     
    Last edited:
  • 19
    Posts
    11
    Years
    • Seen Jul 25, 2012
    Ah I did do that, I have looked at the wiki. It wasn't working no matter what I did for some reason D= Now it's working for the gym leader no problem, but the other trainers still have the same problem. I guess I'll keep playing around with it. I probably did miss something.

    This is the error I'm getting (add photobucket[dot]com before this link):

    /albums/af350/Slapkat/error.jpg

    (Again, sorry guys for trying to get around the no image thing...)
     

    Nickalooose

    --------------------
  • 1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    I think your problem is...

    With the game open, go into the games folder and open ExtendText.exe, make sure if your using Vista or Windows 7, that you right click the icon first and set it to "run as administrator".

    Your problem however, you should use a Conditional Branch to give items/Pokémon... The script will first check wether the Stone can be added, if false, will return with the else message, if true, continue game.

    EDIT: You're not a hassle to us ;) We like to help.
     

    Maruno

    Lead Dev of Pokémon Essentials
  • 5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    If the game tries to compile a trainer using comments, but there isn't a "EndSpeech" comment, then the trainer will say "..." at the end of battle by default. The solution is to delete any comments you have in the event, so that the game doesn't try to compile the event again.


    Kernel.pbReceiveItem(PBItems::THUNDERS
    TONE)
    ...is not the same as:

    Kernel.pbReceiveItem(PBItems::THUNDERSTONE)
    Make sure it's all on the same line. ExtendText helps.
     
  • 19
    Posts
    11
    Years
    • Seen Jul 25, 2012
    Ohhh...how do I use the ExtendText? (as in where do I use it, just so that I don't screw anything up XD )
     

    Maruno

    Lead Dev of Pokémon Essentials
  • 5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    It's in the main game folder. Just run it while RMXP is open - it won't appear to do anything, but you'll notice its effect when you next edit a message or script event command.
     

    Nickalooose

    --------------------
  • 1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    With the game open, go into the games folder and open ExtendText.exe, make sure if your using Vista or Windows 7, that you right click the icon first and set it to "run as administrator".

    I think that was already covered once.
     
    Back
    Top