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

[Battle✓] Setting trainer Pokémon levels dynamically

23
Posts
6
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!
     
    1,591
    Posts
    10
    Years
    • Seen Mar 20, 2024
    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.
     
    23
    Posts
    6
    Years
    • Seen Nov 28, 2023
    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