Script Help Thread (DO NOT REQUEST SCRIPTS) Page 359

Started by HackMew December 20th, 2008 5:10 AM
  • 626078 views
  • 9682 replies

Teh Blazer

Divider of Zero

Age 27
Male
'MERICA
Seen January 18th, 2019
Posted June 19th, 2018
776 posts
14.3 Years
mhh anyone can explain me a Follow here Script?
pls °O°
You have the person that's following be one step behind the person that's being followed. Essentially, you're gonna have them have the same movements but the follower will be one movement behind the followee.
Being a hero is overrated anyways
Female
Seen November 8th, 2015
Posted July 17th, 2015
61 posts
9.6 Years
Does anyone know if I need a call or something else to go to a custom script/asm in a GBC rom? I need to go from a specific ROM bank location to a custom one, meaning to go from RO14 to RO1E or RO1F...

The Vocaloids battling with Pokemon? What could go wrong?
http://www.youtube.com/watch?v=xI8YOOHlEXQ
Po pi po! (Pokemon Gold music import)
Check out my channel for more!

miksy91

Dark Energy is back in action! ;)

Male
Finland
Seen September 21st, 2022
Posted September 21st, 2022
1,480 posts
14.6 Years
Does anyone know if I need a call or something else to go to a custom script/asm in a GBC rom? I need to go from a specific ROM bank location to a custom one, meaning to go from RO14 to RO1E or RO1F...
See what they say here in Pandocs --> Memory Bank Controllers under "MBC3".

2000-3FFF - ROM Bank Number (Write Only)
 
Same as for MBC1, except that the whole 7 bits of the RAM Bank Number are written directly to this address. As for the MBC1, writing a value of 00h, will select Bank 01h instead. All other values 01-7Fh select the corresponding ROM Banks.
To make more sense, what this small text string here says is that by writing a value to somewhere in ram between addresses $2000 and $3FFF, the rom bank that is currently accessable from addresses $4000-$7FFF is changed.
(Writing 00 won't "work" since rom bank 0 has to be always accessable right here between $0000-$3FFF.)

This is how you can change rom banks in all of its simplicity. However, it's safe to say that we would run into problems if all we could do would be jumping from rom bank into another without being able to call anything from another rom bank. In Gold and Silver, "RST 8" is made to function as a "3-byte call" from current address to rom address determined by a and hl (a = rom bank, hl = address).

ld a, (rom bank)
ld hl, (address)
RST 8
....
---------
00:0008
jp 2E27
---------
00:2E27 // whole functionality
1) Stores the current rom bank onto stack
2) Calls RST 10 to switch the rom bank
3) Call 2E48 calls "jp hl" which now jumps to the address determined before RST 8 (a:hl). When that routine ends with "ret", we return here after this call 2E48.
4) Value of bc is stored in CFE0-CFE1.
5) Original rom bank (and the value of f register) is popped into bc.
6) Call RST 10 returns the original rom bank.
7) Original value of bc is taken back from CFE0-CFE1.
8) Routine ends and we go back executing code at the original routine (after RST 8).
Pokémon Dark Energy
Some ROM hacking related stuff
Male
Seen July 14th, 2020
Posted September 14th, 2015
215 posts
10.7 Years
Alright so I am writing a script where when you talk to this man, him and his abra will teleport you across the lake. When he does, you him and his abra will appear on the otherside and you can talk to him again and get teleported again.

I have it set up so there are two old man (one is always hidden with a flag) and there is always an abra beside the old man (there are two but one is always hidden by a flag).

This is what ACTUALLY happens when I talk to the old man. I get teleported across, but the old man I just talked to doesn't disapear while the abra does. When I try to talk to the other old man, he just stops after he tells abra to teleport.

this is the code

Spoiler:
#dynamic 0x800000

#org @main
lock
faceplayer
textcolor 0x0
msgbox @talk2 MSG_YESNO
compare LASTRESULT 0x1
if 0x1 goto @main3
msgbox @talk3 MSG_NORMAL
release
end

