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

[Scripting Question] Battle Gyms in any order

17
Posts
8
Years
    • Seen May 12, 2024
    Hey guys, a total amateur here who needs some help :)

    This may sound crazy, but I'm actually trying to make gym leaders be challenged in any order. As in, what I want is, the first & the last gym should always be the same, but Gyms #2 to #7 should be battle-able in any order.

    As shown in Pokemon Origins, I want the Gym Leaders to use different teams based on the number of badges the player already has.

    I know this is too much ambition for someone who's just starting out :3c

    Anyways, let me explain a little better. Say, a Ground type gym would use a Level 20ish Drilbur if battled when the player has 1 badge (as Gym #2) but it would use a Level 40-45 Excadrill when battled as Gym #7.

    I'm guessing the teams need to be made separately for each badge count & be saved under different trainers. I just need help with the coding which will pick the right Gym Leader's team based on the player's gym badge count.

    Sorry if this is already asked before or this is too stupid/complex, I rarely post here & I'm complete garbage when it comes to coding (I started RomHacking on RPGMXP just 2-3 days ago) :P

    If its also not too much trouble, can somebody tell me where to put this code too? Like, do I need an external editor for this? If yes, which one?

    Thanks to all who reply! :)
     

    Djaco75

    DAJ 775
    35
    Posts
    7
    Years
  • Hey, Prankster,

    There are two possible ways of doing this.
    1. You can use switches to decide which team a Gym Leader will use. For example. Town 1 switch is on, then they will use the town 1 team. Town 2 switch is on, they will use the town 2 team. The way to set this out is to use the switch button at the top of the event box and put a different conditional branch with the battle inside the actual script box. (You will need to define a different trainer for each switch, though.

    2. The second option is to have the levels revolve around the number of badges. This will not only apply to Gym Leaders, but to all trainers. See the link attached.
    https://www.pokecommunity.com/showthread.php?t=328441
    (Scroll to roby_kof's post)

    I hope that helps. If you have any questions, feel free to ask and I'll see what I can do,
    DJ
     
    220
    Posts
    14
    Years
    • Seen Nov 29, 2021
    Do note that the first option is more work, but far more flexible, allowing for different pokemon (and numbers of pokemon) and items; whereas the second is much simpler, but without work it doesn't account for things like evolution.
     
    17
    Posts
    8
    Years
    • Seen May 12, 2024
    Thanks to both of you (& sorry for the late-ish reply, I've been a little busy)
    I guess I'm gonna go with switches for a much more fabricated experience, but the 'levels revolve around gym badges' idea is pretty cool too! Maybe I'll use them both... I don't know :P
    Thanks again! :)
     
    Back
    Top