PoKéHackers Inc.

Just a forum where ROM hackers can come by and leave some tips or tools on hacking...So come on by!!!

Navigation

Who is Online ?

In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest

None


[ View the whole list ]


Most users ever online was 3 on 05/05/09, 02:56 pm

  • Post new topic
  • Reply to topic

DIEAGOISAWSOME MEGA HUGE XSE SCRIPTING TUTORIAL!

Share

tyson
Admin

Posts: 51
Join date: 2009-05-05
Age: 16
Location: IDK

DIEAGOISAWSOME MEGA HUGE XSE SCRIPTING TUTORIAL!

Post  tyson on 25/05/09, 01:45 pm

This is Dieagoisawsome XSE Scripting Tutorial from PC(Pokecommunity).I have asked for his permission to use it.Please don't still this Tutorial or claim it as your own,thanks and please respect my wishes.Anyways without further ado,here is Diegoisawsome scripting tutorial.



diegoisawesome's MEGA-HUGE XSE Scripting Tutorial

(PokeScript tutorial originally by thethethethe)


Don't Take Or Modify Without Permission


I want to say thanks to thethethethe for letting me take this tutorial
and modify it for XSE compatibility. Also, I want to thank HackMew for
making XSE in the first place, and for Irish Witch and PokeScript for
getting me started on scripting. I also want to thank zel for making
the hack (ShinyGold) that started me on the road to hacking. Since this
is just a modification to thethethethe's original tutorial, you'll see
very many similarities.

XSE is a program created by Hackmew, as I've already said. This program
is, in my opinion, the best scripting program there is, having many
advantages over ScriptED, PokeScript, Diamond Cutter, and the likes.
Some of the important features of XSE are:



Dynamic Offsets
All you need to find is the starting offset. XSE will find the rest.
Less Raws, More Commands
It's to make it easier. Instead of having to use #raw 0x53 0x07, you can just use hidesprite 0x07.

This tutorial is going to cover a lot.
I'll show a script at the beginning and then explain everything "new" after it.
Please note that because I hack Fire Red, most scripts are written to suit Fire Red/Leaf Green, and NOT Ruby/Sapphire/Emerald.

I think I'll start with pointers.
Pointers


XSE is great in the way that it uses dynamic offsets. You just put the
starting offset (found in FSF {Free Space Finder}) and XSE will do the
rest.
You can use any random name for the pointer. It could be, for example...
@blah ; @iliketoeatcheese ; @1234567890
As long as there are no spaces in it, and there aren't two exact same pointers, the pointer will work.
So, for example, these won't work
@mr potato head ; @i like mews ; @pikachu rocks.
Message Scripts


Now I can move onto a normal message script.

Code:

#dynamic 0x(FSF Offset)
#org @start
lock
faceplayer
msgbox @1 0x6
release
end

#org @1
= Hi.\nMy name is Diego.

I'll begin at the top of the script and work my way down.
#dynamic 0x(FSF Offset) is the starting offset for your script. XSE will do the rest.
#org @start marks the start of the script, obviously. It shows that it's the beginning.
lock will lock your player so that while this script is "in motion" the player won't be able to move.
faceplayer is used to make the sprite you are talking with face you.
message is used when you want a message to display on the
screen. It's followed by a pointer that will be placed at the bottom as
shown.
The actual message will appear like this.

Quote:


Hi.
My name is Diego.



I'll explain the other types, like \p and \l and others, a little later.

Now the number after the pointer. That number MUST follow a msgbox pointer. Without this, the message box won't appear. In this case, I've used 0x6. I'll cover more numbers later.
Now we use release. This will release the locked player.
end will end the script, stopping it from reading any bytes past it that could crash your game when used.
Extra Message Info


There are lots of other little add-ons that can be used with the message. Here's a short list of them:

Quote:


\c
\h
\n
\l
\p
\v



I'll go in order of this list.
\c usually refers to a color.
This message:

Quote:


\c\h01\h02You received a Pokémon!



will appear in a black text. There's also a new way to write colors.
Here's a short list of the new ones:
Fire Red/Leaf Green
Spoiler:

Spoiler:
White - [white_fr]
Black - [black_fr]
Gray - [grey_fr]
Red - [red_fr]
Orange - [orange_fr]
Green - [green_fr]
Light Green - [lightgreen_fr]
Blue - [blue_fr]
Light Blue - [lightblue_fr]
Light Blue 2 - [lightblue2_fr]
Cyan - [cyan_fr]
Light Blue 3 - [lightblue3_fr]
Navy Blue - [navyblue_fr]
Dark Navy Blue - [darknavyblue_fr]


Ruby/Sapphire

Spoiler:

Spoiler:
Transparent - [transp_rs]
Dark Gray - [darkgrey_rs]
Red - [red_rs]
Light Green - [lightgreen_rs]
Blue - [blue_rs]
Yellow - [yellow_rs]
Cyan - [cyan_rs]
Magenta - [magenta_rs]
Gray - [grey_rs]
Black - [black_rs]
Light Gray - [lightgrey_rs]
White - [white_rs]
Sky Blue - [skyblue_rs]
Dark Sky Blue - [darkskyblue_rs]


Emerald

Spoiler:
White - [white_em]
Dark Gray - [darkgrey_em]
Gray - [grey_em]
Red - [red_em]
Orange - [orange_em]
Green - [green_em]
Light Green - [lightgreen_em]
Blue - [blue_em]
Light Blue - [lightblue_em]
White 4 - [white4_em]
Lime Green- [limegreen_em]
Aqua - [aqua_em]
Navy - [navy_em]


