Script Help Thread (DO NOT REQUEST SCRIPTS) Page 338

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

DrFuji

Heiki Hecchara‌‌

Age 30
Male
Aussie
Seen 4 Days Ago
Posted February 12th, 2021
1,693 posts
13.7 Years
@UP
I can type only something like this:
Unknown: $XX
Var numver: $XXXX
So i can't type "300" (i can type only 2 digits).
You can just write '03' then :D
Seen July 6th, 2013
Posted July 6th, 2013
3 posts
9.9 Years
Now, game isn't pausing, but nothing happen.

I edited it to:
'---------------
#org 0x800240
msgbox 0x880043C MSG_KEEPOPEN '"TEST!/n IT'S WORKING!"
checkflag 0x829
if 0x0 goto 0x880026F
checkflag 0x10A
if 0x1 goto 0x880026F
applymovement MOVE_PLAYER 0x8800272
waitmovement 0x0
msgbox 0x880041C MSG_KEEPOPEN '"[player], you have to talk with he..."
releaseall
end

'---------------
#org 0x80026F
releaseall
end


'---------
' Strings
'---------
#org 0x80043C
= TEST!\n IT'S WORKING!

#org 0x80041C
= [player], you have to talk with he!


'-----------
' Movements
'-----------
#org 0x800272
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements
and still nothing happen.

@EDIT
This scripit isn't working too:
#dynamic 0x800460

#org @start
msgbox @test MSG_KEEPOPEN
release
end

#org @test
= TEST!/n IT'S WORKING!
Male
Seen January 20th, 2016
Posted October 8th, 2015
5 posts
10 Years
Hey everyone. Roughneck JB here - Long time lurker, first time hacker.

I just started a FireRed ROM hack, and I've finished scripting up to the point where you receive your Starter & battle your Rival, (as well as a few late-game events), and have somehow managed to permanently stop all wild pokemon from appearing.

I can't find any record of this happening in other tutorials or help questions, nor can I find any flag or variable which could be responsible.
Does anyone here know how to fix this?
Male
Seen 3 Weeks Ago
Posted April 17th, 2015
15 posts
10.6 Years
So after a good few hours of searching around the forums and Google, I have yet to find anything that point's me in the direction of changing how big the spaces are in the Japanese pokemon games, and as anyone with any knowledge of the Japanese language can tell you that the spaces are pretty big overall, which doesn't really work when your trying to have sentences in any kind of language that uses some form of Alphabet (such as English :V ) so any help would be AMAZING!

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
Hey everyone. Roughneck JB here - Long time lurker, first time hacker.

I just started a FireRed ROM hack, and I've finished scripting up to the point where you receive your Starter & battle your Rival, (as well as a few late-game events), and have somehow managed to permanently stop all wild pokemon from appearing.

I can't find any record of this happening in other tutorials or help questions, nor can I find any flag or variable which could be responsible.
Does anyone here know how to fix this?
There are several vars that control repel steps. Did you touch them?:D

Paired with Simba

DrFuji

Heiki Hecchara‌‌

Age 30
Male
Aussie
Seen 4 Days Ago
Posted February 12th, 2021
1,693 posts
13.7 Years
Now, game isn't pausing, but nothing happen.

I edited it to:
'---------------
#org 0x800240
msgbox 0x880043C MSG_KEEPOPEN '"TEST!/n IT'S WORKING!"
checkflag 0x829
if 0x0 goto 0x880026F
checkflag 0x10A
if 0x1 goto 0x880026F
applymovement MOVE_PLAYER 0x8800272
waitmovement 0x0
msgbox 0x880041C MSG_KEEPOPEN '"[player], you have to talk with he..."
releaseall
end

'---------------
#org 0x80026F
releaseall
end


'---------
' Strings
'---------
#org 0x80043C
= TEST!\n IT'S WORKING!

#org 0x80041C
= [player], you have to talk with he!


'-----------
' Movements
'-----------
#org 0x800272
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements
and still nothing happen.

@EDIT
This scripit isn't working too:
#dynamic 0x800460

#org @start
msgbox @test MSG_KEEPOPEN
release
end

#org @test
= TEST!/n IT'S WORKING!
If something simple like your second script isn't working then you are probably using an outdated version of XSE. The most recent release was XSE 1.1.1 which you can download here. Every version of XSE was supposed to auto-update to the most recent build but that system has been broken for a few years now.
Age 34
Male
Seen March 16th, 2022
Posted February 8th, 2019
416 posts
10.3 Years
Hey everyone. Roughneck JB here - Long time lurker, first time hacker.

I just started a FireRed ROM hack, and I've finished scripting up to the point where you receive your Starter & battle your Rival, (as well as a few late-game events), and have somehow managed to permanently stop all wild pokemon from appearing.

I can't find any record of this happening in other tutorials or help questions, nor can I find any flag or variable which could be responsible.
Does anyone here know how to fix this?
if you were editing the maps (or making new ones) and added pokemon, maybe you forgot to set the encounter rate (not percentage) above 0... if its 0 you have a 0% chance of walking into a pokemon...

of course this is map specific

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
@LocksmithArmy, that was my first guess too, but I changed the encounter rates several times & it did nothing.

@Karatekid552, that sounds plausible. I'll try & find out which vars trigger Repel mechanics. Thanks! :D
Look in my signature, I have a list of almost every known flag and var.

Paired with Simba

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
OK, the only Vars I saw which sound like suspects are 4020 - 4025, and I haven't triggered any of them. I even tried a Level script which changed the setting for 4020, and all that did was display the "Repel wore off" message every few steps...

Are there any other known causes?
Behavior Bytes. Open up A-Map and go into the block editor after you open up any out door map. Goto the grass tile, and make sure the behavior bytes is set to 02 02 and the background bytes are 00 01. This goes for all tiles that have grass on them. Also, you must click save indivigually for all tiles.

Paired with Simba
Seen February 1st, 2014
Posted November 23rd, 2013
53 posts
10.6 Years
Hi,

i've two scripts. The first one works fine, if player is facing up the movement apply is different. This is the code:

compare PLAYERFACING UP
if == jump 0x8153B49 ' Equal To
jump 0x8153B59
The second one does not. It enter in LEFT block although player is facing up. This is the code:

compare PLAYERFACING LEFT
if == jump 0x874238A ' Equal To
compare PLAYERFACING RIGHT
if == jump 0x874237B ' Equal To
jump 0x8742399
The only difference is in the first case is a person event (so you have to talk with a person for start the script) while in the second is a script event associated with a tile block.

I'm using PKSV, can anyone help me?

NB. during test in the second case i have also added a faceplayer before but nothing change.

Thanks a lot

pokefreake

Male
Seen November 17th, 2013
Posted October 24th, 2013
69 posts
10.5 Years
I'm making a movement script and I ran into a problem... It works fine like this:
Spoiler:
#dyn 0x740000
#org @main
lock
faceplayer
message @First
callstd MSG_NORMAL
compare playerfacing up
if == call @up
compare playerfacing down
if == call @down
compare playerfacing left
if == call @left
compare playerfacing right
if == call @right
message @Last
callstd MSG_NOCLOSE
pause 0xA
closemsg
applymovement 0x1 @walkaway
applymovement PLAYER @seeaway
pauseevent 0x0
fadedefault
disappear 0x1
setflag 0x200
release
end

#org @up
applymovement 0x1 @leadup
applymovement PLAYER @followup
pauseevent 0x0
return
#org @down
applymovement 0x1 @leaddown
applymovement PLAYER @followdown
pauseevent 0x0
return
#org @left
applymovement 0x1 @leadleft
applymovement PLAYER @followleft
pauseevent 0x0
return
#org @right
applymovement 0x1 @leadright
applymovement PLAYER @followright
pauseevent 0x0
return

But I don't want the sprite to disappear I want it to say something else if you walk to it again. So I tried to add a flag and it glitched the game...

Spoiler:
#dyn 0x740000
#org @main
lock
faceplayer
checkflag 0x201
if == jump @Already
message @First
callstd MSG_NORMAL
compare playerfacing up
if == call @up
compare playerfacing down
if == call @down
compare playerfacing left
if == call @left
compare playerfacing right
if == call @right
message @Last
callstd MSG_NOCLOSE
pause 0xA
closemsg
applymovement 0x1 @walkaway
applymovement PLAYER @seeaway
pauseevent 0x0
fadedefault
setflag 0x201
release
end

#org @up
applymovement 0x1 @leadup
applymovement PLAYER @followup
pauseevent 0x0
return
#org @down
applymovement 0x1 @leaddown
applymovement PLAYER @followdown
pauseevent 0x0
return
#org @left
applymovement 0x1 @leadleft
applymovement PLAYER @followleft
pauseevent 0x0
return
#org @right
applymovement 0x1 @leadright
applymovement PLAYER @followright
pauseevent 0x0
return
#org @Already
message @AlreadyMSG
callstd MSG_NORMAL
#org @AlreadyMSG
= I already showed you where he lives!
Male
Seen January 20th, 2016
Posted October 8th, 2015
5 posts
10 Years
Behavior Bytes. Open up A-Map and go into the block editor after you open up any out door map. Goto the grass tile, and make sure the behavior bytes is set to 02 02 and the background bytes are 00 01. This goes for all tiles that have grass on them. Also, you must click save indivigually for all tiles.
Yep. I did indeed forget that I'd changed a lot of background bytes to 00 20 some time ago. Thanks so much! :D
Male
Seen 2 Weeks Ago
Posted December 22nd, 2022
498 posts
10.2 Years
I have a legendary event with Mew (that I've posted here before) which works as intended except for a small detail: whenever I catch or defeat it and return to the game he's still there until a fadescreen happens at wich point he's removed from the map. Is there a way to make it gone as soon as I defeat/catch it like every other legendary?

Here's the script:

Spoiler:
'---------------
#org 0x7404A7
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x8740523
special 0x188
lock
faceplayer
checksound
cry 0x97 0x2
msgbox 0x8740562 MSG_FACE '"Mew!"
waitcry
pause 0x14
playsong 0x156 0x0
waitkeypress
setflag 0x2FF
setwildbattle 0x97 0x3 0x0
setflag 0x807
special 0x138
waitstate
clearflag 0x807
special2 LASTRESULT 0xB4
compare LASTRESULT 0x7
if 0x1 goto 0x8740526
compare LASTRESULT 0x1
if 0x1 goto 0x8740530
compare LASTRESULT 0x4
if 0x1 goto 0x8740530
setflag 0x201
fadescreen 0x1
setflag 0x2FF
hidesprite LASTTALKED
fadescreen 0x0
bufferpokemon 0x0 0x8004
msgbox 0x8740569 MSG_KEEPOPEN '"The [buffer1] flew away!"
release
end

'---------------
#org 0x740523
release
end

'---------------
#org 0x740526
setflag 0x201
goto 0x874053C

'---------------
#org 0x740530
setvar 0x8004 0x97
goto 0x8740549

'---------------
#org 0x74053C
fadescreen 0x1
setflag 0x2FF
hidesprite LASTTALKED
fadescreen 0x0
release
end

'---------------
#org 0x740549
fadescreen 0x1
setflag 0x2FF
hidesprite LASTTALKED
fadescreen 0x0
bufferpokemon 0x0 0x8004
msgbox 0x8740569 MSG_KEEPOPEN '"The [buffer1] flew away!"
release
end


'---------
' Strings
'---------
#org 0x740562
= Mew!

#org 0x740569
= The [buffer1] flew away!

Satoshi Ookami

Memento Mori

Age 30
Male
Abyss of Time, Great Seal
Seen August 5th, 2018
Posted July 3rd, 2018
14,253 posts
14.8 Years
Move bufferpokemon command before the fadescreen 0x0...

I don't really know why do you use such a complicated way but I guess you have a reason...
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List
Male
Seen February 23rd, 2015
Posted October 17th, 2014
7 posts
9.9 Years
So I've created my own starter Pokemon script. It works all fine except that when I go to start menu -> Pokemon and choose my Pokemon's summary, the game freezes! (The Pokemon's cry plays and it moves and then the music turns a bit more silent. After that I can't do anything)

#org 0x8741497
'-----------------------------------
hidepokepic
disappear LASTTALKED
msgbox 0x87410E9 ' Oak: Congratulations...
callstd MSG_NOCLOSE ' Non-closing message
setflag FR_POKEMON
addpokemon BULBASAUR 5 NONE 0x0 0x0 0x0
storepokemon 0x0 BULBASAUR
message 0x8741048 ' \v\h01 received Bulb...
showmsg
fanfare 0x13E
waitfanfare
msgbox 0x874105F ' Would you like to na... NAMING
callstd MSG_YESNO ' Yes/No message
compare LASTRESULT YES
if == jump 0x8740FB8 ' Equal To
if < jump 0x8740FC7 ' Smaller Than
release
end
Battles and leveling work fine too with that Pokemon.

Ps. The Pokemon that my script gives is the player's first..

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
So I've created my own starter Pokemon script. It works all fine except that when I go to start menu -> Pokemon and choose my Pokemon's summary, the game freezes! (The Pokemon's cry plays and it moves and then the music turns a bit more silent. After that I can't do anything)



Battles and leveling work fine too with that Pokemon.

Ps. The Pokemon that my script gives is the player's first..
This seems more lik a graphics issue. I think the game is having trouble loading the sprite. Did you edit it?

Paired with Simba
Male
Seen February 23rd, 2015
Posted October 17th, 2014
7 posts
9.9 Years
This seems more lik a graphics issue. I think the game is having trouble loading the sprite. Did you edit it?
I haven't edited any bulbasaur sprite but I have changed some other images. I hope I haven't corrupted anything.. :S

EDIT: I can change the summary page if I'm fast enough. But after the cry and the animation, game freezes.. :(
EDIT2: This happens also in the original first Pokemon script in Pallet town so I have probably corrupted something. My backups have this same problem so I must copy all my work to a new fresh vanilla rom.. Luckily I haven't done so much content that it won't probably take so long. :(
Male
GA, USA
Seen August 6th, 2022
Posted July 13th, 2013
72 posts
15.4 Years
Okay, I have a simple applymovement msgbox script, and it freezes right after the applymovement part of my script, and the textbox never comes up. When I step on the green script block, the npc moves properly, stops, and the music just keeps playing and nothing else can be done. I am sure that i have the proper unknown and var numbers for my script, but it still isn't working.

Here is the code:
Spoiler:
#dynamic 0x802E51

#org @start
lock
faceplayer
checkflag 0x200
if 0x1 goto @done
playsong 0x13B 0x0
applymovement 0x01 @move1
waitmovement 0x0
msgbox @1 0x6
applymovement 0x01 @move2
waitmovement 0x0
hidesprite 0x01
fadesong 0x012C
setflag 0x200
release
end

#org @done
hidesprite 0x1
end

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

#org @move2
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

#org @1
= [rival]: Hey [player] I was just\nabout to get you! You're about\lto be late to class! Hurry up and\lget to the classroom downstairs.\lRoom 101.\nSee ya there.



ROMs I Support:

GoGoJJTech

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

Age 24
Female
Earth
Seen December 9th, 2016
Posted December 5th, 2016
2,475 posts
10.5 Years
Try waitmovement 0x1. The game waits for sprite 0 to finish moving when it didn't move in the first place, thus freezing.
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

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
Try waitmovement 0x1. The game waits for sprite 0 to finish moving when it didn't move in the first place, thus freezing.
Dude, we have told you this before. Waitmovement 0x0 waits for all sprites to finish moving, whereas any other number is particular to the event. You can't have a person event 0. That creates issues if you do.

Okay, I have a simple applymovement msgbox script, and it freezes right after the applymovement part of my script, and the textbox never comes up. When I step on the green script block, the npc moves properly, stops, and the music just keeps playing and nothing else can be done. I am sure that i have the proper unknown and var numbers for my script, but it still isn't working.

Here is the code:
Spoiler:
#dynamic 0x802E51

#org @start
lock
faceplayer
checkflag 0x200
if 0x1 goto @done
playsong 0x13B 0x0
applymovement 0x01 @move1
waitmovement 0x0
msgbox @1 0x6
applymovement 0x01 @move2
waitmovement 0x0
hidesprite 0x01
fadesong 0x012C
setflag 0x200
release
end

#org @done
hidesprite 0x1
end

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

#org @move2
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

#org @1
= [rival]: Hey [player] I was just\nabout to get you! You're about\lto be late to class! Hurry up and\lget to the classroom downstairs.\lRoom 101.\nSee ya there.
I can almost guarentee the issue is in using the wrong XSE. What version are you using?

Paired with Simba