Advertiser Content
Seen 1 Week Ago
Posted 1 Week Ago
9 posts
2.4 Years
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!

Buffel Saft

Male
Seen 13 Hours Ago
Posted 13 Hours Ago
582 posts
6.1 Years
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[i].lvl" parameter in all four of the CreateMon function calls in it to read their Pokemon levels from somewhere else.
Seen 1 Week Ago
Posted 1 Week Ago
9 posts
2.4 Years
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[i].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!
Advertiser Content