bitKoder
completely unreasonable
- 36
- Posts
- 8
- Years
- Seen Apr 14, 2025
Hey guys,
What I thought would be a relatively simple operation - prompting the player to plant a berry immediately after picking one - has not worked out to be quite so straightforward. Somehow a frankenfunction is being created out of my script when I compile it.
By the way, I am working with a clean Pokémon Emerald ROM.
Here was the part of the berry script I was to edit BEFORE I edited it (the clean vanilla script, in other words):
And after I edited it:
[/COLOR]
In essence, a very minimal change. The completed version will actually do something with the player's response, but at this stage of development I have encountered a problem. Here is the script after compiling:
Somehow "The BAG's BERRIES POCKET is full." (part of the next function) is being cloned into this function. Why is this happening?
I have tried repointing the function, twice. The first time it broke the overworld (the game crashed on trying to load the overworld) and the second time it just seemed to keep using the old, unedited function (even though I had edited the "goto" to point to the new, edited function. This has confirmed my suspicion that I have no idea how to repoint things.
Help would be much appreciated, thank you!
Please let me know if you need more information and I would be happy to supply it. Thanks in advance :)
What I thought would be a relatively simple operation - prompting the player to plant a berry immediately after picking one - has not worked out to be quite so straightforward. Somehow a frankenfunction is being created out of my script when I compile it.
By the way, I am working with a clean Pokémon Emerald ROM.
Here was the part of the berry script I was to edit BEFORE I edited it (the clean vanilla script, in other words):
Code:
Berry picking function:
#org 0x274448
special 0x31
compare 0x8004 0x0
if 0x1 goto 0x8274470
special 0x15F
special 0x32
preparemsg 0x827461B '"[player] picked the [buffer2] [buf..."
fanfare 0x183
waitmsg
waitfanfare
waitkeypress
preparemsg 0x8274630 '"[player] put away the [buffer1]\ni..."
waitmsg
waitkeypress
release
end
Berry picking message:
#org 0x274630
= [player] put away the [buffer1]\nin the BAG's BERRIES POCKET.\pThe soil returned to its soft and\nloamy state.
And after I edited it:
Code:
Berry picking function:
#org 0x274448
special 0x31
compare 0x8004 0x0
if 0x1 goto 0x8274470
special 0x15F
special 0x32
preparemsg 0x827461B '"[player] picked the [buffer2] [buf..."
fanfare 0x183
waitmsg
waitfanfare
waitkeypress
[COLOR="Lime"]release
msgbox 0x8274630 MSG_YESNO '"[player] put away the [buffer1]\ni..."
end[/COLOR]
Berry picking message:
#org 0x274630
[COLOR="lime"]= [player] put away the [buffer1]\nin the BAG's BERRIES POCKET.\pPlant another BERRY?
In essence, a very minimal change. The completed version will actually do something with the player's response, but at this stage of development I have encountered a problem. Here is the script after compiling:
Code:
#org 0x274421
buffernumber 0x1 0x8006
lock
faceplayer
special 0x2E
msgbox 0x82745EE MSG_YESNO '"You found [buffer2] [buffer1]!\pDo..."
compare LASTRESULT 0x1
if 0x1 goto 0x8274448
compare LASTRESULT 0x0
if 0x1 goto 0x8274479
special 0x31
compare 0x8004 0x0
if 0x1 goto 0x8274470
special 0x15F
special 0x32
preparemsg 0x827461B '"[player] picked the [buffer2] [buf..."
fanfare 0x183
waitmsg
waitfanfare
waitkeypress
release
msgbox 0x8274630 MSG_YESNO '"[player] put away the [buffer1]\ni..."
[COLOR="Red"]preparemsg 0x827468F '"The BAG's BERRIES POCKET is full.\..."
waitmsg
waitkeypress[/COLOR]
release
end
Somehow "The BAG's BERRIES POCKET is full." (part of the next function) is being cloned into this function. Why is this happening?
I have tried repointing the function, twice. The first time it broke the overworld (the game crashed on trying to load the overworld) and the second time it just seemed to keep using the old, unedited function (even though I had edited the "goto" to point to the new, edited function. This has confirmed my suspicion that I have no idea how to repoint things.
Help would be much appreciated, thank you!
Please let me know if you need more information and I would be happy to supply it. Thanks in advance :)
Last edited: