• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.
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:
 
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..
 
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?
 
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. :(
 
Last edited:
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:
 
Try waitmovement 0x1. The game waits for sprite 0 to finish moving when it didn't move in the first place, thus freezing.
 
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:

I can almost guarentee the issue is in using the wrong XSE. What version are you using?
 
Last edited:
Oh, my bad. I forgot :(
I have my Waitmovement usually set to the person.
 
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.

From my experience, waitmovement 0x0 waits for the last person event during the applymovement to finish and then the script continues.

Code:
#org @start
...
applymovement 0x1 @m1
applymovement 0x2 @m2
applymovement 0x3 @m3
waitmovement 0x0
...
end

#org @m1
#raw 0x08 0x08 0x08 0x08 0x08 0x01 0xFE

#org @m2
#raw 0x08 0x08 0x01 0xFE

#org @m3
#raw 0x01 0xFE

The script continues after person event number 3 is done moving, even though person events 1 and 2 aren't done moving yet.
But that's from my experience on hacking Ruby for so many years. No idea about FireRed though.


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. :(

You have probably overwrote data on a non-free space on your ROM by accident. =/

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:

Try adding "nop1" right after your 'playsong' and 'fadesong' codes.
 
From my experience, waitmovement 0x0 waits for the last person event during the applymovement to finish and then the script continues.

Code:
#org @start
...
applymovement 0x1 @m1
applymovement 0x2 @m2
applymovement 0x3 @m3
waitmovement 0x0
...
end

#org @m1
#raw 0x08 0x08 0x08 0x08 0x08 0x01 0xFE

#org @m2
#raw 0x08 0x08 0x01 0xFE

#org @m3
#raw 0x01 0xFE

The script continues after person event number 3 is done moving, even though person events 1 and 2 aren't done moving yet.
But that's from my experience on hacking Ruby for so many years. No idea about FireRed though.

I did experience this in Ruby. I always make sure my movements are the same length, just out of habit, using delays and such, so maybe this carries over into FireRed. However, the main point was that it doesn't wait for person event 0. So, yeah... Thanks, I need to look into that for other games.

Try adding "nop1" right after your 'playsong' and 'fadesong' codes.

It ran just fine when I compiled it, so I don't think it is the script itself, but it is worth a try.

This is what it looks like:

Spoiler:

That is correct. hmmmm
 
Last edited:
Hello, I am new here.
I wanted to make a script for Pokemon Firered. I made an applymovement script and at the end of it I wanted that the person who talk to me disappears after it.

So here is the script

Spoiler:


So the script works fine everytime, but the problem is that you can't see the sprite of the person sometimes. Also after the script sometimes the person is there again and sometimes not. It isn't regulary. I have this problem with all sprites which I want to hide.
Hope you understand my problem and someone can fix it.
 
Hello, I am new here.
I wanted to make a script for Pokemon Firered. I made an applymovement script and at the end of it I wanted that the person who talk to me disappears after it.

So here is the script

Spoiler:


So the script works fine everytime, but the problem is that you can't see the sprite of the person sometimes. Also after the script sometimes the person is there again and sometimes not. It isn't regulary. I have this problem with all sprites which I want to hide.
Hope you understand my problem and someone can fix it.

Read this: https://www.pokecommunity.com/threads/302347
 
So you have to use the "safe flags" between 200 and 2FF?!
I think it works now, thanks a lot!
 
Ok, That could be the reason why sometimes you saw the sprite and sometimes not. Hope my scripts will work now.
 
Status
Not open for further replies.
Back
Top