• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

mervyn797

What? I'm right here. >D
1,696
Posts
15
Years
  • Seen Nov 28, 2011
it still didnt work it just froze
Hmm..
Are you script settings in Advance Map correct? Try setting Unkown to 0003 like, this:
scri.png
 

Pokemonguy1990

Pokemon Shoto Saga Creator
45
Posts
13
Years
Using Brock's script, where would i place camera movements? i understand what to use for it (thanks to your tut) but not where to place them. What I'm looking for is to enter the gym, as soon as I enter, the camera moves up to center on the gymleader (10 tiles up), who does their usual talking in the begining, battles, and the finishes with giving the badge and TM, then recenters the camera on the player, at which time you can then leave the gym. I'm also wanting this to happen only BEFORE you beat the leader.

I'm still learning scripting and understand this may be out of my current abilities, I'm not asking for a script, just an explanation as to how i would go about doing this.
 

Teh Blazer

Divider of Zero
776
Posts
15
Years
Using Brock's script, where would i place camera movements? i understand what to use for it (thanks to your tut) but not where to place them. What I'm looking for is to enter the gym, as soon as I enter, the camera moves up to center on the gymleader (10 tiles up), who does their usual talking in the begining, battles, and the finishes with giving the badge and TM, then recenters the camera on the player, at which time you can then leave the gym. I'm also wanting this to happen only BEFORE you beat the leader.

I'm still learning scripting and understand this may be out of my current abilities, I'm not asking for a script, just an explanation as to how i would go about doing this.
Do you mean the commands for the "move-camera" thing?
If no, then I think you mean a level script; something that activates as soon as you enter the map.
If not a level script, then a normal script? If so, then you'd probably place the move camera after all of your locks and preparation (checkflags and whatnot). In the game, it would appear first since it doesn't visually show you it is checking the flags. id I get it? :3


One small thing, my question, is there a command in XSE to open up multiple picture boxes at once (like showpokepic but opening up more than one)?
 

masterquestmq

Enthusiastic Rom Hacker
194
Posts
13
Years
  • Seen Nov 19, 2023
Nurse Joy script

working wit JPAN rom engine
and having trouble setting up the pokemon center...game frezzes after nurse joy gives the players pokemon back (before the hope we see u again line)

would appreciate any sort of help


#dynamic 0x720000
#org @nurse_start
lock
faceplayer
special 0x187
compare LASTRESULT 0x2
if 0x1 goto @error_release
preparemsg @heal_q '"Welcome to our POKéMON CENTER!\pWo..."
waitmsg
multichoice 0x13 0x8 0x0 0x2
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto @set_heal_poke
compare 0x8000 0x1
if 0x1 goto @go_away
compare 0x8000 0x7F
if 0x1 goto @go_away
release
end

'---------------
#org @error_release
release
end

'---------------
#org @set_heal_poke
cmdc3 0xF
preparemsg @will_heal '"Okay, I'll take your POKéMON for a..."
waitmsg
call @heal_anime
special 0x169
goto @check_wireless

'---------------
#org @go_away
msgbox @goodbye MSG_KEEPOPEN '"We hope to see you again!"
release
end
 

Equin

Got it memorized?
55
Posts
13
Years
  • Seen Dec 14, 2010
One small thing, my question, is there a command in XSE to open up multiple picture boxes at once (like showpokepic but opening up more than one)?
I'm going to take a guess and say no. This is just hypothetical, but if there was such a command on XSE, it should be in here. I'm not saying it's not impossible, though. But, it wouldn't happen to be in a raw command on XSE.
 

Pokemonguy1990

Pokemon Shoto Saga Creator
45
Posts
13
Years
Do you mean the commands for the "move-camera" thing?
If no, then I think you mean a level script; something that activates as soon as you enter the map.
If not a level script, then a normal script? If so, then you'd probably place the move camera after all of your locks and preparation (checkflags and whatnot). In the game, it would appear first since it doesn't visually show you it is checking the flags. id I get it? :3


One small thing, my question, is there a command in XSE to open up multiple picture boxes at once (like showpokepic but opening up more than one)?
Normal script, i think. I'm not for sure how to explain it. here's what i have set up/would like to do.

Spoiler:
 
1
Posts
13
Years
  • Seen Dec 12, 2010
[XSE],[FR] New guy scripting problem

First off, Hi there PokéCommunity! First post here!

I recently(days) started scripting and I have encountered a problem.
Just to confirm things, I have tried search button, but the phrases I was searching for did not find me what I wanted. Call me lazy, but I did not want to go through 200 pages looking for something that might help me.
I figured this would be more efficient.

Anyway, for the problem:

In my script(s) I have designed Oak to say something(@speak1) and send you away unless you have completed an event(flag 0x1200). After that he will talk for some time, then move abit and release you. Basics.
The first event script works fine. However, when I try to talk to Oak, he keeps saying:

Code:
"It's like an encyclopedia, but the pages are blank"
My script:

Code:
#dynamic 0x71AB00

#org @start
lock
faceplayer
Message @speak1 0x6
checkflag 0x1200
if 0x1 goto @gotPKMN
release
end

#org @gotPKMN
Message @speak2 0x6
applymovement 0x3 @move
Message @speak4 0x6
applymovement 0x3 @move2
faceplayer
setflag 0x1211
release
end

#org @speak1
= COMEBACKLATER

#org @speak2
= DONEEVENTMSG

#org @speak4
= PICK A STONE!

#org @move
#raw 0x13
#raw 0x13
#raw 0x0

#org @move2
#raw 0x12
#raw 0x12
(NOTE: the messages are ofc "placeholders" that will eb replaced with proper dialogue later. I do this for the purpose of testing my script before adding text)

My script might also look very "messy" so if you have any tips for me I would appreciate them as well ;)
 

Your Mum

Level 2 'THE LEGACY'
5
Posts
13
Years
Hey! Can i just say when I use a script box, I write the script, I do everything right.(vars & stuff) But when i step on the box it's as if it wasnt even there?!
thanks.
 

Equin

Got it memorized?
55
Posts
13
Years
  • Seen Dec 14, 2010
First off, Hi there PokéCommunity! First post here!

I recently(days) started scripting and I have encountered a problem.
Just to confirm things, I have tried search button, but the phrases I was searching for did not find me what I wanted. Call me lazy, but I did not want to go through 200 pages looking for something that might help me.
I figured this would be more efficient.

Anyway, for the problem:

In my script(s) I have designed Oak to say something(@speak1) and send you away unless you have completed an event(flag 0x1200). After that he will talk for some time, then move abit and release you. Basics.
The first event script works fine. However, when I try to talk to Oak, he keeps saying:

Code:
"It's like an encyclopedia, but the pages are blank"
My script:

Code:
#dynamic 0x71AB00

#org @start
lock
faceplayer
Message @speak1 0x6
checkflag 0x1200
if 0x1 goto @gotPKMN
release
end

#org @gotPKMN
Message @speak2 0x6
applymovement 0x3 @move
Message @speak4 0x6
applymovement 0x3 @move2
faceplayer
setflag 0x1211
release
end

#org @speak1
= COMEBACKLATER

#org @speak2
= DONEEVENTMSG

#org @speak4
= PICK A STONE!

#org @move
#raw 0x13
#raw 0x13
#raw 0x0

#org @move2
#raw 0x12
#raw 0x12
(NOTE: the messages are ofc "placeholders" that will eb replaced with proper dialogue later. I do this for the purpose of testing my script before adding text)

My script might also look very "messy" so if you have any tips for me I would appreciate them as well ;)
Well, first of all, your script doesn't seem messy at all.

At the 'move' and 'move2' pointers, there is a '#raw 0xFE' missing at the end of each moevement raw list, vital to the whole command-unless, of course, you forgot to paste it.

Anyway, are you sure that the specified overworld has the script you compiled in the 'script' value, or is it another script? (one that, most probably is the original 'pokedex overworld msg' script)
 

Zeffy

g'day
6,402
Posts
15
Years
  • Age 27
  • Seen Feb 7, 2024
Hey! Can i just say when I use a script box, I write the script, I do everything right.(vars & stuff) But when i step on the box it's as if it wasnt even there?!
thanks.
In A-map, you need to do this:
whattodo.png
 
24
Posts
13
Years
Um... Forgive me if this is a completely "n00bish" question, but...

I'm new to ROM hacking, and, to be honest, I have little to no idea what a script is, or what it does. Help, please...?
 
1,421
Posts
13
Years
Um... Forgive me if this is a completely "n00bish" question, but...

I'm new to ROM hacking, and, to be honest, I have little to no idea what a script is, or what it does. Help, please...?
Scripting is an integral part of rom hacking. A script is just like a set of instructions for the game to perform certain functions. For example,
Code:
'---------------
#org 0x16582F
msgbox 0x817D80D MSG_FACE '"Technology is incredible!\pYou can..."
end

#org 0x17D80D
= Technology is incredible!\pYou can now store and recall items\nand POKéMON as data via PC.
^ This is a script. In game, it will display a message where a person will say the following line- "Technology is incredible! You can now store and recall items and POKéMON as data via PC."

I hope that was somewhat helpful.

If you are looking for a tutorial, check this tutorial!
 
Last edited:

Nerketur

PokéScripter
104
Posts
13
Years
Perhaps this would help? =)

Thanks But it still doesn't work.. is there anything else i can do?

Make sure that you aren't checking for a used flag at the beginning. For example, this script won't work properly, because the flag is used (in FR/LG):
Spoiler:

It would help if you posted the script you have, (within spoiler tags), so we can see if your error is in there. I'm assuming the script compiles, and I'm also assuming you're using XSE.
 

Pokemonguy1990

Pokemon Shoto Saga Creator
45
Posts
13
Years
Is there a way i can erase the content connected to an offset and use it for something else? Like so that the offset will show up in FSF later on?

when i tried to edit the pallet town sign scripts, they started pushing everything around. the end of Oak's lab sign ended up on the players house and overwrote it. so i decided to just write new ones, with new offsets, but I want to be able to use those offsets later on, it just seems like a waste to have them filled and not used.
 

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
Is there a way i can erase the content connected to an offset and use it for something else? Like so that the offset will show up in FSF later on?

when i tried to edit the pallet town sign scripts, they started pushing everything around. the end of Oak's lab sign ended up on the players house and overwrote it. so i decided to just write new ones, with new offsets, but I want to be able to use those offsets later on, it just seems like a waste to have them filled and not used.

I'm not going to tell you what it is, that would defeat the purpose of learning it for yourself now wouldn't it?
But I WILL tell you how to find the information you are looking for.

If you're using XSE, then luckily, there are 2 commands in XSE that, depending on the one you use, can erase the main portion of a script, and leave behind text, movements, etc etc, OR erase the ENTIRE script at the offset you give it.

These 2 commands are located in the Comprehensive XSE Guide, that comes with XSE.
Open XSE, and press F2.
The open the "What makes a Script" section, and select "Preprocessing Directives"
In this section is a list of every command you can give XSE, that isn't a command that is used in the ROM, like #dynamic, or #define.

Have fun!
 

Pokemonguy1990

Pokemon Shoto Saga Creator
45
Posts
13
Years
I'm not going to tell you what it is, that would defeat the purpose of learning it for yourself now wouldn't it?
But I WILL tell you how to find the information you are looking for.

If you're using XSE, then luckily, there are 2 commands in XSE that, depending on the one you use, can erase the main portion of a script, and leave behind text, movements, etc etc, OR erase the ENTIRE script at the offset you give it.

These 2 commands are located in the Comprehensive XSE Guide, that comes with XSE.
Open XSE, and press F2.
The open the "What makes a Script" section, and select "Preprocessing Directives"
In this section is a list of every command you can give XSE, that isn't a command that is used in the ROM, like #dynamic, or #define.

Have fun!

I'm taking that this is it?

#erase
Overwrites a certain amount of bytes with the free space-byte value set, starting from the specified offset.


Usage:
#erase lOffset aValue


Example:

#erase 0x720000 0x64
0x64 (100) bytes from offset 0x720000 got overwritten with free space.

one quick thing, since this says 0x64 (100) bytes... How do i determine how many bytes a script takes? i understand that the number is in hexadecimal, and i can convert from decimal to hexadecimal (thanks to XSE's converter calculater thing) but i don't know where to find the number to convert to erace the proper amount.
 

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
I'm taking that this is it?

#erase
Overwrites a certain amount of bytes with the free space-byte value set, starting from the specified offset.


Usage:
#erase lOffset aValue


Example:

#erase 0x720000 0x64
0x64 (100) bytes from offset 0x720000 got overwritten with free space.

one quick thing, since this says 0x64 (100) bytes... How do i determine how many bytes a script takes? i understand that the number is in hexadecimal, and i can convert from decimal to hexadecimal (thanks to XSE's converter calculater thing) but i don't know where to find the number to convert to erace the proper amount.

Close, but no cigar, keep reading the document, and you'll see 2 more commands that specifically remove a script, automatically figuring the space it takes.

You see, the #erase command can be dangerous, because if you erase something at the wrong place, or if you erase too many bytes, you can potentially ruin other stuff in the ROM.
No, I'm speaking of the #remove, and #removeall commands.
#remove 0xOffset removes the main portion of the script at the offset, but leaves the text, movements, mart data it contains (If it contains any), braille (If any) and other things behind, for future use.
#removeall 0xOffset erases the WHOLE thing, text data, movement data, everything that script pointed to.

For instance, if you were to use the fat guy in Pallet tow's offset for the #remove command, his speech about technology will still exist in the ROM, but the rest of the script is gone, but if you use #removeall instead, that speech is gone, and freespace is left over.

Though if you want to erase images, ASM, and other NON-SCRIPT crap, #erase is your best friend.
 
Status
Not open for further replies.
Back
Top