• 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.
79
Posts
13
Years
  • Seen Aug 27, 2014
Ok.

1. Did you remember to copy the script offset XSE gave you and put it into the script offset box in Advance Map?

2. What is the talking height of the signpost set to?

1.yes

2.taling level is always[00] and signpost type is script,if hero is face up[01].
 
17
Posts
13
Years
  • Seen Aug 15, 2013
I've made several talking scripts and more complicated scripts already that work fine, but all of a sudden now when I'm trying to make a generic talking script in XSE I'm getting an error when I try to compile it, preventing me from doing so.

"Error 9: Subscript out of range", on the line the actual dialogue is. It works if I shorten the dialogue to ridiculous extents, but I've made plenty of dialogue longer than that in other scripts. Why is it randomly acting up now?

Just to show you that this is nothing other than a generic talking script I'll post it. Yes, it does hate -both- lines of dialogue.

Spoiler:
 
Last edited:
141
Posts
13
Years
  • Seen Feb 10, 2012
Dig

Spoiler:

Spoiler:


I'm trying to change the check move so that it checks if a pokemon has Dig rather than Dive and then I was gonna change the text on my own. Thanks.
 

SupahNinja

Scripting Ninja
34
Posts
13
Years
  • Seen Dec 23, 2011
Spoiler:

Spoiler:


I'm trying to change the check move so that it checks if a pokemon has Dig rather than Dive and then I was gonna change the text on my own. Thanks.

Change
Code:
checkattack 0x123
to
Code:
checkattack 0x05B
.

A full list of moves can be found in Diegoisawesome's XSE Scripting Tutorial.

I think the only thing is that I haven't given you a list of the attacks yet, have I?
Anyway, here's the list. This will come in handy a little later:
HEX Values
Spoiler:
 
Last edited:
76
Posts
12
Years
  • Seen Jan 12, 2012
Okay, I'm trying to make a script where when you step on the spot, it pops up with a message. HOWEVER. For some reason, the script ONLY works with person events, not with scripts (the green squares with a yellow S).
I'm using XSE with Fire Red BPRE.

Here's my script:
Spoiler:


What happens is, when you step on the spot, it does the "lock" and you can't move, but not thing else happens. The music still plays, but it just locks you forever and doesn't pop up with a message.
 
76
Posts
12
Years
  • Seen Jan 12, 2012

You probably did not set attributes of tile script correctly.

Attributes? I didn't set anything. All I did was a normal script, like one that you would use on a Person.

Are there other commands I have to add?
 
1,344
Posts
14
Years
  • Seen Dec 10, 2021
Oh.

Well how do I set unknown and variable?
I'm using xse by the way.

Go in A-map, to your tile script in the events tab. Under the Delete Event button, fill up the Unknown and Var number boxes with 0300 (Unknown) and 4050 (Var).
 
76
Posts
12
Years
  • Seen Jan 12, 2012
Okay, I'm really having trouble with my script! I keep changing it one way, but it keeps changing back!! Its happened to me before too, its ANNOYING AS HELL.

When I write it its like this:
Spoiler:


Then I click compile.

But when I decompile it / close and reopen it, it changes back to this:
Spoiler:

The red is the part that keeps changing. Its preventing my script from working! Everything works until it gets to that applymovement, then it just stays locked and gets stuck in the script.

Am i doing something wrong??? This isn't the first time its happened to me!
 
Last edited:
275
Posts
13
Years
  • Seen Oct 9, 2019
Educated guess off the top of my head: there might be a problem with your offsets, such that one part of the script overwrites another and breaks compiling.
 
76
Posts
12
Years
  • Seen Jan 12, 2012
Educated guess off the top of my head: there might be a problem with your offsets, such that one part of the script overwrites another and breaks compiling.

Hmm, okay...

Does anyone know what this offset problem might be?
 

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
The red is the part that keeps changing. Its preventing my script from working! Everything works until it gets to that applymovement, then it just stays locked and gets stuck in the script.

Am i doing something wrong??? This isn't the first time its happened to me!
Just repoint offset of that red applymovement to different location ;)
You probably overflowed the previous offset so it keeps glitching.
 

Cathar

/人◕ ‿‿ ◕人\
79
Posts
13
Years
  • Age 36
  • Seen Jul 23, 2016
Hi!
I'm currently working on a hack of FireRed.

I tried changing the texts displayed when you pick your Pokémon in Oak's lab. I've already found the text I have to edit at the end of the script in XSE.

However, when I try to change the text of BULBASAUR, after I compile and save the script, the text I put in changed to "E?"

I was able to change the texts for Squirtle and Charmander, but the first one won't work. I already tried only changing a single letter, or writing the whole sentence from scratch, it always comes out as "E?"

I hope someone can help me and this isn't a mega-noobish question.

Thanks,
Cathar
 

Kaith

Hacker of Fire
49
Posts
12
Years
Hi!
I'm currently working on a hack of FireRed.

I tried changing the texts displayed when you pick your Pokémon in Oak's lab. I've already found the text I have to edit at the end of the script in XSE.

However, when I try to change the text of BULBASAUR, after I compile and save the script, the text I put in changed to "E?"

I was able to change the texts for Squirtle and Charmander, but the first one won't work. I already tried only changing a single letter, or writing the whole sentence from scratch, it always comes out as "E?"

I hope someone can help me and this isn't a mega-noobish question.

Thanks,
Cathar

I had a problem similar to this while editing the sign's infront of Red and Green's houses. All I had to do was rewrite the script. Do you use the text adjusters in XSE? That usual fixes most of your problems.
 

DrerAhv

She That Derps in the Night
9
Posts
13
Years
Okay, I'm trying to code an event that has your mother in the back of the van with you at the beginning of the game. I want the player to be unable to input until the mother notices the character is awake, has an Alert! exclamation point over her head, and says a line of text. At that point the door of the van opens and the player is allowed to input. If they try to talk to the mother before walking out of the van, she will say a different line of text.

Needless to say I've run into some issues compiling this.
I'm using Pokemon Ruby and XSE. The code I input was this;
Code:
#org @start
checkflag 0x828
if 0x0 goto @hey!
if 0x1 goto @nightmare
end

#org @hey!
setflag 0x828
lock
applymovement 0x4 @alert
waitmovement 0x0
msgbox @awake 0x6
release
end

#org @awake
= [player], wake up! \nwe're here. We're here, \nplayer.

#org @alert
#raw 0x56 0xFE

#org @nightmare
checkflag 0x828
if 0x0 goto @hey!
if 0x1 goto @okay

#org @okay
lock
faceplayer
msgbox @feeling 0x6
release
end

#org @feeling
= [player], \nare you feeling okay? \nYou looked like you were \nhaving a nightmare.
release
end

After I compile the code, this is what I get.
Code:
'---------------
#org 0x1C6E1D
checkflag 0x828
if 0x0 goto 0x81C6E2E
if 0x1 goto 0x81C6E7E
end

'---------------
#org 0x1C6E2E
setflag 0x828
lock
msgbox 0x8000006 0x2B '"-¿\h69\h9A1ï\h3D\h84\h82\h0A\h84pÌ..."
pause 0x608
nop
checkpcitem 0x1C6E 0x608
nop1
lighten 0x6E
comparebanktobyte 0x8 0x2
'---------------
#org 0x1C6E7E

'---------
' Strings
'---------
#org 0x6
= -¿\h69\h9A1ï\h3D\h84\h82\h0A\h84pÌ.Ùô\h8B\h98F\h81\h7Fï2¡Dç\h93ÌTîŒ\h46\h4A\h4A\hF8\h27\h31x[OC]Mt\h33\h82oTE<äk\h94T\h4BÌG\h94[Ke]\h8AFÛ\h726\c\h9F\h84\h4D\h732P\h9A[LL][OC]\h972ú\c\h03\h98\h76óëM[LL]ÂÇ-[Ke]E\h38\h84 \h406Ó\v\hFF
For the hell of it I inserted that into the game regardless of how glitched it was; the result was that when I tried to talk to the mother the game froze.
Can anyone tell me where I went wrong with the original code?
 
275
Posts
13
Years
  • Seen Oct 9, 2019
Code:
#org @okay
lock
faceplayer
msgbox @feeling 0x6
release
end

#org @feeling
= [player], \nare you feeling okay? \nYou looked like you were \nhaving a nightmare.
[COLOR=Red]release
end[/COLOR]
Can anyone tell me where I went wrong with the original code?
Remove the red. That needs to be a string and hence can't have commands. The commands can be safely removed since the script that shows that string also runs them.
 
Status
Not open for further replies.
Back
Top