PDA

View Full Version : Special Message codes..


cooley
June 26th, 2008, 10:39 AM
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.
http://i29.tinypic.com/2sbmp7t.jpg

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.
http://i26.tinypic.com/2co6a1l.jpg

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
http://i28.tinypic.com/30k9ky1.jpg
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.
http://i31.tinypic.com/2628k78.jpg

See what I mean?

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

"\c\h15" for Japanese
http://i32.tinypic.com/1gjbbq.jpg - 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
http://i28.tinypic.com/1z6r1fm.jpg

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.
http://i30.tinypic.com/14m9dts.jpg

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 !

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...


[B]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

spenceroone3
June 27th, 2008, 01:52 AM
Hey I like it. I learnt a couple of things from this tutorial,
such as shadow, background, that small text (I've been wondering about that for a long while)

EDIT: First post.

Darthatron
June 27th, 2008, 02:07 AM
Nice document Cooley, I'll write up some simple codes so HackMew can add them into XSE. :D

Thanks for posting another helpful document. :)

dragonarche
June 27th, 2008, 02:51 AM
__________
nice tut cooly,
i already knew you can change the back ground colour
but, i nevver knew you can change the font
good work taught me alot:)
_____________________

thethethethe
June 27th, 2008, 03:24 AM
Damn... Didn't know about the changing of the shadows and the backgounds...
I knew about the small font but not the large font. :\
And I only found the special characters the other day when I was proper casing things.
Great tutorial Cooley.

Binary
June 27th, 2008, 08:19 AM
OMG I only knew the color codes and the smilies XD I was clueless..
Thanks for sharing it. Hopefully will be a great help.

Master_Track
June 27th, 2008, 09:04 AM
phew I only knew colour, font and background.
I didn't know that there are that many uses, thanks for sharing this :)

X-aveon
June 27th, 2008, 10:03 AM
is this XSE? if it isn't, could you make one for xse?

cooley
June 27th, 2008, 10:36 AM
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!

Tyrantrum
June 27th, 2008, 11:32 AM
Kool tut! ^^
One question.
The small letters(\h00)
If u always wanted it small, would u just add \h00?

cooley
June 27th, 2008, 01:38 PM
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
June 27th, 2008, 11:50 PM
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 :)

foullump
June 28th, 2008, 11:31 AM
\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.
http://i31.tinypic.com/2628k78.jpg

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
http://i32.tinypic.com/1gjbbq.jpg - 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
June 28th, 2008, 05:52 PM
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!

liuyanghejerry
June 29th, 2008, 01:49 AM
Interesting thing...it surely looks great...keep looking...

destinedjagold
July 2nd, 2008, 03:09 PM
nice tut ya got here. =3
does the codes work for PokeScript as well..?
also, will the background changing colour be available for Ruby..?

thanks and continue the great work~

cooley
July 2nd, 2008, 03:54 PM
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
July 2nd, 2008, 08:57 PM
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
July 6th, 2008, 04:46 PM
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

12345
July 11th, 2008, 01:55 AM
How can I change font once and all text in game will change?

cooley
July 17th, 2008, 12:08 PM
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 (http://pkmnhackersonline.com/) to change RUBY font into FireRed, and a patch to change Ruby Font into Diamond, etc.

Ninja Caterpie
July 25th, 2008, 02:33 AM
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

cooley
July 25th, 2008, 09:30 AM
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...

Ninja Caterpie
July 26th, 2008, 04:36 AM
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

cooley
July 26th, 2008, 05:58 PM
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 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.


[B]#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 flew away!"
callstd 0x4
release
end


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

#org 0x1A63C4
= The 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 [B]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 flew away!"
callstd 0x4
release
end


'---------
' Strings
'---------
#org [B]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!