- 20
- Posts
- 5
- Years
- Seen Aug 28, 2024
Still quite new at ROM hacking and scripting in particular, so I may be missing something obvious that needs pointing out to me.
I've been trying to add a simple pokemart script into Pallet Town as a learning exercise, but I've ran into some issues. When I placed the person outside in Pallet Town, they couldn't be interacted with at all. When I placed them indoors (inside the player's home) they would be interactable and load up the initial message, but would lock the game without opening the pokemart menu. As a test, I assigned the person the script for Cerulean City's pokemart instead, and it worked perfectly. I've all but copied my script from the big XSE scripting tutorial on here, so I'm not sure what I could possibly have done wrong, and I was hoping someone could help.
My script:
Cerulean City's pokemart script for comparison:
The only key difference I can see between the two is the use of special 0x187, though JPAN's big post about Fire Red specials suggests it's an error checking special and nothing specific to pokemarts in particular. Either way, seeing as it features before the pokemart part of the script even happens, surely that can't be what's affecting it?
I've been trying to add a simple pokemart script into Pallet Town as a learning exercise, but I've ran into some issues. When I placed the person outside in Pallet Town, they couldn't be interacted with at all. When I placed them indoors (inside the player's home) they would be interactable and load up the initial message, but would lock the game without opening the pokemart menu. As a test, I assigned the person the script for Cerulean City's pokemart instead, and it worked perfectly. I've all but copied my script from the big XSE scripting tutorial on here, so I'm not sure what I could possibly have done wrong, and I was hoping someone could help.
My script:
Spoiler:
Code:
#dynamic 0x800000
#org @ShopKeep
lock
faceplayer
preparemsg @ShopGreetingsText
waitmsg
pokemart @ShopStock
msgbox @ShopLeavingText 0x6
release
end
#org @ShopGreetingsText
= Hi there! Can I help?
#org @ShopLeavingText
= Thanks for stopping by!
#org @ShopStock
#raw word 0x21
#raw word 0x2C
#raw word 0x2C
#raw word 0xAF
#raw word 0xBD
#raw word 0xBF
#raw word 0xCA
Cerulean City's pokemart script for comparison:
Spoiler:
Code:
'---------------
#org 0x16ACB0
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
lock
faceplayer
preparemsg 0x81A6211 '"Hi, there!\nMay I help you?"
waitmsg
pokemart 0x816ACD8
msgbox 0x81A5190 MSG_KEEPOPEN '"Please come again!"
release
end
'---------------
#org 0x1A7AE0
release
end
'---------
' Strings
'---------
#org 0x1A6211
= Hi, there!\nMay I help you?
#org 0x1A5190
= Please come again!
'-----------
' MartItems
'-----------
#org 0x16ACD8
#raw word 0x4
#raw word 0x16
#raw word 0xD
#raw word 0xE
#raw word 0x12
#raw word 0x11
#raw word 0xF
#raw word 0x55
#raw word 0x56
#raw word 0x0
The only key difference I can see between the two is the use of special 0x187, though JPAN's big post about Fire Red specials suggests it's an error checking special and nothing specific to pokemarts in particular. Either way, seeing as it features before the pokemart part of the script even happens, surely that can't be what's affecting it?
Last edited: