Advertiser Content

DrFuji

Heiki Hecchara‌‌

Age 27
Male
Aussie
Seen 6 Minutes Ago
Posted 5 Hours Ago
1,672 posts
10.5 Years
Compiling is the process of turning commands within XSE into a string of hexadecimal values in the ROM. Thus, decompiling is turning a string of hexadecimal values in the ROM into commands within XSE. You decompile with XSE whenever you open a script that has already been inserted in a ROM. Here's what a decompiled scripts looks like vs one that hasn't been compiled yet:

'---------------
#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.

__fred__40

fred

Male
mt silver
Seen 47 Minutes Ago
Posted 3 Hours Ago
111 posts
137 Days
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??
This is the trailer for my new hack rom Pokémon Secret Diaries,check It out!!

https://youtu.be/jxvk8605cVY

Dr. Seuss

Aesthetic  Kaktus

Male
Guatemala City
Seen 6 Hours Ago
Posted 16 Hours Ago
350 posts
6 Years
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.
I'm just a normal romhacker c:

__fred__40

fred

Male
mt silver
Seen 47 Minutes Ago
Posted 3 Hours Ago
111 posts
137 Days
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.
It usually would but i cant find the script that activates when After attempting to go in the tall grass oak stops you and bring you inside and the you know you and the oak walk to where Is the rival.that it the only One i cant find
This is the trailer for my new hack rom Pokémon Secret Diaries,check It out!!

https://youtu.be/jxvk8605cVY

Dr. Seuss

Aesthetic  Kaktus

Male
Guatemala City
Seen 6 Hours Ago
Posted 16 Hours Ago
350 posts
6 Years
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
I'm just a normal romhacker c:

__fred__40

fred

Male
mt silver
Seen 47 Minutes Ago
Posted 3 Hours Ago
111 posts
137 Days
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
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?
This is the trailer for my new hack rom Pokémon Secret Diaries,check It out!!

https://youtu.be/jxvk8605cVY

Dr. Seuss

Aesthetic  Kaktus

Male
Guatemala City
Seen 6 Hours Ago
Posted 16 Hours Ago
350 posts
6 Years
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"
I'm just a normal romhacker c:

__fred__40

fred

Male
mt silver
Seen 47 Minutes Ago
Posted 3 Hours Ago
111 posts
137 Days
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"
Ahhhw ok thx
This is the trailer for my new hack rom Pokémon Secret Diaries,check It out!!

https://youtu.be/jxvk8605cVY

__fred__40

fred

Male
mt silver
Seen 47 Minutes Ago
Posted 3 Hours Ago
111 posts
137 Days
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"
I copied every single script from the lab but it still aint working

I believe that the problem is that the game cant connect the 2 following scripts

this first one(which is an 03 script that activates on map entering/not menu close) which activates when Oak brings you into the lab after having tried to go on tall grass
Spoiler:

#dynamic 0x169006
#org @start
setflag 0x2CF
compare 0x4055 0x1
if 0x1 call @call1
compare 0x4055 0x7
if 0x1 call @call2
compare 0x4055 0x8
if 0x1 call @call3
checkflag 0x247
if 0x1 call @call4
end

#org @call1
movesprite2 0x4 0x6 0xB
spritebehave 0x4 0x7
playsong2 0x12E
return

#org @call2
movesprite2 0x4 0x6 0xB
spritebehave 0x4 0x7
return

#org @call3
setvar 0x4055 0x9
return

#org @call4
setflag 0x24F
return


and the second one(which is a 02 script that SHOULD activates when you walk on a script box) which makes you and Oak walks up towards where the rival stands
Spoiler:

#dynamic 0x1692B6
#org @start
lockall
textcolor 0x0
applymovement 0x4 @move1
waitmovement 0x0
hidesprite 0x4
movesprite2 0x4 0x6 0x3
spritebehave 0x4 0x8
clearflag 0x2B
applymovement 0xFF @move2
waitmovement 0x0
applymovement 0x8 @move3
waitmovement 0x0
clearflag 0x4001
playsong2 0x0
fadedefault
msgbox @msg1 0x4
closeonkeypress
pause 0x3C
msgbox @msg2 0x4
closeonkeypress
pause 0x1E
applymovement 0x8 @move4
waitmovement 0x0
msgbox @msg3 0x4
msgbox @msg4 0x4
setvar 0x4055 0x2
releaseall
end



#org @msg1
= Gary: Gramps!\nI'm fed up with waiting!

#org @msg2
= OAK: Gary?\nLet me think[.]\pOh, that's right, I told you to\ncome! Just wait!\pHere, [player].\pThere are three POKéMON here.\pHaha!\pThe POKéMON are held inside\nthese POKé BALLS.\pWhen I was young, I was a serious\nPOKéMON TRAINER.\pBut now, in my old age, I have\nonly these three left.\pYou can have one.\nGo on, choose!

#org @msg3
= Gary: Hey! Gramps! No fair!\nWhat about me?

#org @msg4
= OAK: Be patient, Gary.\nYou can have one, too!


#org @move1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @move2
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @move3
#raw 0x2E
#raw 0xFE

#org @move4
#raw 0x26
#raw 0x26
#raw 0xFE

I have no idea how are the 2 supposed to be connected

there is also a 3rd script that set the player face up when entering the map(IDK why did the creator put it)that i will put down below just in case
Spoiler:

#dynamic 0x169063
#org @start
spriteface 0xFF 0x2
end


I thought that maybe the fact that I changed the rival name into Gary in every text of the Lab may have a negative effect as flag 24F as something to do with a rival check Idk of what sort(I think is checking how did the player called him in the intro,but thanks to GBA intro manager I took out the possibility of selecting a name for the rival)
This is the trailer for my new hack rom Pokémon Secret Diaries,check It out!!

https://youtu.be/jxvk8605cVY
Advertiser Content