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
  #251    
Old August 6th, 2009 (07:13 PM). Edited August 6th, 2009 by NintendoWalkthrudude.
NintendoWalkthrudude's Avatar
NintendoWalkthrudude NintendoWalkthrudude is offline
Creator of Pokemon Ninja!
 
Join Date: Aug 2009
Location: Boise, Idaho
Age: 21
Gender: Male
Nature: Sassy
Posts: 49
Send a message via Skype™ to NintendoWalkthrudude
Quote originally posted by diegoisawesome:
Code:
#dynamic 0x800000

#org @start
checkflag 0x828
if 0x1 goto @done
checkflag 0x828
if 0x0 goto @willgive
end

#org @done
lock
faceplayer
msgbox @already 0x6
release
end

#org @willgive
lock
faceplayer
msgbox @ask 0x5
compare LASTRESULT 0x0
if 0x1 goto @cyndaquil
compare LASTRESULT 0x1
if 0x1 goto @totodile
end

#org @cyndaquil
msgbox @givecynda 0x4
givepokemon 0x9B 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @get 0x4
waitfanfare
msgbox @takecare 0x6
setflag 0x828
release
end

#org @totodile
msgbox @givetoto 0x4
givepokemon 0x9E 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @get2 0x4
waitfanfare
msgbox @takecare 0x6
setflag 0x828
release
end

#org @already
= That is Johto pokemon.

#org @ask
= Want a pokemon?

#org @get
= [player] received Cyndaquil from Oak.

#org @get2
= [player] received Totodile from Oak.

#org @givecynda
= But, you need a pokemon.\pThis pokemon for you.

#org @givetoto
= Okay, this is for you.

#org @takecare
= Please take care of your\npokemon.
Before, the script was checking for "if not no, goto @cyndaquil" and "if yes, it's yes, then go to @totodile", but I fixed it.
Thanks a ton man, I refer to this tut like crazy so thanks for helping me out!
I think you should put in your main post about this sort of thing.

Also, I want one space, if stepped on you are checked for a pokemon, if you have one you are allowed through, but if you don't, you are pushed back one space. Would it be just like the script for the Guards in FR, like I would only have to replace the flag and text, or would it be different?
Reply With Quote
  #252    
Old August 7th, 2009 (02:51 AM).
3n3rGyZ 3n3rGyZ is offline
 
Join Date: Jul 2009
Gender: Male
Posts: 33
This may be a bit on the off-topic side...But if anyone is pretty experienced with scripting and could help me out.
I would really appreciate it if someone could add me on MSN so we could discuss some of the pointers on scripting.

Thanks in advance,

3n3rGyZ
__________________
3n3rGyZ's PokePet

GrandSlam the level 99 Metagross!
Reply With Quote
  #253    
Old August 7th, 2009 (03:32 PM). Edited August 8th, 2009 by NintendoWalkthrudude.
NintendoWalkthrudude's Avatar
NintendoWalkthrudude NintendoWalkthrudude is offline
Creator of Pokemon Ninja!
 
Join Date: Aug 2009
Location: Boise, Idaho
Age: 21
Gender: Male
Nature: Sassy
Posts: 49
Send a message via Skype™ to NintendoWalkthrudude
I tried this script:

Spoiler:
#org 0x8004B9
countpokemon
compare LASTRESULT 0x2
if 0x1 goto 0x88004CC
if 0x0 goto 0x88004ED

#org 0x8004CC
lock
faceplayer
= Okay go on through.
release
end

#org 0x8004ED
lock
faceplayer
= No pokemon? No passage!
#raw 0x2
#raw 0x12
release
end


But it doesn't work. I was trying to have it check pokemon, and if you have one you go onthrough and if you dont you go back one space to the left. Kinda like the cycling road entrances. But with only 2 script squares, But it just freezes you there while the guard stares at you.
I even adjusted the unknown and varnumber to like the picture, but it doesnt work still.
Reply With Quote
  #254    
Old August 8th, 2009 (07:39 PM).
Napalm's Avatar
Napalm Napalm is offline
Careful! That Stuff Burns!
 
Join Date: Aug 2009
Location: Australia
Age: 19
Gender: Male
Nature: Naughty
Posts: 69
Send a message via Windows Live Messenger to Napalm
Thanks for the guide! A huge help for me.
__________________

Last.FM Profile| Platinum FC | Intelligent PC Brother
Reply With Quote
  #255    
