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
  #76    
Old March 1st, 2009 (03:12 PM).
dogz's Avatar
dogz dogz is offline
Hacker
 
Join Date: Sep 2008
Posts: 9
can anyone tell me whats wrong with this script

#dynamic 0x80005b

#org @start
lock
faceplayer
checkflag 0x829
if 0x0 goto @pokedex
if 0x1 goto @tobad
release

#org @pokedex
setflag 0x829
msgbox @here
boxset 0x6
release
end

#org @tobad
msgbox @noway
boxset 0x6
end

#org @here
= heres a pokedex for you

#org @noway
= now leave me alone!
Reply With Quote
  #77    
Old March 1st, 2009 (03:22 PM).
diegoisawesome's Avatar
diegoisawesome diegoisawesome is offline
Please understand
Silver Tier
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 18
Gender: Male
Nature: Quirky
Posts: 972
Quote originally posted by dogz:
can anyone tell me whats wrong with this script

#dynamic 0x80005b

#org @start
lock
faceplayer
checkflag 0x829
if 0x0 goto @pokedex
checkflag 0x829
if 0x1 goto @tobad
release

#org @pokedex
setflag 0x829
msgbox @here
boxset 0x6
release
end

#org @tobad
msgbox @noway
boxset 0x6
end

#org @here
= heres a pokedex for you

#org @noway
= now leave me alone!
I've fixed it for you. now leave me alone! lol
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
Reply With Quote
  #78    
Old March 1st, 2009 (08:02 PM).
Curt_09's Avatar
Curt_09 Curt_09 is offline
Also known as Chozo
 
Join Date: Feb 2009
Location: Oklahoma
Age: 24
Gender: Male
Posts: 499
Okay, I've compiled the script, but every time I go to try it out on the ROM, it only makes it to the first movement and then freezes...

#dynamic 0x800000

#org @start
checkflag 0x999
if 0x1 goto @end
applymovement 0x1 @mom
waitmovement 0x1
msgbox @1 0x2
applymovement 0x1 @mum
waitmovement 0x1
setflag 0x999
end

#org @end
end

#org @mom
#raw 0x62
#raw 0x01

#org @1
= [red_fr]Good morning [player]! \nAre you ready to beat [rival]?

#org @mum
#raw 0x02
__________________
Old hacks I liked back in the day:



Reply With Quote
  #79    
Old March 2nd, 2009 (06:18 AM).
machomuu's Avatar
machomuu machomuu is online now
Grant me the power of revolution!
Gold Tier
 
Join Date: Apr 2008
Location: 'Murca
Gender: Male
Nature: Relaxed
Posts: 6,652
Quote originally posted by Curt_09:
Okay, I've compiled the script, but every time I go to try it out on the ROM, it only makes it to the first movement and then freezes...

#dynamic 0x800000

#org @start
checkflag 0x999
if 0x1 goto @end
applymovement 0x1 @mom
waitmovement 0x1
msgbox @1 0x2
applymovement 0x1 @mum
waitmovement 0x1
setflag 0x999
end

#org @end
end

#org @mom
#raw 0x62
#raw 0x01

#org @1
= [red_fr]Good morning [player]! \nAre you ready to beat [rival]?

#org @mum
#raw 0x02
#dynamic 0x800000

#org @start
checkflag 0x999
if 0x1 goto @end
applymovement 0x1 @mom
waitmovement 0x1
msgbox @1 0x2
applymovement 0x1 @mum
waitmovement 0x1
setflag 0x999
end

#org @end
end

#org @mom
#raw 0x62
#raw 0x01
#raw 0xFE

#org @1
= [red_fr]Good morning [player]! \nAre you ready to beat [rival]?

#org @mum
#raw 0x02
#raw 0xFE

The changes are in bold.
__________________
Reply With Quote
  #80    
Old March 2nd, 2009 (08:38 PM).
Curt_09's Avatar
Curt_09 Curt_09 is offline
Also known as Chozo
 
Join Date: Feb 2009
Location: Oklahoma
Age: 24
Gender: Male
Posts: 499
Thanks, that did the trick!
Umm... I'm having a prob with that flag not setting, or something... After the event happens and I walk onto that tile again, the game freezes. If I leave the room and come back and step on the tile, the event happens again...
__________________
Old hacks I liked back in the day:



Reply With Quote
  #81    
Old March 7th, 2009 (09:12 AM).
eraserhead eraserhead is offline
 
