Sierra's MEGA-HUGE XSE Scripting Tutorial Page 35

Started by Sierraffinity December 26th, 2008 6:55 PM
  • 776138 views
  • 1232 replies

Shadowraze

ur mum

Age 24
Non-binary
ur mum
Seen November 24th, 2022
Posted October 16th, 2016
794 posts
10.1 Years
Is there any script that makes a sprite follow the player?
Yes, you can just use an applymovement script. Make the script just like the players applymovement.

Though if you're talking about following you like in Pokemon Yellow then no. I don't think you can.

Satoshi Ookami

Memento Mori

Age 30
Male
Abyss of Time, Great Seal
Seen August 5th, 2018
Posted July 3rd, 2018
14,253 posts
14.8 Years
Though if you're talking about following you like in Pokemon Yellow then no. I don't think you can.
Jambo did it... he never finished the routine completely yet, though...
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List
Male
Seen April 18th, 2013
Posted April 18th, 2013
3 posts
10.1 Years
I know that. But I do think he said something that completing the routine is almost near impossible. :3
Well, I meant following like in Pokemon Yellow. I know it is almost impossible, but there should be a way. I mean if it was possible in Yellow, then it should be also in FR. Anyway, is there any way I can see that Jambo's script?
Age 29
Male
Seen March 10th, 2023
Posted August 22nd, 2022
3,482 posts
15 Years
Well, I meant following like in Pokemon Yellow. I know it is almost impossible, but there should be a way. I mean if it was possible in Yellow, then it should be also in FR. Anyway, is there any way I can see that Jambo's script?
Incorrect, just because something was in a past game doesn't mean it's possible in other games. It kind of is possible, but it's really buggy, and Jambo as far as I know never released his version of the script to the public as it was buggy.


Temmie vibrates intensely.

awwAwa cute!! (pets u)

OMG!! humans TOO CUTE (dies)

can't blame a BARK for tryin'...

RATED TEM OUTTA TEM.

Male
Seen April 18th, 2013
Posted April 18th, 2013
3 posts
10.1 Years
Incorrect, just because something was in a past game doesn't mean it's possible in other games. It kind of is possible, but it's really buggy, and Jambo as far as I know never released his version of the script to the public as it was buggy.
Well, ok. I think i'll try to make an applymovement for the player and the sprite, then.

PiplupGHacker

Keeping the dream alive.

Age 26
Female
New Lenox, IL
Seen October 25th, 2016
Posted May 2nd, 2014
124 posts
16.2 Years
(insert patrick I love you here, image was enormous so I just removed it)

Once again, I apologize for the idiocy. Had a feeling it was something stupid like that ._.
Thanks soo much though xD.

EDIT: Welp. Moar problems. Textbox won't open at all when I talked to him. This happened at first when I did the other one too, so I just assigned the script to someone else. Gonna try that but, thought I'd say that oddly enough after compiling the script shows up like this(could just be that it automatically shorthanded it or something):
Spoiler:

'-----------------------
#org 0xB339A5
checkflag 0x828
if 0x1 goto 0x8B33A06
msgbox 0x8B33A0F '"Hello.\nSorry to trouble you.\nI ca..."
compare LASTRESULT 0x1
if 0x1 goto 0x8B339C8
msgbox 0x8B33A70 '"That's okay.\pI'm sure someone else..."
release
end

'-----------------------
#org 0xB33A06
msgbox 0x8B33B18 '"Are you taking good care\nof Axew?"
release
end

'-----------------------
#org 0xB339C8
givepokemon 0x262 0x12 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x8B33AA4 '" blackkfrrYou received an Axew!"
waitfanfare
closeonkeypress
setflag 0x828
msgbox 0x8B33AC5 '" blackkfrrWould you like to give a\..."
compare LASTRESULT 0x1
if 0x1 call 0x8B339FF
msgbox 0x8B33AFC '"Please take care of\nAxew."
release
end

'-----------------------
#org 0xB339FF
call 0x81A74EB
return

'-----------------------
#org 0x1A74EB
fadescreen 0x1
special 0x9E
waitstate
return


'---------
' Strings
'---------
#org 0xB33A0F
= Hello.\nSorry to trouble you.\nI can't take care\nof my Axew.\pCan you take care of\nit for me?

#org 0xB33A70
= That's okay.\pI'm sure someone else will\ntake it.

#org 0xB33B18
= Are you taking good care\nof Axew?

#org 0xB33AA4
= blackkfrrYou received an Axew!

#org 0xB33AC5
= blackkfrrWould you like to give a\nnickname to Axew?

#org 0xB33AFC
= Please take care of\nAxew.


EDIT2: Put it to girl next to the gym who talks about Clefairys, same thing happens. Error in my script?
Can I get some help with this?
My birthdays tomorrow and I want to get this shiz to work >.>
Click above for my collab YouTube Let's Play channel!
Featuring games like Pokemon SoulSilver, Mystery Dungeon, and Persona 3: FES!
Age 25
Male
Seen 2 Weeks Ago
Posted September 2nd, 2020
534 posts
10.7 Years
Can I get some help with this?
My birthdays tomorrow and I want to get this shiz to work >.>
Happy Birthday!
#dynamic 0xB00000

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

#org @take
givepokemon 0x262 0x12 0x0 0x0 0x0 0x0
fanfare 0x13E
textcolor 0x02
msgbox @3 0x4
waitfanfare
closeonkeypress
textcolor 0x02
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @done
msgbox @6 0x6
release
end

#org @1
= Hello.\nSorry to trouble you.\nI can't take care\nof my Axew.\pCan you take care of\nit for me?

#org @2
= That's okay.\pI'm sure someone else will\ntake it.

#org @3
= You received an Axew!

#org @4
= Would you like to give a\nnickname to Axew?

#org @5
= Please take care of\nAxew.

#org @6
= Are you taking good care\nof Axew?
Note: You should have just modified the givepokemon script on the first page.

And if it still doesn't work, update your XSE to 1.1.1 or just use Gamre2020's Unofficial XSE in his Toolbox.

PiplupGHacker

Keeping the dream alive.

Age 26
Female
New Lenox, IL
Seen October 25th, 2016
Posted May 2nd, 2014
124 posts
16.2 Years
Happy Birthday!
#dynamic 0xB00000

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

#org @take
givepokemon 0x262 0x12 0x0 0x0 0x0 0x0
fanfare 0x13E
textcolor 0x02
msgbox @3 0x4
waitfanfare
closeonkeypress
textcolor 0x02
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @done
msgbox @6 0x6
release
end

#org @1
= Hello.\nSorry to trouble you.\nI can't take care\nof my Axew.\pCan you take care of\nit for me?

#org @2
= That's okay.\pI'm sure someone else will\ntake it.

#org @3
= You received an Axew!

#org @4
= Would you like to give a\nnickname to Axew?

#org @5
= Please take care of\nAxew.

#org @6
= Are you taking good care\nof Axew?
Note: You should have just modified the givepokemon script on the first page.

And if it still doesn't work, update your XSE to 1.1.1 or just use Gamre2020's Unofficial XSE in his Toolbox.

Oh, lawdy. First of all, thankies! Secondly, turns out I had a super old version of XSE or something, so I downloaded the unofficial and seemed to have made some progress. Now he actually talks to me! Whoo! Only problem is he just says "Are you taking care of Axew?" and I haven't even received it yet ._. is it because this flag is already used or something?
Click above for my collab YouTube Let's Play channel!
Featuring games like Pokemon SoulSilver, Mystery Dungeon, and Persona 3: FES!

Shadowraze

ur mum

Age 24
Non-binary
ur mum
Seen November 24th, 2022
Posted October 16th, 2016
794 posts
10.1 Years
Oh, lawdy. First of all, thankies! Secondly, turns out I had a super old version of XSE or something, so I downloaded the unofficial and seemed to have made some progress. Now he actually talks to me! Whoo! Only problem is he just says "Are you taking care of Axew?" and I haven't even received it yet ._. is it because this flag is already used or something?
It's because you didn't put setflag 0x828 in the script. You may have received Axew although the Pokemon menu isn't showing.

Just put setflag 0x828 at the end of your script.

PiplupGHacker

Keeping the dream alive.

Age 26
Female
New Lenox, IL
Seen October 25th, 2016
Posted May 2nd, 2014
124 posts
16.2 Years
It's because you didn't put setflag 0x828 in the script. You may have received Axew although the Pokemon menu isn't showing.

Just put setflag 0x828 at the end of your script.
Still didn't work after I did this. However, I changed the flag it checks and sets to 0x777. Any problem this is gonna cause in the future? Because it now works. And could I have a list of flags that I can use, or can I just put in any number?
Click above for my collab YouTube Let's Play channel!
Featuring games like Pokemon SoulSilver, Mystery Dungeon, and Persona 3: FES!

Shadowraze

ur mum

Age 24
Non-binary
ur mum
Seen November 24th, 2022
Posted October 16th, 2016
794 posts
10.1 Years
Still didn't work after I did this. However, I changed the flag it checks and sets to 0x777. Any problem this is gonna cause in the future? Because it now works. And could I have a list of flags that I can use, or can I just put in any number?
There is a list of flags at the first post check it.

AtecainCorp.

Rejishan awake...

Age 30
Male
Takoabe Town (Region Thonsu)
Seen 2 Days Ago
Posted 1 Week Ago
1,354 posts
14.9 Years
Can you help me? I want add the new Pokemon Trade offset. I need to add extra one than three existing Trades in Pokemon Ruby. My task is add an trade your Mankey for Leafeon <Added to empty place holder> Can you help me with making script of trade?
- My new Project comming Soon

Eren Jaeger

Pianoist

Male
EARTH
Seen March 28th, 2020
Posted July 27th, 2017
151 posts
10.1 Years
Hey diego would you mind checking on this script?

Spoiler:
#dynamic 0x800000

#org @start
checkflag 0x828
lock
faceplayer
textcolor 0x00
if 0x1 goto @done
playsong 0x12E 0x0
applymovement 0x04 @move
applymovement 0xFF @move2
msgbox @hi 0x6
if 0x0 goto @start1
release
end

#org @start1
if 0x1 goto @done
showpokepic 0x1 0x0A 0x03
msgbox @1 0x5
compare 0x800D 0x0001
hidepokepic
if 0x0 goto @start2
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
closeonkeypress
msgbox @have 0x6
setflag 0x828
release
end

#org @start2
if 0x1 goto @done
showpokepic 0x4 0x0A 0x03
msgbox @2 0x5
compare 0x800D 0x0001
hidepokepic
if 0x0 goto @start3
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
closeonkeypress
msgbox @have 0x6
setflag 0x828
release
end

#org @start3
if 0x1 goto @done
showpokepic 0x7 0x0A 0x03
msgbox @3 0x5
hidepokepic
compare LASTRESULT 0x1
if 0x0 goto @start1
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
closeonkeypress
msgbox @have 0x6
setflag 0x828
release
end

#org @done
msgbox @have 0x6
if 0x1 goto @door
setflag 828
release
end

#org @door
applymovement 0xFF @move3
setdooropened 0x23 0x0A
doorchange
applymovement 0x04 @move4
setdoorclosed 0x23 0x0A
doorchange

#org @move
#raw 0x61
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @move2
#raw 0x2
#raw 0x62
#raw 0xFE

#org @move3
#raw 0x10
#raw 0x1

#org @move4
#raw 0x61
#raw 0x13
#raw 0x5
#raw 0x60

#org @hi
= Prof:Oak: Hello! First kid I met today! \nI came from the kanto region \nand I'm visiting my new lab here! \pSo what's your name lad? \n... ... ... ... ... ... ... \pI see! [Player]! Hey I'm giving out \nPOK\h1AMON today! \pWhy? It's my first visit! \nfirst visit! new people! \pWell [Player]! Do you know? \nIt's your luckiest day! \pBecause I'm giving you this \nThree POK\h1Aballs containing POK\h1AMON! \lBut be sure to take care \nof this POK\h1AMON you'll choose! \pThey're very rare [Player]! \nSo are you ready?!
#org @1
= Here! Choose! \nWould you like a BULBASAUR?

