Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Reload this Page [Tutorial] diegoisawesome's MEGA-HUGE XSE Scripting Tutorial

Notices
For all updates, view the main page.

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.



Reply
 
Thread Tools
  #1001    
Old May 23rd, 2014 (10:28 AM). Edited May 24th, 2014 by DoCNL.
DoCNL
 
Join Date: Oct 2013
Gender: Male
Never mind, i used variables instead of flags now (thanks to Magic for showing me an info post).
This works fine now

Also, I have an advance map related question, mind if I ask that too?

If yes, here it is, else I'll remove it in a bit
Quote:
Whenever I make a new map and insert it, it's called LITTLEROOT TOWN by default, even though when I clicked "Create new map" i gave it the name "Newbore Town" ;O
This means that it can't be renamed without renaming the original LITTLEROOT TOWN too, which is quite annoying haha.
Edit 2:
Do you have steam?
It's easier to talk there :D
Reply With Quote
  #1002    
Old June 1st, 2014 (07:14 PM).
qaz015393's Avatar
qaz015393
pokemon revenge developer
 
Join Date: Aug 2009
Age: 24
Gender: Male
Thanks for the tut & for still being around. Anyway I ran into an error, I wanted to make a new trainer battle & have him give u a badge & item then move. Then when I tried to debug it I got this error

Quote:
"Too less parameters on line 27. The correct number is 3"
I don't know what they mean. I'm re-learning how to script.
Anyway here is the script can you/some1 else help me fix it:

Spoiler:
Code:
#dynamic 0x800000

#org @start
lock
faceplayer
textcolor 0x0
msgbox @2 0x6
applymovement 0x5 @move1
waitmovement 0x0
msgbox @7 0x6
trainerbattle 0x1 0x001 0x0 @before @after @later
end

#org @before
= Show me what you got!

#org @after
= Hmmm, not bad.

#org @later
msgbox @3 0x6
fanfare 0x13E
msgbox @4 0x4
waitfanfare
closeonkeypress
msgbox @5 0x6
giveitem 0x147 0x1
setflag 0x820
msgbox @6 0x6
closeonkeypress
applymovement 0x5 @move2
waitmovement 0x0
hidesprite 0x5
setflag 0x200
setvar 0x4011 0x1
release
end

#org @2
= Light: ok let me double check the\nlist.\l...

#org @3
= Light: I found this after I beat a\nmember of Team Dark some time ago.\lI don't know what it is but I\lthink it may help out.

#org @4
= \v\h01 recieved a shadow badge!

#org @5
= Light: Oh, and please take this\nas well.

#org @6
= Light: Good job. I'm going to\nfinish getting the snacks. The\lmeeting place is in a secret\lplace thanks to Ryuaski. So I'll\lmeet you there.

#org @7
= Lght: Hello. You must be Red. I'm\ngetting snacks for the meeting.\lLets battle and see what you got.


#org @move1
#raw 0x62 0xA 0xFE

#org @move2
#raw 0x11 0x11 0x11 0x11 0x11 0x11 0xFE
__________________

POKEMON REVENGE TEAM IS looking for members APPLY HERE so the hack can continue.

3Ds Fc= 0619-4312-9526 IgN is Near My trade shop is here
Reply With Quote
  #1003    
Old June 1st, 2014 (07:51 PM).
destinedjagold's Avatar
destinedjagold
Oh Hai Thar~ 'ω'
Community Supporter
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Quote originally posted by qaz015393:
Thanks for the tut & for still being around. Anyway I ran into an error, I wanted to make a new trainer battle & have him give u a badge & item then move. Then when I tried to debug it I got this error

I don't know what they mean. I'm re-learning how to script.
Anyway here is the script can you/some1 else help me fix it:

Spoiler:
Code:
#dynamic 0x800000

#org @start
lock
faceplayer
textcolor 0x0
msgbox @2 0x6
applymovement 0x5 @move1
waitmovement 0x0
msgbox @7 0x6
trainerbattle 0x1 0x001 0x0 @before @after @later
end

#org @before
= Show me what you got!

#org @after
= Hmmm, not bad.

