StrangerOfParadiseFinalFantasyOrigins.asl 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. //Thanks to Clara the Classy for finding the CurrentMapName's so I don't have to finish the game myself
  2. state("SOPFFO", "1.02 Epic")//75980800
  3. {
  4. int Loader1 : 0x3918FE4; // just testing out a better value 1 loading, 0 not
  5. string250 CurrentMapName : 0x04239E90, 0x20; //REG STRING
  6. string250 CurrentCutsceneName : 0x04276B58, 0x30, 0x50; //UNICODE movie/
  7. }
  8. state("SOPFFO", "1.03 Epic")// 61,440
  9. {
  10. int Loader1 : 0x3926FE4; //E000
  11. string250 CurrentMapName : 0x042483F0, 0x20; // E560
  12. string250 CurrentCutsceneName : 0x042850D8, 0x30, 0x50; //E580, 3CCE8
  13. }
  14. state("SOPFFO", "1.04 Epic")//20,480
  15. {
  16. int Loader1 : 0x392BFE4; //5000
  17. string250 CurrentMapName : 0x0424D460, 0x20; //135D0
  18. string250 CurrentCutsceneName : 0x0428A158, 0x30, 0x50; //13600, 3CCF8
  19. }
  20. // I didn't forget to update the game, I'm just bad at telling what update we are on.
  21. state("SOPFFO", "1.11 Epic")
  22. {
  23. int Loader1 : 0x3AC0604; //194620
  24. string250 CurrentMapName : 0x04431C10, 0x20; // 1E47B0
  25. string250 CurrentCutsceneName : 0x0446FF28, 0x30, 0x50; // 1E5DD0. 1620
  26. }
  27. state("SOPFFO", "1.12 Epic")
  28. {
  29. int Loader1 : 0x3AD9604; // 19000
  30. string250 CurrentMapName : 0x0444AF70, 0x20; //19360
  31. string250 CurrentCutsceneName : 0x04489288, 0x30, 0x50;
  32. }
  33. state("SOPFFO", "1.23 Epic")
  34. {
  35. int Loader1 : 0x3DCB064; // 2F1A60
  36. string250 CurrentMapName : 0x0474ECD0, 0x20; //19360
  37. string250 CurrentCutsceneName : 0x04791DC8, 0x30, 0x50;
  38. }
  39. state("SOPFFO", "1.24 Epic")
  40. {
  41. int Loader1 : 0x3DCC064; // 2F1A60
  42. string250 CurrentMapName : 0x0474FD00, 0x20; //19360
  43. string250 CurrentCutsceneName : 0x04792F18, 0x30, 0x50;
  44. }
  45. state("SOPFFO", "1.25 Epic")
  46. {
  47. int Loader1 : 0x3F0F9E4; // 2F1A60
  48. string250 CurrentMapName : 0x048AD7B0, 0x20; //19360
  49. string250 CurrentCutsceneName : 0x048F1B28, 0x30, 0x50;
  50. }
  51. state("SOPFFO", "1.26 Epic")
  52. {
  53. int Loader1 : 0x3F139E4; // 2F1A60
  54. string250 CurrentMapName : 0x048B17D0, 0x20; //19360
  55. string250 CurrentCutsceneName : 0x048F5B48, 0x30, 0x50;
  56. }
  57. state("SOPFFO", "1.32 Epic")
  58. {
  59. int Loader1 : 0x3F149E4; // 2F1A60
  60. string250 CurrentMapName : 0x048B27B0, 0x20; //19360
  61. string250 CurrentCutsceneName : 0x048F6B28, 0x30, 0x50; //FE0
  62. }
  63. state("SOPFFO", "1.32 Steam")
  64. {
  65. int Loader1 : 0x3F36974; // 21F90
  66. string650 CurrentMapName : 0x48D47B0, 0x20; //19360
  67. string250 CurrentCutsceneName : 0x04918B28, 0x30, 0x50; // steam dif is 22000
  68. }
  69. init
  70. {
  71. vars.doneMaps = new List<string>();
  72. switch (modules.First().ModuleMemorySize)
  73. {
  74. case 75980800:
  75. version = "1.02 Epic";
  76. break;
  77. case 76042240:
  78. version = "1.03 Epic";
  79. break;
  80. case 76062720:
  81. version = "1.04 Epic";
  82. break;
  83. case 78143488:
  84. version = "1.11 Epic";
  85. break;
  86. case 78368768:
  87. version = "1.12 Epic";
  88. break;
  89. case 81690624:
  90. version = "1.23 Epic";
  91. break;
  92. case 81694720:
  93. version = "1.24 Epic";
  94. break;
  95. case 83181568 :
  96. version = "1.25 Epic";
  97. break;
  98. case 83202048 :
  99. version = "1.32 Epic";
  100. break;
  101. case 83525632 :
  102. version = "1.32 Steam";
  103. break;
  104. default:
  105. version = "";
  106. break;
  107. }
  108. //10 98 ? ? ? ? 00 00 d0 3e curmapname
  109. //40 2d ? ? ? ? 00 00 02 00 cutscenename
  110. //00 50 ? b2 ? f6 7f ? 00 f0 48 a3 loading
  111. }
  112. startup
  113. {
  114. settings.Add("SOPFFO", true, "Stranger of Paradise: Final Fantasy Origins");
  115. var tB = (Func<string, string, string, Tuple<string, string, string>>) ((elmt1, elmt2, elmt3) => { return Tuple.Create(elmt1, elmt2, elmt3); });
  116. var sB = new List<Tuple<string, string, string>>
  117. {
  118. tB("SOPFFO", "1", "A Desperate Struggle"),
  119. tB("SOPFFO", "2", "Dawn"),
  120. tB("SOPFFO", "3", "Illusion at Journey's End"),
  121. tB("SOPFFO", "4", "In Memories"),
  122. tB("SOPFFO", "5", "Dawn of a New Journey"),
  123. tB("SOPFFO", "6", "The Journey Begins"),
  124. tB("SOPFFO", "7", "Audience with the Dark Elf"),
  125. tB("SOPFFO", "8", "Natrual Distortion"),
  126. tB("SOPFFO", "9", "A Familiar Place"),
  127. tB("SOPFFO", "10", "Memories of Wind"),
  128. tB("SOPFFO", "11", "Memories of Poison"),
  129. tB("SOPFFO", "12", "Memories of Fire"),
  130. tB("SOPFFO", "13", "Phantoms of the Past"),
  131. tB("SOPFFO", "14", "Memories of Earth"),
  132. tB("SOPFFO", "15", "To Remember"),
  133. tB("SOPFFO", "16", "Memories of Water"),
  134. tB("SOPFFO", "17", "The False Warriors"),
  135. tB("SOPFFO", "18", "Schemes of the Past"),
  136. tB("SOPFFO", "19", "Remembering Home"),
  137. tB("SOPFFO", "20", "The Suffering of Fools"),
  138. tB("SOPFFO", "21", "Strangers of Paradise"),
  139. tB("SOPFFO", "22", "Warriors of Calamity"),
  140. };
  141. foreach (var s in sB) settings.Add(s.Item2, true, s.Item3, s.Item1);
  142. vars.Splits = new Dictionary <string, string>
  143. {
  144. //egs
  145. {"mission/CH01_MAIN01_BABIL/CH01_MAIN01_BABIL.bmud","1"},
  146. {"mission/CH01_MAIN01_STP/CH01_MAIN01_STP.bmud","2"},
  147. {"mission/CH01_MAIN02_CHAOS/CH01_MAIN02_CHAOS.bmud","3"},
  148. {"mission/CH01_MAIN03_CITY/CH01_MAIN03_CITY.bmud","4"},
  149. {"mission/CH01_MAIN03_NORTH/CH01_MAIN03_NORTH.bmud","5"},
  150. //{"mission/CH01_MAIN03_PURABOKA/CH01_MAIN03_PURABOKA.bmud",""},
  151. {"mission/CH01_MAIN03_SASTA/CH01_MAIN03_SASTA.bmud","6"},
  152. {"mission/CH02_MAIN01_PALAM/CH02_MAIN01_PALAM.bmud","7"},
  153. {"mission/CH02_MAIN01_SUN/CH02_MAIN01_SUN.bmud","8"},
  154. {"mission/CH02_MAIN02_CLYST/CH02_MAIN02_CLYST.bmud","9"},
  155. {"mission/CH02_MAIN02_BABIL/CH02_MAIN02_BABIL.bmud","10"},
  156. {"mission/CH03_MAIN01_EVIL/CH03_MAIN01_EVIL.bmud","11"},
  157. {"mission/CH03_MAIN01_FIRE/CH03_MAIN01_FIRE.bmud","12"},
  158. {"mission/CH03_MAIN02_GAGA/CH03_MAIN02_GAGA.bmud","13"},
  159. {"mission/CH03_MAIN02_RAITH/CH03_MAIN02_RAITH.bmud","14"},
  160. {"mission/CH03_MAIN03_RONKA/CH03_MAIN03_RONKA.bmud","15"},
  161. {"mission/CH03_MAIN03_MAKOU/CH03_MAIN03_MAKOU.bmud","16"},
  162. {"mission/CH04_MAIN01_CITY/CH04_MAIN01_CITY.bmud","17"},
  163. {"mission/CH04_MAIN02_DELK/CH04_MAIN02_DELK.bmud","18"},
  164. {"mission/CH04_MAIN03_CITA/CH04_MAIN03_CITA.bmud","19"},
  165. {"mission/CH04_MAIN04_FLOAT/CH04_MAIN04_FLOAT.bmud","20"},
  166. {"mission/CH04_MAIN05_CITY/CH04_MAIN05_CITY.bmud","21"},
  167. {"mission/CH04_MAIN06_CHAOS01/CH04_MAIN06_CHAOS01.bmud","22"},
  168. //steam
  169. {"FDC8F89403E781B0C6A6C41A1533BBC78182ED4E65CE436668F1C6D65DA95719", "1"},
  170. {"41068306BED1015EC127A1614BFA129E6E2C235B84C5A10D983CE954B6A6D814", "2"},
  171. {"682A162B48DF1FA94AFDEF3B71CE73CB5BF1DECDA6F70EC7C3A5BCAF350A9DC8", "3"},
  172. {"7A00A089F627165F7BB71A830E85A866AD02F4C3DDDABA820AFC0C949C3FB8C4", "4"},
  173. {"FCA50872522BF75ACAA621CEE606FC26A91967470C847529578364A340D98E62", "5"},
  174. {"19B4AFB88946668192A1DAE9AB14BF734182B36EFACADF81DE0221494CAD4094", "6"},
  175. {"E32550207AF1FDFF5F3AA44BD97D73249331752A7E2778DBCA83E58515B52D2A", "7"},
  176. {"AFDD36AEED76B1C5BC69B118DF919E7040C9FE3BF4D8A0D3C800033334233563", "8"},
  177. {"72855EFF2472FE3AD19ECEE02754C07E6D8D6B2ECC0DA11EB44B102D7198A873", "9"},
  178. {"B29967B0F8E6FC8DC37E6EE709887CCF94C3B7B8B169F8AF38AE1E6701F589B8", "10"},
  179. {"1A5D3E88CA45A2BF3647F5254B50EACC85A1DA7EE14DC43C59535A290288EEAA", "11"},
  180. {"01E3806C388305CC4EA8B684B0DC7361AA72910F0793135C3AB652712871101E", "12"},
  181. {"DBDD9FB6BBF61F7C8449BF697B936F2249619DEEE8F02B1DFC2DD375699A013E", "13"},
  182. {"439A1D2B7A7D1F4B07193A0B0454D4A7B154651DB8C1AA9B75D9618A42AAF03C", "14"},
  183. {"1B696D773862AA56E6CBB5D64F0DA53179BAF995FF91AF7B7E3957F35BAC2D3F", "15"},
  184. {"AFAD79AF1F32A0E898AE550CD6FAFBC149291F76EB46509A43C06EC5BA11D9D1", "16"},
  185. {"B0F4E7077DA089B5B343E72BF4C208F7E94FD6EC57E28954F5732A937841EAC1", "17"},
  186. {"016645D64DA88AA109FCA70D12956A443A2C2AA96566BE4D5FD81E09372B4E4F", "18"},
  187. {"E0CD3385873DBAC7BCCCB406349F40625B7537EE5251C94C64C4FB17AF24A49B", "19"},
  188. {"BC1B055AA99872B3DBC61291F5693AE23090ECB029C14E3BA2D9B7A533817031", "20"},
  189. {"DFD28D94810127F4012327D58B2818B24B885F79B85D4302EAA0DA144E2F2D67", "21"},
  190. {"31B1A9D12EDF302785641AD66D1CF9E14D7B3FED51B9DEAFD288E84FF470EA5B", "22"},
  191. };
  192. if (timer.CurrentTimingMethod == TimingMethod.RealTime) // stolen from dude simulator 3, basically asks the runner to set their livesplit to game time
  193. {
  194. var timingMessage = MessageBox.Show
  195. (
  196. "This game uses Time without Loads (Game Time) as the main timing method.\n"+
  197. "LiveSplit is currently set to show Real Time (RTA).\n"+
  198. "Would you like to set the timing method to Game Time? This will make verification easier",
  199. "LiveSplit | Stranger of Paradise: Final Fantasy Origins",
  200. MessageBoxButtons.YesNo,MessageBoxIcon.Question
  201. );
  202. if (timingMessage == DialogResult.Yes)
  203. {
  204. timer.CurrentTimingMethod = TimingMethod.GameTime;
  205. }
  206. }
  207. }
  208. update
  209. {
  210. print(current.CurrentMapName);
  211. }
  212. start
  213. {
  214. return (settings[vars.Splits[current.CurrentMapName]] && (current.Loader1 != 1) && (old.Loader1 == 1));
  215. }
  216. split
  217. {
  218. if (settings[vars.Splits[current.CurrentMapName]] && (current.CurrentMapName != old.CurrentMapName) && (!vars.doneMaps.Contains(current.CurrentMapName)) || (current.CurrentCutsceneName == "movie/EV04_33-EN.mp4"))
  219. {
  220. vars.doneMaps.Add(current.CurrentMapName);
  221. return true;
  222. }
  223. }
  224. isLoading
  225. {
  226. return ((current.Loader1 == 1) || (current.CurrentCutsceneName != null));
  227. }
  228. onReset
  229. {
  230. vars.doneMaps.Clear();
  231. }