debug_data.lua 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. -- Debug data used for testing, remove or don't include this script for actual gameplay.
  2. Inventory.add_item(6, 5)
  3. Inventory.add_item(73, 4)
  4. Inventory.add_item(56, 3)
  5. Inventory.add_item(0, 2)
  6. Inventory.add_item(1, 4)
  7. Inventory.add_item(42, 3)
  8. Inventory.add_item(1, 4)
  9. Inventory.add_item(71, 4)
  10. Inventory.add_item(259, 2)
  11. Inventory.add_item(260, 2)
  12. Inventory.add_item(261, 2)
  13. Inventory.add_item(262, 2)
  14. Inventory.add_item(263, 2)
  15. Inventory.add_item(264, 2)
  16. Inventory.add_item(265, 2)
  17. Inventory.add_item(266, 2)
  18. Inventory.add_item(267, 2)
  19. Inventory.add_item(268, 2)
  20. Inventory.add_item(13, 2)
  21. Inventory.add_item(129, 1)
  22. Inventory.add_item(130, 1)
  23. Inventory.add_item(131, 1)
  24. Inventory.add_item(181, 1)
  25. Inventory.add_item(14, 4)
  26. Inventory.add_item(58, 3)
  27. Inventory.add_item(240, 4)
  28. Inventory.add_item(289, 4)
  29. Inventory.add_item(290, 1)
  30. Inventory.add_item(294, 2)
  31. Inventory.add_key_item(0)
  32. Inventory.add_key_item(1)
  33. Inventory.add_key_item(5)
  34. Inventory.add_key_item(18)
  35. Inventory.add_key_item(19)
  36. Inventory.add_key_item(20)
  37. Inventory.add_key_item(21)
  38. Inventory.add_key_item(22)
  39. Inventory.add_key_item(33)
  40. Inventory.add_key_item(38)
  41. --[[for i = 0, 50 do
  42. Inventory.add_key_item(i)
  43. end]]
  44. Inventory.money = 1234567
  45. Inventory.sort(Inventory.ORDER.NAME)
  46. --[[Characters[0].stats.hp.current = 12345
  47. Characters[0].stats.hp.base = 54321
  48. ]]
  49. Characters[0].stats.dex.base = 11
  50. Characters[0].stats.dex.total = 11
  51. -- Cloud has enough MP for Comet (70 MP) and Comet2 (110 MP).
  52. Characters[0].stats.mp.base = 400
  53. Characters[0].stats.mp.max = 400
  54. Characters[0].stats.mp.current = 400
  55. Characters[0].armor.id = 268
  56. -- The slots of this armor are linked in pairs: 0-1, 2-3, 4-5 and 6-7. Fire (0) is paired with MP
  57. -- Absorb, Ice (2) with MP Turbo, Restore (4) with Quadra Magic, and Lightning (6) with nothing. Contain (4 spells) is in the weapon. Before, Lightning (6) was with Contain, which
  58. -- is not a support materia (so nothing). All is not equipped any more. Slots of the weapon, which has
  59. -- one pair (0-1): Double Cut with Steal as well (his Attack steals too).
  60. Characters[0].armor.materia = {
  61. [0] = {id = 49, ap = 100000}, -- Fire
  62. [1] = {id = 27, ap = 100000}, -- MP Absorb
  63. [2] = {id = 50, ap = 100000}, -- Ice
  64. [3] = {id = 26, ap = 120000}, -- MP Turbo
  65. [4] = {id = 53, ap = 100000}, -- Restore
  66. [5] = {id = 35, ap = 200000}, -- Quadra Magic
  67. [6] = {id = 39, ap = 100000}, -- Throw mastered: Coin (Tifa has Throw level 1)
  68. }
  69. -- Attack commands to test: Double Cut gives 2x-Cut (AP below 100000) or 4x-Cut (100000 or more), and Slash-All
  70. -- gives Slash-All (AP below 130000) or Flash (130000 or more). Cloud has Double Cut (4x-Cut) paired with Steal
  71. -- as well, and Tifa has Slash-All (Flash). Only the last attack command of a character is used.
  72. Characters[0].weapon.materia[0] = {id = 15, ap = 100000} -- Double Cut (4x-Cut)
  73. -- Magic for testing. Materia IDs: Fire 49, Ice 50, Earth 51, Lightning 52, Restore 53, Heal 54,
  74. -- Revive 55, Poison 60. AP is enough to reach the highest level.
  75. Characters[0].weapon.materia[1] = {id = 34, ap = 200000} -- Steal as well (paired with Double Cut: his Attack steals too)
  76. Characters[2].weapon.materia[0] = {id = 50, ap = 100000}
  77. Characters[2].weapon.materia[1] = {id = 52, ap = 100000}
  78. Characters[2].armor.materia[0] = {id = 54, ap = 100000}
  79. Characters[2].armor.materia[1] = {id = 55, ap = 100000}
  80. -- Aerith has no materia.
  81. Characters[3].weapon.materia = {}
  82. Characters[3].armor.id = 268
  83. Characters[3].armor.materia = {}
  84. -- Status magic: Seal 56 (Sleepel, Silence), Mystify 57 (Confu, Berserk), Transform 58 (Mini, Toad),
  85. -- Time 65 (Haste, Slow, Stop), Destruct 68 (DeBarrier, DeSpell, Death). Cloud already has Barrier
  86. -- (62) in his armor.
  87. Characters[0].weapon.materia[2] = {id = 36, ap = 100000} -- Steal (mastered: Mug). Use ap = 0 for plain Steal.
  88. Characters[0].weapon.materia[3] = {id = 41, ap = 0} -- Deathblow (D.blow), instead of Sense (37)
  89. Characters[2].armor.materia[2] = {id = 68, ap = 100000}
  90. Characters[2].armor.materia[3] = {id = 57, ap = 100000}
  91. -- Limit bars to test the Limit command: everybody has the first limit and a bar of about 85% (217 of 255).
  92. -- The HP and MP are filled (the game caps them to the maximums when the battle starts).
  93. for _, c in ipairs({0, 2, 3}) do
  94. Characters[c].limit.learned[1][1] = true
  95. Characters[c].limit.bar = 217
  96. Characters[c].stats.hp.current = 99999
  97. Characters[c].stats.mp.current = 99999
  98. end
  99. -- Cloud: limit level 4 (Omnislash, the first technique of the level) and a full bar.
  100. Characters[0].limit.current = 4
  101. Characters[0].limit.learned[4] = Characters[0].limit.learned[4] or {}
  102. Characters[0].limit.learned[4][1] = true
  103. Characters[0].limit.bar = 255
  104. -- One kill from limit level 2 (120 kills): the first enemy he defeats teaches him Blade Beam.
  105. Characters[0].kills = 119
  106. -- Barret (Mindblow) and Red XIII (Lunatic High): limit level 1 with the two techniques and a full bar. The ids
  107. -- are in begin_menu.lua option 7 (party Barret, Red XIII, Aerith). Their other levels: Barret 2 Grenade Bomb and
  108. -- Hammerblow, 3 Satellite Beam; Red XIII 2 Blood Fang and Stardust Ray, 3 Howling Moon (on himself) and Earth Rave.
  109. for _, c in ipairs({1, 4}) do
  110. Characters[c].limit.current = 1
  111. Characters[c].limit.learned[1] = Characters[c].limit.learned[1] or {}
  112. Characters[c].limit.learned[1][1] = true
  113. Characters[c].limit.learned[1][2] = true
  114. Characters[c].limit.bar = 255
  115. Characters[c].stats.hp.current = 99999
  116. Characters[c].stats.mp.current = 99999
  117. end
  118. -- Aerith: limit level 3 (Planet Protector and Pulse of Life), with a full bar.
  119. Characters[3].limit.current = 3
  120. Characters[3].limit.learned[3] = Characters[3].limit.learned[3] or {}
  121. Characters[3].limit.learned[3][1] = true
  122. Characters[3].limit.learned[3][2] = true
  123. Characters[3].limit.bar = 255
  124. -- Summons: Choco/Mog 74, Shiva 75, Ifrit 76, Ramuh 77, Titan 78, Odin 79, Leviathan 80, Bahamut 81,
  125. -- Kjata 82, Alexander 83, Phoenix 84, Neo Bahamut 85, Hades 86, Typhoon 87, Bahamut ZERO 88,
  126. -- Knights of Round 89, Master Summon 90. They cost between 14 and 250 MP.
  127. Characters[0].weapon.materia[4] = {id = 75, ap = 100000} -- Shiva
  128. Characters[0].weapon.materia[6] = {id = 44, ap = 0, skills = {}} -- E. Skill
  129. Characters[0].weapon.materia[7] = {id = 69, ap = 100000} -- Contain (mastered: Freeze, Break, Tornado, Flare)
  130. for i = 1, 24 do -- E. Skill list
  131. if i == 1 or i == 6 or i == 9 or i == 13 or i == 14 or i == 15 or i == 23 or i == 24 then
  132. Characters[0].weapon.materia[6].skills[i] = true
  133. else
  134. Characters[0].weapon.materia[6].skills[i] = false
  135. end
  136. end
  137. Characters[2].weapon.materia[2] = {id = 77, ap = 100000} -- Ramuh
  138. Characters[2].weapon.materia[3] = {id = 40, ap = 0} -- Morph, instead of Choco/Mog (74)
  139. Characters[2].weapon.materia[4] = {id = 14, ap = 130000} -- Slash-All (Flash)
  140. Characters[2].weapon.materia[6] = {id = 16, ap = 40000} -- Cover (100%: takes the attacks for allies with critical HP)
  141. Characters[2].armor.materia[4] = {id = 39, ap = 0} -- Throw (level 1; mastered it is Coin)
  142. Characters[3].weapon.materia[0] = {id = 39, ap = 100000} -- Throw mastered: Aerith has Coin
  143. -- Double commands: Aerith W-Magic (with Fire and Restore to cast), Tifa W-Item, Cloud W-Summon (instead of Mega All, with Shiva).
  144. Characters[3].weapon.materia[1] = {id = 19, ap = 100000} -- W-Magic
  145. Characters[3].armor.materia[0] = {id = 49, ap = 100000} -- Fire
  146. Characters[3].armor.materia[1] = {id = 53, ap = 100000}
  147. Characters[3].armor.materia[2] = {id = 43, ap = 0} -- Mime
  148. Characters[2].weapon.materia[5] = {id = 42, ap = 0} -- Manipulate
  149. Characters[2].armor.materia[5] = {id = 21, ap = 100000} -- W-Item
  150. Characters[0].weapon.materia[5] = {id = 20, ap = 100000} -- W-Summon
  151. Inventory.add_item(129, 3) -- Mythril Saber (to throw)
  152. Inventory.add_item(130, 2)
  153. -- Items to try: Potion, Hi-Potion, Ether, Phoenix Down, Antidote, Echo Screen, Hyper, Tranquilizer,
  154. -- Remedy, Speed Drink, Grenade, Shrapnel, Molotov.
  155. for _, item in ipairs({{0, 6}, {1, 4}, {3, 4}, {7, 4}, {8, 3}, {12, 3}, {13, 2}, {14, 2}, {15, 2}, {17, 3}, {20, 5}, {21, 3}, {53, 3}}) do
  156. Inventory.add_item(item[1], item[2])
  157. end
  158. -- Uncomment to have enough MP to cast anything, summons included.
  159. --[[
  160. for _, c in ipairs({0, 2, 3}) do
  161. Characters[c].stats.mp.base = 999
  162. Characters[c].stats.mp.max = 999
  163. Characters[c].stats.mp.current = 999
  164. end
  165. ]]
  166. Materia.add(4)
  167. Materia.add(44)
  168. Materia.add(12)
  169. Materia.add(15, 2000)
  170. Materia.add(24)
  171. -- Where the entities of the overworld appear when it is loaded, in world units (x, z). Without this the
  172. -- game would use the spawn points of the story (not known yet), so they are all around the start of the
  173. -- test map, near Kalm. Remove an entry to use the default of that entity.
  174. WorldMapDebug = WorldMapDebug or {}
  175. WorldMapDebug.spawn = {
  176. Cloud = {42.0, 36.5},
  177. Chocobo = {42.5, 37.5},
  178. Highwind = {43.0, 36.5},
  179. Buggy = {42.0, 36.0},
  180. Submarine = {41.5, 36.5},
  181. TinyBronco = {42.0, 37.37},
  182. }
  183. -- Story of the overworld, for testing the models that depend on it. Without anything here the game
  184. -- takes the situation (the set of models of the map, 0 to 12) from the story, like the original does:
  185. -- the story counter (word 0 of the game variables, Banks[2][0] in the fields) and two flags (the bits
  186. -- 976 and 7220) give 0 the start (counter under 1000), 1 to 4 the Diamond Weapon (1000 to 1579; +1 with
  187. -- the bit 976, +2 from 1620 on), 5 to 8 the Ultimate Weapon and the Ruby Weapon (from 1580; +1 from
  188. -- 1620, +2 with the bit 7220). The situation can be forced for a map with WorldMapDebug.situation[map]
  189. -- (1 to 4 Diamond Weapon, with the Midgar cannon in 2 and 4 and the second Highwind in 3 and 4; 5 and
  190. -- 6 Ultimate Weapon; 7 and 8 Ruby Weapon; 11 the underwater map; 12 the snowstorm one).
  191. --
  192. -- The variables are the ones of the savemap that the world scripts read, and the fields write: they
  193. -- are written when the map is loaded. "word" and "byte" are by the address in bytes (the story counter
  194. -- is word 0), "bit" by the address in bits (the vehicles are the bits 1016 to 1021: 1016 the Buggy, 1018
  195. -- the Tiny Bronco, 1020 the Highwind, 1008 the Chocobo, 6787 and 6802 the Submarine, 6803 the Diamond
  196. -- Weapon appears) and "special" the values that the engine gives to the world (6 is the FIELD.TBL
  197. -- record of the exit by which the world was entered).
  198. --
  199. -- WorldMapDebug.arrival is that record, to test entering the world from a field exit: the vehicles
  200. -- and the player are where their scripts put them for it, except the ones with a spawn above.
  201. -- The map has to be loaded again to change any of this. Example: the story at 1400 with the Buggy, the
  202. -- Tiny Bronco and the Highwind.
  203. --WorldMapDebug.situation = {[0] = 3}
  204. --WorldMapDebug.arrival = 51
  205. WorldMapDebug.variables = {}
  206. --WorldMapDebug.variables = {
  207. -- word = {[0] = 1400},
  208. -- bit = {[1016] = 1, [1018] = 1, [1020] = 1},
  209. --}