• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Dawn, Gloria, Juliana, or Summer - 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.

[pokefirered] how to change rival starter

  • 8
    Posts
    13
    Days
    • Seen today
    Thanks to a previous post I was able to randomize the starter options offered to the player, but the rival still gets the traditional starter strong against the type you chose. How would I go about changing the Pokemon your rival ends up with? I imagine I'll probably have to change the team for each rival battle, but correct me if I'm wrong.
     
    how to change rival starter
    It doesn't look like you made an effort to read Oak's Lab's scripts.inc file, huh.
    Just like there's a temporary variable that is used to store the Player's starter before giving it to them (VAR_TEMP_2 which uses PLAYER_STARTER_SPECIES as a local label), there's a variable used to control the Rival's, VAR_TEMP_3 via the local label RIVAL_STARTER_SPECIES. Like I said in the other thread, both of these are located near the top of the scripts.inc file.
    You're gonna have to modify its value in a similar way than you modified the value of VAR_TEMP_2/PLAYER_STARTER_SPECIES.

    I imagine I'll probably have to change the team for each rival battle, but correct me if I'm wrong.
    You're correct, yes. Each rival battle uses a separate opponent ID with their own parties. All the relevant data is in src/data/trainers.h and src/data/trainer_parties.h.
     
    So, I have the special I set in field_specials also set VAR_TEMP_3, for the rival, which I assume is copied to RIVAL_STARTER_SPECIES.
    In the trainer_parties.h I'm trying to read that variable to run a switch/case to build rival's team for each encounter, and am at a loss. I tried doing VarGet, as I use VarSet in the special function, but that doesn't seem to be it unless I'm doing it wrong. I have the following:
    Code:
    u16 rivalspecies = VarGet(RIVAL_STARTER_SPECIES);
    Then I'd do a switch on rivalspecies and have a different party roster for each case. I get an error that 'RIVAL_STARTER_SPECIES' is undeclared here, so I can only assume I'm doing something wrong.
     
    Back
    Top