cooley

///Keepin' it simple

Age 28
Male
United States
Seen December 5th, 2014
Posted December 2nd, 2014
1,148 posts
16.3 Years
Another tutorial of mine...
You know in Baro's hack, where you are talking, then all of a sudden, the message pauses? Well, he gave me a document, that explains different codes to do different things in a Msgbox script.

Color Codes

Prologue

Color codes are used in the game to give the user an idea of who is speaking. In my (used to be) hack, I used to set everyone's color code to Black, and use the color blue to tell everyone that the player is speaking. I also used Red to tell people the Mother is speaking. But they can be used for, anything the creator wants them to be used for.

Example

#org @start
 msgbox @color
 callstd 0x2
 end

 #org @pause
 = \c\h01\h08Today is Wednsday, right?
That one was simple. It will change the text color to blue, because \c\h01 means "set ink color to X" and X = 08, blue.

Text Color
Now \c doesn't necessarily mean "color" codes, \c in hex is FC.
Color codes use the code \c\h01 or FC01 to change the color of the Ink. In the pic below, you'll see that I changed the color of the text to Red.


Background Color
Now did you know you can also change the background of text? All you do is use the code for color but instead of "\c\h01\h04", you would use "\c\h02\h04"
\c\h02 means to set background ink color to "X". X = color. A list of colors can be found in XSE's thread in the toolbox.


Shadow Color
Besides changing the color of the background, or color of text, you can also change the color of the Shadow! Guess what? CHICKEN BUTT, xD

In that pic, I changed the shadow's color to Blue and the text color to Red.

That's all for Color codes...Basic, that is...

Font Codes

Prologue

Well I don't have a clue why people use them, but oh well. Teh Baro used them in his hack to demonstrate how serious, or angry someone was/is. You can tell, by looking at the examples below.

Example

 #org @start
 msgbox @font
 callstd 0x3
 end

 #org @font
 = \c\h06\h00Today is wednsdaym right?\n\c\h06\h00YES! TODAY IS WEDNSDAY, GEEZ[.]
Smaller Font
The code \c\h06 means to set the font to a certain size. \h00 = small, and everything else that is NOT "00" will result in normal font.


See what I mean?

Different Syled Font
This code(below) will change the font to Japanese or Western STYLED font:

"\c\h15" for Japanese
- It looks kinda like DP font, don't it? :S

"\c\h15" for Western(which is the regular font)

That concludes Font tutorials...

Special Character Text

Prolouge

Ok, at least you made it this far.
These special characters, they're mainly used for guiding, and directing. In the game, some places use them for signposts.

Example

 #org @start
 message @direct
 boxset 0x3
 end

 #org @direct
 = \hF8\h00 is used for ???

Information Characters

For these, we don't use "\c" anymore, we use \hF8 now.

Code F8 is used in the Key Bar to display the buttons:
00-05 Buttons: A B L R Start Select
06-0C Dipad: ↑ ↓ ← → ↕ ↔ none
Code 2 – F9


So if you wanted the "B" button, you would put:

 #org @start
 lock
 faceplayer
 message @button
 boxset 6
 release
 end

 #org @button
 = Did you know the \hF8\h01 is used\nto cancel menus?
Smileys
Using the code F9 and one of the numbers below, you can make a smiley like this: :)

 Code 2 – F9

 Several other glyphs, including smileys (?!)
 00-19; D0-FE:  ' D0 - FE are the smileys/etc.


In that example, I used "\hF9\hF7" - "\hF9\hFE"

If you wanted a mad face, you'd put:
 #org @start
 lock
 faceplayer
 message @hello
 boxset 6
 release
 end

 #org @hello
 = Grr...I'm mad! \hF9\hFE

Short String Text


Prologue
Using the Short string codes, we no longer use "\c" or "\h" to start it. We would normally use "\v". But you can use "\hFD"
Short string text saves you a lot of space from writing simple things such as "Player" while we can use "\v\h01". The game won't understand "player" anyways, so I'll use a different example. If you have a script, and you are continuously using a name or pokemon, you can just specify that name with the "Bufferstring" command(0x85) or "Bufferpokemon" command(0x7D).

Example
#org @start
bufferpokemon 0x0 0x150
message @mewtwo
boxset 0x6
end

