• 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.
22
Posts
11
Years
  • Seen Jan 2, 2013
Hey can anyone help me with a simple battle script. When i try to compile it says "Unknown keyword "boxset" line 6"

#dynamic 0x800000

#org @start
trainerbattle 0x0 0x000 0x0 @before @after
message @beaten 0x6
boxset 0x6
release
end

#org @before
=

#org @after
=

#org @beaten
=
 

Renegade

Time for real life...
995
Posts
12
Years
Hey can anyone help me with a simple battle script. When i try to compile it says "Unknown keyword "boxset" line 6"

#dynamic 0x800000

#org @start
trainerbattle 0x0 0x000 0x0 @before @after
message @beaten 0x6
boxset 0x6
release
end

#org @before
=

#org @after
=

#org @beaten
=

Why do you have the extra boxset 6 anyways? It is not needed. After your "message @beaten" command, you already have 0x6. 0x6 is boxset 6. I'm also not sure why you're compiling it when there is no text in the message commands... (You only have an equals symbol...)



I also have a question. I made this simple battle script:

Code:
#dynamic 0x800380

#org @start
trainerbattle 0x0 0x001 0x0 @before @after
textcolor 0x0
message @beaten 6
release
end

#org @beaten
= You're pretty tough for a new guy.

#org @before
= You look like a new trainer.\nBattle me!

#org @after
= I lost!

But there is a big problem. When I walk into the view distance of this trainer, the "trainerbattle by sight" doesn't work. When I talk to the trainer, he skips directly to the @beaten message, except I haven't even battled him yet... His value in the script is correct in terms of matching the value in PET and I do have the "trainer" box on A-Map checked. I'm not sure why this is happening... Help please?
 
Last edited:
22
Posts
11
Years
  • Seen Jan 2, 2013
Why do you have the extra boxset 6 anyways? It is not needed. After your "message @beaten" command, you already have 0x6. 0x6 is boxset 6. I'm also not sure why you're compiling it when there is no text in the message commands... (You only have an equals symbol...)

i have message there i just erased them before posting and ic now
 

KhaosKnight

The 1 and only Khaotic Hacker
355
Posts
16
Years
  • Seen May 28, 2015
I also have a question. I made this simple battle script:

Code:
#dynamic 0x800380

#org @start
trainerbattle 0x0 0x001 0x0 @before @after
textcolor 0x0
message @beaten 0x6
end

#org @beaten
= You're pretty tough for a new guy.

#org @before
= You look like a new trainer.\nBattle me!

#org @after
= I lost!
But there is a big problem. When I walk into the view distance of this trainer, the "trainerbattle by sight" doesn't work. When I talk to the trainer, he skips directly to the @beaten message, except I haven't even battled him yet... His value in the script is correct in terms of matching the value in PET and I do have the "trainer" box on A-Map checked. I'm not sure why this is happening... Help please?


Did you set view radius in A-Map as well? The script looks fine, although you don't need release and make sure you put 0x before the 6 in your @beaten message. It also doesn't hurt to triple check to see if the values match PET.
 
2
Posts
14
Years
  • Seen Apr 10, 2014
Can anyone help me with this problem? I'm trying to make a givepokemon script for a starter pokemon. It gives you the pokemon but the pokemon button in the menu doesn't show up afterwards. here's my script:

Spoiler:




Using XSE + the original version of Fire Red. I've only been scripting for a week or 2 and I'm not very good at it so any help would be appreciated.
 

SacredMurathJohn

ROM Hacking
41
Posts
11
Years
Can anyone help me with this problem? I'm trying to make a givepokemon script for a starter pokemon. It gives you the pokemon but the pokemon button in the menu doesn't show up afterwards. here's my script:

Spoiler:




Using XSE + the original version of Fire Red. I've only been scripting for a week or 2 and I'm not very good at it so any help would be appreciated.

You need to add setflag 0x828. When this flag is enable, it activates POKéMON menu.
 
7
Posts
11
Years
  • Seen Jul 16, 2012
My script still freezes after the warp. It just creates a black screen and no music plays.
Spoiler:
 

zid_sen

The Sacred Thunder of Aselis
61
Posts
11
Years
Help!

Hai!
I want to ask something,
is something wrong in this script,
Code:
#dynamic 0x3B4D84

#org @start
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x6
release
end

#org @take
givepokemon 0xF1 0x5 0x1D 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @done
msgbox @6 0x4
closeonkeypress
fadescreen 0x1
fanfare 0x100
special 0x0
waitfanfare
fadescreen 0x0
msgbox @7 0x6
release
end