\h is used with hex values. Here's an example:

Quote:


Here's \hB7100!



That \hB7 is the currency sign of the Pokemon world.
So in this example, I'm going to use "$":

Quote:


Here's $100!



Here's a table of all the hex codes for each symbol:
Spoiler:
00=
01=À
02=Á
03=Â
04=Ç
05=È
06=É
07=Ê
08=Ë
09=Ì
0B=Î
0C=Ï
0D=Ò
0E=Ó
0F=Ô
10=Æ
11=Ù
12=Ú
13=Û
14=Ñ
15=ß
16=à
17=á
19=ç
1A=è
1B=é
1C=ê
1D=ë
1E=ì
20=î
21=ï
22=ò
23=ó
24=ô
25=æ
26=ù
27=ú
28=û
29=ñ
2A=º
2B=ª
2C=·
2D=&
2E=+
34=[Lv]
35==
36=;
51=¿
52=¡
53=[PK]
54=[MN]
55=[PO]
56=[Ke]
57=[BL]
58=[OC]
59=[K]
5A=Í
5B=%
5C=(
5D=)
68=â
6F=í
79=[u]
7A=[D]
7B=[L]
7C=[R]
A1=0
A2=1
A3=2
A4=3
A5=4
A6=5
A7=6
A8=7
A9=8
AA=9
AB=!
AC=?
AD=.
AE=-
AF=·
B0=[...]
B1="
B2=["]
B3='
B4=[']
B5=[m]
B6=[f]
B7=$
B8=,
B9=[x]
BA=/
BB=A
BC=B
BD=C
BE=D
BF=E
C0=F
C1=G
C2=H
C3=I
C4=J
C5=K
C6=L
C7=M
C8=N
C9=O
CA=P
CB=Q
CC=R
CD=S
CE=T
CF=U
D0=V
D1=W
D2=X
D3=Y
D4=Z
D5=a
D6=b
D7=c
D8=d
D9=e
DA=f
DB=g
DC=h
DD=i
DE=j
DF=k
E0=l
E1=m
E2=n
E3=o
E4=p
E5=q
E6=r
E7=s
E8=t
E9=u
EA=v
EB=w
EC=x
ED=y
EE=z
EF=[>]
F0=:
F1=Ä
F2=Ö
F3=Ü
F4=ä
F5=ö
F6=ü
F7=[u]
F8=[d]
F9=[l]
FA=\l
FB=\p
FC=\c
FD=\v
FE=\n
FF=\x


Instead of using the codes below, I recommend using the Text Adjuster,
found under Tools>Text Adjuster. Just type it in, press "Convert",
and paste it in. It's that simple!

\n is used when we want to go to a new line. So this message:

Quote:


Hi.\nWelcome.



would appear like this:

Quote:


Hi.
Welcome.




\l
is used in text for a new line, but it can only be used after \n has already been used.
So this message:

Quote:


Hi.\nI love my bed!\lDon't you dare sleep in\lit!



will appear like this:

Quote:


Hi.
I love my bed!
Don't you dare sleep in
it!




\p
is used when we want the text to continue in a new box. This message:

Quote:


...\p...\p...\pYup!



will appear like this: ------------ means a new box.

Quote:


...
------------------------------------------------
...
------------------------------------------------
...
------------------------------------------------
Yup!




\v
is used when we want display stored text. Here's an example:

Quote:


Hello, \v\h01!\n\v\h06 is looking for you.



This would appear like this.

Quote:


Hello, [PLAYER's name]!
[RIVAL's name] is looking for you.



You could also do it like this:

Quote:


Hello, [player]!\n[rival] is looking for you.





Msgbox Numbers

Here are the many different types, taken directly from The ROM Hacking Newsletter, also located in the ROM Hacking section.
This week's tip comes from HackMew. This time, it's all about
msgboxes. Below is a description, script example and in-game shot of
the different msgbox types.


0x2
Spoiler:
Description:
This is the msgbox used for normal people. Using this type means that
you don't need to use the lock, faceplayer or release commands.

Script:
#dynamic 0x800000


#org @start
msgbox @hello 0x2
end

#org @hello
= Hello, my name is dshayabusa.

In-Game:


0x3
Spoiler:
Description:
Used for signs etc. No lock or faceplayer effect. Only shows the sign textbox when used on an actual sign.

Script:
#dynamic 0x800000



#org @start
msgbox @sign 0x3
end

#org @hello
= You are here

In-Game:


0x4
Spoiler:
Description:
Used for Yes/No questions. No lock or faceplayer effect.

Script:
#dynamic 0x800000


#org @start
msgbox @question 0x5
end

#org @hello
= Is this statement false?

In-game:


0x6
Spoiler:

Description:
Normal textbox. Has no lock or faceplayer effect.

Script:

#dynamic 0x800000

#org @start
msgbox @Hello 0x6
end

#org @hello
= Hello, my name is dshayabusa.

In-game:


Flags



Flags are very useful when you need an event to only occur once or if you want a person to disappear.
Let's say you set flag 0x200. If you want an overworld to disappear, we
have to assign the set flag (in this example, 0x200) to the overworld's
people ID in Advance-Map. I'll go into more detail on that later.
Many flags are used within the game already. If you plan on leaving
scripts that are already in the ROM, you'll need to be more careful on
what flags you use, because flags can only really be used once.
If you want some flags that are used in the ROM already, here's a list: Taken directly from the XSE Comprehensive Scripting Guide, found here: Help>Guide
  • Post new topic
  • Reply to topic

Current date/time is 24/11/09, 03:49 pm