#org @later
msgbox @3 0x6
fanfare 0x13E
msgbox @4 0x4
waitfanfare
closeonkeypress
msgbox @5 0x6
giveitem 0x147 0x1
setflag 0x820
msgbox @6 0x6
closeonkeypress
applymovement 0x5 @move2
waitmovement 0x0
hidesprite 0x5
setflag 0x200
setvar 0x4011 0x1
release
end

#org @2
= Light: ok let me double check the\nlist.\l...

#org @3
= Light: I found this after I beat a\nmember of Team Dark some time ago.\lI don't know what it is but I\lthink it may help out.

#org @4
= \v\h01 recieved a shadow badge!

#org @5
= Light: Oh, and please take this\nas well.

#org @6
= Light: Good job. I'm going to\nfinish getting the snacks. The\lmeeting place is in a secret\lplace thanks to Ryuaski. So I'll\lmeet you there.

#org @7
= Lght: Hello. You must be Red. I'm\ngetting snacks for the meeting.\lLets battle and see what you got.


#org @move1
#raw 0x62 0xA 0xFE

#org @move2
#raw 0x11 0x11 0x11 0x11 0x11 0x11 0xFE
You forgot what type of message will appear after the player receives the item.
From what I can see, it looks like an NPC will give them player an item, so...
Code:
giveitem 0x147 0x1 msg_obtain
__________________

3DS FC: 0061-1111-6462
TSV: 1364(X), 0790(OR)


Reply With Quote
  #1004    
Old June 1st, 2014 (08:19 PM).
qaz015393's Avatar
qaz015393
pokemon revenge developer
 
Join Date: Aug 2009
Age: 24
Gender: Male
Quote originally posted by destinedjagold:
You forgot what type of message will appear after the player receives the item.
From what I can see, it looks like an NPC will give them player an item, so...
Code:
giveitem 0x147 0x1 msg_obtain

Thanks for the help man. That worked now it works [from what I see. Im not insert it in my rom yet].
__________________

POKEMON REVENGE TEAM IS looking for members APPLY HERE so the hack can continue.

3Ds Fc= 0619-4312-9526 IgN is Near My trade shop is here
Reply With Quote
  #1005    
Old June 12th, 2014 (10:18 AM).
pokemaniaco
 
Join Date: Jun 2006
Gender:
Nature: Adamant
I'm sorry if this is the wrong thread, but here it goes...

I'm having problems with the script boxes (you step on the tile and the script happens).

The script (let's call script X) happens with no problems whatsoever in a building, if I put a level script (script Y).

But where there isn't any level script (no script Y), such as cities, when stepping on the tile with the script X, one of the two things happen:
1. The game freezes
2. The script doesn't happen

I've followed the tutorial in levelscripts according to the ones in pokecommunity.

My question is, how to make scripts work without using level scripts?

I think the problem is with setvar, but if you could give me some kind of tutorial, I would be more than happy.

Thanks in advance ;)
Reply With Quote
  #1006    
Old June 15th, 2014 (10:33 PM).
qaz015393's Avatar
qaz015393
pokemon revenge developer
 
Join Date: Aug 2009
Age: 24
Gender: Male
I'm wondering how in the intro for fire red, how i can start off in the home town and make a battle script where the player losses and then after that it fades into another scene in a lab where some story occurs. Then the player walks out [to be clear I wanted to have the player sprite to be hidden then show up when it needs to. Do I need to have the hide sprite near the beginning of the script then have the show sprite later when i want it?].

Now is there something different that needs to happen in the beginning battle script for the player to lose so all that intro story can only happen once.

And how can the hero sprites appear at the right time and be the right gender.

Im asking this bc like in R/E/S when u pick brandon and may is your rival. I wanted to make the same script so when u pick a gender the story is played as that hero and the other 1 is a rival. I would like to know how that works. Is there something else adding so the Ow sprite and trainer sprite is changed when 1 gender is picked.
__________________

POKEMON REVENGE TEAM IS looking for members APPLY HERE so the hack can continue.

3Ds Fc= 0619-4312-9526 IgN is Near My trade shop is here
Reply With Quote
  #1007    
Old June 20th, 2014 (11:38 PM). Edited June 20th, 2014 by KillerKrabs.
KillerKrabs's Avatar
KillerKrabs
 