#org @mewtwo
= I think I saw a [buffer1]!
List of all Short String text
Code FD16("\v") inserts short strings:
\v\h01	Player’s name
\v\h02-04	Buffer strings (set by another function, used for various things)
\v\h06	Rival’s name
\v\h07	Ruby
\v\h08	Magma
\v\h09	Aque
\v\h0A	Maxie
\v\h0B	Archie
\v\h0C	Groudon
\v\h0D	Kyogre
I guess that's all...It's up to you to experiment now...


ETC. Message Codes

Prolouge
The Codes that don't fit with the rest of the other category's. These codes include Pause music, resume music, play a song, wait to resume message after a key is pressed, wait to resume message after a specified length of time, and Set drawing position to X.

Pause music
This message code pauses the music until it is resumed by another code.
It's used in Gym's, where BROCK is talking and while he is talking the music stops, then plays the fanfare music, then resumes normal music. In a way, this saves space so you don't have to use the "Playsong command".

Example
I'll finish this later, ok? xD

Darthatron

巨大なトロール。

Age 31
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
17.4 Years
Nice document Cooley, I'll write up some simple codes so HackMew can add them into XSE. :D

Thanks for posting another helpful document. :)
あなた は しきしゃ です
わたし は ばか です

cooley

///Keepin' it simple

Age 28
Male
United States
Seen December 5th, 2014
Posted December 2nd, 2014
1,148 posts
16.3 Years
is this XSE? if it isn't, could you make one for xse?
No, It's scriptED.

Anyways, I updated the first post, kind of...Thanks for all your feedback, guys!

cooley

///Keepin' it simple

Age 28
Male
United States
Seen December 5th, 2014
Posted December 2nd, 2014
1,148 posts
16.3 Years
Kool tut! ^^
One question.
The small letters(\h00)
If u always wanted it small, would u just add \h00?
If you always want it small than put it in front of the text. It is similar to the color codes. It will remain that color until you set it back to black.

Swampert 22

Is making tools for you...

Age 32
Male
Switzerland
Seen August 23rd, 2022
Posted November 26th, 2011
393 posts
17.7 Years
Very good Cooley, I have learnt a lot form this tutorial, I only knew about the colour codes and small text. Very good and clear tutorial!

Well Done :)

I've made some tools for Pokémon hacking! Please check out the thread... Swampert Tools Showcase

Head over to my thread to check out my latest tool, Pokémon Red/Blue Trainer Editor!

Visit my site for Pokémon ROM Hacking tools! Swampert Tools Homepage
United States
Seen May 15th, 2020
Posted April 25th, 2019
221 posts
16.2 Years
\c\h06\h00Today is wednsdaym right?\n\c\h06\h00YES! TODAY IS WEDNSDAY, GEEZ[.]

The code \c\h06 means to set the font to a certain size. \h00 = small, and everything else that is NOT "00" will result in normal font.


See what I mean?

No, I don't. If you notice, you contradicted yourself. "The code \c\h06 means to set the font to a certain size. \h00 = small, and everything else that is NOT "00" will result in normal font." Yet, in your code, both codes are the exact same. (\c\h06\h00) Yet, there still retains a definate change to the font. Did you make a mistake when you showed us your script? Or when you type that code, does it just change automaticly, even if you don't define a switch? That doesn't seem very logical...

Different Syled Font
This code(below) will change the font to Japanese or Western STYLED font:

"\c\h15" for Japanese
- It looks kinda like DP font, don't it? :S

"\c\h15" for Western(which is the regular font)
Again, you contradicted yourself. "\c\h15 for Japanese" "\c\h15 for Western"
As you see, they're the same code... And with the shadow changing, you didn't explain how to do it. You simply stated it could be done. So, could you please go over this again and if you made an error, correct it? Thanks! Aside from that, I don't know how you learned this, but I knew about the backround coloring. I made a mistake one time when I changed text color.

cooley

///Keepin' it simple

Age 28
Male
United States
Seen December 5th, 2014
Posted December 2nd, 2014
1,148 posts
16.3 Years
No, I don't. If you notice, you contradicted yourself. "The code \c\h06 means to set the font to a certain size. \h00 = small, and everything else that is NOT "00" will result in normal font." Yet, in your code, both codes are the exact same. (\c\h06\h00) Yet, there still retains a definate change to the font. Did you make a mistake when you showed us your script? Or when you type that code, does it just change automaticly, even if you don't define a switch? That doesn't seem very logical...


