__fred__40
fred
- 277
- Posts
- 5
- Years
- mt silver
- Seen Mar 6, 2022
How can I decompile a script?Moreover,when decompiled can I then compile such script in another rom?
'---------------
#org 0x800000
msgbox 0x880000B MSG_FACE '"Hello world!"
release
end
'---------
' Strings
'---------
#org 0x80000B
= Hello world!
#dynamic 0x800000
#org @start
msgbox @talk 0x2
release
end
#org @talk
= Hello world!
I'm sure you've seen this before. The biggest difference between the two is that the pointers are not dynamic (@start, @talk), but static (0x800000, 0x80000B). Unless you're making changes that don't affect the length of a script (e.g turning a 0x0 into a 0x1) or you're an expert scripter and know what you're doing, you should always be working with dynamic pointers. Because of this, it isn't safe to port a decompiled script to another ROM unless you know that it will be inserted into free space, or else you're at risk of overwriting data. Its good practice to change every static pointer to a dynamic one in order to be on the safe side if you want to port.
Thx,
My problem is that I corrupted the texts in Oak's lab and I can't use AText(cause my laptop doesnt meet the requirements or whatever)So i was planning of decompiling the script from a vanilla rom and then compile them into my hack
Do you think that is possible or should I still change all the pointers??
The best way to fix these kinds of issues is by copying and pasting the original data form a clean rom to yours. You can get the script offsets in XSE and copy that data from the clean one to the corrupted one. That should resolve the issue.
Open your game in A-map and look for the Oak's lab map. Click on the tab "header" and locate the map scripts. You need to look for the one that starts upon entering the lab and check that script with a vanilla ROM
Actually you need to look for the map scripts instead of the map script itself. These are the ones that have a button that says "open map script"Ok so if i got It right i should Press crtl+H and activate the professional view and there i found the map script but then It doesnt let me open It and if i try to Copy the offset in an XSE blank window with the rom loaded it gives me a Total no sense script like a warp or something
Did i get It right or should It on the normal view of the header section?
Actually you need to look for the map scripts instead of the map script itself. These are the ones that have a button that says "open map script"
Actually you need to look for the map scripts instead of the map script itself. These are the ones that have a button that says "open map script"