Old August 9th, 2009 (12:03 PM).
Vigilante Vigilante is offline
Ringleader of Hell
 
Join Date: Jul 2009
Nature: Naive
Posts: 319
I don't really get the yes/no thing, I've tried it and it didn't work :/. Help me get a working one?
Reply With Quote
  #256    
Old August 9th, 2009 (09:13 PM).
NintendoWalkthrudude's Avatar
NintendoWalkthrudude NintendoWalkthrudude is offline
Creator of Pokemon Ninja!
 
Join Date: Aug 2009
Location: Boise, Idaho
Age: 21
Gender: Male
Nature: Sassy
Posts: 49
Send a message via Skype™ to NintendoWalkthrudude
Quote originally posted by Meneur d'enfer:
I don't really get the yes/no thing, I've tried it and it didn't work :/. Help me get a working one?
Its basically, if they click yes you point them to #org @yes and if they pick no you point them to #org @no, unless you just want it to end when you click yes or no. Its basically all in the MSGBOX Number, you just have to add extra basic stuff depending on what you are planning to do with that particular script.
Reply With Quote
  #257    
Old August 12th, 2009 (11:58 AM).
rockeymon's Avatar
rockeymon rockeymon is offline
Real life Silver Shirubaa
 
Join Date: Nov 2007
Location: Mahora Academy.
Nature: Serious
Posts: 229
What do you use to Compile the script? Or how do you?
__________________
PalPad Info:
Name: Soul
FC: 5242 9096 3237
Reply With Quote
  #258    
Old August 12th, 2009 (06:17 PM).
NintendoWalkthrudude's Avatar
NintendoWalkthrudude NintendoWalkthrudude is offline
Creator of Pokemon Ninja!
 
Join Date: Aug 2009
Location: Boise, Idaho
Age: 21
Gender: Male
Nature: Sassy
Posts: 49
Send a message via Skype™ to NintendoWalkthrudude
Quote originally posted by rockeymon:
What do you use to Compile the script? Or how do you?
Using an XSE Script Editor
__________________
Free games and stuff click below!

Reply With Quote
  #259    
Old August 22nd, 2009 (01:55 PM).
BlitŻ's Avatar
BlitŻ BlitŻ is offline
guahh my dog is so cute
Crystal Tier
 
Join Date: Feb 2009
Location: Bay Area, Califronia.
Age: 20
Gender: Male
Nature: Jolly
Posts: 472
this tut is really useful , I like teh movement lists
__________________
Reply With Quote
  #260    
Old August 23rd, 2009 (04:08 PM).
Fendaril Fendaril is offline
Novice Mario 64 hacker.
 
Join Date: Feb 2008
Posts: 43
Hello Diego. First before anything your tutorial acts as an excellent reference for me. It's almost as if a professional wrote it.

Now here is my problem. I have a script that suppose to move my player but after its completed my player freezes on the spot without the msgbox function activating.
Below is my code.

Also do you know how to get XSE NOT to autogenerate extra code? It sometimes likes to generate extra unneeded movement commands.

Code:
'---------------
#org 0x80050A
checkflag 0x8D4
if 0x1 goto 0x880054C
setflag 0x8D4
lock
applymovement MOVE_PLAYER 0x880052C
waitmovement 0x0
release
msgbox 0x8800534 MSG_NORMAL '"you notice a pokeball"
closeonkeypress
end

'---------------
#org 0x80054C
release
end


'---------
' Strings
'---------
#org 0x800534
= you notice a pokeball


'-----------
' Movements
'-----------
#org 0x80052C
#raw 0x56 'Exclamation Mark (!)
#raw 0x0 'Face Down
#raw 0x1 'Face Up
#raw 0x2 'Face Left
#raw 0x3 'Face Right
#raw 0x2 'Face Left
#raw 0x3 'Face Right
__________________
mario.......is back?
Reply With Quote
  #261    
Old August 23rd, 2009 (05:27 PM).
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 Fendaril:
Hello Diego. First before anything your tutorial acts as an excellent reference for me. It's almost as if a professional wrote it.

Now here is my problem. I have a script that suppose to move my player but after its completed my player freezes on the spot without the msgbox function activating.
Below is my code.

Also do you know how to get XSE NOT to autogenerate extra code? It sometimes likes to generate extra unneeded movement commands.

