Back4Blood.asl 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. state("Back4Blood", "Xbox Game Pass v1.0.3")
  2. {
  3. int Loader : 0x666CE20;
  4. string100 CurrentLevel : 0x067DD4A0, 0xC58, 0X0, 0XF8, 0X3E;
  5. }
  6. state("Back4Blood", "Xbox Game Pass v1.0.5")
  7. {
  8. int Loader : 0x62A3DB8;
  9. string100 CurrentLevel : 0x06445F58, 0x10, 0x8, 0x48, 0x0;
  10. }
  11. state("Back4Blood", "Steam V1.13")
  12. {
  13. int Loader : 0x6490FE8;
  14. string100 CurrentLevel : 0x0667C630, 0x10, 0x8, 0x48, 0x0;
  15. }
  16. state("Back4Blood", "Steam v1.0.5")
  17. {
  18. int Loader : 0x64817F8;
  19. string100 CurrentLevel : 0x066238E8, 0x10, 0x8, 0x48, 0x0;
  20. }
  21. state("Back4Blood", "Steam v1.0.3")
  22. {
  23. int Loader : 0x640B558;
  24. string100 CurrentLevel : 0x065A74F8, 0x10, 0x8, 0x48, 0x0;
  25. }
  26. state("Back4Blood", "Steam v1.0.0")
  27. {
  28. int Loader: 0x67D6FA8;
  29. string100 CurrentLevel : 0x0655B9A8, 0x10, 0x8, 0x48, 0x0;
  30. }
  31. init
  32. {
  33. vars.doneMaps = new List<string>();
  34. switch (modules.First().ModuleMemorySize)
  35. {
  36. case 486912000: version = "Xbox Game Pass v1.0.3";
  37. break;
  38. case 496152576: version = "Xbox Game Pass v1.0.5";
  39. break;
  40. case 491970560 : version = "Steam V1.13";
  41. break;
  42. case 485240832: version = "Steam v1.0.5";
  43. break;
  44. case 489611264: version = "Steam v1.0.3";
  45. break;
  46. case 520429568: version = "Steam v1.0.0";
  47. break;
  48. default: version = "";
  49. break;
  50. }
  51. vars.Loading = false;
  52. }
  53. startup
  54. {
  55. settings.Add("B4B", true, "Back 4 Blood");
  56. settings.Add("A1", true, "ACT 1 - RESURGENCE", "B4B");
  57. settings.Add("TDR", true, "THE DEVIL'S RETURN", "A1");
  58. settings.Add("SAR", true, "SEARCH & RESCUE", "A1");
  59. settings.Add("TDBTD", true, "THE DARK BEFORE DAWN", "A1");
  60. settings.Add("BDH", true, "BLUE DOG HOLLOW", "A1");
  61. settings.Add("A2", true, "ACT 2 - A CALL TO ARMS", "B4B");
  62. settings.Add("TA", true, "THE ARMORY", "A2");
  63. settings.Add("PB", true, "PLAN B", "A2");
  64. settings.Add("JOB", true, "JOB 10:222", "A2");
  65. settings.Add("A3", true, "ACT 3 - FARTHER AFIELD", "B4B");
  66. settings.Add("DRN", true, "DR.ROGERS NEIGHBORHOOD", "A3");
  67. settings.Add("REM", true, "REMNANTS", "A3");
  68. settings.Add("MAP_PERS_TitanTunnels", true, "ACT 4 - THE ABOMINATION", "B4B");
  69. var tB = (Func<string, string, string, Tuple<string, string, string>>) ((elmt1, elmt2, elmt3) => { return Tuple.Create(elmt1, elmt2, elmt3); });
  70. var sB = new List<Tuple<string, string, string>>
  71. {
  72. //tB("","",""),
  73. tB("TDR","MAP_PERS_Evansburgh_A","RESURGENCE"),
  74. tB("TDR","MAP_PERS_Evansburgh_B","TUNNEL OF BLOOD"),
  75. tB("TDR","MAP_PERS_Evansburgh_C","PAIN TRAIN"),
  76. tB("TDR","MAP_PERS_Evansburgh_D","THE CROSSING"),
  77. tB("SAR","MAP_PERS_Finleyville_Rescue_A","A CLEAN SWEEP"),
  78. tB("SAR","MAP_PERS_Finleyville_Rescue_B","BOOK WORMS"),
  79. tB("SAR","MAP_PERS_Finleyville_Rescue_C","BAR ROOM BLITZ"),
  80. tB("TDBTD","MAP_PERS_Finleyville_Diner_A","SPECIAL DELIVERY"),
  81. tB("TDBTD","MAP_PERS_Finleyville_Diner_B","THE DINER"),
  82. tB("BDH","MAP_PERS_Bluedog_A","BAD SEEDS"),
  83. tB("BDH","MAP_PERS_Bluedog_B","HELL'S BELLS"),
  84. tB("BDH","MAP_PERS_Bluedog_C","ABANDONED"),
  85. tB("BDH","MAP_PERS_Bluedog_D","THE SOUND OF THUNDER"),
  86. tB("TA","MAP_PERS_Finleyville_Police_A","A CALL TO ARMS"),
  87. tB("TA","MAP_PERS_Finleyville_Police_B","THE HANDY MAN"),
  88. tB("PB","MAP_PERS_TheClog_A","PIPE CLEANERS"),
  89. tB("PB","MAP_PERS_TheClog_B","HINTERLAND"),
  90. tB("PB","MAP_PERS_TheClog_C","TRAILER TRASHED"),
  91. tB("PB","MAP_PERS_TheClog_D","THE CLOG"),
  92. tB("PB","MAP_PERS_TheClog_E","THE BROKEN BIRD"),
  93. tB("JOB","MAP_PERS_Finleyville_Church_A","HERALDS OF THE WORM PART 1"),
  94. tB("JOB","MAP_PERS_Finleyville_Church_B","HERALDS OF THE WORM PART 2"),
  95. tB("JOB","MAP_PERS_Finleyville_Church_C","GRAVE DANGER"),
  96. tB("DRN","MAP_PERS_Manor_A","FARTHER AFIELD"),
  97. tB("DRN","MAP_PERS_Manor_B","BLAZING TRAILS"),
  98. tB("DRN","MAP_PERS_Manor_C","CABINS BY THE LAKE"),
  99. tB("DRN","MAP_PERS_Manor_D","GARDEN PARTY"),
  100. tB("DRN","MAP_PERS_Manor_E","T-5"),
  101. tB("REM","MAP_PERS_CDC_A","A FRIEND IN NEED"),
  102. tB("REM","MAP_PERS_CDC_B","MAKING THE GRADE"),
  103. tB("REM","MAP_PERS_CDC_C","THE ROAD TO HELL"),
  104. tB("REM","MAP_PERS_CDC_D","THE BODY DUMP"),
  105. };
  106. foreach (var s in sB) settings.Add(s.Item2, true, s.Item3, s.Item1);
  107. if (timer.CurrentTimingMethod == TimingMethod.RealTime) // stolen from dude simulator 3, basically asks the runner to set their livesplit to game time
  108. {
  109. var timingMessage = MessageBox.Show (
  110. "This game uses Time without Loads (Game Time) as the main timing method.\n"+
  111. "LiveSplit is currently set to show Real Time (RTA).\n"+
  112. "Would you like to set the timing method to Game Time? This will make verification easier",
  113. "LiveSplit | BACK 4 BLOOD",
  114. MessageBoxButtons.YesNo,MessageBoxIcon.Question
  115. );
  116. if (timingMessage == DialogResult.Yes)
  117. {
  118. timer.CurrentTimingMethod = TimingMethod.GameTime;
  119. }
  120. }
  121. }
  122. update
  123. {
  124. if ((current.Loader == 0) || (current.CurrentLevel == "MAP_PERS_FortHope_A"))
  125. {
  126. vars.Loading = true;
  127. }
  128. }
  129. start
  130. {
  131. return ((settings[current.CurrentLevel]) && (current.Loader != 0));
  132. }
  133. onStart
  134. {
  135. vars.doneMaps.Add(current.CurrentLevel);
  136. }
  137. isLoading
  138. {
  139. return (vars.Loading);
  140. }
  141. split
  142. {
  143. if (!vars.doneMaps.Contains(current.CurrentLevel) && (settings[current.CurrentLevel]) && (current.CurrentLevel != old.CurrentLevel))
  144. {
  145. vars.doneMaps.Add(current.CurrentLevel);
  146. return true;
  147. }
  148. }
  149. onReset
  150. {
  151. vars.doneMaps.Clear();
  152. }