#org @2
= How about a CHARMANDER?

#org @3
= Maybe a SQUIRTLE?

#org @have
= Good Choice [Player]! \nI'll be expecting something \pmore from you! and.. \nNice to meet you [Player]! \pI'll be going! Bye!


It's hanging when the door opens then closed. What should I do?!
Music is art
Age 25
Male
Seen 2 Weeks Ago
Posted September 2nd, 2020
534 posts
10.7 Years
Sometimes when I'm inserting/changing scripts/events, after saving it, my game messes up even though I inserted the scripts correctly. Is it normal for me to experience this?
Btw, I'm hacking pokemon emerald.
Use the Unofficial XSE Gamer2020 recently released. That one doesn't mess up Pokemon Emerald.
Male
Seen May 15th, 2013
Posted May 15th, 2013
15 posts
11.8 Years
Use the Unofficial XSE Gamer2020 recently released. That one doesn't mess up Pokemon Emerald.
Thank you for the quick reply, I've downloaded it and gonna try it for a while. ;)

Can someone check this pleeeeaasse? :)

Spoiler:
'---------------
#org 0xE3DE89
lockall
applymovement 0x19 0x8E3DEC2
waitmovement 0x0
msgbox 0x8E3DEC6 MSG_KEEPOPEN '"You can't pass here."
closeonkeypress
applymovement MOVE_PLAYER 0x8E3DEDD
waitmovement 0x0
applymovement 0x19 0x8E3DEC2
applymovement MOVE_PLAYER 0x8E3DEC2
waitmovement 0x0
applymovement 0x19 0x8E3DEE0
waitmovement 0x0
gotostd 0x8


'---------
' Strings
'---------
#org 0xE3DEC6
= You can't pass here.


'-----------
' Movements
'-----------
#org 0xE3DEC2
#raw 0x8 'Step Down (Normal)
#raw 0x8 'Step Down (Normal)
#raw 0xFE 'End of Movements

#org 0xE3DEDD
#raw 0x0 'Face Down
#raw 0xFE 'End of Movements

#org 0xE3DEE0
#raw 0x9 'Step Up (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0x0 'Face Down
#raw 0xFE 'End of Movements


I kept on getting that gotostd 0x8 when I change it to anything. It's suppose to be releaseall,end.
Is there anything wrong in my script?
It is a script event in pokemon emerald.

The gotostd 0x8 activates the registration of the person to the pokenav.

Shadowraze

ur mum

Age 24
Non-binary
ur mum
Seen November 24th, 2022
Posted October 16th, 2016
794 posts
10.1 Years
Thank you for the quick reply, I've downloaded it and gonna try it for a while. ;)

Can someone check this pleeeeaasse? :)

Spoiler:
'---------------
#org 0xE3DE89
lockall
applymovement 0x19 0x8E3DEC2
waitmovement 0x0
msgbox 0x8E3DEC6 MSG_KEEPOPEN '"You can't pass here."
closeonkeypress
applymovement MOVE_PLAYER 0x8E3DEDD
waitmovement 0x0
applymovement 0x19 0x8E3DEC2
applymovement MOVE_PLAYER 0x8E3DEC2
waitmovement 0x0
applymovement 0x19 0x8E3DEE0
waitmovement 0x0
gotostd 0x8


'---------
' Strings
'---------
#org 0xE3DEC6
= You can't pass here.


'-----------
' Movements
'-----------
#org 0xE3DEC2
#raw 0x8 'Step Down (Normal)
#raw 0x8 'Step Down (Normal)
#raw 0xFE 'End of Movements

#org 0xE3DEDD
#raw 0x0 'Face Down
#raw 0xFE 'End of Movements

#org 0xE3DEE0
#raw 0x9 'Step Up (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0x0 'Face Down
#raw 0xFE 'End of Movements


