The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
Research & Development programs in this forum are subject to moderator approval before they are displayed.

Reply
 
Thread Tools
  #1    
Old Posted December 28th, 2008 (05:41 PM).
hot_kage's Avatar
hot_kage
I am like a rose cute and calm
 
Join Date: Oct 2008
Location: Long Beach , California
Age: 21
Gender:
Nature: Naughty
XSE Scripting Tutorial

This Tutorial Does Not Cover Basics, Just Certain Scripts
.

In This Tutorial:
Weather Scripts
Warp Scripts
Setmaptile script
add/check pc item (addpcitem and checkpcitem)

To Come:
Money Scripts

Contest Scripts
sethealingplace
buffer scripts
pokepic scripts


Weather


Their are two simple commands to the weather script; setweather and doweather.

setweather
will set the weather and doweather with activate it.

Now Here's A List of all the weather commands.
Code:
None = 0x0
Reflected Clouds = 0x1
Normal = 0x2 
Rain = 0x3
3 Snowflakes = 0x4
Thunderstorm = 0x5 
Fog = 0x6
Snow = 0x7
Sandstorm = 0x8
Diagonal Fog = 0x9
Thin Fog = 0xA
Bit Dark = 0xB
Overheat = 0xC
Thunderstorm2 = 0xD
None = 0xE
now for the script itself:

Code:
#dynamic 0x800000

#org @start
checkflag 0x200
if 0x1 goto @next
setweather 0x7
doweather
setflag 0x200
release
end

#org @next
setweather 0x2
doweather
clearflag 0x200
release
end
The Line setweather 0x3 means it sets rain and then doweather makes it rain. no another example.

Say you want it to snow you would replace the 0x3 with 0x7.
so now the script is

Spoiler:
#dynamic 0x800000
#org @start
checkflag 0x200
if 0x1 goto @next
setweather 0x3
doweather
setflag 0x200
release
end

#org @next
setweather 0x2
doweather
clearflag 0x200
release
end

now another useful command is; resetweather.
this command resets the default weather of that area.
as it only prepares the ROM for the weather, it still suppose to be followed by doweather.

Setmaptile

This script replaces tiles in the map and replaces them with other tiles.
now the script for the setmaptile.

Code:
#dynamic 0x800000

#org @start
setmaptile 0x0E 0x13 0x1 0x0
special 0x8E
release
end
now for the explanation;
Spoiler:
setmaptile 0x(X Coordinate) 0x(Y Coordinate) 0x(Tile Number) 0x(movement allowed)


You can find The X and Y coordinates and the tile number in Advance map. In the little status bar at the bottom on the far left of AM, you should have Block: Offset:
Movement allowed has two possible options:

Spoiler:
0x0 = Passable
0x1 = Blocked off


This will reset the map so that it allows the tile to change . Without it you have to leave the map and then return for it to work

Warp

I Will be showing you all 4 Different Kinds of Warps!

First Is The Basic Warp:

Code:
warp 0x(map bank) 0x(map number) 0x(warp number)
for example to warp to pallet town, your house you would type:

Code:
warp 0x3 0x0 0x0
now for the second type of warp; warphole this script warps the player but with a hole effect.

the only difference is that instead of the warp command you write the warphole command

Code:
warphole 0x3 0x0 0x0
now the next warp we will discuss is the warpteleport! now here once again the only difference is that instead of warp, you do warpteleport;

Code:
warpteleport 0x3 0x0 0x0
next is the warpwalk;

Code:
warpwalk 0x3 0x0 0x2
now is the warp2:

Code:
warp2 0x3 0x0 0x2
now warp2 warps the player but with no sound effect.

now my final scripts are the addpcitem and checkpcitem

NOTE: These might not work properly cause i don't really know them D:

now the addpcitem adds a specified item to the PC.

here is how it works:

Code:
addpcitem 0x(item number) 0x(quantity)


pretty simple?

now the checkpcitem checks if the player has the item of his/her PC.

Code:
checkpcitem 0x(item number) 0x(quantity)
















Reply With Quote
  #2    
Old Posted December 29th, 2008 (09:17 PM).
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Not bad, but what about adjusting it to the new XSE database? XSE v1.1.1 is out now, and everyone should update as soon as possible ;)
__________________
Reply With Quote
  #3    
Old Posted December 30th, 2008 (02:46 AM).
Pokepal17's Avatar
Pokepal17
More cowbell~
 