Join Date: Mar 2009
Gender:
Posts: 24
In the GIVEPOKEMON script.
After i compile i can only choose one value to copy to the perosn in advance map!
Causing the person to either just talk.
Or just give me a pokmeon?
Any help?
Reply With Quote
  #82    
Old March 7th, 2009 (10:00 AM).
diegoisawesome's Avatar
diegoisawesome diegoisawesome is offline
Please understand
Silver Tier
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 18
Gender: Male
Nature: Quirky
Posts: 972
Quote originally posted by eraserhead:
In the GIVEPOKEMON script.
After i compile i can only choose one value to copy to the perosn in advance map!
Causing the person to either just talk.
Or just give me a pokmeon?
Any help?
Well, copy the @start offset if you're using my script.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
Reply With Quote
  #83    
Old March 7th, 2009 (11:08 AM).
Pokepal17's Avatar
Pokepal17 Pokepal17 is offline
More cowbell~
Silver Tier
 
Join Date: Oct 2008
Location: Steeltown
Age: 20
Gender: Male
Nature: Modest
Posts: 1,517
This is an excellent translation of thethethethe's Pokescript tutorial. When will you be adding the level script part? Also, do you think you could do a bit on the command sethealingplace?
__________________
Pokémon Stardrop
Reply With Quote
  #84    
Old March 7th, 2009 (11:35 AM). Edited February 18th, 2014 by diegoisawesome.
diegoisawesome's Avatar
diegoisawesome diegoisawesome is offline
Please understand
Silver Tier
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 18
Gender: Male
Nature: Quirky
Posts: 972
diegoisawesome's XSE Level Scripting Tutorial

Do Not Take or Modify Without Permission

A lot of people have been asking me for this, so here it is!

Step 1:
Make the script you want.

Step 2:
Add a setvar 0x(variable number) 0x1 into your script. Make sure that the player is FORCED to do the part that you add it into.
Note: You do NOT need a setflag/checkflag situation unless you have a script that sets a flag for another script.


IMPORTANT: Make sure to always use variables between 0x4011 and 0x40FF. If you don't, then anything could happen to your game, ranging from Bad EGGs in your players' PC boxes to a deleted save file.
Step 3:
Compile the script.

Step 4:
In A-Map, go to the map you want to put your level script onto.

Step 5:
Go to the Header view.

Step 6:
Under Map Script, remove all other old level scripts and press Add.

Step 7:
Under Script Type, select 02 Validates values, loads handler to...

Step 8:
Paste the script offset into the Script offset 2 box.

Step 9:
Put the number of the variable that will be set to 0x1 in your script under Flag. Leave the Value box alone.

Step 10:
Press Save map scripts.

Step 11:
Press Ctrl+H on your keyboard. The view should change to Pro-Header view.

Step 12:
In the Map options>Map script offset box, copy the offset past the dollar sign and paste it into the Offset box in XSE.

Step 13:
Decompile the script and...Blank! Not to worry! Press the button right next to the Decompile button, press the Decompile button itself and...voila! There's a script now!

Step 14:
There should be a minimum of three parts to the script: two things with pointers and your script that you made. In the second part, there should be a pointer to your script. Under it, there should be a #raw word 0x(random number). Replace the random number with 0. Compile it and test it out in the game.

Step 15:
Enjoy your level script!
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
Reply With Quote
  #85    
Old March 7th, 2009 (02:15 PM). Edited March 7th, 2009 by Pokepal17.
Pokepal17's Avatar
Pokepal17 Pokepal17 is offline
More cowbell~
Silver Tier
 
Join Date: Oct 2008
Location: Steeltown
Age: 20
Gender: Male
Nature: Modest
Posts: 1,517
Quote originally posted by diegoisawesome:
diegoisawesome's XSE Level Scripting Tutorial



Do Not Take or Modify Without Permission



A lot of people have been asking me for this, so here it is!



Step 1:


Make the script you want.



Step 2:


Add a setvar 0x(variable number) 0x1 into your script. Make sure that the player is FORCED to do the part that you add it into. I recommend using variables 0x7000 up.


Note: You do NOT need a setflag/checkflag situation unless you have a script that sets a flag for another script.



Step 3:


Compile the script.



Step 4:


In A-Map, go to the map you want to put your level script onto.



Step 5:


Go to the Header view.



Step 6:


Under Map Script, remove all other old level scripts and press Add.



Step 7:


