From 874bb83e20b78b7edb0f62c5571e626e2e113359 Mon Sep 17 00:00:00 2001 From: NERS1111 <85985080+NERS1111@users.noreply.github.com> Date: Wed, 15 Feb 2023 11:12:39 +0200 Subject: [PATCH 01/10] actually fixed fight pointers like for real on god --- Deltarune.asl | 73 +++++++++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 32 deletions(-) diff --git a/Deltarune.asl b/Deltarune.asl index f9bcc82..f294db1 100644 --- a/Deltarune.asl +++ b/Deltarune.asl @@ -1,15 +1,15 @@ // DELTARUNE autosplitter by Tenebrosful and NERS // Inspired by Narry's autosplitter based on Glacia's Undertale autosplitter (https://drive.google.com/file/d/1SCpuUpDgIYHmbc6xKK3ZrNk1zaIeDUMq/view?usp=sharing) -state("Deltarune", "v1.13 - v1.15") { +state("Deltarune", "v1.12 - v1.15") { // static uint room : "Deltarune.exe", 0x6F0B70; // globals string128 textboxMsg : "Deltarune.exe", 0x6FE774, 0x8, 0x144, 0x144, 0x140, 0x24, 0x10, 0x0, 0x0, 0x0, 0x0; - double fight : "Deltarune.exe", 0x6FE860, 0x30, 0x9C, 0x5F0; - double fight2 : "Deltarune.exe", 0x6FE860, 0x30, 0xD98, 0x9B0; // going into chapter 2 then chapter 1 breaks the first pointer so i had to find a second one (not like it matters though cuz they're broken at the moment) + double fight : "Deltarune.exe", 0x6FE860, 0x30, 0x4F8, 0x660; + double fight2 : "Deltarune.exe", 0x6FE860, 0x30, 0x4F8, 0xAD0; // going into chapter 2 then chapter 1 breaks the first pointer (and vice-versa) so i had to find a second one double choicer : "Deltarune.exe", 0x6F0B48, 0x80, 0x140, 0x24, 0x10, 0x15C, 0x0; @@ -17,9 +17,9 @@ state("Deltarune", "v1.13 - v1.15") { double namerEvent : "Deltarune.exe", 0x43FE48, 0x630, 0xC, 0x140, 0x24, 0x10, 0xFC, 0x0; double doorCloseCon : "Deltarune.exe", 0x6F0BD0, 0x524, 0x84, 0x24, 0x10, 0x18, 0x0; - double jevilDance : "Deltarune.exe", 0x6F0B48, 0xD8, 0x15C, 0x20, 0x24, 0x10, 0x4EC, 0x0; + double jevilDance : "Deltarune.exe", 0x6F0B48, 0xD8, 0x15C, 0x20, 0x24, 0x10, 0x4EC, 0x0; // breaks if you die to him or return to title, need to fix that someday maybe (same with v1.08 - v1.10) - double djFightCon : "Deltarune.exe", 0x438BCC, 0x1F0, 0xDC, 0x20, 0x144, 0x24, 0x10, 0x2B8, 0x0; + double djFightCon : "Deltarune.exe", 0x438BCC, 0x1F0, 0xDC, 0x20, 0x144, 0x24, 0x10, 0x2B8, 0x0; // same here double freezeRingTimer : "Deltarune.exe", 0x43FE48, 0xC20, 0xC, 0x144, 0x24, 0x10, 0x120, 0x0; double loadedDiskGreyBG : "Deltarune.exe", 0x6F0B48, 0x10C, 0x504, 0x20, 0x24, 0x10, 0x0, 0x0; } @@ -79,6 +79,7 @@ startup { vars.tracabartpeeg = false; vars.fightPointer = -1; // had to do a weird workaround in update{} to make sure the correct fight pointer was used vars.fightPointerOld = -1; + vars.fightPointerUsed = 0; vars.chapter = 0; // Based on: https://github.com/NoTeefy/LiveSnips/blob/master/src/snippets/checksum(hashing)/checksum.asl, used to calculate the hash of the game to detect the version @@ -99,6 +100,7 @@ startup { vars.tracabartpeeg = false; vars.fightPointer = -1; vars.fightPointerOld = -1; + vars.fightPointerUsed = 0; vars.chapter = 0; vars.resetSplits(); @@ -147,7 +149,7 @@ startup { settings.Add("Ch1_School", true, "School / Bed Skip", "Ch1_Intro"); settings.Add("Ch1_CastleTown", true, "Castle Town section"); settings.Add("Ch1_Pre-CastleTown", false, "Pre-Castle Town (after chase slide)", "Ch1_CastleTown"); - settings.Add("Ch1_LancerFight", false, "Lancer Fight (may not work on Demo sometimes)", "Ch1_CastleTown"); + settings.Add("Ch1_LancerFight", false, "Lancer fight", "Ch1_CastleTown"); settings.Add("Ch1_CastleTown_DoorClose", true, "Castle Town (door close)", "Ch1_CastleTown"); settings.Add("Ch1_CastleTown_RoomChange", false, "Castle Town (room change)", "Ch1_CastleTown"); settings.Add("Ch1_Fields", true, "Fields section"); @@ -167,7 +169,7 @@ startup { settings.Add("Ch1_BakeSale", false, "Bake Sale", "Ch1_Forest"); settings.Add("Ch1_BloxerSkip#2", false, "Bloxer Skip 2", "Ch1_Forest"); settings.Add("Ch1_Maze_End", false, "Maze end", "Ch1_Forest"); - settings.Add("Ch1_Susie&Lancer", false, "Susie & Lancer fight (may not work on Demo sometimes)", "Ch1_Forest"); + settings.Add("Ch1_Susie&Lancer", false, "Susie & Lancer fight", "Ch1_Forest"); settings.Add("Ch1_Susie&Lancer_Exit", true, "Susie & Lancer exit room", "Ch1_Forest"); settings.Add("Ch1_Captured", false, "Captured", "Ch1_Forest"); settings.Add("Ch1_Prison", true, "Prison section"); @@ -179,7 +181,7 @@ startup { settings.Add("Ch1_Jevil_EnterRoom", false, "Enter Jevil room", "Ch1_Jevil"); settings.Add("Ch1_Jevil_StartBattle", false, "Start Jevil Battle", "Ch1_Jevil"); settings.Add("Ch1_Jevil_ExitRoom", false, "Exit Jevil room", "Ch1_Jevil"); - settings.Add("Ch1_Jevil_EndBattle", false, "End Jevil Battle (May not work on Demo sometimes, use with caution)", "Ch1_Jevil"); + settings.Add("Ch1_Jevil_EndBattle", false, "End Jevil Battle (may not work on Demo sometimes, use with caution)", "Ch1_Jevil"); settings.Add("Ch1_CardCastle", true, "Card Castle section"); settings.Add("Ch1_RudinnRangerSkip", false, "Rudinn Ranger Skip", "Ch1_CardCastle"); settings.Add("Ch1_HeadHathySkip", false, "Head Hathy Skip", "Ch1_CardCastle"); @@ -227,8 +229,8 @@ startup { settings.Add("Ch2_BerdlySnowgrave", true, "Berdly 2 (Snowgrave)", "Ch2_CyberCity"); settings.Add("Ch2_Spamton", true, "Spamton", "Ch2_CyberCity"); settings.Add("Ch2_FullParty", false, "Full party", "Ch2_CyberCity"); - settings.Add("Ch2_Ambyu-lance#2", false, "Ambyu-Lance #2 fight (may not work sometimes)", "Ch2_CyberCity"); - settings.Add("Ch2_Mice", false, "Mice fight (may not work sometimes)", "Ch2_CyberCity"); + settings.Add("Ch2_Ambyu-lance#2", false, "Ambyu-Lance #2 fight", "Ch2_CyberCity"); + settings.Add("Ch2_Mice", false, "Mice fight", "Ch2_CyberCity"); settings.Add("Ch2_CyberCity_Exit", true, "Exit Cyber City (Captured)", "Ch2_CyberCity"); settings.Add("Ch2_CyberCity_Exit_Snowgrave", false, "Exit Cyber City (Snowgrave)", "Ch2_CyberCity"); settings.Add("Ch2_Mansion", true, "Queen Mansion"); @@ -254,7 +256,8 @@ startup { settings.Add("Ch2_Werewerewire", false, "Werewerewire", "Ch2_Mansion"); settings.Add("Ch2_Queen", true, "Queen", "Ch2_Mansion"); settings.Add("Ch2_GigaQueen", true, "Giga Queen", "Ch2_Mansion"); - settings.Add("Ch2_Fountain_Enter", false, "Enter Fountain Room (Snowgrave Spamton NEO)", "Ch2_Mansion"); + settings.Add("Ch2_Fountain_Enter", true, "Enter Fountain Room (Snowgrave Spamton NEO)", "Ch2_Mansion"); + settings.Add("Ch2_SnowgraveNEO", true, "End Spamton NEO (Snowgrave)", "Ch2_Mansion"); settings.Add("Ch2_Fountain_Exit", false, "Exit Fountain Room (Snowgrave Spamton NEO)", "Ch2_Mansion"); settings.Add("Ch2_Ending", true, "Ending"); settings.Add("Ch2_EndingOST", false, "Ending (OST%)"); @@ -266,6 +269,7 @@ exit { vars.chapter = 0; vars.fightPointer = -1; vars.fightPointerOld = -1; + vars.fightPointerUsed = 0; } init { @@ -281,18 +285,20 @@ init { switch(hash) { case "A9DB8B7FB6333B5E267F574F46076B3F": - version = "v1.13 - v1.15"; + version = "v1.12 - v1.15"; break; case "4D09627E1FA123D12DDF1A496C489F73": version = "SURVEY_PROGRAM"; + vars.fightPointerUsed = 1; break; default: switch(module.ModuleMemorySize) { case 7495680: version = "v1.08 - v1.10"; + vars.fightPointerUsed = 1; break; case 7491584: - version = "v1.00 - v1.07"; + version = "v1.00 - v1.07 (Unsupported)"; break; default: vars.DebugPrint("Unable to recognize the game version"); @@ -307,7 +313,7 @@ init { #region Version variables (Splits, Start Rooms, Reset Rooms, ...) switch(version) { - case "v1.13 - v1.15": + case "v1.12 - v1.15": case "v1.08 - v1.10": vars.splitsVarIndex = new object[] { "done", "oldRoom", "currentRoom", "oldFight", "currentFight", "specialCondition" }; vars.splits = new Dictionary() { @@ -429,6 +435,7 @@ init { {"Ch2_Queen", new object[] {false, -1, 207, -1, -1, -1}}, {"Ch2_GigaQueen", new object[] {false, 207, 208, -1, -1, -1}}, {"Ch2_Fountain_Enter", new object[] {false, 4, 3, -1, -1, -1}}, + {"Ch2_SnowgraveNEO", new object[] {false, -1, 3, 1, 0, -1}}, {"Ch2_Fountain_Exit", new object[] {false, 3, 54, -1, -1, -1}}, // Ch2_Ending is handled manually @@ -529,10 +536,10 @@ update { } return false; } - if (version == "v1.00 - v1.07") { - if (!vars.VersionOutputWarning){ - vars.DebugPrint("Versions v1.00 - v1.07 no longer handled"); - MessageBox.Show("This autosplitter doesn't handle DELTARUNE versions v1.00 to v1.07 anymore.", + if (version == "v1.00 - v1.07 (Unsupported)") { + if (!vars.VersionOutputWarning) { + vars.DebugPrint("Versions v1.00 - v1.07 are no longer handled"); + MessageBox.Show("This autosplitter doesn't handle DELTARUNE versions v1.00 - v1.07 anymore.", "[DELTARUNE] Unsupported version"); vars.VersionOutputWarning = true; } @@ -549,16 +556,14 @@ update { } if (((IDictionary)current).ContainsKey("plot") && current.plot != old.plot) vars.DebugPrint("PLOT " + old.plot + " -> " + current.plot); - switch(version) { // Handling fight variable, see v1.15 - case "v1.13 - v1.15": - // i really couldn't think of a better way to go about this, sigscanning is out of the question as chapter switching breaks it entirely - // also when chapter switching debugview could be spammed a little bit with wrong values but ignore that it doesn't matter, there's no real point to adding checks for that - if(vars.fightPointer == old.fight && old.fight != current.fight) { + switch(version) { // Handling the fight pointers, see v1.12 - v1.15 state() + case "v1.12 - v1.15": + if(vars.fightPointerUsed == 1 && old.fight != current.fight) { vars.DebugPrint("FIGHT " + old.fight + " -> " + current.fight); vars.fightPointerOld = old.fight; vars.fightPointer = current.fight; } - else if(vars.fightPointer == old.fight2 && old.fight2 != current.fight2) { + else if(vars.fightPointerUsed == 2 && old.fight2 != current.fight2) { vars.DebugPrint("FIGHT " + old.fight2 + " -> " + current.fight2); vars.fightPointerOld = old.fight2; vars.fightPointer = current.fight2; @@ -566,20 +571,24 @@ update { if(old.room == 279) { // chapter select room if(current.room == 281) { // chapter 1 initialization room - if(vars.chapter == 0) vars.fightPointer = current.fight; - else if(vars.chapter == 2) vars.fightPointer = current.fight2; - vars.DebugPrint("CHAPTER " + vars.chapter + " -> 1"); + if(vars.chapter == 0) vars.fightPointerUsed = 1; + vars.DebugPrint(vars.chapter != 1 ? "CHAPTER " + vars.chapter + " -> 1" : "CHAPTER 1 - Returning to Title"); vars.chapter = 1; } else if(current.room == 11) { // chapter 2 initialization room - if(vars.chapter == 0) vars.fightPointer = current.fight2; - else if(vars.chapter == 1) vars.fightPointer = current.fight; - vars.DebugPrint("CHAPTER " + vars.chapter + " -> 2"); + if(vars.chapter == 0) vars.fightPointerUsed = 2; + vars.DebugPrint(vars.chapter != 2 ? "CHAPTER " + vars.chapter + " -> 2" : "CHAPTER 2 - Returning to Title"); vars.chapter = 2; } } break; - default: if(old.fight != current.fight) { vars.DebugPrint("FIGHT " + old.fight + " -> " + current.fight); vars.fightPointerOld = old.fight; vars.fightPointer = current.fight; } break; + default: + if(old.fight != current.fight) { + vars.DebugPrint("FIGHT " + old.fight + " -> " + current.fight); + vars.fightPointerOld = old.fight; + vars.fightPointer = current.fight; + } + break; } if(version != "SURVEY_PROGRAM") { @@ -646,7 +655,7 @@ split { int specialCondition = vars.findSplitVarIndex("specialCondition"); switch(version) { - case "v1.13 - v1.15": + case "v1.12 - v1.15": case "v1.08 - v1.10": // Chapter 1 end if((settings["Ch1_Ending"] || (settings["Ch1_Ch2_PauseTimer"] && !settings["Ch1_Ch2_PauseTimerOST"])) && (old.textboxMsg == @"* (ねむることにした)/%" || old.textboxMsg == @"* (You decided to go to bed.)/%") && current.textboxMsg == null) { From 88b62f51c03afb72d245a1676ff374f595b3fe48 Mon Sep 17 00:00:00 2001 From: NERS1111 <85985080+NERS1111@users.noreply.github.com> Date: Fri, 17 Feb 2023 22:28:45 +0200 Subject: [PATCH 02/10] Fixed fight pointers + added demo key item splits --- Deltarune.asl | 96 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 65 insertions(+), 31 deletions(-) diff --git a/Deltarune.asl b/Deltarune.asl index f294db1..a33e2b9 100644 --- a/Deltarune.asl +++ b/Deltarune.asl @@ -8,8 +8,8 @@ state("Deltarune", "v1.12 - v1.15") { // globals string128 textboxMsg : "Deltarune.exe", 0x6FE774, 0x8, 0x144, 0x144, 0x140, 0x24, 0x10, 0x0, 0x0, 0x0, 0x0; - double fight : "Deltarune.exe", 0x6FE860, 0x30, 0x4F8, 0x660; - double fight2 : "Deltarune.exe", 0x6FE860, 0x30, 0x4F8, 0xAD0; // going into chapter 2 then chapter 1 breaks the first pointer (and vice-versa) so i had to find a second one + double fight : "Deltarune.exe", 0x4E17F0, 0x34, 0xD4, 0x20, 0x24, 0x10, 0x54, 0x10; + double fight2 : "Deltarune.exe", 0x4E06B8, 0x24, 0x10, 0x3D8, 0x930; // going into chapter 2 then chapter 1 breaks the first pointer (and vice-versa) so i had to find a second one double choicer : "Deltarune.exe", 0x6F0B48, 0x80, 0x140, 0x24, 0x10, 0x15C, 0x0; @@ -79,7 +79,7 @@ startup { vars.tracabartpeeg = false; vars.fightPointer = -1; // had to do a weird workaround in update{} to make sure the correct fight pointer was used vars.fightPointerOld = -1; - vars.fightPointerUsed = 0; + vars.pointersUsed = 1; vars.chapter = 0; // Based on: https://github.com/NoTeefy/LiveSnips/blob/master/src/snippets/checksum(hashing)/checksum.asl, used to calculate the hash of the game to detect the version @@ -100,7 +100,7 @@ startup { vars.tracabartpeeg = false; vars.fightPointer = -1; vars.fightPointerOld = -1; - vars.fightPointerUsed = 0; + vars.pointersUsed = 0; vars.chapter = 0; vars.resetSplits(); @@ -157,14 +157,14 @@ startup { settings.Add("Ch1_RudinnSkip#2", false, "Rudinn Skip 2", "Ch1_Fields"); settings.Add("Ch1_RudinnSkip#3", false, "Rudinn Skip 3", "Ch1_Fields"); settings.Add("Ch1_VandalizedPuzzle", false, "Vandalized Puzzle", "Ch1_Fields"); - settings.Add("Ch1_KeyA", false, "Key A (SURVEY)", "Ch1_Fields"); + settings.Add("Ch1_KeyA", false, "Key A", "Ch1_Fields"); settings.Add("Ch1_Fields_Exit", true, "Rudinn Skip 4 / Exiting Fields", "Ch1_Fields"); settings.Add("Ch1_Checkerboard", true, "Checkerboard"); settings.Add("Ch1_PawnSkip#1", false, "Pawn Skip 1", "Ch1_Checkerboard"); settings.Add("Ch1_PawnSkip#2", false, "Pawn Skip 2", "Ch1_Checkerboard"); settings.Add("Ch1_Checkerboard_Exit", true, "Exiting Checkerboard", "Ch1_Checkerboard"); settings.Add("Ch1_Forest", true, "Forest section"); - settings.Add("Ch1_KeyB", false, "Key B (SURVEY)", "Ch1_Forest"); + settings.Add("Ch1_KeyB", false, "Key B", "Ch1_Forest"); settings.Add("Ch1_BloxerSkip#1", false, "Bloxer Skip 1", "Ch1_Forest"); settings.Add("Ch1_BakeSale", false, "Bake Sale", "Ch1_Forest"); settings.Add("Ch1_BloxerSkip#2", false, "Bloxer Skip 2", "Ch1_Forest"); @@ -176,8 +176,8 @@ startup { settings.Add("Ch1_Escape_Cell", false, "Exiting Cell", "Ch1_Prison"); settings.Add("Ch1_Escape_Elevator", true, "Entering Escape Elevator", "Ch1_Prison"); settings.Add("Ch1_Jevil", false, "Jevil section"); - settings.Add("Ch1_KeyC", false, "Key C (SURVEY)", "Ch1_Jevil"); - settings.Add("Ch1_KeyFixed", false, "Key Fixed (SURVEY)", "Ch1_Jevil"); + settings.Add("Ch1_KeyC", false, "Key C", "Ch1_Jevil"); + settings.Add("Ch1_KeyFixed", false, "Key Fixed", "Ch1_Jevil"); settings.Add("Ch1_Jevil_EnterRoom", false, "Enter Jevil room", "Ch1_Jevil"); settings.Add("Ch1_Jevil_StartBattle", false, "Start Jevil Battle", "Ch1_Jevil"); settings.Add("Ch1_Jevil_ExitRoom", false, "Exit Jevil room", "Ch1_Jevil"); @@ -269,7 +269,7 @@ exit { vars.chapter = 0; vars.fightPointer = -1; vars.fightPointerOld = -1; - vars.fightPointerUsed = 0; + vars.pointersUsed = 0; } init { @@ -289,13 +289,11 @@ init { break; case "4D09627E1FA123D12DDF1A496C489F73": version = "SURVEY_PROGRAM"; - vars.fightPointerUsed = 1; break; default: switch(module.ModuleMemorySize) { case 7495680: version = "v1.08 - v1.10"; - vars.fightPointerUsed = 1; break; case 7491584: version = "v1.00 - v1.07 (Unsupported)"; @@ -330,12 +328,14 @@ init { {"Ch1_RudinnSkip#2", new object[] {false, -1, 335, -1, -1, -1}}, {"Ch1_RudinnSkip#3", new object[] {false, -1, 337, -1, -1, -1}}, {"Ch1_VandalizedPuzzle", new object[] {false, -1, 344, -1, -1, -1}}, + {"Ch1_KeyA", new object[] {false, -1, 414, -1, -1, 4}}, {"Ch1_Fields_Exit", new object[] {false, -1, 346, -1, -1, -1}}, //Checkboard {"Ch1_PawnSkip#1", new object[] {false, -1, 348, -1, -1, -1}}, {"Ch1_PawnSkip#2", new object[] {false, -1, 352, -1, -1, -1}}, {"Ch1_Checkerboard_Exit", new object[] {false, -1, 354, -1, -1, -1}}, //Forest + {"Ch1_KeyB", new object[] {false, -1, 366, -1, -1, 5}}, {"Ch1_BloxerSkip#1", new object[] {false, -1, 362, -1, -1, -1}}, {"Ch1_BakeSale", new object[] {false, 362, 363, -1, -1, -1}}, {"Ch1_BloxerSkip#2", new object[] {false, 365, 366, -1, -1, -1}}, @@ -349,8 +349,8 @@ init { {"Ch1_Escape_Elevator", new object[] {false, 388, 390, -1, -1, -1}}, //Jevil - {"Ch1_KeyC", new object[] {false, -1, 64, -1, -1, 6}}, - {"Ch1_KeyFixed", new object[] {false, -1, 83, -1, -1, 3}}, + {"Ch1_KeyC", new object[] {false, -1, 345, -1, -1, 6}}, + {"Ch1_KeyFixed", new object[] {false, -1, 364, -1, -1, 3}}, {"Ch1_Jevil_EnterRoom", new object[] {false, 392, 393, -1, -1, -1}}, {"Ch1_Jevil_StartBattle", new object[] {false, -1, 393, 0, 1, -1}}, {"Ch1_Jevil_ExitRoom", new object[] {false, 393, 392, -1, -1, -1}}, @@ -453,12 +453,6 @@ init { } break; case "SURVEY_PROGRAM": - vars.checkKeyItems = (Func)((id) => { - for (int i = 0; i < 12; i++){ - if (new DeepPointer("Deltarune.exe", 0x49D598, 0x264, (0x1A00 + (i*0x10))).Deref(game) == id) return true; - } - return false; - }); vars.splitsVarIndex = new object[] { "done", "maxPlot", "exactPlot", "oldRoom", "currentRoom", "oldFight", "currentFight", "specialCondition" }; vars.splits = new Dictionary() { #region Chapter 1 @@ -495,8 +489,8 @@ init { {"Ch1_Escape_Elevator", new object[] {false, -1, -1, 107, 109, -1, -1, -1}}, //Jevil - {"Ch1_KeyC", new object[] {false, -1, -1, -1, 64, -1, -1, 6 }}, - {"Ch1_KeyFixed", new object[] {false, -1, -1, -1, 83, -1, -1, 3 }}, + {"Ch1_KeyC", new object[] {false, -1, -1, -1, 64, -1, -1, 6}}, + {"Ch1_KeyFixed", new object[] {false, -1, -1, -1, 83, -1, -1, 3}}, {"Ch1_Jevil_EnterRoom", new object[] {false, -1, -1, 111, 112, -1, -1, -1}}, {"Ch1_Jevil_StartBattle", new object[] {false, -1, -1, -1, 112, 0, 1, -1}}, {"Ch1_Jevil_ExitRoom", new object[] {false, -1, -1, 112, 111, -1, -1, -1}}, @@ -517,6 +511,33 @@ init { break; } #endregion + + vars.checkKeyItems = (Func)((id) => { + switch(version) { + case "v1.12 - v1.15": + if(vars.pointersUsed == 1) { + for(int i = 0; i < 12; i++) { if(new DeepPointer("Deltarune.exe", 0x6FE860, 0x30, 0xA74, 0x10, 0xE4, (0xE00 + (i*0x10))).Deref(game) == id) return true; } + } + else if(vars.pointersUsed == 2) { + for(int i = 0; i < 12; i++) { if(new DeepPointer("Deltarune.exe", 0x6FE860, 0x30, 0x4F8, 0x0, 0x64, (0xE00 + (i*0x10))).Deref(game) == id) return true; } + } + break; + + case "v1.08 - v1.10": + if(vars.pointersUsed == 1) { + for(int i = 0; i < 12; i++) { if(new DeepPointer("Deltarune.exe", 0x6FCF38, 0x30, 0x108, 0x0, 0x64, (0xA00 + (i*0x10))).Deref(game) == id) return true; } + } + else if(vars.pointersUsed == 2) { + for(int i = 0; i < 12; i++) { if(new DeepPointer("Deltarune.exe", 0x6FCF38, 0x30, 0x48C, 0x20, 0xE4, (0x900 + (i*0x10))).Deref(game) == id) return true; } + } + break; + + case "SURVEY_PROGRAM": + for(int i = 0; i < 12; i++) { if(new DeepPointer("Deltarune.exe", 0x49D598, 0x264, (0x1A00 + (i*0x10))).Deref(game) == id) return true; } + break; + } + return false; + }); } update { @@ -556,27 +577,28 @@ update { } if (((IDictionary)current).ContainsKey("plot") && current.plot != old.plot) vars.DebugPrint("PLOT " + old.plot + " -> " + current.plot); - switch(version) { // Handling the fight pointers, see v1.12 - v1.15 state() + switch(version) { // Handling variables with multiple pointers case "v1.12 - v1.15": - if(vars.fightPointerUsed == 1 && old.fight != current.fight) { + if(vars.pointersUsed == 1 && old.fight != current.fight) { vars.DebugPrint("FIGHT " + old.fight + " -> " + current.fight); vars.fightPointerOld = old.fight; vars.fightPointer = current.fight; } - else if(vars.fightPointerUsed == 2 && old.fight2 != current.fight2) { + else if(vars.pointersUsed == 2 && old.fight2 != current.fight2) { vars.DebugPrint("FIGHT " + old.fight2 + " -> " + current.fight2); vars.fightPointerOld = old.fight2; vars.fightPointer = current.fight2; } - + goto case "v1.08 - v1.10"; + case "v1.08 - v1.10": if(old.room == 279) { // chapter select room if(current.room == 281) { // chapter 1 initialization room - if(vars.chapter == 0) vars.fightPointerUsed = 1; + if(vars.chapter == 0) vars.pointersUsed = 1; vars.DebugPrint(vars.chapter != 1 ? "CHAPTER " + vars.chapter + " -> 1" : "CHAPTER 1 - Returning to Title"); vars.chapter = 1; } else if(current.room == 11) { // chapter 2 initialization room - if(vars.chapter == 0) vars.fightPointerUsed = 2; + if(vars.chapter == 0) vars.pointersUsed = 2; vars.DebugPrint(vars.chapter != 2 ? "CHAPTER " + vars.chapter + " -> 2" : "CHAPTER 2 - Returning to Title"); vars.chapter = 2; } @@ -709,6 +731,18 @@ split { if (vars.splits[splitKey][specialCondition] != -1) { bool pass = false; switch((int)vars.splits[splitKey][specialCondition]) { + case 3: // Ch1_KeyFixed + pass = vars.checkKeyItems(5); + break; + case 4: // Ch1_KeyA + pass = vars.checkKeyItems(4); + break; + case 5: // Ch1_KeyB + pass = vars.checkKeyItems(6); + break; + case 6: // Ch1_KeyC + pass = vars.checkKeyItems(7); + break; case 7: // Ch1_Jevil_EndBattle /* Jevil has a variable named dancelv which sets the sprite/animation he's using @@ -802,16 +836,16 @@ split { case 2: // Ch1_Ending (SURVEY) pass = ((old.textboxMsg == @"* (ねむることにした)/%" || old.textboxMsg == @"* (You decided to go to bed.)/%") && current.textboxMsg == null); break; - case 3: // i-key + case 3: // Ch1_KeyFixed pass = vars.checkKeyItems(5); break; - case 4: // i-keyA + case 4: // Ch1_KeyA pass = vars.checkKeyItems(4); break; - case 5: // i-keyB + case 5: // Ch1_KeyB pass = vars.checkKeyItems(6); break; - case 6: // i-keyC + case 6: // Ch1_KeyC pass = vars.checkKeyItems(7); break; case 7: // Ch1_Jevil_EndBattle From 86a423c463f649f090b032042044a3928b263b41 Mon Sep 17 00:00:00 2001 From: NERS1111 <85985080+NERS1111@users.noreply.github.com> Date: Fri, 17 Feb 2023 22:29:40 +0200 Subject: [PATCH 03/10] smol typo :keuchrCat: --- Deltarune.asl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Deltarune.asl b/Deltarune.asl index a33e2b9..3b485db 100644 --- a/Deltarune.asl +++ b/Deltarune.asl @@ -79,7 +79,7 @@ startup { vars.tracabartpeeg = false; vars.fightPointer = -1; // had to do a weird workaround in update{} to make sure the correct fight pointer was used vars.fightPointerOld = -1; - vars.pointersUsed = 1; + vars.pointersUsed = 0; vars.chapter = 0; // Based on: https://github.com/NoTeefy/LiveSnips/blob/master/src/snippets/checksum(hashing)/checksum.asl, used to calculate the hash of the game to detect the version From 12bf0658df3c8d2f8c7b495388f4a923821858c9 Mon Sep 17 00:00:00 2001 From: NERS1111 <85985080+NERS1111@users.noreply.github.com> Date: Sat, 18 Feb 2023 08:24:44 +0200 Subject: [PATCH 04/10] Added Arcade Game (Susie textbox close) split --- Deltarune.asl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Deltarune.asl b/Deltarune.asl index 3b485db..ec64f8b 100644 --- a/Deltarune.asl +++ b/Deltarune.asl @@ -200,7 +200,8 @@ startup { settings.Add("Ch2_CyberFields", true, "Cyber Fields"); settings.Add("Ch2_Pre-CyberFields", false, "Pre-Cyber Fields (after slide)", "Ch2_CyberFields"); settings.Add("Ch2_Tasque", false, "Tasque Fight / Skip", "Ch2_CyberFields"); - settings.Add("Ch2_ArcadeGame", true, "Arcade Game", "Ch2_CyberFields"); + settings.Add("Ch2_ArcadeGameText", false, "Arcade Game (textbox close)", "Ch2_CyberFields"); + settings.Add("Ch2_ArcadeGame", true, "Arcade Game (room change)", "Ch2_CyberFields"); settings.Add("Ch2_Virovirokun#1", false, "Virovirokun #1 Fight / Skip", "Ch2_CyberFields"); settings.Add("Ch2_Agree2All", false, "Agree 2 All puzzle", "Ch2_CyberFields"); settings.Add("Ch2_DJFightWon", false, "DJ Fight ('BATTLE WON!' text) (may not work sometimes)", "Ch2_CyberFields"); @@ -376,6 +377,7 @@ init { // Cyber Fields {"Ch2_Pre-CyberFields", new object[] {false, -1, 88, -1, -1, -1}}, {"Ch2_Tasque", new object[] {false, 91, 93, -1, -1, -1}}, + {"Ch2_ArcadeGameText", new object[] {false, -1, 93, -1, -1, 73}}, {"Ch2_ArcadeGame", new object[] {false, 93, 94, -1, -1, -1}}, {"Ch2_Virovirokun#1", new object[] {false, 95, 96, -1, -1, -1}}, {"Ch2_Agree2All", new object[] {false, 96, 95, -1, -1, -1}}, @@ -768,6 +770,9 @@ split { case 69: // Ch2_Disk_Loaded pass = (current.loadedDiskGreyBG == 121 && old.loadedDiskGreyBG == 119); break; + case 73: // Ch2_ArcadeGameText + pass = ((old.textboxMsg == @"\EH* おまえら^1!&  追っかけるぞ!/%" || old.textboxMsg == @"\EH* C'mon^1, let's go after&||her!/%") && current.textboxMsg == null); + break; case 424: // Ch1_CastleTown_GreatDoor pass = (current.doorCloseCon == 21 && old.doorCloseCon == 7); break; From a0c331622972e910bc91b6b00778ad457cf82427 Mon Sep 17 00:00:00 2001 From: NERS1111 <85985080+NERS1111@users.noreply.github.com> Date: Sat, 18 Feb 2023 09:17:52 +0200 Subject: [PATCH 05/10] Update README.md --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 286fc52..eab37c5 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ -# DELTARUNE-Livesplit.Autosplitter -Autosplitter for DELTARUNE (SURVEY_PROGRAM, 1.08 to 1.10, 1.15) +# DELTARUNE LiveSplit Autosplitter +Autosplitter for DELTARUNE (SURVEY_PROGRAM, 1.08 to 1.10, 1.12 to 1.15) Inspired by [Narry's Autosplitter](https://drive.google.com/file/d/1SCpuUpDgIYHmbc6xKK3ZrNk1zaIeDUMq/view?usp=sharing) based on Glacia's Undertale autosplitter (But I don't understand everything so I made my own) -**Auto end-splitting may not be frame-perfectly accurate** +**Autosplitting may not always be frame-perfectly accurate** Don't forget to configure your settings before using it. - -Pause timer for All Chapter between chapters is available. +Timer pausing between chapters for All Chapters is available and it is the only setting turned on by default. From 7375c0b5f5d88cbfbd54125a5adab08956f88f22 Mon Sep 17 00:00:00 2001 From: NERS1111 <85985080+NERS1111@users.noreply.github.com> Date: Sun, 19 Feb 2023 16:42:44 +0200 Subject: [PATCH 06/10] Removed 1.15 fight pointers i give up.. --- Deltarune.asl | 79 ++++++++++++++++----------------------------------- 1 file changed, 24 insertions(+), 55 deletions(-) diff --git a/Deltarune.asl b/Deltarune.asl index ec64f8b..ac9c3ad 100644 --- a/Deltarune.asl +++ b/Deltarune.asl @@ -8,9 +8,6 @@ state("Deltarune", "v1.12 - v1.15") { // globals string128 textboxMsg : "Deltarune.exe", 0x6FE774, 0x8, 0x144, 0x144, 0x140, 0x24, 0x10, 0x0, 0x0, 0x0, 0x0; - double fight : "Deltarune.exe", 0x4E17F0, 0x34, 0xD4, 0x20, 0x24, 0x10, 0x54, 0x10; - double fight2 : "Deltarune.exe", 0x4E06B8, 0x24, 0x10, 0x3D8, 0x930; // going into chapter 2 then chapter 1 breaks the first pointer (and vice-versa) so i had to find a second one - double choicer : "Deltarune.exe", 0x6F0B48, 0x80, 0x140, 0x24, 0x10, 0x15C, 0x0; // selfs @@ -77,8 +74,6 @@ startup { vars.tempCount = 0; // used for ch1 cell exit split (it triggers twice, once when susie exits it and once when everyone exits it) vars.tracabartpeeg = false; - vars.fightPointer = -1; // had to do a weird workaround in update{} to make sure the correct fight pointer was used - vars.fightPointerOld = -1; vars.pointersUsed = 0; vars.chapter = 0; @@ -98,8 +93,6 @@ startup { vars.reactivate = (Action)(() => { vars.tempCount = 0; vars.tracabartpeeg = false; - vars.fightPointer = -1; - vars.fightPointerOld = -1; vars.pointersUsed = 0; vars.chapter = 0; vars.resetSplits(); @@ -149,7 +142,7 @@ startup { settings.Add("Ch1_School", true, "School / Bed Skip", "Ch1_Intro"); settings.Add("Ch1_CastleTown", true, "Castle Town section"); settings.Add("Ch1_Pre-CastleTown", false, "Pre-Castle Town (after chase slide)", "Ch1_CastleTown"); - settings.Add("Ch1_LancerFight", false, "Lancer fight", "Ch1_CastleTown"); + settings.Add("Ch1_LancerFight", false, "Lancer fight (< v1.12)", "Ch1_CastleTown"); settings.Add("Ch1_CastleTown_DoorClose", true, "Castle Town (door close)", "Ch1_CastleTown"); settings.Add("Ch1_CastleTown_RoomChange", false, "Castle Town (room change)", "Ch1_CastleTown"); settings.Add("Ch1_Fields", true, "Fields section"); @@ -169,7 +162,7 @@ startup { settings.Add("Ch1_BakeSale", false, "Bake Sale", "Ch1_Forest"); settings.Add("Ch1_BloxerSkip#2", false, "Bloxer Skip 2", "Ch1_Forest"); settings.Add("Ch1_Maze_End", false, "Maze end", "Ch1_Forest"); - settings.Add("Ch1_Susie&Lancer", false, "Susie & Lancer fight", "Ch1_Forest"); + settings.Add("Ch1_Susie&Lancer", false, "Susie & Lancer fight (< v1.12)", "Ch1_Forest"); settings.Add("Ch1_Susie&Lancer_Exit", true, "Susie & Lancer exit room", "Ch1_Forest"); settings.Add("Ch1_Captured", false, "Captured", "Ch1_Forest"); settings.Add("Ch1_Prison", true, "Prison section"); @@ -179,7 +172,7 @@ startup { settings.Add("Ch1_KeyC", false, "Key C", "Ch1_Jevil"); settings.Add("Ch1_KeyFixed", false, "Key Fixed", "Ch1_Jevil"); settings.Add("Ch1_Jevil_EnterRoom", false, "Enter Jevil room", "Ch1_Jevil"); - settings.Add("Ch1_Jevil_StartBattle", false, "Start Jevil Battle", "Ch1_Jevil"); + settings.Add("Ch1_Jevil_StartBattle", false, "Start Jevil Battle (< v1.12)", "Ch1_Jevil"); settings.Add("Ch1_Jevil_ExitRoom", false, "Exit Jevil room", "Ch1_Jevil"); settings.Add("Ch1_Jevil_EndBattle", false, "End Jevil Battle (may not work on Demo sometimes, use with caution)", "Ch1_Jevil"); settings.Add("Ch1_CardCastle", true, "Card Castle section"); @@ -188,7 +181,7 @@ startup { settings.Add("Ch1_Shopping", false, "After the shop, before K Round", "Ch1_CardCastle"); settings.Add("Ch1_Throne_Enter", false, "Entering Card Castle's Throne room", "Ch1_CardCastle"); settings.Add("Ch1_Throne_Exit", true, "Exiting Card Castle's Throne room", "Ch1_CardCastle"); - settings.Add("Ch1_King_EndBattle", false, "End King Battle", "Ch1_CardCastle"); + settings.Add("Ch1_King_EndBattle", false, "End King Battle (< v1.12)", "Ch1_CardCastle"); settings.Add("Ch1_King_ExitBattleRoom", true, "Exit King Battle Room", "Ch1_CardCastle"); settings.Add("Ch1_Ending", true, "Ending"); settings.Add("Ch1_EndingOST", false, "Ending (OST%)"); @@ -230,8 +223,8 @@ startup { settings.Add("Ch2_BerdlySnowgrave", true, "Berdly 2 (Snowgrave)", "Ch2_CyberCity"); settings.Add("Ch2_Spamton", true, "Spamton", "Ch2_CyberCity"); settings.Add("Ch2_FullParty", false, "Full party", "Ch2_CyberCity"); - settings.Add("Ch2_Ambyu-lance#2", false, "Ambyu-Lance #2 fight", "Ch2_CyberCity"); - settings.Add("Ch2_Mice", false, "Mice fight", "Ch2_CyberCity"); + settings.Add("Ch2_Ambyu-lance#2", false, "Ambyu-Lance #2 fight (< v1.12)", "Ch2_CyberCity"); + settings.Add("Ch2_Mice", false, "Mice fight (< v1.12)", "Ch2_CyberCity"); settings.Add("Ch2_CyberCity_Exit", true, "Exit Cyber City (Captured)", "Ch2_CyberCity"); settings.Add("Ch2_CyberCity_Exit_Snowgrave", false, "Exit Cyber City (Snowgrave)", "Ch2_CyberCity"); settings.Add("Ch2_Mansion", true, "Queen Mansion"); @@ -243,8 +236,8 @@ startup { settings.Add("Ch2_Swatchling#2", false, "Swatchling 2 (Pot Race)", "Ch2_Mansion"); settings.Add("Ch2_TasqueManager", false, "Tasque Manager", "Ch2_Mansion"); settings.Add("Ch2_Disk_Loaded", false, "Loaded Disk (All Bosses)", "Ch2_Mansion"); - settings.Add("Ch2_SpamtonNEO_Start", false, "Start Spamton NEO (All Bosses)", "Ch2_Mansion"); - settings.Add("Ch2_SpamtonNEO_End", false, "End Spamton NEO (All Bosses)", "Ch2_Mansion"); + settings.Add("Ch2_SpamtonNEO_Start", false, "Start Spamton NEO (All Bosses) (< v1.12)", "Ch2_Mansion"); + settings.Add("Ch2_SpamtonNEO_End", false, "End Spamton NEO (All Bosses) (< v1.12)", "Ch2_Mansion"); settings.Add("Ch2_Mauswheel", false, "Mauswheel", "Ch2_Mansion"); settings.Add("Ch2_DogPipis", false, "After Dog / Pipis Room", "Ch2_Mansion"); settings.Add("Ch2_Swatchling#3", false, "Swatchling #3", "Ch2_Mansion"); @@ -258,7 +251,7 @@ startup { settings.Add("Ch2_Queen", true, "Queen", "Ch2_Mansion"); settings.Add("Ch2_GigaQueen", true, "Giga Queen", "Ch2_Mansion"); settings.Add("Ch2_Fountain_Enter", true, "Enter Fountain Room (Snowgrave Spamton NEO)", "Ch2_Mansion"); - settings.Add("Ch2_SnowgraveNEO", true, "End Spamton NEO (Snowgrave)", "Ch2_Mansion"); + settings.Add("Ch2_SnowgraveNEO", true, "End Spamton NEO (Snowgrave) (< v1.12)", "Ch2_Mansion"); settings.Add("Ch2_Fountain_Exit", false, "Exit Fountain Room (Snowgrave Spamton NEO)", "Ch2_Mansion"); settings.Add("Ch2_Ending", true, "Ending"); settings.Add("Ch2_EndingOST", false, "Ending (OST%)"); @@ -268,8 +261,6 @@ startup { exit { vars.DebugPrint("The game just exited"); vars.chapter = 0; - vars.fightPointer = -1; - vars.fightPointerOld = -1; vars.pointersUsed = 0; } @@ -579,41 +570,6 @@ update { } if (((IDictionary)current).ContainsKey("plot") && current.plot != old.plot) vars.DebugPrint("PLOT " + old.plot + " -> " + current.plot); - switch(version) { // Handling variables with multiple pointers - case "v1.12 - v1.15": - if(vars.pointersUsed == 1 && old.fight != current.fight) { - vars.DebugPrint("FIGHT " + old.fight + " -> " + current.fight); - vars.fightPointerOld = old.fight; - vars.fightPointer = current.fight; - } - else if(vars.pointersUsed == 2 && old.fight2 != current.fight2) { - vars.DebugPrint("FIGHT " + old.fight2 + " -> " + current.fight2); - vars.fightPointerOld = old.fight2; - vars.fightPointer = current.fight2; - } - goto case "v1.08 - v1.10"; - case "v1.08 - v1.10": - if(old.room == 279) { // chapter select room - if(current.room == 281) { // chapter 1 initialization room - if(vars.chapter == 0) vars.pointersUsed = 1; - vars.DebugPrint(vars.chapter != 1 ? "CHAPTER " + vars.chapter + " -> 1" : "CHAPTER 1 - Returning to Title"); - vars.chapter = 1; - } - else if(current.room == 11) { // chapter 2 initialization room - if(vars.chapter == 0) vars.pointersUsed = 2; - vars.DebugPrint(vars.chapter != 2 ? "CHAPTER " + vars.chapter + " -> 2" : "CHAPTER 2 - Returning to Title"); - vars.chapter = 2; - } - } - break; - default: - if(old.fight != current.fight) { - vars.DebugPrint("FIGHT " + old.fight + " -> " + current.fight); - vars.fightPointerOld = old.fight; - vars.fightPointer = current.fight; - } - break; - } if(version != "SURVEY_PROGRAM") { if(timer.CurrentPhase != TimerPhase.Ended && timer.IsGameTimePaused == true && settings["Ch2_Ch2_PauseTimer"] && current.room == 31 && !vars.tracabartpeeg) { @@ -622,6 +578,19 @@ update { vars.tracabartpeeg = true; // reset splits so that they can be triggered the next time Chapter 2 is opened } + + if(old.room == 279) { // chapter select room + if(current.room == 281) { // chapter 1 initialization room + if(vars.chapter == 0) vars.pointersUsed = 1; + vars.DebugPrint(vars.chapter != 1 ? "CHAPTER " + vars.chapter + " -> 1" : "CHAPTER 1 - Returning to Title"); + vars.chapter = 1; + } + else if(current.room == 11) { // chapter 2 initialization room + if(vars.chapter == 0) vars.pointersUsed = 2; + vars.DebugPrint(vars.chapter != 2 ? "CHAPTER " + vars.chapter + " -> 2" : "CHAPTER 2 - Returning to Title"); + vars.chapter = 2; + } + } } } @@ -722,11 +691,11 @@ split { continue; // is there a current fight requirement? - if ((vars.splits[splitKey][currentFight] != -1) && (vars.fightPointer != vars.splits[splitKey][currentFight])) + if ((vars.splits[splitKey][currentFight] != -1) && (version == "v1.12 - v1.15" || current.fight != vars.splits[splitKey][currentFight])) continue; // is there an old fight requirement? - if ((vars.splits[splitKey][oldFight] != -1) && (vars.fightPointerOld != vars.splits[splitKey][oldFight])) + if ((vars.splits[splitKey][oldFight] != -1) && (version == "v1.12 - v1.15" || current.fight != vars.splits[splitKey][oldFight])) continue; // is there a special flag requirement? From 0f41b4a339c3f144f6c547e87fa61e893985437c Mon Sep 17 00:00:00 2001 From: NERS1111 <85985080+NERS1111@users.noreply.github.com> Date: Sun, 19 Feb 2023 16:43:10 +0200 Subject: [PATCH 07/10] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index eab37c5..4d546c5 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ Autosplitter for DELTARUNE (SURVEY_PROGRAM, 1.08 to 1.10, 1.12 to 1.15) Inspired by [Narry's Autosplitter](https://drive.google.com/file/d/1SCpuUpDgIYHmbc6xKK3ZrNk1zaIeDUMq/view?usp=sharing) based on Glacia's Undertale autosplitter (But I don't understand everything so I made my own) **Autosplitting may not always be frame-perfectly accurate** +**Fight autosplits do not work for v1.12 - v1.15** Don't forget to configure your settings before using it. Timer pausing between chapters for All Chapters is available and it is the only setting turned on by default. From 1baff024b389a966ed2cbbdc64247ba14e635d28 Mon Sep 17 00:00:00 2001 From: NERS1111 <85985080+NERS1111@users.noreply.github.com> Date: Sun, 19 Feb 2023 16:43:31 +0200 Subject: [PATCH 08/10] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 4d546c5..bb8e121 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,7 @@ Autosplitter for DELTARUNE (SURVEY_PROGRAM, 1.08 to 1.10, 1.12 to 1.15) Inspired by [Narry's Autosplitter](https://drive.google.com/file/d/1SCpuUpDgIYHmbc6xKK3ZrNk1zaIeDUMq/view?usp=sharing) based on Glacia's Undertale autosplitter (But I don't understand everything so I made my own) -**Autosplitting may not always be frame-perfectly accurate** -**Fight autosplits do not work for v1.12 - v1.15** +**Autosplitting may not always be frame-perfectly accurate + fight autosplits do not work for v1.12 - v1.15** Don't forget to configure your settings before using it. Timer pausing between chapters for All Chapters is available and it is the only setting turned on by default. From 758937e8f4a9a2e1608da02990d2e3b36e2eedbd Mon Sep 17 00:00:00 2001 From: NERS1111 <85985080+NERS1111@users.noreply.github.com> Date: Wed, 22 Feb 2023 12:27:01 +0200 Subject: [PATCH 09/10] Changed SURVEY_PROGRAM auto end back to halt state --- Deltarune.asl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Deltarune.asl b/Deltarune.asl index ac9c3ad..c056d9c 100644 --- a/Deltarune.asl +++ b/Deltarune.asl @@ -48,8 +48,6 @@ state("Deltarune", "SURVEY_PROGRAM") { uint room : "Deltarune.exe", 0x6AC9F0; // globals - string128 textboxMsg : "Deltarune.exe", 0x48BDEC, 0x6C, 0x178, 0x60, 0x10, 0x208, 0x0, 0x0, 0x0; - double money : "Deltarune.exe", 0x48E5DC, 0x27C, 0x488, 0x470; double fight : "Deltarune.exe", 0x48E5DC, 0x27C, 0x488, 0x490; double plot : "Deltarune.exe", 0x48E5DC, 0x27C, 0x488, 0x500; @@ -63,6 +61,9 @@ state("Deltarune", "SURVEY_PROGRAM") { // Finding reliable pointers to these values is really weird so here's a few paths that appear to cover all the test cases Narry found so we don't need to use a sigscan double jevilDance : "Deltarune.exe", 0x48BDEC, 0x78, 0x60, 0x10, 0x10, 0x0; double jevilDance2 : "Deltarune.exe", 0x48BDEC, 0x7C, 0x60, 0x10, 0x10, 0x0; + + double finalTextboxHalt : "Deltarune.exe", 0x48BDEC, 0x98, 0x60, 0x10, 0x274, 0x0; + double finalTextboxHalt2 : "Deltarune.exe", 0x48BDEC, 0x9C, 0x60, 0x10, 0x274, 0x0; } startup { @@ -808,7 +809,7 @@ split { pass = (current.filechoice > 2); break; case 2: // Ch1_Ending (SURVEY) - pass = ((old.textboxMsg == @"* (ねむることにした)/%" || old.textboxMsg == @"* (You decided to go to bed.)/%") && current.textboxMsg == null); + pass = (((old.finalTextboxHalt == 2 && current.finalTextboxHalt != 2) || (old.finalTextboxHalt2 == 2 && current.finalTextboxHalt2 != 2)) && current.choicer == 0); break; case 3: // Ch1_KeyFixed pass = vars.checkKeyItems(5); From 026ae156aabce7bfa498e86f8d67c2d07fcfa6a6 Mon Sep 17 00:00:00 2001 From: NERS1111 <85985080+NERS1111@users.noreply.github.com> Date: Wed, 22 Feb 2023 12:32:26 +0200 Subject: [PATCH 10/10] added last card castle room exit (poncini request) --- Deltarune.asl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Deltarune.asl b/Deltarune.asl index c056d9c..f241865 100644 --- a/Deltarune.asl +++ b/Deltarune.asl @@ -182,6 +182,7 @@ startup { settings.Add("Ch1_Shopping", false, "After the shop, before K Round", "Ch1_CardCastle"); settings.Add("Ch1_Throne_Enter", false, "Entering Card Castle's Throne room", "Ch1_CardCastle"); settings.Add("Ch1_Throne_Exit", true, "Exiting Card Castle's Throne room", "Ch1_CardCastle"); + settings.Add("Ch1_LastCastleRoom_Exit", false, "Exiting Card Castle's L shaped room", "Ch1_CardCastle"); settings.Add("Ch1_King_EndBattle", false, "End King Battle (< v1.12)", "Ch1_CardCastle"); settings.Add("Ch1_King_ExitBattleRoom", true, "Exit King Battle Room", "Ch1_CardCastle"); settings.Add("Ch1_Ending", true, "Ending"); @@ -355,6 +356,7 @@ init { {"Ch1_Shopping", new object[] {false, -1, 406, -1, -1, -1}}, {"Ch1_Throne_Enter", new object[] {false, -1, 407, -1, -1, -1}}, {"Ch1_Throne_Exit", new object[] {false, 407, 408, -1, -1, -1}}, + {"Ch1_LastCastleRoom_Exit", new object[] {false, 408, 409, -1, -1, -1}}, {"Ch1_King_EndBattle", new object[] {false, -1, 409, 1, 0, -1}}, {"Ch1_King_ExitBattleRoom", new object[] {false, 409, 410, -1, -1, -1}}, @@ -496,6 +498,7 @@ init { {"Ch1_Shopping", new object[] {false, -1, -1, 123, 125, -1, -1, -1}}, {"Ch1_Throne_Enter", new object[] {false, -1, -1, 125, 126, -1, -1, -1}}, {"Ch1_Throne_Exit", new object[] {false, -1, -1, 126, 127, -1, -1, -1}}, + {"Ch1_LastCastleRoom_Exit", new object[] {false, -1, -1, 127, 128, -1}}, {"Ch1_King_EndBattle", new object[] {false, -1, -1, -1, 128, 1, 0, -1}}, {"Ch1_King_ExitBattleRoom", new object[] {false, -1, -1, 128, 129, -1, -1, -1}}, @@ -563,8 +566,7 @@ update { if (current.room != old.room) { vars.DebugPrint("ROOM " + old.room + " -> " + current.room); - if(version != "SURVEY_PROGRAM" && timer.IsGameTimePaused == true && (settings["Ch1_Ch2_PauseTimer"] || settings["Ch1_Ch2_PauseTimerOST"] || settings["Ch2_Ch2_PauseTimer"]) && current.room == 28) - { + if(version != "SURVEY_PROGRAM" && timer.IsGameTimePaused == true && (settings["Ch1_Ch2_PauseTimer"] || settings["Ch1_Ch2_PauseTimerOST"] || settings["Ch2_Ch2_PauseTimer"]) && current.room == 28) { vars.DebugPrint("ALL CHAPTERS: Chapter 2 started, timer resumed"); timer.IsGameTimePaused = false; } @@ -720,7 +722,6 @@ split { Jevil has a variable named dancelv which sets the sprite/animation he's using 0 - Default, 1 - Bounce, 2 - Sad, 3 - Teleports, 4 - Dead We use this to determine when he's been pacified - The pointers for him are really weird unfortunately I couldn't find one that would work if you died to him or returned to title before the fight */ pass = (current.jevilDance == 4); break;