Again, you contradicted yourself. "\c\h15 for Japanese" "\c\h15 for Western"
As you see, they're the same code... And with the shadow changing, you didn't explain how to do it. You simply stated it could be done. So, could you please go over this again and if you made an error, correct it? Thanks! Aside from that, I don't know how you learned this, but I knew about the backround coloring. I made a mistake one time when I changed text color.
Thanks for pointing it out to me. But, I wasn't done really, so later(unfortunately), I'll fix them. And add shortcuts, using XSE!

cooley

///Keepin' it simple

Age 28
Male
United States
Seen December 5th, 2014
Posted December 2nd, 2014
1,148 posts
16.3 Years
You still use Pokescript?
Yeah, they should work with pokescript, if pokescript doesn't mess up the compiling, xD

And, I haven't really tested them in other games. But if you use XSE, the color codes, for example are available to all Pokemon Advance Roms.

Ex.
[black_rs]This is black text. For RUBY
[green_rs]This is green text. For RUBY

Darthatron

巨大なトロール。

Age 31
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
17.4 Years
You still use Pokescript?
Yeah, they should work with pokescript, if pokescript doesn't mess up the compiling, xD

And, I haven't really tested them in other games. But if you use XSE, the color codes, for example are available to all Pokemon Advance Roms.

Ex.
[black_rs]This is black text. For RUBY
[green_rs]This is green text. For RUBY
Yeah, but I wrote them before I knew you could change the Backgroud, and Outliune colors... >_> I guess I'll write up the list again, but for everything this time. :D

PS.
When are you going to finish this guide? xD I want to learn how to pause text. :) (Or you could PM me the data Baro sent you. ;))
あなた は しきしゃ です
わたし は ばか です

cooley

///Keepin' it simple

Age 28
Male
United States
Seen December 5th, 2014
Posted December 2nd, 2014
1,148 posts
16.3 Years
Yeah, but I wrote them before I knew you could change the Backgroud, and Outliune colors... >_> I guess I'll write up the list again, but for everything this time. :D

PS.
When are you going to finish this guide? xD I want to learn how to pause text. :) (Or you could PM me the data Baro sent you. ;))
Lol, I'm a busy guy...
Maybe I'll pm you the codes, or maybe just Pm every member, to make it fair, xD

I'll PM you, I'll finish this, sometime, xD

cooley

///Keepin' it simple

Age 28
Male
United States
Seen December 5th, 2014
Posted December 2nd, 2014
1,148 posts
16.3 Years
How can I change font once and all text in game will change?
What you're talking about is not a message code
You would have to edit the font, I don't know how, but there is a patch on PHO to change RUBY font into FireRed, and a patch to change Ruby Font into Diamond, etc.
Age 27
Male
Best City OCE
Seen October 18th, 2021
Posted April 1st, 2013
5,978 posts
15.1 Years
Hey, nice tut Cooley...You got more things to be credited for... >.>
Anyway, is there a way to show an arrow?
Like -> or <-
Can you finish it? Or are you too lazy? Or busy? xD
Everything ends,
and that's always sad.
But everything begins again, too,
and that's always happy.

cooley

///Keepin' it simple

Age 28
Male
United States
Seen December 5th, 2014
Posted December 2nd, 2014
1,148 posts
16.3 Years
Hey, nice tut Cooley...You got more things to be credited for... >.>
Anyway, is there a way to show an arrow?
Like -> or <-
Can you finish it? Or are you too lazy? Or busy? xD
It depends if you're using XSE or not...
If you are then just write [R] for the right arrow, [U] for the up arrow, etc. And it has to be in caps.

If you're using anything else, I suggest you decompile it with something else, and see how they do it in-game...
Age 27
Male
Best City OCE
Seen October 18th, 2021
Posted April 1st, 2013
5,978 posts
15.1 Years
Oh? Awesome!
...Can it be done on A Text cos I edit texts with it. Easier cos of auto-repoint and stuff telling size of...etc. I screwed up half the signs in Pallet when I script edited. xD
Everything ends,
and that's always sad.
But everything begins again, too,
and that's always happy.

cooley

///Keepin' it simple

Age 28
Male
United States
Seen December 5th, 2014
Posted December 2nd, 2014
1,148 posts
16.3 Years
Oh? Awesome!
...Can it be done on A Text cos I edit texts with it. Easier cos of auto-repoint and stuff telling size of...etc. I screwed up half the signs in Pallet when I script edited. xD
Well yes, and you can always decompile the script, and use one of XSE's not appreciated functions...

