FAITHTheUnholyTrinity.asl 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. state("FAITH")
  2. {
  3. int CurRoom : 0x6C4DB8;
  4. byte inCutscene : 0x004B477C, 0x0, 0x68, 0x10, 0x80;
  5. }
  6. init
  7. {
  8. vars.doneMaps = new List<string>();
  9. vars.CurRoomToString = "";
  10. vars.sheepcounter = "";
  11. }
  12. startup
  13. {
  14. settings.Add("Faith", true, "Faith: The Unholy Trinity");
  15. settings.Add("Ch1", true, "Faith: Chapter One", "Faith");
  16. settings.Add("Ch2", true, "Faith: Chapter Two", "Faith");
  17. settings.Add("Ch3", true, "Faith: Chapter Three", "Faith");
  18. var tB = (Func<string, string, string, Tuple<string, string, string>>) ((elmt1, elmt2, elmt3) => { return Tuple.Create(elmt1, elmt2, elmt3); });
  19. var sB = new List<Tuple<string, string, string>>
  20. {
  21. tB("Ch1", "353", "Start of Chapter 1"),
  22. tB("Ch1", "375", "Entering Worn-Down, Ugly, Brown, Shack"),
  23. tB("Ch1", "397", "Entering Worn-Down, Ugly, Red, House"),
  24. tB("Ch1", "349", "Amy climbs into bed for cuddles"),
  25. tB("Ch1", "410", "Entering Attic"),
  26. tB("Ch1", "348", "Title Card"),
  27. tB("Ch2", "425", "Beginning Room"),
  28. tB("Ch2", "515", "Descending beneath Chapel"),
  29. tB("Ch2", "468", "Spider transformation complete"),
  30. tB("Ch2", "517", "Title Card"),
  31. tB("Ch3", "112", "Missing exorcism spot that shows scene in clinic - Ending specific"),
  32. tB("Ch3", "324", "Opening nightmare and House 1"),
  33. tB("Ch3", "53", "Waking up in house"),
  34. tB("Ch3", "113", "Waking up in clinic basement on stretcher with Jeremy demon checking bodies"),
  35. tB("Ch3", "54", "Nightmare section 2"),
  36. tB("Ch3", "59", "House and waking up section 2."),
  37. tB("Ch3", "123", "Inside Lisas room + Lisa fight"),
  38. tB("Ch3", "187", "Tiffany boss intro and fight"),
  39. tB("Ch3", "73", " Nightmare section again"),
  40. tB("Ch3", "76", "Image with text about X night before Profane Sabbath after nightmare sequence in house which is for Ending I and II"),
  41. tB("Ch3", "94", "Waking up in the house yet again"),
  42. tB("Ch3", "191", "School entrance"),
  43. tB("Ch3", "331", "Needle that's shot into John and he trips balls cutscene"),
  44. tB("Ch3", "84", "Nightmare section again right after tripping balls cutscene"),
  45. tB("Ch3", "209", "Weird cult section underneath the school after tripping balls"),
  46. tB("Ch3", "269", "First Gary battle before the end of the game"),
  47. tB("Ch3", "281", "Second Gary fight for Ending II which is right before the final end of the game and Ending specific to II"),
  48. tB("Ch3", "284", "The Ending for Ending II right before last automatic split triggers. Choosing to leave with Fr. Garcia"),
  49. tB("Ch3", "290", "Waking up in house for Ending III where it is all dark with lightning strikes and an inverted cross is over the protagonists head on Night 3"),
  50. tB("Ch3", "297", "Grabbing key in basement of protagonists house during lightning strike - Ending specific to III I think"),
  51. tB("Ch3", "293", "Going inside the room locked up with all the crosses in the protagonists house for Ending III"),
  52. tB("Ch3", "308", "Ending placard for Ending III. Needs to have final time split here"),
  53. tB("Ch3", "289", "Title Card"),
  54. };
  55. foreach (var s in sB) settings.Add(s.Item2, true, s.Item3, s.Item1);
  56. if (timer.CurrentTimingMethod == TimingMethod.RealTime)
  57. {
  58. var timingMessage = MessageBox.Show (
  59. "This game uses Time without Loads (Game Time) as the main timing method.\n"+
  60. "LiveSplit is currently set to show Real Time (RTA).\n"+
  61. "Would you like to set the timing method to Game Time?",
  62. "LiveSplit | Faith The Unholy Trinity",
  63. MessageBoxButtons.YesNo,MessageBoxIcon.Question
  64. );
  65. if (timingMessage == DialogResult.Yes)
  66. {
  67. timer.CurrentTimingMethod = TimingMethod.GameTime;
  68. }
  69. }
  70. vars.LoadValues = new List<int>
  71. {
  72. 152,
  73. 187,
  74. 207,
  75. 259,
  76. 260,
  77. 261,
  78. 270,
  79. 280,
  80. 283,
  81. 284,
  82. 285,
  83. 286,
  84. 288,
  85. 324,
  86. 325,
  87. 326,
  88. 327,
  89. 328,
  90. 329,
  91. 330,
  92. 331,
  93. 332,
  94. 343,
  95. 349,
  96. 353,
  97. //411,
  98. 419,
  99. 428,
  100. 458,
  101. 466,
  102. 468,
  103. 505,
  104. 512,
  105. 515,
  106. 516,
  107. 153,
  108. 35,
  109. 36,
  110. 75,
  111. 77,
  112. 91,
  113. 92,
  114. 93,
  115. };
  116. vars.SetTextComponent = (Action<string, string>)((id, text) =>
  117. {
  118. var textSettings = timer.Layout.Components.Where(x => x.GetType().Name == "TextComponent").Select(x => x.GetType().GetProperty("Settings").GetValue(x, null));
  119. var textSetting = textSettings.FirstOrDefault(x => (x.GetType().GetProperty("Text1").GetValue(x, null) as string) == id);
  120. if (textSetting == null)
  121. {
  122. var textComponentAssembly = Assembly.LoadFrom("Components\\LiveSplit.Text.dll");
  123. var textComponent = Activator.CreateInstance(textComponentAssembly.GetType("LiveSplit.UI.Components.TextComponent"), timer);
  124. timer.Layout.LayoutComponents.Add(new LiveSplit.UI.Components.LayoutComponent("LiveSplit.Text.dll", textComponent as LiveSplit.UI.Components.IComponent));
  125. textSetting = textComponent.GetType().GetProperty("Settings", BindingFlags.Instance | BindingFlags.Public).GetValue(textComponent, null);
  126. textSetting.GetType().GetProperty("Text1").SetValue(textSetting, id);
  127. }
  128. if (textSetting != null)
  129. textSetting.GetType().GetProperty("Text2").SetValue(textSetting, text);
  130. });
  131. settings.Add("sheep_count", true, "Sheep Count");
  132. }
  133. update
  134. {
  135. vars.CurRoomToString = current.CurRoom.ToString();
  136. print(vars.CurRoomToString);
  137. if (settings["sheep_count"]) {vars.SetTextComponent("RoomID", (current.CurRoom).ToString()); }
  138. }
  139. start
  140. {
  141. return (settings[vars.CurRoomToString]);
  142. }
  143. onStart
  144. {
  145. vars.doneMaps.Add(vars.CurRoomToString);
  146. }
  147. split
  148. {
  149. if (settings[vars.CurRoomToString] && (!vars.doneMaps.Contains(vars.CurRoomToString)))
  150. {
  151. vars.doneMaps.Add(vars.CurRoomToString);
  152. return true;
  153. }
  154. }
  155. isLoading
  156. {
  157. return (vars.LoadValues.Contains(current.CurRoom));
  158. }
  159. onReset
  160. {
  161. vars.doneMaps.Clear();
  162. }