CODBlackOpsColdWar.asl 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. // Created by KunoDemetries#6969
  2. // For vers 1.10.5
  3. /*
  4. Because of the anti-cheat I have retired from updating the BOCW ASL, until the game is offically "dead" in future years this will be a stump.
  5. */
  6. state("BlackOpsColdWar")
  7. {
  8. int loading1 : 0xF5F3C70; // It seems static addresses for things like loads and
  9. string50 map : 0xF6DCF73; // Level names are consistent to the 0xEA - 0xEF area
  10. }
  11. startup
  12. {
  13. settings.Add("missions", true, "Missions"); // Making a setting for base levels
  14. settings.Add("split", false, "Briefings"); // Making a setting for All the briefings
  15. settings.SetToolTip("split", "Will Split on ever briefing (Includes interrogation)"); // making a note to explain the briefing setting
  16. vars.missions = new Dictionary<string,string> // creating a dictionary just to not have to make 1.5k settings
  17. {
  18. {"ger_hub","CIA Safehouse E9"}, // first "" is the in-game name, and the second "" is the actual name
  19. {"nam_armada","Fractured Jaw"},
  20. {"ger_stakeout","Brick in the Wall"},
  21. {"rus_amerika","Redlight, Greenlight"},
  22. {"rus_yamantau","Echoes of a Cold War"},
  23. {"rus_kgb","Desperate Measures"},
  24. {"nic_revolucion","End of the Line"},
  25. {"nam_prisoner","Break on Through"},
  26. {"ger_hub8","Identity Crisis"},
  27. {"rus_siege","The Final Countdown (Good Ending)"},
  28. {"rus_duga","Ashes to Ashes (Bad Ending)"},
  29. };
  30. // operation cirus demission_tundra
  31. foreach (var Tag in vars.missions) // Saying for every var in var.missions to make it have the key value of missions to then refrence it in the settings for missions
  32. {
  33. settings.Add(Tag.Key, true, Tag.Value, "missions");
  34. };
  35. vars.onStart = (EventHandler)((s, e) => // thanks gelly for this, it's basically making sure it always clears the vars no matter how livesplit starts
  36. {
  37. vars.starter = 0;
  38. vars.endsplit = 0;
  39. vars.FuckFinalSplit = 0;
  40. vars.doneMaps.Clear();
  41. vars.doneMaps.Add(current.map.ToString());
  42. });
  43. timer.OnStart += vars.onStart;
  44. if (timer.CurrentTimingMethod == TimingMethod.RealTime) // stolen from dude simulator 3, basically asks the runner to set their livesplit to game time
  45. {
  46. var timingMessage = MessageBox.Show (
  47. "This game uses Time without Loads (Game Time) as the main timing method.\n"+
  48. "LiveSplit is currently set to show Real Time (RTA).\n"+
  49. "Would you like to set the timing method to Game Time? This will make verification easier",
  50. "LiveSplit | Call of Duty: Black Ops Cold War",
  51. MessageBoxButtons.YesNo,MessageBoxIcon.Question
  52. );
  53. if (timingMessage == DialogResult.Yes)
  54. {
  55. timer.CurrentTimingMethod = TimingMethod.GameTime;
  56. }
  57. }
  58. }
  59. init // making throwaway vars for comparison and tracking
  60. {
  61. vars.debreifsplit = 0;
  62. vars.doneMaps = new List<string>();
  63. vars.splitter = 0;
  64. }
  65. update
  66. {
  67. // This first one is basically keeping track of everytime we enter a debrief as they're the same map name
  68. if ((current.map == "ger_hub") && (old.map != "takedown") && (current.map != old.map) && (settings["split"]))
  69. {
  70. vars.debreifsplit = 1;
  71. }
  72. else
  73. {
  74. vars.debreifsplit = 0;
  75. }
  76. // A basic check to see if were in a level we weren't in previously and if that level's setting is true
  77. if (((settings[current.map]) && (old.map != current.map) && (!vars.doneMaps.Contains(current.map))))
  78. {
  79. vars.doneMaps.Add(old.map);
  80. vars.splitter = 1;
  81. }
  82. else
  83. {
  84. vars.splitter = 0;
  85. }
  86. }
  87. start // a generic start
  88. {
  89. if ((current.map == "takedown") && (current.loading1 != 0))
  90. {
  91. vars.doneMaps.Clear(); // Always good to clear doneMaps in start and reset. Would recommend to also do it in
  92. return true; // update if you're back in e_frontend but most of the time it's not neccesary
  93. }
  94. }
  95. split // Basically if the "update" function's checks turned true to split
  96. {
  97. return ((vars.debreifsplit == 1) ||
  98. (vars.splitter == 1));
  99. }
  100. reset // e_frontend is the main menu screen
  101. {
  102. if (current.map == "e_frontend")
  103. {
  104. vars.doneMaps.Clear(); // Always good to clear doneMaps in start and reset
  105. return true;
  106. }
  107. }
  108. isLoading
  109. {
  110. return (current.loading1 == 0);
  111. }
  112. exit
  113. {
  114. timer.OnStart -= vars.onStart;
  115. }