#org @main3
msgbox @talk4 MSG_NORMAL
checkflag 0x3C
if 0x1 goto @main4A
checkflag 0x36
if 0x1 goto @main4B
release
end

#org @main4A
applymovement 0x8 0x880175F
waitmovement 0x0
msgbox @talk5 MSG_NORMAL
fadescreen 0x1
clearflag 0x3C
clearflag 0x4B
setflag 0x36
setflag 0x37
hidesprite 0x8
hidesprite 0xB
showsprite 0x9
showsprite 0xA
warp 0x3 0x20 0xFF 0x18 0x1E
applymovement MOVE_PLAYER 0x8800EE1
waitmovement 0x0
fadescreen 0x0
goto @main5

#org @main4B
applymovement 0x9 0x8800EDB
waitmovement 0x0
msgbox @talk5 MSG_NORMAL
fadescreen 0x1
clearflag 0x36
clearflag 0x67
setflag 0x3C
setflag 0x4B
hidesprite 0x9
hidesprite 0xA
showsprite 0x8
showsprite 0xB
warp 0x3 0x20 0xFF 0x1E 0x06
applymovement MOVE_PLAYER 0x8800EDB
waitmovement 0x0
fadescreen 0x0
goto @main5

#org @main5
msgbox @talk6 MSG_NORMAL
release
end

#org @talk2
= Hello there!\nMe and my ABRA teleport people\lacross the water.\pWould you like us to teleport you\nto the other side?

#org @talk3
= Alright well I will always be here\nso if you change your mind let\lme know!

#org @talk4
= Alright hold on!\nABRA use teleport!

#org @talk5
= ABRA: Abrraaaa!

#org @talk6
= There you go young one!\pIf you want to go back, ask me\nand I will be more than willing\lto teleport you back!


Anyone know what's wrong with my script? Please let me know!
Check out my Pokemon Rom! Click the Image Below!

JordanB500

Former Pokemon League Champion

Age 36
Male
Independence MO
Seen October 31st, 2022
Posted October 24th, 2022
100 posts
15.3 Years
Emerald:
Person Event:
PKSV-UI:
Spoiler:
#org 0x86B475C
checkflag 0x201
if B_True goto $GotBall
checkitem 0x2
compare LASTRESULT 10
if B_<< goto $NoUltra
message $WantBall
$WantBall 1 = Oh, You have ten Ultra Balls.\pIf you want i can trade you a MasterBall \lfor ten of your UltraBalls...\pWhat do you say?
boxset 5
compare LASTRESULT 10
if B_FALSE goto $DontGet
giveitem 0x1 1
removeitem 0x2 10
Release
end

#ORG $GotBall
Lock
Faceplayer
message $Likeballs
$Likeballs 1 = Smart Choice!
boxset 6
release
end

#ORG $NoUltra
Lock
Faceplayer
message $ugotnoballs
$ugotnoballs 1 = Oh, you... dont have ten Ultra Balls!?\lCome back when you get ten!!/p and ill give ya something good!!
boxset 6
release
end

#ORG $DontGet
Lock
Faceplayer
message $badchoice
$badchoice 1 = its your loss!!\nI guess ill be keeping these for myself.
boxset 6
release
end


Did i do that correctly??




i used a modifyed sample of a script that i got from a thread on pokecommunity i tryed to compile it but even the sample script wouldnt compile kept saying "Unknown value in IF (Value must be integer)" so i was wondering is there a way to fix this script also idk if im doing this right with the modified script i want to be able to trade 10 ultra balls for a masterball

but i also want to be able to repeat the event




Rezordaxx

Asks many questions!

Age 24
Male
The Netherlands
Seen January 15th, 2017
Posted June 17th, 2015
290 posts
9.7 Years
Emerald:
Person Event:
PKSV-UI:
Spoiler:
#org 0x86B475C
checkflag 0x201
if B_True goto $GotBall
checkitem 0x2
compare LASTRESULT 10
if B_<< goto $NoUltra
message $WantBall
$WantBall 1 = Oh, You have ten Ultra Balls.\pIf you want i can trade you a MasterBall \lfor ten of your UltraBalls...\pWhat do you say?
boxset 5
compare LASTRESULT 10
if B_FALSE goto $DontGet
giveitem 0x1 1
removeitem 0x2 10
Release
end

#ORG $GotBall
Lock
Faceplayer
message $Likeballs
$Likeballs 1 = Smart Choice!
boxset 6
release
end

#ORG $NoUltra
Lock
Faceplayer
message $ugotnoballs
$ugotnoballs 1 = Oh, you... dont have ten Ultra Balls!?\lCome back when you get ten!!/p and ill give ya something good!!
boxset 6
release
end

#ORG $DontGet
Lock
Faceplayer
message $badchoice
$badchoice 1 = its your loss!!\nI guess ill be keeping these for myself.
boxset 6
release
end


Did i do that correctly??




i used a modifyed sample of a script that i got from a thread on pokecommunity i tryed to compile it but even the sample script wouldnt compile kept saying "Unknown value in IF (Value must be integer)" so i was wondering is there a way to fix this script also idk if im doing this right with the modified script i want to be able to trade 10 ultra balls for a masterball

but i also want to be able to repeat the event
Remove

checkflag 0x201
if B_True goto $Gotball
if you want to repeat it

Does it give you a line at the error like @line 22 or something?

I recommend XSE instead of pokescript xse is much easy'r to work with,

My hack

Teh Blazer

Divider of Zero

Age 27
Male
'MERICA
Seen January 18th, 2019
Posted June 19th, 2018
776 posts
14.3 Years
Remove

checkflag 0x201
if B_True goto $Gotball
if you want to repeat it

Does it give you a line at the error like @line 22 or something?

I recommend XSE instead of pokescript xse is much easy'r to work with,
In addition to that, you're also forgetting a dynamic.
(If pksv doesn't use dynamics, then please ignore me completely)
Being a hero is overrated anyways

Orifiel

Priestess

Female
Tokyo, Japan
Seen May 3rd, 2015
Posted May 5th, 2014
413 posts
9.8 Years
Initialized.
#ORG
-> 0x86B475C
CHECKITEM
-> 0x2
Unknown value in CHECKITEM (Value must be integer)

btw tried usin xse and it crashed
Try downloading Unofficial XSE, also the script works completely different in XSE.
If you are gonna use XSE then you must take XSE tutorial.
~ Pair | Character | Previously L96 ~

Rezordaxx

Asks many questions!

Age 24
Male
The Netherlands
Seen January 15th, 2017
Posted June 17th, 2015
290 posts
9.7 Years
Initialized.
#ORG
-> 0x86B475C
CHECKITEM
-> 0x2
Unknown value in CHECKITEM (Value must be integer)

btw tried usin xse and it crashed
If u say it crashed we cant help you tell us the error message of the crash mine crashed before too bit now it works fine

The value must always come right after the command so CHEKITEM 0x2

My hack

JordanB500

Former Pokemon League Champion

Age 36
Male
Independence MO
Seen October 31st, 2022
Posted October 24th, 2022
100 posts
15.3 Years
]i did it just says it that way in the log and the error is
run-rime error 9
Subscript out of range

also where do i get the unofficial version?



sorry still new to adding screenshots to the posts




Rezordaxx

Asks many questions!

Age 24
Male
The Netherlands
Seen January 15th, 2017
Posted June 17th, 2015
290 posts
9.7 Years
]i did it just says it that way in the log and the error is
run-rime error 9
Subscript out of range

also where do i get the unofficial version?



sorry still new to adding screenshots to the posts
http://youtu.be/EQFv9DsvWMI
Maybe this wil help you with your error

My hack

JordanB500

Former Pokemon League Champion

Age 36
Male
Independence MO
Seen October 31st, 2022
Posted October 24th, 2022
100 posts
15.3 Years
ty one more question is there a way to change the script for the opening sequence with prof birch? or use different music for that part? i know i couldnt find that in am