Under Script Type, select 02 Validates values, loads handler to...



Step 8:


Paste the script offset into the Script offset 2 box.



Step 9:


Put the number of the variable that will be set to 0x1 in your script under Flag. Leave the Value box alone.



Step 10:


Press Save map scripts.



Step 11:


Press Ctrl+H on your keyboard. The view should change to Pro-Header view.



Step 12:


In the Map options>Map script offset box, copy the offset past the dollar sign and paste it into the Offset box in XSE.



Step 13:


Decompile the script and...Blank! Not to worry! Press the button right next to the Decompile button, press the Decompile button itself and...voila! There's a script now!



Step 14:


There should be a minimum of three parts to the script: two things with pointers and your script that you made. In the second part, there should be a pointer to your script. Under it, there should be a #raw word 0x(random number). Replace the random number with 0. Compile it and test it out in the game.



Step 15:


Enjoy your level script!

I think what most of us were expecting was one on all types level scripts not just the most commonly used one.
__________________
Pokémon Stardrop
Reply With Quote
  #86    
Old March 9th, 2009 (10:48 PM).
Alice's Avatar
Alice Alice is offline
(>^.(>0.0)>
Crystal Tier
 
Join Date: Mar 2009
Location: Oregon
Age: 23
Gender: Female
Nature: Careful
Posts: 3,081
Send a message via Skype™ to Alice
Well that was probably the best tutorial I've seen so far. It has sooo much content, while most of the others don't even have trainerbattle scripts.

It was pretty big, so I might have missed it, but I can't get figure out the trainer thing. I want to make completely new trainers for my hack, and there are no tutorials specifically for this so I'll start by asking here. How do you create new trainer IDs?
Reply With Quote
  #87    
Old March 10th, 2009 (05:28 AM).
diegoisawesome's Avatar
diegoisawesome diegoisawesome is offline
Please understand
Silver Tier
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 18
Gender: Male
Nature: Quirky
Posts: 972
Quote originally posted by QuilavaKing:
Well that was probably the best tutorial I've seen so far. It has sooo much content, while most of the others don't even have trainerbattle scripts.

It was pretty big, so I might have missed it, but I can't get figure out the trainer thing. I want to make completely new trainers for my hack, and there are no tutorials specifically for this so I'll start by asking here. How do you create new trainer IDs?
Go into PET and select one of the trainers at the beginning that has no name.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
Reply With Quote
  #88    
Old March 10th, 2009 (01:47 PM).
Alice's Avatar
Alice Alice is offline
(>^.(>0.0)>
Crystal Tier
 
Join Date: Mar 2009
Location: Oregon
Age: 23
Gender: Female
Nature: Careful
Posts: 3,081
Send a message via Skype™ to Alice
Quote originally posted by diegoisawesome:
Go into PET and select one of the trainers at the beginning that has no name.
That's the problem, there are none with no name.
Reply With Quote
  #89    
Old March 13th, 2009 (05:44 PM). Edited March 17th, 2009 by Dragonmaster91.
Dragonmaster91's Avatar
Dragonmaster91 Dragonmaster91 is offline
It's just common sense!
 
Join Date: Apr 2008
Gender: Male
Nature: Adamant
Posts: 220
How could you hide a sprite before even using it, then have it appear for one thing, then disappear? I looked at professor Oak's in the beginning, but that did not help...


Edit: Just use Professor Oak's person ID.

Edit 2: Or you could use the hide sprite thingy in the options in events......
Reply With Quote
  #90    
Old March 21st, 2009 (11:18 AM).
dogz's Avatar
dogz dogz is offline
Hacker
 
Join Date: Sep 2008
Posts: 9
#dynamic 0x100008C

#org @start
lock
faceplayer
checkflag 0x829
if 0x0 goto @pokedex
checkflag 0x829
if 0x1 goto @tobad
release

#org @pokedex
setflag 0x829
msgbox @here 0x6
release
end

#org @tobad
msgbox @noway 0x6
end

#org @here
= heres a pokedex for you

#org @noway
= now leave me alone!



The script still makes the game freeze it is in Fire Red and is not working
Reply With Quote
  #91    
Old March 21st, 2009 (11:48 AM).
Xatoku's Avatar
Xatoku Xatoku is offline
Game Developer
 
Join Date: Feb 2009
Location: Canada
Gender: Male
Posts: 451
Well why do you have 2 checkflags? And post this in the script help thread.
Reply With Quote
  #92    
Old March 29th, 2009 (05:08 AM).
Matteron (96)'s Avatar
Matteron (96) Matteron (96) is offline
Difference is everything...
Gold Tier
 
Join Date: May 2008
Age: 18
Posts: 270
Hi I'm new to scripting and I wrote this script but when i press debug mode it shows this message.
Spoiler:
Error 13 "type mismatch" on line 8.
Missing Dynamic label.

can you tell me what i'm doing wrong heres the script
Spoiler:
#dynamic 0x71A23C
#org @start
lock
faceplayer
applymovement 0x1 @walk1
waitmovement 0x0
#org @Mom1
msgbox @ha 0x6
givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
#org @Mom3
msgbox @he 0x6
giveitem 0xD 0x1 MSG_OBTAIN
#org @mom4
msgbox @ho 0x6
applymovement 0x1 @walk2
waitmovement 0x0
#org @walk1

#RAW 0x13
#RAW 0x13
#RAW 0x11
#RAW 0xFE
#org @Mom
= Oh [player] don't forget your eevee\n. We would not want anything \phappening to you on your first day.\nHere you go.\p
#org @Mom2
= Also you should take this potion.\n
#org @mom5
= Good-luck [player].\n
#org @walk2

#RAW 0x10
#RAW 0x12
#RAW 0x12
#RAW 0xFE
__________________
Matteron(96)
Currently Playing--->
Progress: Post-Game
Current Team:


In Terms of Hacking...
Favorite ROM
Skills
Working On
In Terms of Game Dev...
Working On
News
I'm currently up for hire, for almost anything in ROM hacking, so just send me a PM.
Reply With Quote
  #93    
Old March 29th, 2009 (07:00 AM).
Liquid Shadow's Avatar
Liquid Shadow Liquid Shadow is offline
xD
 
Join Date: Mar 2008
Gender:
Posts: 224
Quote originally posted by Matteron:
Hi I'm new to scripting and I wrote this script but when i press debug mode it shows this message.
Spoiler:
Error 13 "type mismatch" on line 8.
Missing Dynamic label.

can you tell me what i'm doing wrong heres the script
Spoiler:
#dynamic 0x71A23C
#org @start
lock
faceplayer
applymovement 0x1 @walk1
waitmovement 0x0
#org @Mom1
msgbox @ha 0x6
givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
#org @Mom3
msgbox @he 0x6
giveitem 0xD 0x1 MSG_OBTAIN
#org @mom4
msgbox @ho 0x6
applymovement 0x1 @walk2
waitmovement 0x0
#org @walk1

#RAW 0x13
#RAW 0x13
#RAW 0x11
#RAW 0xFE
#org @Mom
= Oh [player] don't forget your eevee\n. We would not want anything \phappening to you on your first day.\nHere you go.\p
#org @Mom2
= Also you should take this potion.\n
#org @mom5
= Good-luck [player].\n
#org @walk2

#RAW 0x10
#RAW 0x12
#RAW 0x12
#RAW 0xFE
Well on line 8 you have "msgbox @ha 0x6". Well, if you look at your script you don't have a "@ha message". That's your problem. There's no message even though in your script theres a msgbox.
__________________

4 truths of life
1. You cannot touch all your teeth with your tongue.
2. All idiots, after reading the first truth, will try it.
3. And discover that the first truth is a lie.
4. You're smiling now because you're an idiot.
Reply With Quote
  #94    
Old March 29th, 2009 (07:44 AM). Edited March 29th, 2009 by Matteron (96).
Matteron (96)'s Avatar
Matteron (96) Matteron (96) is offline
Difference is everything...
Gold Tier
 
Join Date: May 2008
Age: 18
Posts: 270
thanks
wow i really need to get better at this.
um i no i already asked for help but when i inserted the script it just froze up on me heres the image of what i typed into amap
Spoiler:

also here the new script.
Spoiler:
#dynamic 0x71A23C
#org @start
lock
faceplayer
applymovement 0x1 @walk1
waitmovement 0x0
#org @Mom1
msgbox @mom2 0x6
givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
#org @Mom3
msgbox @mom2 0x6
giveitem 0xD 0x1 MSG_OBTAIN
#org @mom4
msgbox @mom5 0x6
applymovement 0x1 @walk2
waitmovement 0x0
#org @walk1

#RAW 0x13
#RAW 0x13
#RAW 0x11
#RAW 0xFE
#org @Mom
= Oh [player] don't forget your eevee\n. We would not want anything \phappening to you on your first day.\nHere you go.\p
#org @Mom2
= Also you should take this potion.\n
#org @mom5
= Good-luck [player].\n
#org @walk2

#RAW 0x10
#RAW 0x12
#RAW 0x12
#RAW 0xFE
__________________
Matteron(96)
Currently Playing--->
Progress: Post-Game
Current Team:


In Terms of Hacking...
Favorite ROM
Skills
Working On
In Terms of Game Dev...
Working On
News
I'm currently up for hire, for almost anything in ROM hacking, so just send me a PM.
Reply With Quote
  #95    
Old March 31st, 2009 (05:18 AM).
X_CiEnCe's Avatar
X_CiEnCe X_CiEnCe is offline
Meta-Hacker
 
Join Date: Mar 2009
Location: Mar del plata, buenos aires, argentina
Gender:
Nature: Timid
Posts: 9
Oh diego
your tuto
are the best


I use this every time
when i build a script
__________________


Sorry for my english i live in south america
disculpen mi ingles vivo en america del sur
xD
Reply With Quote
  #96    
Old April 2nd, 2009 (08:16 PM).
LunaticHigh LunaticHigh is offline
N00b h4x0r
 
Join Date: Mar 2009
Location: A foreign land called Canada
Gender:
Nature: Hasty
Posts: 13
In the Apply Movement section, the last spoiler the images aren't working so what exactly am I supposed to change so it doesnt freeze when I step on the tile?
Reply With Quote
  #97    
Old April 3rd, 2009 (07:28 PM).
diegoisawesome's Avatar
diegoisawesome diegoisawesome is offline
Please understand
Silver Tier
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 18
Gender: Male
Nature: Quirky
Posts: 972
Quote originally posted by LunaticHigh:
In the Apply Movement section, the last spoiler the images aren't working so what exactly am I supposed to change so it doesnt freeze when I step on the tile?
It works for me. Try refreshing the page.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
Reply With Quote
  #98    
Old April 3rd, 2009 (07:35 PM). Edited April 4th, 2009 by GoldxLight.
GoldxLight GoldxLight is offline
 
Join Date: Apr 2009
Posts: 50
Hey, I seem to be having a problem with XSE...

Whenever I try to script something, whether a talking or givepokemon script, it changes into a roll of garbage that makes no sense when I go back to it.


EDIT: Fixed the problem...
__________________
Reply With Quote
  #99    
Old April 5th, 2009 (01:37 PM).
Dragonmaster91's Avatar
Dragonmaster91 Dragonmaster91 is offline
It's just common sense!
 
Join Date: Apr 2008
Gender: Male
Nature: Adamant
Posts: 220
Quote originally posted by Matteron:
thanks
wow i really need to get better at this.
um i no i already asked for help but when i inserted the script it just froze up on me heres the image of what i typed into amap
Spoiler:

also here the new script.
Spoiler:
#dynamic 0x71A23C
#org @start
lock
faceplayer
applymovement 0x1 @walk1
waitmovement 0x0
#org @Mom1
msgbox @mom2 0x6
givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
#org @Mom3
msgbox @mom2 0x6
giveitem 0xD 0x1 MSG_OBTAIN
#org @mom4
msgbox @mom5 0x6
applymovement 0x1 @walk2
waitmovement 0x0
#org @walk1

#RAW 0x13
#RAW 0x13
#RAW 0x11
#RAW 0xFE
#org @Mom
= Oh [player] don't forget your eevee\n. We would not want anything \phappening to you on your first day.\nHere you go.\p
#org @Mom2
= Also you should take this potion.\n
#org @mom5
= Good-luck [player].\n
#org @walk2

#RAW 0x10
#RAW 0x12
#RAW 0x12
#RAW 0xFE


Hope this helps.
Reply With Quote
  #100    
Old April 8th, 2009 (06:42 AM).
Sophidius's Avatar
Sophidius Sophidius is offline
Need a storyline? PM me!
 
Join Date: Mar 2009
Location: Farawaystan
Nature: Quiet
Posts: 153
Uhh, is there no way to get an earthquake in FR/LG?
__________________
Officially stopped hacking, but do check out my fanfic: The Legend of the Aquatus

Did you know that Mewtwo is actually a crossing between Marowak (Cubone's mother from Pokemon Tower) and Mew? O_o
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:17 PM.