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

[Script] Alternate way to script trainerbattle in FireRed

Blah

Free supporter
1,924
Posts
11
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?
     

    Dionen

    deprived of sleep
    295
    Posts
    12
    Years
  • 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:
    1,309
    Posts
    12
    Years
    • She/Her
    • Seen Nov 24, 2023
    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.
     
    1,309
    Posts
    12
    Years
    • She/Her
    • Seen Nov 24, 2023
    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.
     
    1,309
    Posts
    12
    Years
    • She/Her
    • Seen Nov 24, 2023
    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
     
    88
    Posts
    7
    Years
    • Seen Jan 16, 2020
    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?
     

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • 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.
     
    56
    Posts
    5
    Years
    • Seen Nov 17, 2023
    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