Need help updating an old project form from a verry old PKHex version #4098
Replies: 1 comment 4 replies
-
In Generation 3, Deoxys depends on the game it needs to calculate for. Each game only has 1 form available, which has different base stats. For mystery gifts, they can be Pokémon, and they can be items, clothing, unlocks, etc. The default for the abstract class is to just implement something and let the derived classes override the behavior. Checking To reply to your edits: just reference the current source code. Generation and Context have replaced the integer-only Format for Mystery Gifts, but Format still exists for Pokémon as it's different from "original Generation". PKHeX/PKHeX.Drawing.Misc/Util/MysteryGiftSpriteUtil.cs Lines 34 to 37 in 1fe2b4f |
Beta Was this translation helpful? Give feedback.
-
Hello I am a software developer who is trying to revive a very old pokemon project that used PkeHex from more than 5 years ago. Currently I am trying to update to the newest version. Of course this will give issues with the code considering many things have changed. I am currently using PKHeX-23.10.11 to do the update.
However I have a few problems finding certain aspects or rather I have a few questions making me unsure if I am doing the right thing here. And I need to ask here to clarify.
Deoxys Alternate form and other Pokémon alternate forms: Byte 0 is the default?
The code I have does have a function to check for the Deoxys form based on game version. This returns an in which I know convert to byte. Since the byte is now the form. So I assume when the byte is value 0, it is the default form. Is this actually true?
I have some code here that uses that uses the user MysteryGift class as input to get an Image back. I have an issue or two.
In the old code there is a check to see if the mystery Gift is a Pokémon or not, which was based on a boolean value in the Mystery Gift Class. I have solved this to say if the Species is higher than 0, but I am unsure if this is the case, I am guessing here.
Is this case or not? Also has what is this is entity boolean here? Is this what the bollean has replaced?
For now these are my issues but I will have many more. I will post them alter when they get resolved.
I post here to ask for help.
Edit above situations except Deoxys have been resolved but there are two more issues in my code that I still need to resolve around the Mystery Gift . There also one around save data but it will be in another discussion.
The old fucntion I have called Image GetSprite(MysteryGift gift°. Has a special scenario to check if the Gift is an item and takes some input in like this
img = GetSprite(gift.Species, gift.Form, gift.Gender, gift.HeldItem, gift.IsEgg, gift.IsShiny, gift.Format);
The thing is Format does not exist anymore in the newer versions and from what I can tell based on this screenshots. I suspect that Format actually now stands for Generation. But I am only 90% sure this is the case.
The next following issue I have is something actually very specific that has to do with ZCrystals. You see in the code of the old project something called the ZCrystal Dictionary is used, to get the item number of the ZCrystal and then set number that item in the application resources. This is gotten from the legal class, the thing is though that function, no longer exists in that class.
So where was this old function placed and how is now called?
Beta Was this translation helpful? Give feedback.
All reactions