Fixed #20, after much research and testing I determined that the byte following difficulty is actually a bitfield that allows for overriding the default gender and ability of pokemon in a trainer's party. 0x1 forces the pokemon to be male, 0x2 forces it to be female, 0x20 sets the pokemon to use it's ability in slot 2. This is only used in pokemon HGSS (the gender override is seemingly never used in the actual game files but it does work on testing) and seems to simply be a filler byte in the other games from what I can tell. This is easy to test in the existing trainer editor by simply setting the first rival fight [495-497] to have a pokemon that normally has intimidate such as growlithe then setting the "DV" to 8704, this should lead to a female growlithe with the ability flash fire instead of intimidate. The value 8192 that was showing up for "DV" in some HGSS pokemon was actually the override that set a pokemon to use it's second ability.
This is also includes the ability to set the gender and ability of pokemon in the trainer editor for HGSS only.
Also adds the ability to set form for pokemon that have them such as burmy, this is disabled in DP as they do not have this feature.
The main window had to be expanded slightly to fit additional controls in the trainer editor.
Some other small changes:
Refactored narc.cs to remove magic numbers in place of easier to read constants
Removed messages boxes that simply said "user operation cancelled" when closing out a file open dialog, these don't convey essential information like a message box should and disrupt the flow of program use
Added location names to wild encounter editors, in the comboBox for encounter files, to make it easier for users to tell what location they are editing encounters for without having to constantly cross-reference the header editor
Fixed #20, after much research and testing I determined that the byte following difficulty is actually a bitfield that allows for overriding the default gender and ability of pokemon in a trainer's party. 0x1 forces the pokemon to be male, 0x2 forces it to be female, 0x20 sets the pokemon to use it's ability in slot 2. This is only used in pokemon HGSS (the gender override is seemingly never used in the actual game files but it does work on testing) and seems to simply be a filler byte in the other games from what I can tell. This is easy to test in the existing trainer editor by simply setting the first rival fight [495-497] to have a pokemon that normally has intimidate such as growlithe then setting the "DV" to 8704, this should lead to a female growlithe with the ability flash fire instead of intimidate. The value 8192 that was showing up for "DV" in some HGSS pokemon was actually the override that set a pokemon to use it's second ability.
You can also see evidence of this in the pret dissasembly (TrMon_OverridePidGender) https://github.com/pret/pokeheartgold/blob/master/src/trainer_data.c
This is also includes the ability to set the gender and ability of pokemon in the trainer editor for HGSS only. Also adds the ability to set form for pokemon that have them such as burmy, this is disabled in DP as they do not have this feature. The main window had to be expanded slightly to fit additional controls in the trainer editor.
Some other small changes: