SniperElite4.asl 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // Gotta love .exe changes so you don't need an identifer
  2. state("SniperElite4_DX11")
  3. {
  4. string16 map : 0xEB0BEB;
  5. float loading1 : 0xCFCAF0;
  6. byte loading : 0xBE1F37;
  7. byte fades : 0xC1555B;
  8. float islandload : 0xC15A90;
  9. int endscene : 0xB67E60;
  10. }
  11. state("SniperElite4_DX12")
  12. {
  13. string16 map : 0xE5A2AB;
  14. byte loading1 : 0xB669FC;
  15. byte loading : 0xB2007F;
  16. byte fades : 0xB65D4D;
  17. float islandload : 0xB683E0;
  18. int endscene : 0xAA5E98;
  19. }
  20. startup
  21. {
  22. settings.Add("missions", true, "Missions");
  23. vars.missions = new Dictionary<string,string>
  24. {
  25. {"Marina", "Bianti Village"},
  26. {"Viaduct", "Regilino Viaduct"},
  27. {"Dockyard", "Lorino Dockyard"},
  28. {"Monte_Cassino", "Abrunza Monastery"},
  29. {"Coastal_Facility", "Magazzeno Facility"},
  30. {"Forest", "Giovi Fiorini Mansion"},
  31. {"Fortress", "Allagra Fortress"},
  32. };
  33. foreach (var Tag in vars.missions)
  34. {
  35. settings.Add(Tag.Key, true, Tag.Value, "missions");
  36. };
  37. vars.onStart = (EventHandler)((s, e) =>
  38. {
  39. vars.doneMaps.Clear();
  40. });
  41. timer.OnStart += vars.onStart;
  42. if (timer.CurrentTimingMethod == TimingMethod.RealTime) // stolen from dude simulator 3, basically asks the runner to set their livesplit to game time
  43. {
  44. var timingMessage = MessageBox.Show (
  45. "This game uses Time without Loads (Game Time) as the main timing method.\n"+
  46. "LiveSplit is currently set to show Real Time (RTA).\n"+
  47. "Would you like to set the timing method to Game Time? This will make verification easier",
  48. "LiveSplit | Sniper Elite 4",
  49. MessageBoxButtons.YesNo,MessageBoxIcon.Question
  50. );
  51. if (timingMessage == DialogResult.Yes)
  52. {
  53. timer.CurrentTimingMethod = TimingMethod.GameTime;
  54. }
  55. }
  56. }
  57. init
  58. {
  59. vars.doneMaps = new List<string>(); // You get kicked to the main menu, so adding this just in case
  60. }
  61. start
  62. {
  63. if ((current.map == "Island") && (current.loading != 1) && (current.loading1 != 0))
  64. {
  65. vars.doneMaps.Clear();
  66. return true;
  67. }
  68. }
  69. split
  70. {
  71. if ((current.map != old.map) && (settings[current.map]) && (!vars.doneMaps.Contains(current.map)) || ((current.endscene == 1)) && ((current.map == "Fortress")))
  72. {
  73. vars.doneMaps.Add(current.map);
  74. return true;
  75. }
  76. }
  77. reset
  78. {
  79. return ((current.map == "Island") && (old.map != "Island"));
  80. }
  81. isLoading
  82. {
  83. return ((current.loading == 1) || (current.fades == 1));
  84. }
  85. exit
  86. {
  87. timer.OnStart -= vars.onStart;
  88. }