• 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.

Sierra's MEGA-HUGE XSE Scripting Tutorial

7
Posts
7
Years
  • Age 28
  • Seen Nov 30, 2016
Ok help would be appreciated I am pretty new to scripting.
here is my script.

'---------------
#org 0x6B3550
checkflag 0x829
if 0x1 goto 0x8806CB4
msgbox 0x8806CD1 MSG_NORMAL '"I should explore more!"
applymovement MOVE_PLAYER 0x8806CEA
release
end

'---------------
#org 0x806CB4
release
end


'---------
' Strings
'---------
#org 0x806CD1
= I should explore more!


'-----------
' Movements
'-----------
#org 0x806CEA
#raw 0x11 'Step Up (Normal)

It is freezing when i step on the tile.
I have the varnumber and unknown set.

Edit:
ok i fixed the problem of freezing idk how ... but it needs to step up after it says i need to explore more, adn it does not.

Edit:
fixed it by switching the order of message and movement.
now i cant move...
 
Last edited:

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Ok help would be appreciated I am pretty new to scripting.
here is my script.



It is freezing when i step on the tile.
I have the varnumber and unknown set.

Edit:
ok i fixed the problem of freezing idk how ... but it needs to step up after it says i need to explore more, adn it does not.

Edit:
fixed it by switching the order of message and movement.
now i cant move...

Add [waitmovement 0x0] or [waitmovement 0xFF] after your [applymovement].
 
7
Posts
7
Years
  • Age 28
  • Seen Nov 30, 2016
Add [waitmovement 0x0] or [waitmovement 0xFF] after your [applymovement].

Did this forgot to edit that i did.
Still cant move i tried both.

here is what it looks like now.

'---------------
#org 0x6B3550
checkflag 0x829
if 0x1 goto 0x8806CB4
applymovement MOVE_PLAYER 0x8806CEA
msgbox 0x8806CD1 MSG_NORMAL '"I should explore more!"
waitmovement 0xFF
release
end

'---------------
#org 0x806CB4
release
end


'---------
' Strings
'---------
#org 0x806CD1
= I should explore more!


'-----------
' Movements
'-----------
#org 0x806CEA
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
 
Last edited:
7
Posts
7
Years
  • Age 28
  • Seen Nov 30, 2016

tried doing that, but i guess it was before i fixed the freezing. Thanks so much!
 
7
Posts
7
Years
  • Age 28
  • Seen Nov 30, 2016
Ok so now i am trying to add in a script.
and im using advancemap and opening the script then when i open it with xse type it up and click compile and it runs,
then I click on the script and nothing is there.
any ideas? i'm lost....
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Ok so now i am trying to add in a script.
and im using advancemap and opening the script then when i open it with xse type it up and click compile and it runs,
then I click on the script and nothing is there.
any ideas? i'm lost....

Are you saying that you're opening, editing and compiling a script that's already in the ROM? That's actually not really an advi(c/s)able thing to do.

You should write a new script if that script you wanted to edit is a default script in the game. If you're trying to edit your own script that you've already compiled in your ROM, then you can either delete that script or not, and then write a new script.
 
7
Posts
7
Years
  • Age 28
  • Seen Nov 30, 2016
Are you saying that you're opening, editing and compiling a script that's already in the ROM? That's actually not really an advi(c/s)able thing to do.

You should write a new script if that script you wanted to edit is a default script in the game. If you're trying to edit your own script that you've already compiled in your ROM, then you can either delete that script or not, and then write a new script.

i have been making my own scripts.
not editing.
but i have tried both.
neither are saving after i compile :/
 

waw

20
Posts
11
Years
  • Seen Nov 12, 2021
This may be more of an issue on the AMap end of things.

Using XSE, I create the script. Save. Compile. I can compile. (So I'm using the same ROM). I then copy the @start value given and go to place this into A Map event's script offset.

A Map is reading it as 8 digits, messes it up and won't save it. This is an unusual issue that I'm having trouble finding an answer for. Probably because the unwieldy bulk of it.

In short: the offset should be 6 digits, correct? That gets placed into an event offset in A Map. How do I get it to save? And paste... correctly?

I.e. I'm pasting: "800E25" which is my compiled @start offset.
I'm putting that into Script Offset under the Person Event I wrote it for. When I paste it, it looks like "$800E2580" and then I click off the event onto another one. It now looks like "$000E2580".

It changes the first digit from 8 to 0. And adds two on the end (seems to be repeating it?).
 
Last edited:
82
Posts
10
Years
  • Age 33
  • Seen Oct 25, 2017
This may be more of an issue on the AMap end of things.

Using XSE, I create the script. Save. Compile. I can compile. (So I'm using the same ROM). I then copy the @start value given and go to place this into A Map event's script offset.

A Map is reading it as 8 digits, messes it up and won't save it. This is an unusual issue that I'm having trouble finding an answer for. Probably because the unwieldy bulk of it.

In short: the offset should be 6 digits, correct? That gets placed into an event offset in A Map. How do I get it to save? And paste... correctly?

I.e. I'm pasting: "800E25" which is my compiled @start offset.
I'm putting that into Script Offset under the Person Event I wrote it for. When I paste it, it looks like "$800E2580" and then I click off the event onto another one. It now looks like "$000E2580".

It changes the first digit from 8 to 0. And adds two on the end (seems to be repeating it?).

You should put $800E25 in the 'Script offset' box.
 

waw

20
Posts
11
Years
  • Seen Nov 12, 2021
It doesn't make a difference, still having the same error. It converts to 8 digits, adding a $ at the end. When clicked off and back on, it doesn't track the changes.
 
82
Posts
10
Years
  • Age 33
  • Seen Oct 25, 2017
It doesn't make a difference, still having the same error. It converts to 8 digits, adding a $ at the end. When clicked off and back on, it doesn't track the changes.

That sounds weird, indeed. Maybe someone else, with some more knowledge on the subject, could shed some light on this. Perhaps it would be helpful to post a screenshot of it too, so people could better understand the problem.
 

waw

20
Posts
11
Years
  • Seen Nov 12, 2021
I have a working map (tiles work, moving works, warps work).
Input a new Person Event. It's script offset is $000000
I put one in, tested it, it didn't work. Go check it, the script offset is not what i set it as.
Recompile the script in XSE, put it in. Notice it becomes 8 characters instead of 6. Delete two of them Save, it's back to 8 digits.

It won't keep it at 6 digits.

Spoiler:

Spoiler:

Spoiler:
 
82
Posts
10
Years
  • Age 33
  • Seen Oct 25, 2017
Is that A-Map 1.95? It's very buggy, and more often than not messes things up. You're better off using 1.92, as it's far more stable.
 

waw

20
Posts
11
Years
  • Seen Nov 12, 2021
Thanks. It was 1.95, my understanding was that was the current best. Thanks, sorry to derail this thread. Then again, it helps with the tutorial.
 
82
Posts
10
Years
  • Age 33
  • Seen Oct 25, 2017
Thanks. It was 1.95, my understanding was that was the current best. Thanks, sorry to derail this thread. Then again, it helps with the tutorial.

It's everything but lol The general consensus is to stay away from 1.95. I have no idea why the offsets behave like that though. Maybe someone else could shine some light on that. In the meantime, give it a try in 1.92, and don't forget to report back on whether it works this time.

No worries though, your post was on topic with the thread.

EDIT: This thread might be of help too if you ever get stuck at something.
 
Last edited:

waw

20
Posts
11
Years
  • Seen Nov 12, 2021
Huh, it's fixing the code that's in the offset box. It *looks* right.

That said, the code isn't working. I may have messed something up. I'm going to try on a new base rom and see what happens from there.

EDIT:

Using this code:

#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @talk 0x6
release
end

#org @talk
= I'm an NPC.

I'm not getting a message box to pop up. The other problem seems solved, however.
 
Last edited:
82
Posts
10
Years
  • Age 33
  • Seen Oct 25, 2017
Huh, it's fixing the code that's in the offset box. It *looks* right.

That said, the code isn't working. I may have messed something up. I'm going to try on a new base rom and see what happens from there.

EDIT:

Using this code:



I'm not getting a message box to pop up. The other problem seems solved, however.

That code should work, really. Whatever is wrong it's not the code.
 

waw

20
Posts
11
Years
  • Seen Nov 12, 2021
So what am I doing wrong?

I have a clean rom, XSE, Amap 1.92.

Looking at opening scene, add a Sprite (i can see it). I can make them look around in A Map. So I put in this code:

#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @talk 0x6
release
end

#org @talk
= I'm an NPC.

Into XSE. Save it. Compile it, looking at he ROM i'm using. It compiles, it gives me @talk and @start. I use @start 6 digit number (now, 800000).

I then go to A Map, the new sprite I've inserted. I give him this script, save.

Open the game, approach to talk to him. He looks at me, there's a beep for the message box, and nothing. He will always look my way when I click on him, but there's no dialogue.

I'm using FireRed.

I've seen several tutorials that do this thing and it all works.
 
Back
Top