I kept on getting that gotostd 0x8 when I change it to anything. It's suppose to be releaseall,end.
Is there anything wrong in my script?
It is a script event in pokemon emerald.

The gotostd 0x8 activates the registration of the person to the pokenav.
Try repointing the offsets by naming them again with @script, @script2 and such. Then compile it and see if it works.

destinedjagold

You can contact me in PC's discord server...

Age 32
Male
Seen 2 Days Ago
Posted March 24th, 2023
8,579 posts
16 Years
Hey diego would you mind checking on this script?

Spoiler:
#dynamic 0x800000

#org @start
checkflag 0x828 <-- place this in error 1
lock
faceplayer
textcolor 0x00
[error 1]
if 0x1 goto @done
playsong 0x12E 0x0
applymovement 0x04 @move
applymovement 0xFF @move2
[error 2]
msgbox @hi 0x6
[error 3]
if 0x0 goto @start1 <-- I would assume that this is still under your [checkflag 0x828] command.
release
end
I am not going to fix your script. It's up to you to do so, however, I will try and help you understand your common mistakes.
Corrections and notes are under your SPOILER tag.
Hopefully, this'll help you avoid the mistakes in the future. ;)

Explanation is under here...
Spoiler:
error 1 - commands [lock] and [faceplayer] are generally located at the first lines of the script. also, the command [checkflag] should always be followed by the [if] command.
error 2 - an [applymovement] code, or a group of [applymovement] codes should always be followed by [waitmovement x] code, where the x is either 0 or the person number of an NPC moving.
error 3 - you need to place your [checkflag] command here again, since your [if] statement has nothing to compare with.


It's hanging when the door opens then closed. What should I do?!
That is because you didn't properly end your script. The address [door] lacks the codes [release] and [end], and other things if you plan on adding a few more after that.

Eren Jaeger

Pianoist

Male
EARTH
Seen March 28th, 2020
Posted July 27th, 2017
151 posts
10.1 Years
I am not going to fix your script. It's up to you to do so, however, I will try and help you understand your common mistakes.
Corrections and notes are under your SPOILER tag.
Hopefully, this'll help you avoid the mistakes in the future. ;)

Explanation is under here...
Spoiler:
error 1 - commands [lock] and [faceplayer] are generally located at the first lines of the script. also, the command [checkflag] should always be followed by the [if] command.
error 2 - an [applymovement] code, or a group of [applymovement] codes should always be followed by [waitmovement x] code, where the x is either 0 or the person number of an NPC moving.
error 3 - you need to place your [checkflag] command here again, since your [if] statement has nothing to compare with.




That is because you didn't properly end your script. The address [door] lacks the codes [release] and [end], and other things if you plan on adding a few more after that.
Man.. this is so confusing.. O_O but anyways, thanks! :)
Music is art
Age 26
Male
Seen July 6th, 2019
Posted October 26th, 2016
252 posts
10.1 Years
thanks for the awesome guide!
oh and can i ask a question?
i'm trying to edit the champion's script in pokemon emerald using xse
how would you do that? i can't open the script using advanced map
i've tried opening the map script using header but all i'm getting is a bunch of setvar
can you help me? and could you explain setvar again (sorry i'm a noob and i'm a visual learner)

Shadowraze

ur mum

Age 24
Non-binary
ur mum
Seen November 24th, 2022
Posted October 16th, 2016
794 posts
10.1 Years
I'm a real noob at scripting and hacking in general.. so I'm struggling to understand this..

I have XSE, and I made a script exactly like yours (on the first post of the thread.. the simple message script) and I have used the free space finder in Advance Map.. but I don't know what to do now?
You don't need A-map to find the offset for you XSE automatically does that.

So what you got to do is put "dynamic 0x800000" at the start of your script and then compile the script into your rom.

To compile first you have to load your rom go to file and then open or simply ctrl+o. AAfter that locate your rom and Ta-Da you rom is loaded.

After that try and locate the compile button it has the icon of a gear next to the save icon so press it. After that a window appears and copy the offset of the very first pointer there. After that goto A-map and paste it to the npc or S-tile script offset box and it should be working perfectly. :)