Msbt: Difference between revisions

2,205 bytes added ,  4 years ago
no edit summary
imported>Argo
imported>CEObrainz
No edit summary
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{lowercase}}
{{lowercase}}
<onlyinclude>
<onlyinclude>
<code>msbt</code> files are message standard binary files. These files define how text is displayed and interacted with by the player.
'''MeSsage StuDio BiNary Text'''
<code>MSBT</code> files are Message Studio Binary files. These files define how text is displayed and interacted with by the player.
</onlyinclude>
</onlyinclude>
== msbt File Layout ==
== msbt File Layout ==
msbt files are made up of four sections that are aligned to 16-bytes.
msbt files are made up of four sections that are aligned to 16-bytes.
Line 324: Line 326:
<code>[00 0A] [00 02] [00 03] [00 04] [00 05] [02 03]</code>
<code>[00 0A] [00 02] [00 03] [00 04] [00 05] [02 03]</code>


There is also the <code>[00 00]</code> at the end which is a reference to the
There is also the <code>[00 00]</code> at the end which is a reference when a criteria is met. In this example the criteria is an unpowered Master Sword.


=== Commands ===
=== Commands ===
Line 370: Line 372:
|-
|-
|Font
|Font
|<code>00 03</code>
|<code>[00 03]</code>
|English font which allows color changing.
|English font which allows color changing.
|-
|-
|Font
|Font
|<code>00 01</code>
|<code>[00 01]</code>
|Hylian Font. Does not allow color changes.
|Hylian Font. Does not allow color changes.
|-
|-
|Color Modifier
|Color Modifier
|<code>00 02</code>
|<code>[00 02]</code>
|Allows changes in color
|Allows changes in color
|-
|-
|Color
|Color
|<code>00 00</code>
|<code>[00 00]</code>
|Red
|Red
|-
|-
|Color
|Color
|<code>00 01</code>
|<code>[00 01]</code>
|Green
|Green
|-
|-
|Color
|Color
|<code>00 02</code>
|<code>[00 02]</code>
|Blue
|Blue
|-
|-
|Color
|Color
|<code>00 03</code>
|<code>[00 03]</code>
|Gray
|Gray
|-
|-
|Color
|Color
|<code>00 05</code>
|<code>[00 05]</code>
|Orange
|Orange
|-
|-
|Color
|Color
|<code>FF FF</code>
|<code>[FF FF]</code>
|White
|White
|}
|}


==== Text Stop Types ====
==== Text Stop Types ====
The Stop text or 1 command has varying stops depending on the type. There are two known types at this time: <code>Choice</code> and <code>Delay</code>
The Stop text or 1 command has varying stops depending on the type. There are two known stop types at this time: <code>Choice</code> and <code>Delay</code>
'''Choice''' is a stop of the text until the player makes a choice which then moves the the text option choosen. A choice is shown above in <code>100enemy.msbt</code>.
*'''Choice''' is a stop of the text until the player makes a choice which then moves the the text option choosen. A choice is shown above in <code>100enemy.msbt</code>.
'''Delay''' is a stop of the text for X number of frames.
*'''Delay''' is a stop of the text for X number of frames. This is then followed by the frame counter and number of frames.


Below are the known Hex codes for the shorts.
{| class="wikitable"
{| class="wikitable"
!Type
!Type
!Hex
!Code
!Notes
!Note
|-
|Choice
|<code>[00 XX]</code>
|X is the number of choices availible. This can reference an event, text in its document, or text in other documents.
|-
|Delay
|<code>[00 00]</code>
|Immedietly Followed by the frame counter
|-
|Frame Counter
|<code>[00 04]</code>
|Followed by 4 nibbles <code>[00 00 00 XX]</code> where XX is the number of frames in hex. EX: 1 sec = 30 frames = <code>[1E]</code>
|-
|-
|}
|}
===== Example =====
A great example of Text stop and modifiers in use is in <code>Demo700_0.msbt</code> the following data appears:
<pre>  | 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F |                 
---|-------------------------------------------------|------------------|
80 | 54 58 54 32 00 00 00 E4 00 00 00 00 00 00 00 00 | TXT2...d........ |
90 | 00 00 00 01 00 00 00 08 00 54 00 68 00 61 00 74 | .........T.h.a.t |
A0 | 00 20 00 69 00 73 00 20 00 61 00 20 00 0E 00 00 | ...i.s...a...... |
B0 | 00 03 00 02 00 00 00 53 00 68 00 65 00 69 00 6B | .......S.h.e.i.k |
C0 | 00 61 00 68 00 20 00 53 00 6C 00 61 00 74 00 65 | .a.h...S.l.a.t.e |
D0 | 00 0E 00 00 00 03 00 02 FF FF 00 2E 00 20 00 0E | ................ |
E0 | 00 01 00 00 00 04 00 00 00 4B 00 54 00 61 00 6B | .........K.T.a.k |
F0 | 00 65 00 20 00 69 00 74 00 2E 00 20 00 0E 00 01 | .e...i.t........ |
</pre>
*'''Text Modifier:''' At byte <code>0xAD</code> command starts exicuting text color. The English Font is referenced at <code>0xB1</code> which leads into the Color Modifier. Then the color red is chosen. To end the red text and go back to white, the same command is ran after the words at <code>0xD2</code> but with white as the color.
*'''Text Stop:''' At byte <code>0xDF</code> command starts and a text stop command is run. Following the time stop, the delay command is chosen <code>0xE3</code>. The delay command tells us that there is a 4B delay <code>0xE9</code> before the next line.  Convert this to decimal is 75, devide 75 by 30 fps (botw default fps) and you get a 2.5 second delay.


== Compiling the Sections ==
== Compiling the Sections ==
Line 661: Line 690:
[[Category:File extensions]]
[[Category:File extensions]]
[[Category:File extensions (MSBT)]]
[[Category:File extensions (MSBT)]]
== Tools ==
{{tool table|category=Tools (MSBT)}}
[[Category:File formats]]
Anonymous user