- 56
- Posts
- 5
- Years
- Ohio
- Seen May 19, 2025
Hi all! I'm having trouble getting the compiler to work with a new feature I added. I added a new property in Pokemon.txt called ShadowHeartValue (determines how long it takes to purify a Shadow Pokemon). However, when I compile data, the compiler deletes ShadowHeartValue from all Pokemon in the PBS file.
It is defined in the compiler as an optional type.
I have the property defined in the compiler, using bytes 59 and 60 and the "w" code. Before I added it in, there were already 2 bytes being allocated to "w". Since ShadowHeartGauge takes up 2 more bytes, I allocated 4 bytes to "w" like so:
Here's the code (created by the awesome Vendily!) in Pokemon_ShadowPokemon that references the compiler.
I thought this would be enough to do it, but I guess I'm still missing something. Do I need to create a new DAT file? Is it necessary to also include this is Editor_Screens or Editor_SaveData? Thanks!
It is defined in the compiler as an optional type.
Code:
"ShadowHeartValue" => [59,"w"]
I have the property defined in the compiler, using bytes 59 and 60 and the "w" code. Before I added it in, there were already 2 bytes being allocated to "w". Since ShadowHeartGauge takes up 2 more bytes, I allocated 4 bytes to "w" like so:
Code:
when "w" #each property for w uses up 2 bytes
value = csvPosInt!(secvalue,key)
bytes = 4 #added 2 more bytes for ShadowHeartValue
Here's the code (created by the awesome Vendily!) in Pokemon_ShadowPokemon that references the compiler.
Code:
def vibecheck # Checks the heart gauge values assigned in pokemon.txt
dexdata=pbOpenDexData
pbDexDataOffset(dexdata,self.species,59)
shadowheart=dexdata.fgetw
dexdata.close
return shadowheart
end
I thought this would be enough to do it, but I guess I'm still missing something. Do I need to create a new DAT file? Is it necessary to also include this is Editor_Screens or Editor_SaveData? Thanks!