I'm very new to ROM hacking and i feel like i'm being dumb but I've been stuck on this for hours.
I'm trying to make a simple person event where you talk to an npc but every time i'm done close of XSE and open the script again, the written script is gone.
I have compiled and saved it but every time i open it, it just goes back to:
and my written script is gone.
This is the script i wrote:
msgbox @test 0x6
= This is a test.
This is my first time posting here so excuse me if i made some kind of mistake.
Thanks in advance
well, how new are u to scripting? I remember when I couldnt compile a single script, but luckily this place has taught me a lot, now usually when u look for free space I start at 0x740000....but I think 0x800000 and above is ok. After you compile your script, you need to copy the offset that the compile gave you....usually if u havent compiled anything after 0x800000, then ur first offset given by the compiler would be 0x800001, just add that offset to ur person event on AM 1.95
This is one of my first time making a ROM hack and this is one of the first scripts I've made. Is there something different you need to do when editing a script instead of making one? Because when I put the same script with a new offset, it works just fine. But when I edit it, it goes back to how it was before i edited it. Is there something besides just saving it you need to do?
Sorry if it sounds confusing(English is not my first language)
yes, editing an existing script might not work if it's more bytes than originally, i think if you edit an existing script, you might corrupt it, so its better that you open up a script and study how the script is made and make your own with dynamic offsets so you don't overwrite anything...and backup your rom often, there's many easy ways to corrupt your rom and if u dont back up often, you will be very sad when you have to start all over with a clean rom.
P.s. I will gladly help you make any script if you tell me what you are looking for. I myself made a whole hack by myself, its not super advance but I do consider myself a good scripter I just wish I was even better with asm.
2. Open Route 1
3. There should be 2 people there. One with a script that will give you potion and one with a script that will give you advice that you can jump down a ledge.
If you can't see any NPC, click the EVENTS tab just below the MAGNIFIER icon
3. Click the NPC with a script that will give you advice. Then look at the very right part of Advance Map.
4. This is the details of the NPC that you clicked. And one of those is Script Offset.
Script offset is the location within your ROM that will tell the game where to look when you interact with this NPC. The script should be $167F52
5. So if you want to edit what will this NPC do when you interact with it, you need to insert a new script here.
6. Open its script with XSE.
Look at the right part of Advance Map, There should be Open Script button
It should open a new window in XSE and you will see :
msgbox 0x81833B9 MSG_FACE '"See those ledges along the road?\p..."
= See those ledges along the road?\pIt's a bit scary, but you can jump\nfrom them.\pYou can get back to Pallet Town\nquicker that way.
7. Delete all of them and input your new script, here is the example :
msgbox @test MSG_FACE
= I like train.
8. Compile it, then XSE will automatically repoints the offsets into your ROM.
9. Pay attention to the detail of XSE Compiler Output. At the bottom of it, you will see Dynamic Offsets
10. Copy the first offset and put it in the NPC Script Offset in the Advance Map.
If your ROM is clean and this is your first script, the offset should start at 800000
11. After you have replaced $167F52 with $800000. Save it.
12. Test your ROM ingame, the NPC should tell you that he likes train instead to tell you to jump off a ledge.