evievi Posted June 4 Posted June 4 Hello, Am an experienced user with PKHeX but an inexperienced user when it comes to using the PKHeX.core DLL. I've been making my way through it with some posts, but ran into a part of the code that's not super well documented as it related to held items. So, if I have a PK4 pokemon object for example, it looks like there's an integer field where I can assign it a held item like in the GUI: public override int HeldItem { get => ReadUInt16LittleEndian(Data.AsSpan(0x0A)); set => WriteUInt16LittleEndian(Data.AsSpan(0x0A), (ushort)value); } For other fields (i.e. abilities), I've been able to use the enums in the DLL to decode what number value corresponds to what value. However, there doesn't seen to really be any documentation or references to figure out what means what. I did find some unrelated code in the game strings that mentions held items like max potions, etc. but I'm not sure how to get an index I could use. It also seems like the integer index may change depending on generation because I saw that gen4 mail seems to shift the indexes. Does the integer value used internally correlate with the bulpapedia integer values? ex. below for gen 4: https://bulbapedia.bulbagarden.net/wiki/List_of_items_by_index_number_(Generation_IV)
Kaphotics Posted June 4 Posted June 4 The text resources are the same. https://github.com/kwsch/PKHeX/blob/0bbba81fca3dca5d84b5f800a3496cbf4c9a1b45/PKHeX.Core/Resources/text/items/text_Items_en.txt Games that use different lists (like Gen2) have a separate list.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now