Edit: just changed the script again now it says
Spoiler:
#org 0x86B475C
checkitem 0x2 10
if B_<< goto $NoUltra
message $WantBalls
$WantBalls = Oh, You have ten Ultra Balls.\pIf you want i can trade you a MasterBall \lfor ten of your UltraBalls...\pWhat do you say?
boxset 5
compare LASTRESULT 10
if B_FALSE goto $DontGet
giveitem 0x1 1
removeitem 0x2 10
Release
end

#ORG $NoUltra
Lock
Faceplayer
message $NoBalls
$NoBalls 1 = Oh, you... dont have ten Ultra Balls!?\lCome back when you get ten!!/p and ill give ya something good!!
boxset 6
release
end

#ORG $DontGet
Lock
Faceplayer
message $Badchoice
$Badchoice 1 = its your loss!!
boxset 6
release
end


and in xse it says too many parameters on line 4 the correct number is 2

so still gettin nowhere




GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)

Age 24
Female
Earth
Seen December 9th, 2016
Posted December 5th, 2016
2,475 posts
10.6 Years
ty one more question is there a way to change the script for the opening sequence with prof birch? or use different music for that part? i know i couldnt find that in am

Edit: just changed the script again now it says
Spoiler:
#org 0x86B475C
checkitem 0x2 10
if B_<< goto $NoUltra
message $WantBalls
$WantBalls = Oh, You have ten Ultra Balls.\pIf you want i can trade you a MasterBall \lfor ten of your UltraBalls...\pWhat do you say?
boxset 5
compare LASTRESULT 10
if B_FALSE goto $DontGet
giveitem 0x1 1
removeitem 0x2 10
Release
end

#ORG $NoUltra
Lock
Faceplayer
message $NoBalls
$NoBalls 1 = Oh, you... dont have ten Ultra Balls!?\lCome back when you get ten!!/p and ill give ya something good!!
boxset 6
release
end

#ORG $DontGet
Lock
Faceplayer
message $Badchoice
$Badchoice 1 = its your loss!!
boxset 6
release
end


and in xse it says too many parameters on line 4 the correct number is 2

so still gettin nowhere
The intro is not a script. It's ASM with text. You can find the offsets with a-text but I advise not using it to repoint
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Youtube Channel

Support me at my site!
Pokémon Platinum Red and Blue
Male
Seen July 14th, 2020
Posted September 14th, 2015
215 posts
10.7 Years
Alright so I am writing a script where when you talk to this man, him and his abra will teleport you across the lake. When he does, you him and his abra will appear on the otherside and you can talk to him again and get teleported again.

I have it set up so there are two old man (one is always hidden with a flag) and there is always an abra beside the old man (there are two but one is always hidden by a flag).

This is what ACTUALLY happens when I talk to the old man. I get teleported across, but the old man I just talked to doesn't disapear while the abra does. When I try to talk to the other old man, he just stops after he tells abra to teleport.

this is the code

Spoiler:
#dynamic 0x800000

#org @main
lock
faceplayer
textcolor 0x0
msgbox @talk2 MSG_YESNO
compare LASTRESULT 0x1
if 0x1 goto @main3
msgbox @talk3 MSG_NORMAL
release
end

#org @main3
msgbox @talk4 MSG_NORMAL
checkflag 0x3C
if 0x1 goto @main4A
checkflag 0x36
if 0x1 goto @main4B
release
end

#org @main4A
applymovement 0x8 0x880175F
waitmovement 0x0
msgbox @talk5 MSG_NORMAL
fadescreen 0x1
clearflag 0x3C
clearflag 0x4B
setflag 0x36
setflag 0x37
hidesprite 0x8
hidesprite 0xB
showsprite 0x9
showsprite 0xA
warp 0x3 0x20 0xFF 0x18 0x1E
applymovement MOVE_PLAYER 0x8800EE1
waitmovement 0x0
fadescreen 0x0
goto @main5

