state("RPG_RT", "steam") { int levelid : 0xD2068, 0x4; int posX : 0xD2014, 0x14; int posY : 0xD2014, 0x18; int switchesPtr : 0xD2008, 0x20; int varsPtr : 0xD2008, 0x28; bool start : 0xD1E08, 0x8, 0x14, 0x70; int frames : 0xD2008, 0x8; int eventID : 0xD202C, 0x4, 0x8, 0x4, 0x0, 0x1C; // Image properties, used for ending detection bool image5 : 0xD2010, 0x8, 0x4, 0x10, 0xC, 0x609; int image5Transparency : 0xD2010, 0x8, 0x4, 0x10, 0xA4; bool image40 : 0xD2010, 0x8, 0x4, 0x9C, 0xC, 0x609; int blackTransparency : 0xD2010, 0x8, 0x4, 0xA4, 0xA4; } startup { vars.Log = (Action)((output) => print("[Ib ASL] " + output)); vars.NUM_SWITCHES = 910; vars.NUM_VARIABLES = 120; int[][] transitions = new int[][] { new int [] {05, 10}, new int [] {11, 14}, new int [] {14, 18}, new int [] {25, 26}, new int [] {32, 34}, new int [] {35, 33}, new int [] {46, 48}, new int [] {51, 48}, new int [] {54, 55}, new int [] {72, 76}, new int [] {96, 97}, }; vars.transitions = transitions; string[] transitionNames = new string[] { "Gallery", "Blue", "Green", "Yellow", "Red", "Maze", "Grey", "Separation", "Violet", "Brown", "Sketchbook" }; settings.Add("splitArea", true, "Split on finishing area"); for (int i=0;i " + current.levelid); } } start { // Start when start flag becomes true, but only on main menu (switchesPtr is 0 on menu) if (current.start && !old.start && current.switchesPtr == 0){ vars.Log("Starting timer"); vars.startFrames = current.frames; vars.PORFadeCount = 0; return true; } } split { // -- INTERMEDIARY -- // Split on finishing each zone if (old.levelid != current.levelid){ for (int i=0;i 0 && old.blackTransparency == 0){ // Together Forever if (current.levelid == 1 && current.eventID == 16){ vars.Log("Ending: Together Forever"); return true; } // Promise of Reunion if (current.levelid == 56){ if (vars.PORFadeCount < 2){ vars.PORFadeCount++; }else{ vars.Log("Ending: Promise of Reunion"); return true; } } } } reset { if (current.frames < old.frames && old.frames != vars.startFrames){ vars.Log("Resetting"); return true; } }