• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

Hacks0rus

Monster Raving Looney
24
Posts
12
Years
  • Seen Nov 9, 2012
Ok, back now with yet more problems.

I changed my rom to fire red because Sapphire just wasnt working for me.

i got this script to work:
Spoiler:


but whenever i try a simple script from the tutorials on the forum, the character appears, the message box sound is heard but no message box comes up?

Script:
Spoiler:
 
5
Posts
13
Years
  • Seen Sep 9, 2011
Hello, I would like to change the battle background music of a trainer. It's a script in PKSV. Is there a command that lets you change the background music?

Here is my Script:

Spoiler:
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Ok, back now with yet more problems.

I changed my rom to fire red because Sapphire just wasnt working for me.

i got this script to work:
Spoiler:


but whenever i try a simple script from the tutorials on the forum, the character appears, the message box sound is heard but no message box comes up?

Script:
Spoiler:

The script seems fine.

Are you sure you're pasting the correct offset to your sprite? Remember that #dynamic only tells XSE where to start looking for space, and isn't the offset where it's necessarily going to write the data too. Make sure you have Show Log checked in the Batch Compiler, and when you compile the script, see which offset it gives you.

If that's not the problem, try deleting and re-inserting the overworld in A-Map, or changing the person event #.
 

Hacks0rus

Monster Raving Looney
24
Posts
12
Years
  • Seen Nov 9, 2012
Ok. this is the script i put in:

#dynamic 0x71A584
#org @start
lock
faceplayer
msgbox @1 0x6
release
end

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

after compiling and choosing the offset next to @start, this is what it comes up with:

'-----------------------
#org 0x71A584
lock
faceplayer
msgbox 0x871A58F '"Hi.\nMy name is Richard."
release
end


'---------
' Strings
'---------
#org 0x71A58F
= Hi.\nMy name is Richard.

in game the player appears and turns to look but no message box appears.
 

Lyzo

Back from vacation
261
Posts
17
Years
Ok. this is the script i put in:

#dynamic 0x71A584
#org @start
lock
faceplayer
msgbox @1 0x6
release
end

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

after compiling and choosing the offset next to @start, this is what it comes up with:

'-----------------------
#org 0x71A584
lock
faceplayer
msgbox 0x871A58F '"Hi.\nMy name is Richard."
release
end


'---------
' Strings
'---------
#org 0x71A58F
= Hi.\nMy name is Richard.

in game the player appears and turns to look but no message box appears.

That. My friend. Is curious... All I can think of is this:

#dynamic 0xwhateva finds the closest free space to that offset. Most people use #dynamic 0x800000 because the space before that should be left untouched because it isn't free. The actual space that shouldn't be touched is just about below 0x720000 So you could use that as well. But you're below that number, which means that maybe you messed something up? Try using #dynamic 0x800000 or #dynamic 0x720000 and recompile. If that doesn't work, then I guess there's something wrong with your ROM...
 

[T]ouko

Dedicated Scripter!
46
Posts
12
Years
  • Seen Jul 9, 2013
Ok. this is the script i put in:

#dynamic 0x71A584
#org @start
lock
faceplayer
msgbox @1 0x6
release
end

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

after compiling and choosing the offset next to @start, this is what it comes up with:

'-----------------------
#org 0x71A584
lock
faceplayer
msgbox 0x871A58F '"Hi.\nMy name is Richard."
release
end


'---------
' Strings
'---------
#org 0x71A58F
= Hi.\nMy name is Richard.

in game the player appears and turns to look but no message box appears.

I had the same problem, everything would work, except for messages. Applymovement, givepokemon, no problem, but a simple message, it would bleep, and no box. What my problem was, is the wrong version of XSE, I think I had 1.0.1, and next I downloaded v1.1.1 and it worked, same script, same ROM.

I downloaded 1.0.1 in the first place 'cause the links in HackMews factory did not work, so I googled it. But the correct (for me) version can be found in the diegoisawesome's thread somewhere, I posted it too a while ago. Search that thread for the words XSE or something....
 
63
Posts
14
Years

-I'm new to scripting and this is my first superscript
-first do i have this laid out right and are there any problems with it.

when you step on the event a sprite is supposed to flicker a little then appear, someone talks then an exclamation mark appears over another sprite, a lot more talking, then they all walk into a building and it fades the screen and it warps somewhere else.

Spoiler:

 
Last edited:

Lyzo

Back from vacation
261
Posts
17
Years

-I'm new to scripting and this is my first superscript
-first do i have this laid out right and are there any problems with it.

when you step on the event a sprite is supposed to flicker a little then appear, someone talks then an exclamation mark appears over another sprite, a lot more talking, then they all walk into a building and it fades the screen and it warps somewhere else.

Spoiler:


Could you maybe share what goes wrong? But here are a few mistakes, the fixes are in bold ;)

Spoiler:

The waitmovement's aren't necessary, but I'm not sure how you planned the script... So I put them there anyway :P But take them out if you meant it to not pause. You forgot to end your @move2 and @move3 by using #raw 0xFE. Lock and faceplayer aren't needed, seeing as this is an event tile. Unless this happens when talking to a person, then use them, and put them at the front of the script, check for flags after.

Also, always make sure when using applymovement in scripts to have the following settings at the event tile:
after%20change.jpg

Picture is from diegoisawesome's script tutorial.

If this hasn't fixed your issue, repost with extra details on what goes wrong ;)
 
20
Posts
14
Years
My Info
Spoiler:


My Problem

Im trying to make a applymovement/battle script! Just like the ones when Gary battles you. The problem is that my script is not making the person i call upon to move to me and engage in battle! Instead when I walk on the script tile the game freezes. Below is my script.

Spoiler:
 
275
Posts
13
Years
  • Seen Oct 9, 2019
Instead when I walk on the script tile the game freezes.
Something seems off about the offsets in your writebytetooffset calls. Why are you writing data directly to those locations?

(Just loaded a FireRed ROM in VBA... According to its memory viewer, nothing exists past 9FF87BF. In fact, if my math is right, 0xC2FFFE11 would only exist in a 3GB ROM!)
 
20
Posts
14
Years
Something seems off about the offsets in your writebytetooffset calls. Why are you writing data directly to those locations?

(Just loaded a FireRed ROM in VBA... According to its memory viewer, nothing exists past 9FF87BF. In fact, if my math is right, 0xC2FFFE11 would only exist in a 3GB ROM!)

Well actually thats not where i originally wrote the data to, once i compiled my script it seems to automatically put that...
 

iYesith

Moderate Scripter(Expert Soon)
8
Posts
14
Years
Need help please

#org $script
lock
faceplayer
message $intro
$intro 1 = Hello \v\h01, My name is Yesith. I am\nThe best trainer of the whole universe,\pAlso known as.....\na POKEMON MASTER!\pI have been sent from the planet "iY"\nto battle you and see if you are ready\pto be my successor....\nso let us see if you are ready....
boxset 6
checkflag 0x80E
if 0x01 goto $battle
message $not
$not 1 = Sorry...\nBut you are still not ready.\pReturn to me once you have earned all\nof the badges that are of gyms.
boxset 6
release
end

#org $battle
applymovement 0 $pop
$pop 1 ; #binary 0x56 0xFE
pause 0x40
Message $ready
$ready 1 = I see....\nYou are ready to face me in battle as\pyou have earned all of the badges that\nare of gyms.....\pBut it is your decision.....\nAre you ready to battle me?
boxset 5
compare 0x800D 0x0001
if 0x01 goto $sure
message $worthless
$worthless 1 = You are worthless!!\nYou do not deserve to be a pokemon\pmaster!\nI shall leave now...\pAnd never again shall you recieve\nthe oppurtunity.....\pto take my place.....\nPEACE OUT!!
boxset 6
fadescreen 1
removesprite 0
setflag 0x1211
pause 0x10
fadescreen 0
release
end

#org $sure
message $hundred
$hundred 1 = Are you sure you want to battle me?\nCoz all my Pokemon are level 100\pand I have six of them......\nSo tell me...........\pAre you ready??
boxset 5
compare 0x800D 0x0001
if 0x01 goto $ultimate
message $worthless2
$worthless2 1 = You are worthless!!\nYou do not deserve to be a pokemon\pmaster!\nI shall leave now...\pAnd never again shall you recieve\nthe oppurtunity.....\pto take my place.....\nPEACE OUT!!
boxset 6
fadescreen 1
removesprite 0
setflag 0x1211
pause 0x10
fadescreen 0
release
end

#org $ultimate
trainerbattle 0x01 0x00 $see $win $further
$see 1 = I see....so you think you are ready?\nBut I shall be the judge of that!\pLet the battle of the century...Begin!!
$win 1 = You are remarkable!
message $after
$after 1 = I'm leaving now....\nGoing back to my own planet
boxset 6
release
end

#org $further
message $pass
$pass 1 = I see now...\nyou are the chosen one!!!!!\pHereby, you....\nare the new........\pPOKEMON MASTER!!!!!
boxset 6
pause 0x40
message $over
$over 1 = ...................................\pThank god that's over......\nI had it with this formal talk crap!!\pWhy the hell did they even make me\ntalk like this?!!???\pErm.......Anyway, for this epic\nvictory.......you deserve a reward.\pImma give you this Jirachi a'ight??\nYou cool with that??\pCoz that's all I got right now....\nHere ya go!
boxset 6
givepokemon 409 100 0x6D
fanfare 0x13E
waitfanfare
message $gotj
$gotj 1 = You Recieved a Jirachi!\pIf there is no space in your party,\nit will be sent to your storage system
boxset 6
message $leaving
$leaving 1 = I have to go back to planet "iY" now,\nGood luck!!
boxset 6
fadescreen 1
removesprite 0
setflag 0x1211
pause 0x10
fadescreen 0
release
end


There is nothing wrong with the script, but the thing is, i want to do more:

1. Make it so that it's in a different map (after you beat the league, a cave appears and there's a warp tile in the cave which will take you to outer space where you meet him.)
2. Make it so that we are teleported back to right in front of the cave after the battle but the cave will be gone (but if we lost the battle the cave will still be here.)
3. Make a little bleep sound when the exclamation appears.
4. get the option to nickname the jirachi we recieved (i tried but it let's us name the 1st pokemon in our party).
5. Display "the pokemon will be sent to storage" only if there is no space in the party.
6. Make it so that during the battle, the trainer uses his pokemon in an order instead of random.

If it helps......here's the you \tube link to the video of this script:
/watch?v=n2VUxkR6dWo


I'd really appreciate any help....thanks in advance!
 
85
Posts
13
Years
  • Age 32
  • Seen Aug 21, 2014
Well actually thats not where i originally wrote the data to, once i compiled my script it seems to automatically put that...

Can you post your original script; before compiling? It would be better to figure out the problem from the source.
 

tkallab

Should have been in Dissidia
1,031
Posts
16
Years
I have a simple problem here. At least, I hope it's simple, otherwise I'm stuck with this glitch.
I've made a script where the player steps on a tile, then walks up, and a msgbox opens, and that's the script. Don't get me wrong, it works perfectly, but there's a small issue.
You see, the tile the player steps on is a warp. So a little arrow shows up when he steps on it. And then the arrow continues to be there until the script is over.
So, is there a way to remove that arrow while the script is still running?
 

Lyzo

Back from vacation
261
Posts
17
Years
My Info
Spoiler:


My Problem

Im trying to make a applymovement/battle script! Just like the ones when Gary battles you. The problem is that my script is not making the person i call upon to move to me and engage in battle! Instead when I walk on the script tile the game freezes. Below is my script.

Spoiler:
Exactly, it would be useful if you could post your uncompiled script. But, seeing as the script freezes right when you step on it, it might be a much simpler issue. Always when using an applymovement script tile, you should make sure to have the following settings on the tile:
after%20change.jpg

This is a picture from diegoisawesome's script tutorial.

If you have that, then please post your original script!
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
My Info
Spoiler:


My Problem

Im trying to make a applymovement/battle script! Just like the ones when Gary battles you. The problem is that my script is not making the person i call upon to move to me and engage in battle! Instead when I walk on the script tile the game freezes. Below is my script.

Spoiler:

The reason you're getting writebytetooffset commands at the end of your script is because there is already data at that offset either for another script or something else in the game, and XSE ends up merging the two together.

Basically, it's time to use a new offset, because the script you're writing is too long and there's not enough free space to write it to the current offset. Just use #dynamic and write the first script to a new offset and you should be fine.

Just remember that if you edit a script to make it longer, you might not have the free space needed for the new script. I usually use #remove to erase the old script, then compile the script again with #dynamic and that seems to work well.
 

Fortunado

Prof. Hemlock is busy now...
30
Posts
12
Years
  • Age 28
  • Seen Nov 26, 2011
ROM INFO: BPRE Fire Red 1.0 (U)

How can I set a step-count limit like the one in the Safari Zone?
 

Learath2

Scripter
114
Posts
14
Years
ROM INFO: BPRE Fire Red 1.0 (U)

How can I set a step-count limit like the one in the Safari Zone?
Its not just a script you need JPAN's hacked engine wich can be found in Research&Development forum it has a really good readme with explainations.
 

Lyzo

Back from vacation
261
Posts
17
Years
Its not just a script you need JPAN's hacked engine wich can be found in Research&Development forum it has a really good readme with explainations.
Actually... you can do it without JPAN's hacked engine, by using 'special 0xCD'. However, using JPAN's engine makes it much easier, because you can set the amount of steps, check the amount of steps and have more than one step counter... But it isn't required :P
 
Status
Not open for further replies.
Back
Top