GhostbustersTheVideoGameRemastered.asl 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. state("ghost", "Epic")
  2. {
  3. string50 CurrentMapArea : 0x1FB5DF8;
  4. bool Loader : 0xD2FA30; //originally an int
  5. }
  6. state("ghost", "Steam")
  7. {
  8. string50 CurrentMapArea : 0x205E058;
  9. bool Loader : 0xDD3A40; //originally an int
  10. }
  11. init
  12. {
  13. vars.doneMaps = new List<string>(); //Used for not splitting twice just in cause the game crashes
  14. vars.DoWeSplit = false;
  15. switch (modules.First().ModuleMemorySize)
  16. {
  17. case 51519488: version = "Epic";
  18. break;
  19. case 52211712: version = "Steam";
  20. break;
  21. default: version = "";
  22. break;
  23. }
  24. }
  25. startup
  26. {
  27. settings.Add("FH", false, "Split every time you return to firehouse?");
  28. //settings.tooltip("FH", "Splits every time you return to the firehouse at the end of missions");
  29. settings.Add("GB", true, "All Splits");
  30. settings.Add("HS", true, "Hotel Sedgewick", "GB");
  31. settings.Add("TS", true, "Times Square", "GB");
  32. settings.Add("PL", true, "Public Library", "GB");
  33. settings.Add("MNH", true, "Museum of Natrual History", "GB");
  34. settings.Add("RTHS", true, "Return to Hotel Sedgewick", "GB");
  35. settings.Add("LI", true, "Lost Island", "GB");
  36. settings.Add("CPC", true, "Central Park Cemetery", "GB");
  37. //firehouse
  38. var tB = (Func<string, string, string, Tuple<string, string, string>>) ((elmt1, elmt2, elmt3) => { return Tuple.Create(elmt1, elmt2, elmt3); });
  39. var sB = new List<Tuple<string, string, string>>
  40. {
  41. tB("HS","hotel1a","Slimer"),
  42. tB("HS","hotel1b","Pappy Sargassi"),
  43. tB("TS","timesSquare1","Walking with car to Stay Puft"),
  44. tB("TS","timesSquare1b","Stay Puft fight on street"),
  45. tB("TS","timesSquare2","Stay Puft fight in building"),
  46. tB("TS","boss_sp_side","Stay Puft boss fight"),
  47. tB("PL","Library1a","First section of library"),
  48. tB("PL","Library1b","Eleanor Twitty underground section"),
  49. tB("PL","Library2","Eleanor Twitty Boss Fight / Azetlor Boss Fight"),
  50. tB("MNH","museum1","History Showcase"),
  51. tB("MNH","museum2","Finding Illisa"),
  52. tB("MNH","museum3","Chairman Fight"),
  53. tB("RTHS","hotel2","Entering Hotel Sedgewick"),
  54. tB("RTHS", "13th_floor_boss","Spider Witch Boss Fight"),
  55. tB("LI","lost_island","Start of Lost Island"),
  56. tB("LI","lost_island2","Sewers"),
  57. tB("CPC","cemetary1","Start of Central Park Cemetery"),
  58. tB("CPC","cemetary2","Crypt Alley"),
  59. tB("CPC","abyss","Shandor Boss Fight"),
  60. };
  61. foreach (var s in sB) settings.Add(s.Item2, true, s.Item3, s.Item1);
  62. if (timer.CurrentTimingMethod == TimingMethod.RealTime) // stolen from dude simulator 3, basically asks the runner to set their livesplit to game time
  63. {
  64. var timingMessage = MessageBox.Show (
  65. "This game uses Time without Loads (Game Time) as the main timing method.\n"+
  66. "LiveSplit is currently set to show Real Time (RTA).\n"+
  67. "Would you like to set the timing method to Game Time? This will make verification easier",
  68. "LiveSplit | Ghostbusters The Video Game",
  69. MessageBoxButtons.YesNo,MessageBoxIcon.Question
  70. );
  71. if (timingMessage == DialogResult.Yes)
  72. {
  73. timer.CurrentTimingMethod = TimingMethod.GameTime;
  74. }
  75. }
  76. }
  77. update
  78. {
  79. // I still have issues putting a double if into splits, others say they don't, but from my experience livesplit doesn't handle it properly and the second if is forgotten about.
  80. if (!vars.doneMaps.Contains(current.CurrentMapArea) && settings[current.CurrentMapArea] && (current.Loader))
  81. {
  82. vars.doneMaps.Add(current.CurrentMapArea);
  83. vars.DoWeSplit = true;
  84. }
  85. if (settings["FH"] && (!current.Loader) && (current.CurrentMapArea == "firehouse"))
  86. {
  87. vars.DoWeSplit = true;
  88. }
  89. }
  90. start
  91. {
  92. return ((current.CurrentMapArea == "firehouse") && (!current.Loader));
  93. }
  94. onStart
  95. {
  96. vars.doneMaps.Clear();
  97. vars.doneMaps.Add(current.CurrentMapArea);
  98. }
  99. split
  100. {
  101. if (vars.DoWeSplit)
  102. {
  103. vars.DoWeSplit = false;
  104. return true;
  105. }
  106. }
  107. isLoading
  108. {
  109. return (current.Loader);
  110. }
  111. reset
  112. {
  113. return (current.CurrentMapArea == null);
  114. }
  115. onReset
  116. {
  117. vars.doneMaps.Clear();
  118. }