Join Date: Oct 2008
Location: Steeltown
Age: 20
Gender: Male
Nature: Modest
This is pretty useful. Good work
__________________
Pokémon Stardrop
Reply With Quote
  #4    
Old Posted December 30th, 2008 (09:05 AM).
hot_kage's Avatar
hot_kage
I am like a rose cute and calm
 
Join Date: Oct 2008
Location: Long Beach , California
Age: 21
Gender:
Nature: Naughty
Quote:
Originally Posted by HackMew View Post
Not bad, but what about adjusting it to the new XSE database? XSE v1.1.1 is out now, and everyone should update as soon as possible
oh okay i didn't know a new version was released

Quote:
Originally Posted by Pokepal17 View Post
This is pretty useful. Good work
Thank You, Though Did Anyone else make a tutorial for these script?
Reply With Quote
  #5    
Old Posted January 15th, 2009 (11:19 AM).
Pokepal17's Avatar
Pokepal17
More cowbell~
 
Join Date: Oct 2008
Location: Steeltown
Age: 20
Gender: Male
Nature: Modest
Quote:
Originally Posted by hot_kage View Post
oh okay i didn't know a new version was released



Thank You, Though Did Anyone else make a tutorial for these script?
Well as far as I know, they can be found in other tutorials but the are buried in themsomewhere and this tutorial is useful if I want to quicky find out about these three things.
__________________
Pokémon Stardrop
Reply With Quote
  #6    
Old Posted July 18th, 2011 (05:19 AM).
The Void's Avatar
The Void
Iron hand in a velvet glove
 
Join Date: May 2010
Location: Holy Roman Empire
Gender: Male
Nature: Calm
Does this work for PKSV? Just curious to know.
__________________
NEMO VIR EST QUI MUNDUM NON REDDAT MELIOREM.
Reply With Quote
  #7    
Old Posted July 20th, 2011 (05:41 PM).
Articuno23's Avatar
Articuno23
Sub-Zero
 
Join Date: Jul 2011
Gender: Male
Nature: Modest
Thanks for this. When is the next section out? I really want to know sethealingplace!
Reply With Quote
  #8    
Old Posted July 20th, 2011 (07:15 PM).
Quickster's Avatar
Quickster
Dream or Drop?
 
Join Date: Oct 2007
Gender: Male
Nature: Quiet
Quote:
Originally Posted by Articuno23 View Post
Thanks for this. When is the next section out? I really want to know sethealingplace!
Woahhh, I think you should find another tutuorial about sethealingplace, as this thread was created in 2008...
__________________
I laugh looking at this.

But sometimes I want to come back to it...

Reply With Quote
  #9    
Old Posted October 10th, 2011 (07:34 PM).
RomHacker23's Avatar
RomHacker23
Beginning Trainer
 
Join Date: Sep 2011
Gender: Male
Quote:
Originally Posted by Articuno23 View Post
Thanks for this. When is the next section out? I really want to know sethealingplace!
You mean like the one in The Pokemon Tower of Lavender Town (FireRed/LeafGreen)?

If you want that script and you're slightly on the lazy side like I am (always tries to find a "cheat" or "side-route" around scripting...then I'd suggest copying the sethealingplace script from Pokemon Tower and adding it to the new area where you'd like your healing spot to be.

Now, if you'd like to learn the script so you can write it yourself or modify (if possible, not real sure on that) it to your needs...I'd suggest checking the Tutorial section. I'm sure you'll find something there that can show the afore-mentioned script (sethealingplace).
__________________
Pikachu - I'm hungry.
Raichu - What would you like to eat?
Pikachu - An Oran Berry please.
Raichu - Oh...
Pikachu - What?
Raichu - If you want an Oran Berry then you'll have to ask Snorlax for
one.
Pikachu - On second thought, I'm not hungry anymore.

Reply With Quote
  #10    
Old Posted October 11th, 2011 (12:24 AM).
DavidJCobb
RESIDENT RAAAAAAAAAAAAGEMASTER
 
Join Date: Jul 2010
Gender: Male
Nature: Lonely
Quote:
Originally Posted by dragon456 View Post
Does this work for PKSV? Just curious to know.
Quote:
Originally Posted by hot_kage View Post
XSE
I doubt it.

Quote:
Originally Posted by Articuno23 View Post
Thanks for this. When is the next section out? I really want to know sethealingplace!
List of healing places.
__________________
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 08:27 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.