Advertiser Content

Pokeemerald trouble adding items

Started by Yknr July 16th, 2019 1:32 AM
  • 506 views
  • 1 replies
Non-binary
USA-PST
Seen 2 Days Ago
Posted August 6th, 2019
9 posts
142 Days
This is just my second day toying around with pokeemerald. I was starting to feel a bit less lost but that turned on it's head when I got my first compile error: src/data/items.h:1: warning: array `gItems' assumed to have one element

as expected, the game refused to compile with one of the game data containers next to empty (I think it would only have it's null value in this case but idk). I added 14 items to items.h (both the one that initializes the items and the one that stores the names), and I made sure to adjust the items count at the end to 391(it was 377 beforehand). I filled in all the data in the other items.h file for the new items like they were meant for the items pocket using the items listed for that pocket as examples. I think I understand all the components of that struct except for secondaryID and type. the numbers assigned to them seem to be almost always 0 and 4 constantly, but I don't know why or what it means for them to differ. so that's one thing that could have broken it.

the only other thing I can think of that could have broken it is that I added an item_ball script so I could test one of the items and just used an arbitrary number for the number next to the name of the script. I tried to make it unique, and checked it against all the other scripts in that folder and it cleared. but I don't know the theory behind those numbers. I assume that they are pointer addresses?? in which case do I just use trial and error until I find an unoccupied address? or is there a better way?

any help here would be wonderful, I haven't touched pokecommunity in forever. didn't even know I had an account. so please tell me of any mistakes I make formatting or etiquette wise.

(I don't think this relevant, but I'm trying add hold items that make the game think that the Pokemon holding them has the item's assigned field move. pretty sure I got the implementation for that good, but that's in party_menu.c; I don't think the interferes, but I could be wrong.)
Advertiser Content