• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

[Battle✓] Setting trainer Pokémon levels dynamically

  • 23
    Posts
    7
    Years
    • Seen Nov 28, 2023
    Hi all,

    I'm interested in changing trainer Pokémon levels dynamically in the same fashion as is done in the Open level mode in some Battle Frontier facilities. I've tried to see where the level of the opposing Pokémon is set and I have so far found some interesting functions in src/battle_controller_opponent.c and src/pokemon.c: SetOpponentMonData, SetMonData, GetOpponentMonData and GetMonData. I have first just tried to set the level of the opposing Pokémon to 50 (just to see if what I've done is working), but I have not been able to influence the level.

    If any of you have better insight as to which function exactly I should try to edit, I would be very grateful. Thank you in advance!
     
    Hey, take a look at the CreateNPCTrainerParty function in battle_main.c, that's what sets most of the data for the trainer mons. You can change the "partyData.lvl" parameter in all four of the CreateMon function calls in it to read their Pokemon levels from somewhere else.
     
    Hey, take a look at the CreateNPCTrainerParty function in battle_main.c, that's what sets most of the data for the trainer mons. You can change the "partyData.lvl" parameter in all four of the CreateMon function calls in it to read their Pokemon levels from somewhere else.


    This was exactly what I needed! Thank you so much for your kind help!
     
    Back
    Top