Join Date: Nov 2013
Location: Arizona
Age: 21
Gender: Male
Nature: Lonely
Send a message via Skype™ to KillerKrabs
Total noob here. I cleared out the memory of FR using an external tool. It's supposed to delete all non-essential memory so you can start from scratch on a game and only have the original maps as a reference.

The only problem I've ran into so far is that when I lose a battle, I warp to some weird-ass building and I'm stuck walking around a closed off room. I think it's the top left corner of Safron's gym.

I launched the unedited FR and tested what what happen if I lost. I warped back to what appeared to be the "mom's" house as a death point. What she said didn't match up with anything in the original FR scrips, so I'm very confused and don't have a reference to even see what makes you warp there upon losing a battle. How do I get this back in my hacked ROM, or set another death point?
Reply With Quote
  #1008    
Old June 23rd, 2014 (03:23 PM).
NeoGBA
 
Join Date: Apr 2014
Hi. In a lot of pokemon games (such as firered) Your rival just walks up to you and has a battle if you step on a certain spot. How would a script like this look? Could you give me an example of one?
__________________
I am working on a FR hack about deoxeys and need a lot of help! I have already
implmented lots of gen 4 and gen 5 pokemon in the game. I am working on mapping
right now, but can't get applymovement of givepokmo commands to work. If you
could give me some help, It would be a great help!
Reply With Quote
  #1009    
Old July 6th, 2014 (10:39 AM).
JosefigGaming's Avatar
JosefigGaming
 
Join Date: May 2013
Location: Portugal
Age: 15
Gender: Male
Hey, I've been wondering, I saw a tutorial on Youtube about a year ago, where you could basiclly change the sprite of the hero
The video has been deleted though
The video was on PokeScript, no ASM required, FireRed as base and it was on a script tile
He switched from Red to a Rocket Grunt
The Youtuber was PurpleSonik418
Even if you don't know how to do it, it would be great if you had a Rom base with that
Wiht would truly make my day
__________________
Working on:


#fasterSneasel :D (nohomo)

Coolest IRC with the coolest people in the coolest rooms:
http://chat.linkandzelda.com:9090/?channels=romhacking,gogo,discovery,fluorite
Reply With Quote
  #1010    
Old July 7th, 2014 (09:04 PM).
TheAmazingSpiderMan's Avatar
TheAmazingSpiderMan
Aka Ansirent
 
Join Date: Sep 2013
Location: India
Gender: Male
Nature: Gentle
Hey i really loved your tutorial. Because of your tutorial one of my friend is now good in scripting. I have also read your tutorial it helped me a lot really thank you.
__________________
Reply With Quote
  #1011    
Old July 8th, 2014 (07:51 AM).
PokemonTrainerRobert
 
Join Date: Mar 2014
Gender: Male
Much I am really, really new to scripting as well to this whole hacking thing. Much your script tutorial helps and all. There some things I don't quite understand : / Now not sure if this has been explained or not...

