• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

[Script] Alternate way to script trainerbattle in FireRed

Blah

Free supporter
  • 1,924
    Posts
    12
    Years
    Does anyone know a way I can have a trainer with the trainer box checked in A-Map (01 in A-Map 1.95) have a checkflag in front of his trainerbattle script in FireRed? Any way, even an extremely complicated method.

    The extremely complicated way would be to find the code which reads the trainer ID from the script, and then rewrite it to use a while loop.
    What are you trying to do? Why do you need the trainer to have a flag?
     
    script tiles
    its nasty but who's playing won't feel the difference ¯\_(ツ)_/¯

    oh and if it's for a lot of trainers this won't work
     
    Last edited:
    We maybe spoke about this on Discord before, can't remember, but for the kind of event you showed me there I'd recommend using script tiles as well. You can still make the exclamation mark appear and play the trainer encounter music before the battle, making it look like an ordinary encounter to the player.
     
    That's probably the most convenient way there is for what you're wanting that I can think of, hmm. Just to double check, the reason you wanted a flag was so that the trainer would only battle you if it was set, was that it? Discord is acting up for me today, otherwise I'd have jumped on to look again haha.
     
    I want the trainers to have certain dialogue and certain pokemon before and after certain events take place

    Ahhh okay. Aye I'd still recommend the trigger script thing, then. Unless FBI can come up with something involving his own brand of wizardry of course x
     
    FBI said "The extremely complicated way would be to find the code which reads the trainer ID from the script, and then rewrite it to use a while loop." How would I go about finding the code?

    I think the area around sub_8080334 is what you're looking for?
     
    yes, that's what this does. if the first trainer battle flag is cleared using a "cleartrainerflag" command in the event script, it should skip over the first trainerbattle in the trainer script.

    Fun idea, wouldn't work when trying to have the trainer approach the player when "their eyes meet" though. The game code reads the first command in the script to figure out the trainer ID. So if the flag was cleared, it'll assume the trainer is cleared and the trainer will not approach you.
     
    Fun idea, wouldn't work when trying to have the trainer approach the player when "their eyes meet" though. The game code reads the first command in the script to figure out the trainer ID. So if the flag was cleared, it'll assume the trainer is cleared and the trainer will not approach you.

    Ah right, I didn't consider that...
     
    Back
    Top