Which is mixed offsets. You decompile a script:


'---------------
#org 0x1637B8
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
special 0x188
lock
faceplayer
startwildbattle 0x91 0x32 0x0
checksound
cry 0x91 0x2
msgbox2 0x81A6448 '"Gyaoo!"
waitmsgbox
waitcry
pause 0xA
playsong 0x156 0x0
waitkeypress
setflag 0x807
special 0x138
waitstate
clearflag 0x807
special2 LASTRESULT 0xB4
compare LASTRESULT 0x1
if 0x1 goto 0x816381B
compare LASTRESULT 0x4
if 0x1 goto 0x8163824
compare LASTRESULT 0x5
if 0x1 goto 0x8163824
setflag 0x2BF
release
end

'---------------
#org 0x1A7AE0
release
end

'---------------
#org 0x16381B
setflag 0x2BF
goto 0x81A922D
end

'---------------
#org 0x163824
setvar 0x8004 0x91
goto 0x81A9236
end

'---------------
#org 0x1A922D
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
release
end

'---------------
#org 0x1A9236
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
bufferpokemon 0x0 0x8004
msgbox 0x81A63C4 '"The [buffer1] flew away!"
callstd 0x4
release
end


'---------
' Strings
'---------
#org 0x1A6448
= Gyaoo!

#org 0x1A63C4
= The [buffer1] flew away!
Find the offset you want to repoint, or add more text to.

#dynamic 0x800000 'Add a dynamic 0xOffset, so XSE can search from there
'---------------
#org 0x1637B8
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
special 0x188
lock
faceplayer
startwildbattle 0x91 0x32 0x0
checksound
cry 0x91 0x2
msgbox2 0x81A6448 - @Pokemon              'Make the offset Dynamic
waitmsgbox
waitcry
pause 0xA
playsong 0x156 0x0
waitkeypress
setflag 0x807
special 0x138
waitstate
clearflag 0x807
special2 LASTRESULT 0xB4
compare LASTRESULT 0x1
if 0x1 goto 0x816381B
compare LASTRESULT 0x4
if 0x1 goto 0x8163824
compare LASTRESULT 0x5
if 0x1 goto 0x8163824
setflag 0x2BF
release
end

'---------------
#org 0x1A7AE0
release
end

'---------------
#org 0x16381B
setflag 0x2BF
goto 0x81A922D
end

'---------------
#org 0x163824
setvar 0x8004 0x91
goto 0x81A9236
end

'---------------
#org 0x1A922D
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
release
end

'---------------
#org 0x1A9236
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
bufferpokemon 0x0 0x8004
msgbox 0x81A63C4 '"The [buffer1] flew away!"
callstd 0x4
release
end


'---------
' Strings
'---------
#org 0x1A6448 - @Pokemon
= Gyaoo! Extra text, A-text can't do!

#org 0x1A63C4
= The [buffer1] flew away!
Here is the result:
'---------------
#org 0x1637B8
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
special 0x188
lock
faceplayer
startwildbattle 0x91 0x32 0x0
checksound
cry 0x91 0x2
msgbox2 0x880B566 '"Gyaoo! Extra text, A-text can't do!"       'Everything else stays the same without any problems.
waitmsgbox
waitcry
pause 0xA
playsong 0x156 0x0
waitkeypress
setflag 0x807
special 0x138
waitstate
clearflag 0x807
special2 LASTRESULT 0xB4
compare LASTRESULT 0x1
if 0x1 goto 0x816381B
compare LASTRESULT 0x4
if 0x1 goto 0x8163824
compare LASTRESULT 0x5
if 0x1 goto 0x8163824
setflag 0x2BF
release
end

'---------------
#org 0x1A7AE0
release
end

'---------------
#org 0x16381B
setflag 0x2BF
goto 0x81A922D
end

'---------------
#org 0x163824
setvar 0x8004 0x91
goto 0x81A9236
end

'---------------
#org 0x1A922D
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
release
end

'---------------
#org 0x1A9236
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
bufferpokemon 0x0 0x8004
msgbox 0x81A63C4 '"The [buffer1] flew away!"
callstd 0x4
release
end


'---------
' Strings
'---------
#org 0x80B566                    'Next offset available in XSE at 0x800000(I used my hack for the example, xD)
= Gyaoo! Extra text, A-text can't do!

#org 0x1A63C4
= The [buffer1] flew away!