Code:
'---------------
#org 0x80050A
checkflag 0x8D4
if 0x1 goto 0x880054C
setflag 0x8D4
lock
applymovement MOVE_PLAYER 0x880052C
waitmovement 0x0
release
msgbox 0x8800534 MSG_NORMAL '"you notice a pokeball"
closeonkeypress
end
 
'---------------
#org 0x80054C
release
end
 
 
'---------
' Strings
'---------
#org 0x800534
= you notice a pokeball
 
 
'-----------
' Movements
'-----------
#org 0x80052C
#raw 0x56 'Exclamation Mark (!)
#raw 0x0 'Face Down
#raw 0x1 'Face Up
#raw 0x2 'Face Left
#raw 0x3 'Face Right
#raw 0x2 'Face Left
#raw 0x3 'Face Right
It only does that when you forget 0xFE at the end of the movements, so it reads the bytes after as movements.
__________________
Pokémon Stardrop
Reply With Quote
  #262    
Old August 23rd, 2009 (09:48 PM).
Fendaril Fendaril is offline
Novice Mario 64 hacker.
 
Join Date: Feb 2008
Posts: 43
So the extra movement generation was because the compiler was trying to guess the movements after to prevent bugs?
__________________
mario.......is back?
Reply With Quote
  #263    
Old August 24th, 2009 (07:13 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
Quote originally posted by Fendaril:
So the extra movement generation was because the compiler was trying to guess the movements after to prevent bugs?
Nope, the byte, to end the movements there wasn't present, so XSE and the ROM believed the bytes after were movements, until it got too an FF or FE. So just remember to put 0xFE at the end of your movements.
__________________
Pokémon Stardrop
Reply With Quote
  #264    
Old August 27th, 2009 (01:48 AM).
Pikachu fan's Avatar
Pikachu fan Pikachu fan is offline
SUSANOOMON IS NOT AMUSED
 
Join Date: Jul 2009
Age: 18
Gender: Male
Nature: Calm
Posts: 54
okay, now i'm trying to compile a shaymin wildbattle script to my fir red hack

#dynamic 0x3AE35F

#org @start
lock
faceplayer
msgbox @1 0x6
cry 0x363 0x0
wildbattle 0x363 0x7 0x8B
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x200
release
end

#org @1
= Shay!

that was the script and every time i try to compile it
it says
"Error 13 type mismatch in file ..... on line 8 missing #define or parameter
Line: wildbattle 0x363 0x7 0x8B

and before you say "Shaymin isn't in fire red!" I replaced roselia
with shaymin.

what is wrong with my script?
Reply With Quote
  #265    
Old August 27th, 2009 (01:52 AM).
Vince_27's Avatar
Vince_27 Vince_27 is offline
 
Join Date: May 2009
Location: France
Gender: Male
Nature: Calm
Posts: 80
the wildbatlle command is:
0x(number of the pokemon yo want in HEX) 0x(level of the pokemon) 0x(item)
__________________
Hacks I support:







Reply With Quote
  #266    
Old August 27th, 2009 (02:51 AM).
kaka1918's Avatar
kaka1918 kaka1918 is offline
sorry im bad in english
 
Join Date: Apr 2009
Location: algeria
Gender:
Nature: Calm
Posts: 27
Send a message via Windows Live Messenger to kaka1918
Is commande of
0x(nember of pokemon in pokedex) 0x(level of pokemon in Format Hexa) 0x(item)
exemple
0x9 0x54 0x1
tortank level 84 item master ball
__________________
French translator tutorials
http://www.hackpoke.toile-libre.org/forum/index.php
Thanks for hackpoke team
Reply With Quote
  #267    
Old August 27th, 2009 (10:13 PM).
Pikachu fan's Avatar
Pikachu fan Pikachu fan is offline
SUSANOOMON IS NOT AMUSED
 
Join Date: Jul 2009
Age: 18
Gender: Male
Nature: Calm
Posts: 54
what would level 7 be in hex?
Reply With Quote
  #268    
Old August 27th, 2009 (10:29 PM).
Vince_27's Avatar
Vince_27 Vince_27 is offline
 
Join Date: May 2009
Location: France
Gender: Male
Nature: Calm
Posts: 80
7in hex is 7, i think.

For know the number you can convert it with the calculator on windows.
__________________
Hacks I support:







Reply With Quote
  #269    
Old August 29th, 2009 (01:05 AM).
ME0W's Avatar
ME0W ME0W is offline
Still busy working on my hack.
 
Join Date: Aug 2009
Age: 19
Gender: Male
Nature: Calm
Posts: 22
Thanks! This tutorial really helped me!
- You're the MAN!
Reply With Quote
  #270    
Old August 29th, 2009 (01:19 AM).
0m3GA ARS3NAL's Avatar
0m3GA ARS3NAL 0m3GA ARS3NAL is offline
Im comin' home...
Silver Tier
 
Join Date: Jan 2008
Location: Superjail Penitentiary
Age: 22
Gender: Male
Nature: Gentle
Posts: 1,816
Quote originally posted by Pikachu fan:
what would level 7 be in hex?
Seven, or, 7 can be written a few ways...

Decimal: 7
Hexadecimal (HEX): 0x7
Octadecimal (OCT, not used in ROM hacking...) 7
Binary (BIN, also not used OFTEN in ROM hacking...): 0111

Hope I could be of help, lol
__________________
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>
Reply With Quote
  #271    
Old August 29th, 2009 (09:45 PM). Edited August 29th, 2009 by Pikachu fan.
Pikachu fan's Avatar
Pikachu fan Pikachu fan is offline
SUSANOOMON IS NOT AMUSED
 
Join Date: Jul 2009
Age: 18
Gender: Male
Nature: Calm
Posts: 54
Thanks, now I just need roselias number is in hex
what is it?

EDIT: nevermind i found it
Reply With Quote
  #272    
Old September 2nd, 2009 (02:03 AM).
Gliscor-Guy Gliscor-Guy is offline
 
Join Date: Aug 2009
Posts: 1
If i use an Level script, i'll be frozen.

When I decompile it, and make it an level script, i get this:

Code:
'---------------
#org 0x14E924
#raw 0x0
But when ik compile this, i don't get an offset, i get this:

Code:
eXtreme Script Editor v1.1.1
-------------------------------------
09-02-2009 12:02:10
-------------------------------------
Output wordt geopent: C:\Users\FSC\Downloads\Sunshine\1Pokémon Sunshine Hack2.gba...
Verwerken van input script...
2 - #ORG
 > lNewOffset = 0x14E924
3 - #RAW
 > bOut = 0x0
-------------------------------------
Bezig met opruimen...
Output sluiten...
Verwerking van input voltooid in 0,014 seconden.
(It's in dutch)

I copied this offset: > lNewOffset = 0x14E924
But then i get frozen.
Reply With Quote
  #273    
Old September 4th, 2009 (03:37 PM).
G Deoxys's Avatar
G Deoxys G Deoxys is offline
Beginner Rom Hacker
 
Join Date: Aug 2009
Location: Internet
Gender: Male
Nature: Timid
Posts: 21
I copied the "Give Pokemon" Script, and when i talk to the person that has that script it says:

Hows Charmander?

When u don't get the charmander
Reply With Quote
  #274    
Old September 5th, 2009 (05:52 PM).
DestinyBender's Avatar
DestinyBender DestinyBender is offline
Mana du vortes, aeria gloris.
 
Join Date: Sep 2009
Location: Currently playing Pokémon Brown.
Age: 17
Gender: Male
Nature: Lonely
Posts: 443
Send a message via Windows Live Messenger to DestinyBender
I use PKSUV, & I have no idea how to work it. I have read guides on it, but still can't nut it out. I am going to download XSE, so it will be much easier, special thanks to your guide. Good job.
__________________
Love you <3


PC Family
Misty-loving sis
Evil, evil, brother
Rock-loving cousin
Uncle, King of Mafia-ness
Beauty Pair

Looking for pair -hinthint-

Also, a rival. Anyone?

Quotes from movies:
Superhero Movie
The House Bunny
Reply With Quote
  #275    
Old September 6th, 2009 (05:58 PM).
BlitŻ's Avatar
BlitŻ BlitŻ is offline
guahh my dog is so cute
Crystal Tier
 
Join Date: Feb 2009
Location: Bay Area, Califronia.
Age: 20
Gender: Male
Nature: Jolly
Posts: 472
hey deigo, for some reason, when I do a mssgboxbox the text comes out like this

Hi(press A)

This is pissing me off(press A)

I want to fix this(press A)

instead of going

Hi(press A)
This is pissing me off (A)
I want to fix this (A)

and Im phrasing it like this in XSE
Hi\nThis is pissing me off\lI want to fix this

So any tips?
__________________
Reply With Quote
Reply
Quick Reply

Sponsored Links

You may also like.. (Beta)
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 06:59 AM.