For example exactly how do you insert, the script codes. Into Advancemap 1.92 onto like say a Sprite? Like a NPC who will give a regular message or statement...How will I be able to insert it into the game? Cause after putting the script in...and then reopen the NPC script...it disappears. Am I doing something wrong [and sorry, I don't know how to take screen shots off from desktop : / ]
__________________
Hacks I support:



Reply With Quote
  #1012    
Old July 8th, 2014 (11:33 PM).
destinedjagold's Avatar
destinedjagold
Oh Hai Thar~ 'ω'
Community Supporter
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Quote originally posted by PokemonTrainerRobert:
Much I am really, really new to scripting as well to this whole hacking thing. Much your script tutorial helps and all. There some things I don't quite understand : / Now not sure if this has been explained or not...

For example exactly how do you insert, the script codes. Into Advancemap 1.92 onto like say a Sprite? Like a NPC who will give a regular message or statement...How will I be able to insert it into the game? Cause after putting the script in...and then reopen the NPC script...it disappears. Am I doing something wrong [and sorry, I don't know how to take screen shots off from desktop : / ]
I have a tutorial for that ~> clicky
__________________

3DS FC: 0061-1111-6462
TSV: 1364(X), 0790(OR)


Reply With Quote
  #1013    
Old July 9th, 2014 (01:34 AM).
PokemonTrainerRobert
 
Join Date: Mar 2014
Gender: Male
Ah thank you very kindly destinedjagold ^ ^
__________________
Hacks I support:



Reply With Quote
  #1014    
Old July 10th, 2014 (07:14 AM).
xX Untouchable Xx's Avatar
xX Untouchable Xx
Everything Is Awesome!
 
Join Date: Jul 2014
This should be stickied.

Great tutorial - I love it! Very helpful indeed.
Reply With Quote
  #1015    
Old July 16th, 2014 (01:25 PM).
stephenbrook
 
Join Date: Jul 2014
Very helpful indeed. IO have scripted a battle with mew in pallet town as a test, it all worked except when I caught the mew it didn't obey me.

Is there a code for an obeying mew?
Reply With Quote
  #1016    
Old July 29th, 2014 (07:20 AM).
lifeprogram10
 
Join Date: Jul 2014
Thanks for the tutorial, very useful however i am getting a problem and i have no idea why

This is my script before compilation:
Code:
#dynamic 0x456776
#org @start
msgbox @1 0x2
end

#org @1
= Hello!\nI used to be a trainer!\Good Times! I wish i could do it again!
And after Compilation:
Code:
'-----------------------
#org 0x456777
msgbox 0x845677F '"Hello!\nI used to be a trainer!!Goo..."
end


'---------
' Strings
'---------
#org 0x45677F
= Hello!\nI used to be a trainer!!Good Times! I wish i could do it again!
I then insert the offset it gives me after compilation into the script offset box of the chubby man person event in pallet town(with 00 before it so it can find it.)

Then, after saving, i run it in virtual boy advance and go to the guy and when clicked it plays the sound *tinkle* then nothing happens and the guy continues walking.

I can't see a problem, please help.

Thanks

Programs:
AdvanceMap
XSE
FSF
Reply With Quote
  #1017    
Old July 31st, 2014 (11:30 AM). Edited August 1st, 2014 by Superelectivire.
Superelectivire's Avatar
Superelectivire
 
Join Date: Jul 2014
Gender: Male
Thanks so much for this!

However, I have a problem. I'm not sure if anybody else who has posted above me has posted this question and/or had it answered, but here it is.
It doesn't let me script Warps.

As this is my first post, I can't post links yet, but it is"
i m g u r . c o m / z p m e Y C i
(without any spaces.)
__________________
Want to watch boring and horrible Youtube videos? Check out my channel.
Reply With Quote
  #1018    
Old July 31st, 2014 (04:02 PM).
FaeBladez's Avatar
FaeBladez
 
Join Date: Jan 2014
Location: Calgary AB Canada
Gender: Male
Quote originally posted by lifeprogram10:
Thanks for the tutorial, very useful however i am getting a problem and i have no idea why

This is my script before compilation:
Code:
#dynamic 0x456776
#org @start
msgbox @1 0x2
end

#org @1
= Hello!\nI used to be a trainer!\Good Times! I wish i could do it again!
And after Compilation:
Code:
'-----------------------
#org 0x456777
msgbox 0x845677F '"Hello!\nI used to be a trainer!!Goo..."
end


'---------
' Strings
'---------
#org 0x45677F
= Hello!\nI used to be a trainer!!Good Times! I wish i could do it again!
I then insert the offset it gives me after compilation into the script offset box of the chubby man person event in pallet town(with 00 before it so it can find it.)

Then, after saving, i run it in virtual boy advance and go to the guy and when clicked it plays the sound *tinkle* then nothing happens and the guy continues walking.

I can't see a problem, please help.

Thanks

Programs:
AdvanceMap
XSE
FSF
Try this

Spoiler:
#dynamic 0x800002
#org @start
lock
faceplayer
msgbox @1 0x6
release
end

#org @1
= Hello!\nI used to be a trainer!\Good Times! I wish i could do it again!

It worked fine for me, remember to copy paste the offset you get for @start

Quote originally posted by Superelectivire:
Thanks so much for this!

However, I have a problem. I'm not sure if anybody else who has posted above me actually has had it answered yet, but here it is.
It doesn't let me script Warps.

As this is my first post, I can't post links yet, but it is"
i m g u r . c o m / z p m e Y C i
(without any spaces.)
What do you mean? Do you mean adding scripts to wrap tiles? Cause that is impossible, but you can add script tiles before a wrap if you want to write a message or something.
Reply With Quote
  #1019    
Old August 1st, 2014 (01:49 PM). Edited August 1st, 2014 by Superelectivire.
Superelectivire's Avatar
Superelectivire
 
Join Date: Jul 2014
Gender: Male
@Fae Bladez
~ It talks about coding the Warps. (In the example, he used warp 0x3 0x0 0x2 0x0 0x0)
- I don't know where to code that.

EDIT: Also, Advance Map also doesn't let me show a trainer for a trainer battle. I can't figure out why...
__________________
Want to watch boring and horrible Youtube videos? Check out my channel.
Reply With Quote
  #1020    
Old August 1st, 2014 (11:09 PM).
Sniper's Avatar
Sniper
ヘッド·ショット
 
Join Date: Nov 2013
Location: Void
Gender: Male
Nature: Quiet
Send a message via Skype™ to Sniper
Quote originally posted by Superelectivire:
@Fae Bladez
~ It talks about coding the Warps. (In the example, he used warp 0x3 0x0 0x2 0x0 0x0)
- I don't know where to code that.

EDIT: Also, Advance Map also doesn't let me show a trainer for a trainer battle. I can't figure out why...
Show what? If you're using A-map 1.95 there's no checkbox for trainer, you just have to change its id. If that's what you mean? Cause I don't get it
__________________
Reply With Quote
  #1021    
Old August 2nd, 2014 (10:48 AM).
Superelectivire's Avatar
Superelectivire
 
Join Date: Jul 2014
Gender: Male
Quote originally posted by VV:
Show what? If you're using A-map 1.95 there's no checkbox for trainer, you just have to change its id. If that's what you mean? Cause I don't get it
Oh. What do you change its ID to?

~ BTW - I meant like on Advance Map, I have a trainer there with the XSE stuff, but when I open up the game, none of the people on that page show up (Except Poké Balls that I inputted)
__________________
Want to watch boring and horrible Youtube videos? Check out my channel.
Reply With Quote
  #1022    
Old August 2nd, 2014 (02:10 PM).
Sniper's Avatar
Sniper
ヘッド·ショット
 
Join Date: Nov 2013
Location: Void
Gender: Male
Nature: Quiet
Send a message via Skype™ to Sniper
Quote originally posted by Superelectivire:
Oh. What do you change its ID to?

~ BTW - I meant like on Advance Map, I have a trainer there with the XSE stuff, but when I open up the game, none of the people on that page show up (Except Poké Balls that I inputted)
You need to input the trainer's id too. Make sure there's not a single setflag or anything that makes your trainers disappear.
__________________
Reply With Quote
  #1023    
Old August 2nd, 2014 (02:19 PM).
Superelectivire's Avatar
Superelectivire
 
Join Date: Jul 2014
Gender: Male
Quote originally posted by VV:
You need to input the trainer's id too. Make sure there's not a single setflag or anything that makes your trainers disappear.
Yes, there are no set-flags for disappearance or a #raw for hide either.
Also, no trainers there can be seen except Poké Balls.

~ What Trainers ID do I put?
__________________
Want to watch boring and horrible Youtube videos? Check out my channel.
Reply With Quote
  #1024    
Old August 2nd, 2014 (02:26 PM).
Sniper's Avatar
Sniper
ヘッド·ショット
 
Join Date: Nov 2013
Location: Void
Gender: Male
Nature: Quiet
Send a message via Skype™ to Sniper
Quote originally posted by Superelectivire:
Yes, there are no set-flags for disappearance or a #raw for hide either.
Also, no trainers there can be seen except Poké Balls.

~ What Trainers ID do I put?
A-map, right side. Click on the NPC first then go see the right side, find the trainer id or id
__________________
Reply With Quote
  #1025    
Old August 2nd, 2014 (02:28 PM).
Superelectivire's Avatar
Superelectivire
 
Join Date: Jul 2014
Gender: Male
Quote originally posted by VV:
A-map, right side. Click on the NPC first then go see the right side, find the trainer id or id
So I looked at PET, and the ID is 001 (The first one, right?) So do I input it as 0001?
__________________
Want to watch boring and horrible Youtube videos? Check out my channel.
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC -8. The time now is 02:29 AM.