Singularity.asl 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. state("Singularity")
  2. {
  3. bool Loader : 0x17C6080; // 0 loading/1 not, btw as nobody puts it this is originally a byte
  4. bool inControl : 0x18DA251; // 1 in control, 0 not
  5. string56 mapID1 : 0x0191A210, 0x14;
  6. string56 mapID2 : 0x018F74E4, 0x58, 0x3C, 0x18, 0x1E4, 0x2C;
  7. float zcoord : 0x18DE3B4; // prolly isn't the zcoord idk how the game orders it lol
  8. }
  9. startup
  10. {
  11. settings.Add("SGL", true, "All Chapters");
  12. settings.Add("WD", true, "Workers' District");
  13. settings.Add("RF", true, "Research Facility");
  14. settings.Add("BT", true, "Barsiov's Tower");
  15. settings.Add("RL", true, "Rail Line");
  16. settings.Add("CD", true, "Central Dock");
  17. settings.Add("E99", true, "E99 Processing Complex");
  18. settings.Add("SL", true, "Singularity Labs");
  19. settings.Add("SP_SL3_kismet99", true, "End Split");
  20. var tB = (Func<string, string, string, Tuple<string, string, string>>) ((elmt1, elmt2, elmt3) => { return Tuple.Create(elmt1, elmt2, elmt3); });
  21. var sB = new List<Tuple<string, string, string>>
  22. {
  23. //tB("WD", "SP_VI_intro_Kismet","After First Cutscene"), keeping this just incase
  24. //tB("WD", "SP_VI2_kismet01", "Standing on The Dock"),
  25. tB("WD", "SP_RL1_kismet01", "Clicking Into Laptop"),
  26. tB("RF", "SP_RL2_kismet04", "Entering Underground Railway"),
  27. tB("RF", "SP_RL2_kismet02_1950", "Entering The Rift"),
  28. tB("RF", "SP_RL3_kismet03", "Returning from 1950"),
  29. tB("RF", "SP_RL5_kismet05", "Entering into the Battle Royal"),
  30. tB("BT", "SP_BT_A_kismet01", "Entering into Barsiov's Tower"),
  31. tB("RL", "orld.PersistentLevel.RCheckpoint_0", "Getting NTD Upgrade"),
  32. tB("RL", "orld.PersistentLevel.RCheckpoint_16", "Crane Skip"),
  33. tB("RL", "orld.PersistentLevel.RCheckpoint_6", "Rescued Kathryn"),
  34. tB("RL", "rain_intro", "Skipped Mother Phase Tick Fight"),
  35. tB("CD", "eck1", "Fixed boat and getting onto it"),
  36. tB("E99", "SP_WL1_kismet01", "Barsiov's Hut"),
  37. tB("E99", "SP_WL1_kismet04", "Skip through the badlands"),
  38. tB("E99", "SP_WL3_kismet04", "Repaired Bridge"),
  39. tB("E99", "SP_WL4_kismet08", "Top of elevator"),
  40. tB("E99", "P_WL6_kismet_1950.TheWorld.PersistentLevel.RCheckpoint_1", "Getting the E99 bomb charged and leaving"),
  41. tB("SL", "SP_SL1_kismet01", "Start of Singularity Tower"),
  42. tB("SL", "L2_kismet_p.TheWorld.PersistentLevel.RCheckpoint_5", "After recieving TMD amplifer mod"),
  43. //tB("", "", ""),
  44. };
  45. foreach (var s in sB) settings.Add(s.Item2, true, s.Item3, s.Item1);
  46. vars.onStart = (EventHandler)((s, e) => // thanks gelly for this, it's basically making sure it always clears the vars no matter how livesplit starts
  47. {
  48. vars.doneMaps.Clear(); // Needed because checkpoints bad in game
  49. });
  50. timer.OnStart += vars.onStart;
  51. if (timer.CurrentTimingMethod == TimingMethod.RealTime) // stolen from dude simulator 3, basically asks the runner to set their livesplit to game time
  52. {
  53. var timingMessage = MessageBox.Show (
  54. "This game uses Time without Loads (Game Time) as the main timing method.\n"+
  55. "LiveSplit is currently set to show Real Time (RTA).\n"+
  56. "Would you like to set the timing method to Game Time? This will make verification easier",
  57. "LiveSplit | Singularity",
  58. MessageBoxButtons.YesNo,MessageBoxIcon.Question
  59. );
  60. if (timingMessage == DialogResult.Yes)
  61. {
  62. timer.CurrentTimingMethod = TimingMethod.GameTime;
  63. }
  64. }
  65. }
  66. init
  67. {
  68. vars.doneMaps = new List<string>();
  69. vars.Splitter = false; // Just so I can throw everything in update
  70. }
  71. update
  72. {
  73. if (settings[current.mapID1] && (!vars.doneMaps.Contains(current.mapID1)) || (settings[current.mapID2] && (!vars.doneMaps.Contains(current.mapID2))))
  74. {
  75. vars.doneMaps.Add(current.mapID1);
  76. vars.doneMaps.Add(current.mapID2); //Wouldn't matter if either of them get triggered as there is never a location where one split can affect another
  77. vars.Splitter = true;
  78. }
  79. else
  80. {
  81. vars.Splitter = false;
  82. }
  83. print(current.inControl.ToString());
  84. }
  85. start
  86. {
  87. if (current.mapID1 == "SP_VI2_kismet01" && current.zcoord >= -37546.51953 && current.inControl == 1) // scuffed but it changes within 5 seconds
  88. {
  89. vars.doneMaps.Clear();
  90. return true;
  91. }
  92. }
  93. split
  94. {
  95. if (vars.Splitter)
  96. {
  97. vars.Splitter = false;
  98. return true;
  99. }
  100. }
  101. isLoading
  102. {
  103. return (!current.Loader);
  104. }