#org @main4B
applymovement 0x9 0x8800EDB
waitmovement 0x0
msgbox @talk5 MSG_NORMAL
fadescreen 0x1
clearflag 0x36
clearflag 0x67
setflag 0x3C
setflag 0x4B
hidesprite 0x9
hidesprite 0xA
showsprite 0x8
showsprite 0xB
warp 0x3 0x20 0xFF 0x1E 0x06
applymovement MOVE_PLAYER 0x8800EDB
waitmovement 0x0
fadescreen 0x0
goto @main5

#org @main5
msgbox @talk6 MSG_NORMAL
release
end

#org @talk2
= Hello there!\nMe and my ABRA teleport people\lacross the water.\pWould you like us to teleport you\nto the other side?

#org @talk3
= Alright well I will always be here\nso if you change your mind let\lme know!

#org @talk4
= Alright hold on!\nABRA use teleport!

#org @talk5
= ABRA: Abrraaaa!

#org @talk6
= There you go young one!\pIf you want to go back, ask me\nand I will be more than willing\lto teleport you back!
Check out my Pokemon Rom! Click the Image Below!

Rezordaxx

Asks many questions!

Age 24
Male
The Netherlands
Seen January 15th, 2017
Posted June 17th, 2015
290 posts
9.7 Years
ty one more question is there a way to change the script for the opening sequence with prof birch? or use different music for that part? i know i couldnt find that in am

Edit: just changed the script again now it says
Spoiler:
#org 0x86B475C
checkitem 0x2 10
if B_<< goto $NoUltra
message $WantBalls
$WantBalls = Oh, You have ten Ultra Balls.\pIf you want i can trade you a MasterBall \lfor ten of your UltraBalls...\pWhat do you say?
boxset 5
compare LASTRESULT 10
if B_FALSE goto $DontGet
giveitem 0x1 1
removeitem 0x2 10
Release
end

#ORG $NoUltra
Lock
Faceplayer
message $NoBalls
$NoBalls 1 = Oh, you... dont have ten Ultra Balls!?\lCome back when you get ten!!/p and ill give ya something good!!
boxset 6
release
end

#ORG $DontGet
Lock
Faceplayer
message $Badchoice
$Badchoice 1 = its your loss!!
boxset 6
release
end


and in xse it says too many parameters on line 4 the correct number is 2

so still gettin nowhere
You are getting somewhere but its not in XSE Language!

Replace al the $ with @ because in pokescript $ is a pointer and in xse @ is a pointer

You always start a xse script with #Dynamic 0x(theoffsetofyourscript)

And the reason of your error is that you dont have 0x6 whicheans boxset 6 after the pointer to your text so it would be ;

#dynamic 0x(offset)

#org @start
Lock
Faceplayer
Message @wantballs 0x6
Release
End

#org @wantballs
= Hey kid, you want some pokeballs?

You get what i mean?
So you put the pointers to your text then put 0x6 or 0x5 which is a yes/no box
Then finish your script
Make another #org with the pointer of your message and i you have got other messages you make other #org 's with those message pointers

So if you translate your script to the xse way it will work
There are some huge indepth xse tutorials in the tutorials section check them out!
Hope this helped you more indepth!

Edit: push f1 in xse if you want help with some commands

My hack
Female
Seen November 8th, 2015
Posted July 17th, 2015
61 posts
9.6 Years
I'm in DIRE NEED of assistance!

I was editing Prof Elm's Lab in JohtoMap on my Pokemon Gold ROM, and I changed the offset for Cyndaquil's ball to 6670 from 40C8. When I re-checked the ROM (opening in JohtoMap) the offset reverted to 4070.

I tried resetting it several times, but it kept going back to 4070. So, I fixed the part back to normal, and went to test my changes (from earlier). Everything is normal, I checked over and over, but WHENEVER I SELECT CYNDAQUIL it blanks out to a black screen and hangs, or resets all glitchy to the Title Screen.

I repaired the map with the clean ROM back to the settings (checking Map Properties, and copy-pasting the good code from 180000 to 182670) and it still blanks out.

I have no idea what JohtoMap did, but Cyndaquil's ball is damaged!!!

The Vocaloids battling with Pokemon? What could go wrong?
http://www.youtube.com/watch?v=xI8YOOHlEXQ
Po pi po! (Pokemon Gold music import)
Check out my channel for more!

miksy91

Dark Energy is back in action! ;)

Male
Finland
Seen September 21st, 2022
Posted September 21st, 2022
1,480 posts
14.6 Years
I'm in DIRE NEED of assistance!

I was editing Prof Elm's Lab in JohtoMap on my Pokemon Gold ROM, and I changed the offset for Cyndaquil's ball to 6670 from 40C8. When I re-checked the ROM (opening in JohtoMap) the offset reverted to 4070.

I tried resetting it several times, but it kept going back to 4070. So, I fixed the part back to normal, and went to test my changes (from earlier). Everything is normal, I checked over and over, but WHENEVER I SELECT CYNDAQUIL it blanks out to a black screen and hangs, or resets all glitchy to the Title Screen.

I repaired the map with the clean ROM back to the settings (checking Map Properties, and copy-pasting the good code from 180000 to 182670) and it still blanks out.

I have no idea what JohtoMap did, but Cyndaquil's ball is damaged!!!
Your problem is most likely something extremely simple like false bit values of Function part in [Color|Function] byte of the person event. As for what comes to the script pointer value changing into 4070, I don't know, but you probably did something wrong there.

I could explain better, but what's the point..
Pokémon Dark Energy
Some ROM hacking related stuff
Female
Seen November 8th, 2015
Posted July 17th, 2015
61 posts
9.6 Years
Your problem is most likely something extremely simple like false bit values of Function part in [Color|Function] byte of the person event. As for what comes to the script pointer value changing into 4070, I don't know, but you probably did something wrong there.

I could explain better, but what's the point..
Yeah, but what's odd is when I kept trying to change it to 6670, and saved, I would go back with it being 4070.

But yeah, idk, it looked like it was reading the wrong value perhaps, or writing to the wrong value.

*I guess I'll have to trigger some breakpoints in bgb to figure it out (groan)*

The Vocaloids battling with Pokemon? What could go wrong?
http://www.youtube.com/watch?v=xI8YOOHlEXQ
Po pi po! (Pokemon Gold music import)
Check out my channel for more!

miksy91

Dark Energy is back in action! ;)

Male
Finland
Seen September 21st, 2022
Posted September 21st, 2022
1,480 posts
14.6 Years
Yeah, but what's odd is when I kept trying to change it to 6670, and saved, I would go back with it being 4070.

But yeah, idk, it looked like it was reading the wrong value perhaps, or writing to the wrong value.

*I guess I'll have to trigger some breakpoints in bgb to figure it out (groan)*
Why don't you just hex edit everything first (event's data and script) and make see it work out in the game? When it works, there is obviously nothing wrong with the person event in general.

Then you can check if Johtomap has still problems editing the event data. If it has, there is most likely some kind of programming error in that tool (although I doubt it since I have used it for a long time). It should load and store all kinds of data related to person events accurately (doesn't go for editing signposts though).
Pokémon Dark Energy
Some ROM hacking related stuff
Female
Seen November 8th, 2015
Posted July 17th, 2015
61 posts
9.6 Years
Why don't you just hex edit everything first (event's data and script) and make see it work out in the game? When it works, there is obviously nothing wrong with the person event in general.

Then you can check if Johtomap has still problems editing the event data. If it has, there is most likely some kind of programming error in that tool (although I doubt it since I have used it for a long time). It should load and store all kinds of data related to person events accurately (doesn't go for editing signposts though).
The Map/Event data was reset to normal from copying the data from a clean ROM, however it still crashes. i.e. the script was always normal, even when reverted.

I noticed a real oddity... it would stay on 0038: FF - rst 38, and the stack would keep popping 0039... I have no idea where the problem is coming from.

The pointer BEFORE that is FE85, which is an OAM location, which contains the value FF... I can see that the pointer is wrong somehow... but FE85??

EDIT: and now it's FE7E........ yeah..... ._.

EDIT2: looking closer at the place where it's loading the values, it appears as though it should be 7DFE by what the values are showing, but it's loading it wrong.

The Vocaloids battling with Pokemon? What could go wrong?
http://www.youtube.com/watch?v=xI8YOOHlEXQ
Po pi po! (Pokemon Gold music import)
Check out my channel for more!

miksy91

Dark Energy is back in action! ;)

Male
Finland
Seen September 21st, 2022
Posted September 21st, 2022
1,480 posts
14.6 Years
The Map/Event data was reset to normal from copying the data from a clean ROM, however it still crashes. i.e. the script was always normal, even when reverted.

I noticed a real oddity... it would stay on 0038: FF - rst 38, and the stack would keep popping 0039... I have no idea where the problem is coming from.

The pointer BEFORE that is FE85, which is an OAM location, which contains the value FF... I can see that the pointer is wrong somehow... but FE85??

EDIT: and now it's FE7E........ yeah..... ._.
Okay, so the pointer to Cyndaquil script is back to normal (and so is its script, right) ?
Does the problem only occur with Cyndaquil event?

All I can pick up from this is that you have either programmed something wrong (with asm) yourself, or some data for example in rom bank 0 has been edited by an accident.

Edit:
Sounds like some "table handler" isn't doing the job right. Instead of loading some 16-bit value in little endian, you'll get it in big endian instead. If you can fix the problem by debugging, good. But if not, you can also try tracking down the bug with ips files (especially if you have kept backups). If you haven't kept regular backups, this method is pretty useless though. I really advise keeping backups though - I have almost 1000 copies of Dark Energy in my computer (with version numbers at the end of their names).

P.S
Just as interesting note, the freezing during that script happens due to a thing which is called "stack overflow". It's a common programming error especially when trying to implement a program, or part of it, with recursion.
Pokémon Dark Energy
Some ROM hacking related stuff

Sniper

ふゆかい

Male
Philippines
Seen August 9th, 2016
Posted June 5th, 2016
1,412 posts
9.5 Years
Hi, I've made a setvar script on firered hack. (JPAN's engine patch)
Then I have a successful one but when the script is done, it keeps repeating.
Here's my script:
Spoiler:
#dynamic 0x800000

#org @start
setvar 0x4000 0x1
if 0x1 goto @done
special 0x113
applymovement 0x7F @camera
waitmovement 0x0
playsong 0x110 0x0
msgbox @1 0x6
msgbox @2 0x6
applymovement 0x1 @move
waitmovement 0x0
msgbox @that 0x6
fadesong 0x117
applymovement 0x1 @move1
waitmovement 0x0
msgbox @3 0x6
applymovement 0x7F @camera1
waitmovement 0x0
special 0x114
applymovement 0xFF @move2
waitmovement 0x0
msgbox @4 0x6
applymovement 0x1 @move3
waitmovement 0x0
release
end

#org @done
release
end

#org @camera
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move
#raw 0x53
#raw 0x53
#raw 0xFE

#org @move1
#raw 0x3
#raw 0x62
#raw 0xFE

#org @camera1
#raw 0x13
#raw 0xFE

#org @move2
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move3
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x2
#raw 0xFE

#org @1
= [black_fr]We now bring you this report!\nJust five minutes ago, today..\pWe heard Prof.Oak have visited\nOur region in a certain town!

#org @2
= [blue_fr]So his aide was not lying.\nHe really is gonna come here!

#org @that
= [black_fr]That is all, good citizens!\nPlease take a picture for me!

#org @3
= [black_fr]Brother:[blue_fr] Oh, [black_fr][Player][blue_fr] done there?\nI've got to tell you something.

#org @4
= [blue_fr]Listen, you know Professor Oak?\nHis the famous reasercher, [black_fr][player][blue_fr].\pI received a word from one\nof his aide on this very town.\pReason is, still not clear to me.\nBut he's looking for you now.\pI don't know why he is.\nBut you should wait for him.\pHuh, where? Outside of course.\nHe'll be here, any minute now.\pNow, now! you should get going.\nTalk to me after your done.


I don't know what happens. I don't see anything wrong.