#org @1
= Sepertinya kamu tidak bisa lagi\ndiam disini,\lkamu mau ambil Miltank\lkesayanganmu untuk pergi\ljalan-jalan?

#org @2
= Baiklah,\nBy The Way, Professor Oak mencarimu\ltemuilah dia!\lAtau ambil Miltank milikmu sekarang\ljuga!

#org @3
= [black_fr]Kamu mendapat Miltank!

#org @4
= [black_fr]Kamu mau kasih nama ke\nMiltank milikmu, sayang?

#org @5
= Rawat Miltank baik-baik,\nayahmu yang memberikannya!Miltank\lini awal dari peternakan kita.

#org @6
= Kamu mau Pokemon milikmu sehat\nlagi, sayang?

#org @7
= Buat ibu bangga dengan hasil\npekerjaanmu sekarang!

When i use it,
the person won't talk to me!
 

Alpha_Spike

Ace Trainer
340
Posts
15
Years
Having some trouble getting a script to save in-game correctly. Using XSE and AdvanceMap programs to input a trainer battle.

This is what the script becomes:
Spoiler:


This is what I'm trying to put in:

Spoiler:


What am I doing wrong? Why is the text getting all weirdly mixed up despite putting things in correctly?
 
28
Posts
12
Years
  • Seen May 1, 2022
Game Freezes after script

I made an introduction script for my Rom, it is the only script i have put it if it matters. The script runs fine for the most part, except the movement that is supposed to happen at the end does not happen, the sprite just disappears. After leaving the house the game freezes at one of three points, after talking to the person outside, walking onto the bridge, or going back inside the house (where the Oak sprite remains).

So i guess i have two questions. how do i stop the freezing and how do i make the even occure only once. I set the flag as Oaks person ID.

Spoiler:
 

tajaros

Hi I'm dawg
855
Posts
12
Years
I made an introduction script for my Rom, it is the only script i have put it if it matters. The script runs fine for the most part, except the movement that is supposed to happen at the end does not happen, the sprite just disappears. After leaving the house the game freezes at one of three points, after talking to the person outside, walking onto the bridge, or going back inside the house (where the Oak sprite remains).

So i guess i have two questions. how do i stop the freezing and how do i make the even occure only once. I set the flag as Oaks person ID.

Spoiler:

You forgot to input "waitmovement 0x0" after your last applymovement script, you should just input 2000 in the person ID to make it not happen again.... :)
 

FrozenInfernoZX

What is out there?
756
Posts
11
Years
I'm new here and I am starting to get the hang of basic scripting. However, there are a few tidbits of information that is not registering with me yet. What do I add to my script in order for it to not appear again? I think it has something to do with setvar, but I'm not sure. This script is activated when stepped on.
Spoiler:
 
10,078
Posts
15
Years
  • Age 32
  • UK
  • Seen Oct 17, 2023
My script still freezes after the warp. It just creates a black screen and no music plays.
Spoiler:

Your warp should read:

warp 0x5 0x1 0xFF 0x06 0x0C

Hai!
I want to ask something,
is something wrong in this script,
Spoiler:

When i use it,
the person won't talk to me!

Sounds like a compiling problem or something, recompile the script and double check you're assigning (and saving) it to the right sprite. Sounds stupid I know but I've done that before!

Having some trouble getting a script to save in-game correctly. Using XSE and AdvanceMap programs to input a trainer battle.

This is what the script becomes:
Spoiler:


This is what I'm trying to put in:

Spoiler:


What am I doing wrong? Why is the text getting all weirdly mixed up despite putting things in correctly?

This looks like a case of messing with compiled scripts.

1) Use '#Dynamic 0x800000' and '#org @BlankPointers' when scripting, do not put your own offsets in.
2) Once compiled make sure not to add or remove bytes of the script, as it will change any close scripts as well by erasing or changing their information.

I'm new here and I am starting to get the hang of basic scripting. However, there are a few tidbits of information that is not registering with me yet. What do I add to my script in order for it to not appear again? I think it has something to do with setvar, but I'm not sure. This script is activated when stepped on.
Spoiler:

Set the script tile variable to 4001 and value to 0 (assuming that's what the value should be when you first step on the tile) and this should be fine. If that doesn't seem to be working try using a larger value, perhaps 5000. Some lower variables reset or are influenced by flags and things.
 
3
Posts
12
Years
  • Seen Aug 7, 2012
Having some trouble permanently disappearing some sprites from the map using hidesprite/setflag on the Person ID.

Spoiler:


Not including the strings because they're just simple text and raws that work perfectly fine.

For the purpose of presentation, all three sprites have a Person ID of 1001. (I have run it with separate ID's for each sprite but it comes to the same result) Everything in the event scripts perfectly, but as soon as the script is done and I take one step forward, all the sprites reappear. Not to mention that they don't disappear when leaving and reentering the room. I've used other hacks/clean roms to compare my scripts to but it seems like I'm doing everything I'm supposed to. Although, I am using JPAN's engine if that means anything.
 
Last edited:

Renegade

Time for real life...
995
Posts
12
Years
Hello, I have another question. This script was working as intended, but now I'm using the command "movesprite2" instead of "movesprite".

Code:
#dynamic 0x800260

#org @start
lock
applymovement 0xFF @m1
waitmovement 0x0
applymovement 11 @m2
applymovement 12 @m3
applymovement 0xFF @m4
waitmovement 0x0
pause 0x20
textcolor 0x0
message @t1 6
applymovement 11 @m5
waitmovement 0x0
movesprite2 0x16 0x8 0x3
pause 0x05
applymovement 11 @m6
waitmovement 0x0
movesprite2 0xE 0x8 0x5
pause 0x05
applymovement 11 @m7
waitmovement 0x0
movesprite2 0xF 0x9 0x3
pause 0x05
applymovement 11 @m6
waitmovement 0x0
movesprite2 0x10 0x9 0x5
pause 0x05
applymovement 11 @m7
waitmovement 0x0
movesprite2 0x11 0xA 0x3
pause 0x05
applymovement 11 @m6
waitmovement 0x0
movesprite2 0x12 0xA 0x5
pause 0x05
applymovement 11 @m7
waitmovement 0x0
movesprite2 0x13 0xB 0x3
pause 0x05
applymovement 11 @m6
waitmovement 0x0
movesprite2 0x14 0xB 0x5
pause 0x05
applymovement 11 @m7
waitmovement 0x0
movesprite2 0x15 0xC 0x3
pause 0x05
applymovement 11 @m8
waitmovement 0x0
message @t2 6
applymovement 0xFF @m9
applymovement 12 @m10
waitmovement 0x0
message @t3 6
applymovement 0xFF @m11
waitmovement 0x0
setvar 0x5012 0x1
release
end

#org @m11
#raw 0x11
#raw 0x13
#raw 0x11
#raw 0x13
#raw 0xFE

#org @t3
= \v\h06: You go first, \v\h01.

#org @m10
#raw 0x3
#raw 0xFE

#org @m9
#raw 0x2
#raw 0xFE

#org @t2
= OAK: You may chose a POKéMON now.

#org @m8
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x0
#raw 0xFE

#org @m7
#raw 0x13
#raw 0x1
#raw 0xFE

#org @m6
#raw 0x0
#raw 0xFE

#org @m5
#raw 0x13
#raw 0x13
#raw 0x1
#raw 0xFE

#org @t1
= OAK: Okay, I have nine POKéMON\nhere and you can have one of them.\pI will lay them out for you two.

#org @m4
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @m3
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x1
#raw 0xFE

#org @m2
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x0
#raw 0xFE

#org @m1
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x11
#raw 0xFE

The problem is at the beginning. The sprites that I want to move permanently don't move at all. It's very strange... I inserted this script a while back with the "movesprite" command, and it worked. Then, I recompiled it using the "movesprite2" command, and it stopped working. Once I saw that it stopped working, I switched back to "movesprite" and it still wouldn't work... I'm starting to wonder if maybe now I have too many person events on my map at once? Help please?

EDIT: Oaky, I tried changing the map so there were only 11 people on it and the "movesprite" command still isn't working... I've gone to another map and made a "movesprite" script there (just to make sure that "movesprite" isn't somehow broken or something...) but the "movesprite" command wouldn't work... It seems like it's broken or somthing weird. It was working when I began my hack, but after a while it just... died. I'm trying a different method now, but any information on this problem would be appreciated, as I can no longer use that command as far as I know...
 
Last edited:

zid_sen

The Sacred Thunder of Aselis
61
Posts
11
Years


Sounds like a compiling problem or something, recompile the script and double check you're assigning (and saving) it to the right sprite. Sounds stupid I know but I've done that before!


Not it,
i want it to be a event script!
It be Erika Heart Event.....
So if it to a script,
is something wrong on my script?
 
10,078
Posts
15
Years
  • Age 32
  • UK
  • Seen Oct 17, 2023
Hello, I have another question. This script was working as intended, but now I'm using the command "movesprite2" instead of "movesprite".

Code:
#dynamic 0x800260

#org @start
lock
applymovement 0xFF @m1
waitmovement 0x0
applymovement 11 @m2
applymovement 12 @m3
applymovement 0xFF @m4
waitmovement 0x0
pause 0x20
textcolor 0x0
message @t1 6
applymovement 11 @m5
waitmovement 0x0
movesprite2 0x16 0x8 0x3
pause 0x05
applymovement 11 @m6
waitmovement 0x0
movesprite2 0xE 0x8 0x5
pause 0x05
applymovement 11 @m7
waitmovement 0x0
movesprite2 0xF 0x9 0x3
pause 0x05
applymovement 11 @m6
waitmovement 0x0
movesprite2 0x10 0x9 0x5
pause 0x05
applymovement 11 @m7
waitmovement 0x0
movesprite2 0x11 0xA 0x3
pause 0x05
applymovement 11 @m6
waitmovement 0x0
movesprite2 0x12 0xA 0x5
pause 0x05
applymovement 11 @m7
waitmovement 0x0
movesprite2 0x13 0xB 0x3
pause 0x05
applymovement 11 @m6
waitmovement 0x0
movesprite2 0x14 0xB 0x5
pause 0x05
applymovement 11 @m7
waitmovement 0x0
movesprite2 0x15 0xC 0x3
pause 0x05
applymovement 11 @m8
waitmovement 0x0
message @t2 6
applymovement 0xFF @m9
applymovement 12 @m10
waitmovement 0x0
message @t3 6
applymovement 0xFF @m11
waitmovement 0x0
setvar 0x5012 0x1
release
end

#org @m11
#raw 0x11
#raw 0x13
#raw 0x11
#raw 0x13
#raw 0xFE

#org @t3
= \v\h06: You go first, \v\h01.

#org @m10
#raw 0x3
#raw 0xFE

#org @m9
#raw 0x2
#raw 0xFE

#org @t2
= OAK: You may chose a POKéMON now.

#org @m8
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x0
#raw 0xFE

#org @m7
#raw 0x13
#raw 0x1
#raw 0xFE

#org @m6
#raw 0x0
#raw 0xFE

#org @m5
#raw 0x13
#raw 0x13
#raw 0x1
#raw 0xFE

#org @t1
= OAK: Okay, I have nine POKéMON\nhere and you can have one of them.\pI will lay them out for you two.

#org @m4
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @m3
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x1
#raw 0xFE

#org @m2
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x0
#raw 0xFE

#org @m1
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x11
#raw 0xFE

The problem is at the beginning. The sprites that I want to move permanently don't move at all. It's very strange... I inserted this script a while back with the "movesprite" command, and it worked. Then, I recompiled it using the "movesprite2" command, and it stopped working. Once I saw that it stopped working, I switched back to "movesprite" and it still wouldn't work... I'm starting to wonder if maybe now I have too many person events on my map at once? Help please?

EDIT: Oaky, I tried changing the map so there were only 11 people on it and the "movesprite" command still isn't working... I've gone to another map and made a "movesprite" script there (just to make sure that "movesprite" isn't somehow broken or something...) but the "movesprite" command wouldn't work... It seems like it's broken or somthing weird. It was working when I began my hack, but after a while it just... died. I'm trying a different method now, but any information on this problem would be appreciated, as I can no longer use that command as far as I know...

Have you tried recompiling this from scratch? Rather than editing a compiled script?

Also are you sure you're not mixing up your hex and decimal numbers? Considering your applymovements are in decimal and your movesprites are in hex X__x, it's a very confusing way to write a script.
 

NarutoActor

The rocks cry out to me
1,974
Posts
15
Years
movesprite is for moving the spirte's current position, and movesprite2 too is for perminitaly moving that spirte. So both the commands should be used in conjunction; Hope that helps.
~NarutoActor
 

Skull Kid

The One and Only
24
Posts
14
Years
  • Age 27
  • Seen Sep 12, 2015
Hello, I have just recently started rom hacking and i'm new to scripting and advance map and all that good stuff. Naturally, i'd find some tutorials on how to make my people say different things and I found Diego's tutorial for a basic message saying hello.

Code:
#dynamic 0x(FSF Offset)
#org @start
lock
faceplayer
msgbox @1 0x6
release
end

#org @1
= Hi.\nMy name is Diego.

However, when I put this exact code into XSE and use the free space offset for my person, my rom either freezes or does nothing when I talk to them. Why is this? Do I need to have a specific amount of free bytes in my offset? Is there something special I need to do with my coding? I'm not trying something super advanced here I just want my person to say hello. I've tried many other tutorials as well and haven't had any luck. Help would be appreciated as I don't know where else to turn to. :/
 
Status
Not open for further replies.
Back
Top