- 116
- Posts
- 17
- Years
- Forina
- Seen Oct 20, 2024
There are a couple of major bugs with this engine, so I've described their fixes below:
-Skill swap makes bad eggs:
--ctrl+ f ability_change(void), find it in helper_functions.c
--look through this function for things that sat "u8"
--replace them with "u16"
-Volt switch crashing when used in double battles with only two pokemon
--Ctrl+f jumpifonlyonepokemon(void)
--Replace the command with this, using correct indenting:
{
if (count_party_pokemon(bank_attacker) <= 1)
battlescripts_curr_instruction = (void*) read_word(battlescripts_curr_instruction);
else if ((count_party_pokemon(bank_attacker) <= 2) && (battle_flags.double_battle))
battlescripts_curr_instruction = (void*) read_word(battlescripts_curr_instruction);
else
battlescripts_curr_instruction += 4;
}
For replace u8 with u16 in the function of ability_change, do I also need to replace all u8 with u16 in the related functions such as findability_in_table and forbidenabilitiestable1, 2, 3, 4?
Last edited: