• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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 was just wondering if someone could explain to me how the "set world map" script work such as the one in saffron city in fire red: '---------------
#org 0x167365
setworldmapflag 0x89A
checkflag 0x23C
if 0x0 call 0x8167372
end

'---------------
#org 0x167372
movesprite2 0x6 0x21 0x1F
return
 
I just did as karatekid552 said and looked it up in a-map. the 3rd map script of Sootopolis City seems to have it...

Code:
'---------------
#org 0x1E5946
pause 0x3C
special 0x116
applymovement MOVE_CAMERA 0x81E5A68
waitmovement 0x0
special 0x117
....

Unsure if 0x117 is needed. So try 0x116 then I guess.


weird... i tried that yesterday when i saw a post about it but it didnt work but now it is. maybe it was a script error on my part ie switching the specials positions.

thank you for your help


@karatekid thanks also
 
why is it when i do setvar 0x4014 0x1 and then in the front of the script put compare 0x4014 0x1 if 0x1 goto @done it doesnt work? if i leave the map and come back i can do the script again

Spoiler:
 
why is it when i do setvar 0x4014 0x1 and then in the front of the script put compare 0x4014 0x1 if 0x1 goto @done it doesnt work? if i leave the map and come back i can do the script again

Spoiler:

Are you using a script tile or a level script for this?
 
why is it when i do setvar 0x4014 0x1 and then in the front of the script put compare 0x4014 0x1 if 0x1 goto @done it doesnt work? if i leave the map and come back i can do the script again

Spoiler:

Is flag 0x1106 even safe in the ROM you are using? Try deleting an item on the ground and use that flag instead.
 
why is it when i do setvar 0x4014 0x1 and then in the front of the script put compare 0x4014 0x1 if 0x1 goto @done it doesnt work? if i leave the map and come back i can do the script again

Spoiler:

Try this...
Code:
#org @event
compare 0x4014 0x1
if 0x1 goto @done
[COLOR="Red"]setvar 0x4014 0x1[/COLOR]
removeitem 0x119 0x1
sound 0x15
applymovement MOVE_PLAYER 0x89C9ECD
waitmovement 0xFF
msgbox 0x89C9EB1 MSG_NORMAL
setflag 0x1106
release
end

#org @done
setvar 0x4014 0x1
release
end
 
Try this...
Code:
#org @event
compare 0x4014 0x1
if 0x1 goto @done
[COLOR="Red"]setvar 0x4014 0x1[/COLOR]
removeitem 0x119 0x1
sound 0x15
applymovement MOVE_PLAYER 0x89C9ECD
waitmovement 0xFF
msgbox 0x89C9EB1 MSG_NORMAL
setflag 0x1106
release
end

#org @done
setvar 0x4014 0x1
release
end

shinyquags said some vars arent safe and to test it, i tried 4022 in the place of 4014 with no other changes and it worked. apparently its the vars im using.

thanks anyways !
 
How would I make a script that as soon as you walk downstairs for the first time you get the running shoes? I have tried doing it before but anytime I try it either freezes the game or I get them but they don't work... Oh this is for FR btw
 
Last edited:
How would I make a script that as soon as you walk downstairs for the first time you get the running shoes? I have tried doing it before but anytime I try it either freezes the game or I get them but they don't work... Oh this is for FR btw

use a level script and just use the special for FR running shoes which is special 0x82F

so something like

#dynamic 0xyouroffset

#org @event
lock
msgbox @talk 0x6
special 0x82F
fanfare 0x212
msgbox @received 0x6
waitfanfare
setvar 0x4050 0x1
release
end

#org @talk
= Better put on my shoes!

#org @received
= [player] received the RUNNING SHOES!

something of that matter... obviously change it to what you want and to do a level script, you can learn on this page: https://www.pokecommunity.com/threads/279345
it's like the very last thing on the first post
 
Hi im new and have trouble scripting i dont know if this is where i would post this but i need scripting help and help changing the title screen im using pokemon firered if that makes a difference. Thanks in advance!
 
@Dazza12

Did you Hex Edit the Level Script Header?

If you have not:

View the Map Header with the Advanced Mode (Strg+H)
Note the offset written in "MAP SCRIPT OFFSET" and decompile it with XSE.

You will see nothing, so just click the "Level Script" button (on the very right, the symbol of a tool)

Then you will find something looking like this:

'-----------------------
#org 0x71C5FC
#raw 02
#raw pointer 0xXXXXXXX
#raw 00

'-----------------------
#org 0x71C602
#raw word 0x402A
#raw word 0x0
#raw pointer 0xXXXXXXX
#raw word 0x0

jump to the offset i marked red.
You will find a hex code like this

[Activation Variable] [Value of the Variable] [Offset] FF FF

change the FF FF at the end to 00 00

that should be it.
 
Then you're doing it wrong...

but if the level script is type 02 you have to do this
 
I have 2 other scripts before this one that work fine for eg.

*game start* walk down stairs, mum walks up to PLAYER says something and walks back to where she was. The PLAYER is free to move then. So PLAYER walks outside then my 2nd Map Script kicks in.
A message pops up PLAYER says [ ! ] a trainer walks up to you and talks. PLAYER auto follows trainer into OAKs LAB then my 3rd Map Script kicks in the whole script runs as needed just no release on the end.

I have narrowed the problem in my script down to the very end of it. I added an extra message on to it just before the addvar (which match the one entered in Map Script Settings) and the message popped up. But still couldn't move after the message. What I don't understand is why the 1st Map Script releases PLAYER and this one doesn't when they end exactly the same way. Except the addvar 0xXXXX are different to match the FLAG I put in.
 
Trying to make a script for Fire Red, what am I doing wrong?
It freezes the game, no matter if I had set the flag before or not

Spoiler:
 
Is this a scrip-field? (green S in AM)
Then you have to put in a variable in the "flag" field in AM.
 
Status
Not open for further replies.
Back
Top