You are not logged in.
Pages: 1
I ran into this before and I swore I had it ironed out, but not so much apparently.
I added a string of new items early on, and went back in and added a new string of items.
Successfully added data to:
- items.asm, for the identifiers and functions
- itemprices.asm, for the new items
- item_names.asm
- key_items.asm (which was my issue the first time)
The new items are potion items, the code for their function works just fine, but upon the use, the screen reverts to the menu and my first position party member remains visible. When I close out the menu, all of the sprites disappear. If I move, it can lock up. If I pull up my party menu and back out, everything comes back and works perfectly.
The displaced potion items work perfectly. Other items work fine. Just these new ones do not.
Pokemon: Project Neo A Pokemon hack 15 years in the making...
Offline
https://github.com/TheFakeMateo/RedPlus … s.asm#L460
Items that pull up the party menu need to be added to the list in engine/menu/start_sub_menus.asm and I see you didn't list that as a file you edited, so I'd give that a try. That seems to be the only thing you're missing, looking back at the commit where I added berry items.
Last edited by Mateo (2016-04-19 04:31:59)
I am not very active on this forum. I only pop in from time to time.
Offline
Yup, that does the trick! And it appears I had *that* part down the first time as my first such item is on that list :D
Joys of being away from a code base this long I suppose~
Thanks!
Pokemon: Project Neo A Pokemon hack 15 years in the making...
Offline
No problem, glad to help.
I am not very active on this forum. I only pop in from time to time.
Offline
New element in the ongoing saga:
The new item, with one item in the back pack, shows the quantity; additional copies of the item and the quantity (x2, x3, etc) disappears. It stacks, it just doesn't SHOW its stacking.
Pokemon: Project Neo A Pokemon hack 15 years in the making...
Offline
Still can't sort the stacking issue...
Here's my key_items.asm file:
KeyItemBitfield: ; e799 (3:6799) ;1 = Not a key item ;0 = Key Item or not-stackable item
db %11110000
db %00000001
db %11110000
db %01001111
db %00000000
db %10011111
db %00000000
db %11000000
db %11110000
db %00111011
db %00000000 ;db %00000000
db %00000000 ; \
db %00000000 ; Unused Items, gibberish items
db %00000000 ; /
db %00001111 ; - New Items
db %11111000 ; - New Items
And here's my understanding of the items:
Line #1
dw ItemUseBall ; MASTER_BALL
dw ItemUseBall ; ULTRA_BALL
dw ItemUseBall ; GREAT_BALL
dw ItemUseBall ; POKE_BALL
dw ItemUseTownMap ; TOWN_MAP
dw ItemUseBicycle ; BICYCLE
dw ItemUseSurfboard ; out-of-battle Surf effect
dw ItemUseBall ; SAFARI_BALL
Line #2
dw ItemUsePokedex ; POKEDEX
dw ItemUseEvoStone ; MOON_STONE
dw ItemUseMedicine ; ANTIDOTE
dw ItemUseMedicine ; BURN_HEAL
dw ItemUseMedicine ; ICE_HEAL
dw ItemUseMedicine ; AWAKENING
dw ItemUseMedicine ; PARLYZ_HEAL
dw ItemUseMedicine ; FULL_RESTORE
Line #3
dw ItemUseMedicine ; MAX_POTION
dw ItemUseMedicine ; HYPER_POTION
dw ItemUseMedicine ; SUPER_POTION
dw ItemUseMedicine ; POTION
dw ItemUseBait ; BOULDERBADGE
dw ItemUseRock ; CASCADEBADGE
dw UnusableItem ; THUNDERBADGE
dw UnusableItem ; RAINBOWBADGE
Line #4
dw UnusableItem ; SOULBADGE
dw UnusableItem ; MARSHBADGE
dw UnusableItem ; VOLCANOBADGE
dw UnusableItem ; EARTHBADGE
dw ItemUseEscapeRope ; ESCAPE_ROPE
dw ItemUseRepel ; REPEL
dw UnusableItem ; OLD_AMBER
dw ItemUseEvoStone ; FIRE_STONE
Line #5
dw ItemUseEvoStone ; THUNDER_STONE
dw ItemUseEvoStone ; WATER_STONE
dw ItemUseVitamin ; HP_UP
dw ItemUseVitamin ; PROTEIN
dw ItemUseVitamin ; IRON
dw ItemUseVitamin ; CARBOS
dw ItemUseVitamin ; CALCIUM
dw ItemUseVitamin ; RARE_CANDY
Line #6
dw UnusableItem ; DOME_FOSSIL
dw UnusableItem ; HELIX_FOSSIL
dw UnusableItem ; SECRET_KEY
dw UnusableItem
dw UnusableItem ; BIKE_VOUCHER
dw ItemUseXAccuracy ; X_ACCURACY
dw ItemUseEvoStone ; LEAF_STONE
dw ItemUseCardKey ; CARD_KEY
Line #7
dw UnusableItem ; NUGGET
dw UnusableItem ; ??? PP_UP
dw ItemUsePokedoll ; POKE_DOLL
dw ItemUseMedicine ; FULL_HEAL
dw ItemUseMedicine ; REVIVE
dw ItemUseMedicine ; MAX_REVIVE
dw ItemUseGuardSpec ; GUARD_SPEC_
dw ItemUseSuperRepel ; SUPER_REPL
Line #8
dw ItemUseMaxRepel ; MAX_REPEL
dw ItemUseDireHit ; DIRE_HIT
dw UnusableItem ; COIN
dw ItemUseMedicine ; FRESH_WATER
dw ItemUseMedicine ; SODA_POP
dw ItemUseMedicine ; LEMONADE
dw UnusableItem ; S_S__TICKET
dw UnusableItem ; GOLD_TEETH
Line #9
dw ItemUseXStat ; X_ATTACK
dw ItemUseXStat ; X_DEFEND
dw ItemUseXStat ; X_SPEED
dw ItemUseXStat ; X_SPECIAL
dw ItemUseCoinCase ; COIN_CASE
dw ItemUseOaksParcel ; OAKS_PARCEL
dw ItemUseItemfinder ; ITEMFINDER
dw UnusableItem ; SILPH_SCOPE
Line #10
dw ItemUsePokeflute ; POKE_FLUTE
dw UnusableItem ; LIFT_KEY
dw UnusableItem ; EXP__ALL
dw OldRodCode ; OLD_ROD
dw GoodRodCode ; GOOD_ROD
dw SuperRodCode ; SUPER_ROD
dw ItemUsePPUp ; PP_UP (real one)
dw ItemUsePPRestore ; ETHER
Line #11
dw ItemUsePPRestore ; MAX_ETHER
dw ItemUsePPRestore ; ELIXER
dw ItemUsePPRestore ; MAX_ELIXER
dw UnusableItem ; B2
dw UnusableItem ; B1
dw UnusableItem ; 1
dw UnusableItem ; 2
dw UnusableItem ; 3
Line #12
dw UnusableItem ; 4
dw UnusableItem ; 5
dw UnusableItem ; 6
dw UnusableItem ; 7
dw UnusableItem ; 8
dw UnusableItem ; 9
dw UnusableItem ; 10
dw UnusableItem ; 11
Line #13
dw UnusableItem ; B4
dw UnusableItem ; UNUSED 1
dw UnusableItem ; UNUSED 2
dw UnusableItem ; UNUSED 3
dw UnusableItem ; UNUSED 4
dw UnusableItem ; UNUSED 5
dw UnusableItem ; UNUSED 6
dw UnusableItem ; UNUSED 7
Line #14
dw UnusableItem ; UNUSED 8
dw UnusableItem ; UNUSED 9
dw UnusableItem ; UNUSED 10
dw UnusableItem ; UNUSED 10
dw UnusableItem ; UNUSED 12
dw UnusableItem ; UNUSED 13
dw UnusableItem ; UNUSED 14
dw UnusableItem ; UNUSED 15
Line #15
dw UnusableItem ; UNUSED 16
dw UnusableItem ; UNUSED 17
dw UnusableItem ; UNUSED 18
dw UnusableItem ; UNUSED 19
dw ItemUseEvoStone ; MIST STONE $75
dw UnusableItem ; ROCKETBALL $76
dw UnusableItem ; ROCKETBALL G $77
dw UnusableItem ; ROCKETBALL U $78
Line #16
dw UnusableItem ; ROCKETBALL M $79
dw ItemUseMedicine ; RKT M. POTION $7A
dw ItemUseMedicine ; RKT H. POTION $7B
dw ItemUseMedicine ; RKT S. POTION $7C
dw ItemUseMedicine ; RKT POTION $7D
dw UnusableItem ; UNUSED, $7E
dw UnusableItem ; UNUSED, $7F
dw UnusableItem ; UNUSED $80
Now, I am confused on something...Moon Stone is stackable isn't it? So why does it not show as stackable? And does that have anything to do with why my RKT POTION item is not stackable?
Last edited by daMoose52 (2016-05-03 23:29:18)
Pokemon: Project Neo A Pokemon hack 15 years in the making...
Offline
You know what...never mind I think. I must have the whole thing backwards looking at it.
0 must be a non-key, stackable item
1 must be a keyed item
And I knew elsewhere the byte read backwards but this seemed to line up with the inverted understanding of the items...except, now, I realize it doesn't...
AND I am dumber than I thought; there's a line in engine/items/items.asm that tells the game how many bytes to grab to view the bits...and my new items were failing because they were on a byte outside of the pulled range. Yay!
Last edited by daMoose52 (2016-05-04 01:41:07)
Pokemon: Project Neo A Pokemon hack 15 years in the making...
Offline
Yeah, the bits are read right to left, so it's easy to get thrown off when you're used to reading everything left to right. And yeah, 0 is a normal item, 1 is a key item. Glad you got it figured out.
I am not very active on this forum. I only pop in from time to time.
Offline
What's funny is I'm *used* to the bytes reading backwards, but somewhere the note about the 1 being a normal item and 0 being a key item was there, and may have been inserted by me after the first go-round, so reading it back it looked like it was right, reading left to right, which seemed odd and out of place but oh well, some things behave weirdly... ^_^
Pokemon: Project Neo A Pokemon hack 15 years in the making...
Offline
Pages: 1