Advertisement
dragonbane

Dialog Codes and Stuff

Jan 17th, 2017
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.21 KB | None | 0 0
  1. Scripting in Slow Item Texts:
  2.  
  3. 2E = . (dot)
  4. 20 = spacer
  5. 00 = when not in command mode and without a preceding 1A = end of text box (terminator)
  6. 0A = line break (\n) (automatically creates new box on 4th line break)
  7.  
  8.  
  9. Control Codes:
  10.  
  11. Example: 1A 06 FF 00 00 01
  12.  
  13. 1: 1A = Command mode activated and command follows (1A is counted as a char and is "rendered", thus commands waste frames)
  14.  
  15. 2: 06 = Amount of value bytes to follow + 2 (03 smallest?)
  16.  
  17. 3: FF 00 00 01 = Value Bytes
  18.  
  19.  
  20. Following value byte amount is used typically for:
  21.  
  22. 05 = Set appear speed (3 value bytes)
  23. 06 = Set text color | Draw special character (4 value bytes)
  24. 07 = Text Delay | Font Size (5 value bytes)
  25. 09 = General Stuff N/A (7 value bytes)
  26.  
  27.  
  28. Value Bytes:
  29.  
  30. 1-4 = Special character/text/color/symbol to draw
  31. 5 = Delay Amount | Font Size
  32.  
  33.  
  34. Examples:
  35.  
  36. 1A 06 FF 00 00 01 = Text color red (color 01)
  37. 1A 06 FF 00 00 00 = Text color white
  38. 1A 05 00 00 01 = Following text is fast
  39. 1A 05 00 00 02 = Following text is slow
  40. 1A 07 00 00 07 00 0A = 10 frames (0A) delay, needs user input to proceed
  41. 1A 07 00 00 04 00 0A = 10 frames (0A) delay, box closes after expiration
  42. 1A 07 00 00 36 00 1E = 30 frames (1E) delay + 1
  43. 1A 07 FF 00 01 00 55 = Smaller text (font size 55)
  44.  
  45. Special text:
  46.  
  47. 00 = Use 3 Bytes for GC Symbol
  48. 03 = Use 3 Bytes for Wii Symbol
  49. 04 = Use 3 Bytes for Hylian/Special character
  50. 05 = Use 3 Bytes for Ammo/Rupee/Collectibels Count
  51. 06 = Use 3 Bytes for Character Names/Icons
  52. FF = Use 4 Bytes for Font Properties (color, size) (last one is important, defines color and font size)
  53.  
  54. More Commands for special cases:
  55.  
  56. 00 00 00 = Link's Name
  57. 00 00 22 = Epona's Name
  58.  
  59. 00 00 01 = Draw the following instantly
  60. 00 00 02 = Draw the following slow
  61.  
  62. 00 00 08 = 2 dialogue choices
  63. 00 00 09 = 3 dialogue choices
  64.  
  65. 00 00 0A = Draw A Button
  66. 00 00 0F = X Button
  67. 00 00 10 = Y Button
  68.  
  69. 03 00 09 = Animated D-Pad Up Icon
  70.  
  71. FF = Extend to 4 bytes for Color & Font Size
  72.  
  73.  
  74. If 00 00 06 Then
  75.  
  76. Use next 2 Bytes to set global frame delay between each text draw call (if 0 draw everything at once) (1 default)
  77.  
  78. If 00 00 07 Then
  79.  
  80. Use next 2 Bytes to set a single delay in frames starting from the next frame, remaining rendering commands are wasted. After the delay is finished there is 1 rendering command left
  81.  
  82. If 00 00 36
  83.  
  84. Use next 2 Bytes to set a single delay in frames and add 1 extra frame of delay
  85.  
  86. If 00 00 04 Then
  87.  
  88. Use next 2 Bytes to set a single delay in frames and close box afterwards
  89.  
  90.  
  91. Text Modes:
  92.  
  93. 01 = Instantly appears
  94. 02 = Slow scrolling
  95.  
  96.  
  97. Colors:
  98. 00 = white
  99. 01 = red
  100. 02 = green
  101. etc.
  102.  
  103.  
  104.  
  105. Appearance of Slow Dialog:
  106. -11 frames after box first becomes visible the box is initialized and all lines that are set to instant mode appear
  107. -On 12th frame the game continues with the char drawing normally if next lines are set to slow
  108. -Each frame advances box by 2 chars ; can press A 2 frames before arrow sign appears (2 chars before end)
  109. -Each extra slow box wastes 2 frames + amount of chars in box/2
  110.  
  111.  
  112. Normal Dialog:
  113.  
  114. Appearance:
  115.  
  116. -In fast dialogue each extra box wastes 2 frames
  117.  
  118.  
  119. For Japanese:
  120.  
  121. Japanese signs are stored as 2 Bytes. Everything remains the same, so in slow texts it will render 1 sign every frame!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement