The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Other Person Event Overwriting Script Event (https://www.pokecommunity.com/showthread.php?t=349363)

joeytheleo May 22nd, 2015 9:28 AM

Person Event Overwriting Script Event
 
So everytime I compile my script event with new code it gets deleted and replaced with code that makes it so when I step on the script tile it triggers the person events dialogue.

So i have a person that is supposed to say something when you talk to her and she does but then something completely unrelated is supposed to happen when you step on the script tile but instead it just runs through the NPCs dialogue again.

Is there a reason why this happens?

I can post my script if needed

NewDenverCity May 22nd, 2015 9:44 AM

Is the script event pointing to the right thing? Alternatively you could have overwritten the script with the person event by accident or something.

joeytheleo May 22nd, 2015 9:56 AM

Quote:

Originally Posted by NewDenverCity (Post 8762200)
Is the script event pointing to the right thing? Alternatively you could have overwritten the script with the person event by accident or something.

What do you mean by pointing to the right thing. Sadly all the script I wrote for the script tile got deleted when it got overwritten but I am fairly certain the offsets i used for that and my person event did not overlap.

Also I rewrote the script tile like 3 times and every time the person event would overwrite it.

At this point I might just delete the person event and start entirely from scratch :\

NewDenverCity May 22nd, 2015 10:11 AM

In A-Map, it makes a pointer to wherever you made the script. If it's pointing to the person event rather than the script event then of course it's not going to run the scripted event. I'd double check that.

joeytheleo May 22nd, 2015 10:22 AM

Quote:

Originally Posted by NewDenverCity (Post 8762229)
In A-Map, it makes a pointer to wherever you made the script. If it's pointing to the person event rather than the script event then of course it's not going to run the scripted event. I'd double check that.

where is this pointer? sorry theres a reason I'm posting in the beginners lounge xD

joeytheleo May 22nd, 2015 10:55 AM

If it helps this is my person event

Spoiler:
'---------------
#org 0x2F029C
checkflag 0x1
if 0x1 goto 0x82C929C
lock
faceplayer
msgbox 0x82C92BD MSG_NORMAL '"My son starts college today!"
release
end

'---------------
#org 0x2C929C
movesprite 0x2 0x3 0x2
hidesprite 0x2
end


'---------
' Strings
'---------
#org 0x2C92BD
= My son starts college today!


and this is what my script keeps getting changed to

Spoiler:
'---------------
#org 0x2C9128
nop1
nop
if 0x1 goto 0x82C929C
lock
faceplayer
msgbox 0x82C92BD MSG_NORMAL '"My son starts college today!"
release
end

'---------------
#org 0x2C929C
movesprite 0x2 0x3 0x2
hidesprite 0x2
end


'---------
' Strings
'---------
#org 0x2C92BD
= My son starts college today!


The offsets overlap now but when I put in my actual script code they don't.

NewDenverCity May 22nd, 2015 2:36 PM

Ok so I can tell you right now what is wrong with that script. First of all, flag #1 is unsafe. Don't use it for your hack, use 200-2FF. Second, you're not using free space. Free space in a typical ROM hack of FR begins at 0x800000, and you're beginning WAY before that. Nop is 00, which is NOT free space. Free space is the byte FF. In order to fix this, try using #dynamic 0x800000 at the top and then #org @start and @(word) for pointers. By doing that you're hopefully going to be using FF rather than 00. Alternatively, use Free Space Finder to find actually safe data to use.


Also, why are you moving the sprite and then hiding it? If you're hiding the sprite, it should be done when you enter the map or by using person IDs.

joeytheleo May 22nd, 2015 3:23 PM

Quote:

Originally Posted by NewDenverCity (Post 8762531)
Ok so I can tell you right now what is wrong with that script. First of all, flag #1 is unsafe. Don't use it for your hack, use 200-2FF. Second, you're not using free space. Free space in a typical ROM hack of FR begins at 0x800000, and you're beginning WAY before that. Nop is 00, which is NOT free space. Free space is the byte FF. In order to fix this, try using #dynamic 0x800000 at the top and then #org @start and @(word) for pointers. By doing that you're hopefully going to be using FF rather than 00. Alternatively, use Free Space Finder to find actually safe data to use.


Also, why are you moving the sprite and then hiding it? If you're hiding the sprite, it should be done when you enter the map or by using person IDs.

Thanks I'll try this. When I used FSF it gave me those offsets, is there a reason why it did? are my search parameters in FSF maybe incorrect. I had learned since posting my previous response about the right flags to use and have since changed them. Also I am moving the sprite because I want that person event to just be there to block the path during the script but then once the script is complete for them to basically not exist anymore.

On an unrelated note, if you may know how to help this too, my warp tile into my first building is not working. I changed the size of the map if that may create an issue but since its the inside of a building I didnt think it would. The warp is set correctly and when I press "goto" in AdvanceMap it switches to the correct map. However when i try to use the warp in game the screen goes black and nothing happens and I just have to close the game or reload it. Any reason why this might be happening


PS: thanks a bunch for all the help

NewDenverCity May 22nd, 2015 4:37 PM

You could also use a hex editor for 100% assurance that areas are free. No I don't know why it did that.


By putting the hidesprite in the script, it's not going to simply reset every time you leave the map. So when you leave and come back after talking to him you'll see that the person is there again. You should use the person ID, your way won't work properly.


I'd need to see the warp script. Alternatively you could make a script event instead of a warp and they'll work the same way.

joeytheleo May 22nd, 2015 6:23 PM

Well there is no actual script for the warp its just the event

http://gyazo.com/a2a3a33ef0dee18a765b4754109211b4

there is what the warp looks like if that helps


All times are GMT -8. The time now is 2:29 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.