state("Cars", "EN") { int gameState : 0x3C5D44, 0x8; // 1 on Main Menu, 0 on Opening Cutscene, works on compatibility mode int trophyCount : 0x3C38DC, 0x28; // Running total of gained trophies int inRace : 0x3B5CE4, 0x10, 0x10, 0x10, 0x2D8, 0x14, 0xC, 0x8C; // 0 on completion of Race, 1 during Race, 2 on Countdown, -1 in Hub World int loadScreen : 0x3C38E8, 0x30, 0x4C; // 1 whilst loading, else 0 } state("Cars", "FR") { int gameState : 0x3C6D44, 0x8; // 1 on Main Menu, 0 on Opening Cutscene, works on compatibility mode int trophyCount : 0x3C48DC, 0x28; // Running total of gained trophies int inRace : 0x3B6CE4, 0x10, 0x10, 0x10, 0x2D8, 0x14, 0xC, 0x8C; // 0 on completion of Race, 1 during Race, 2 on Countdown, -1 in Hub World int loadScreen : 0x3C48E8, 0x30, 0x4C; // 1 whilst loading, else 0 } state("Cars", "DE") { int gameState : 0x3C7ED4, 0x8; // 1 on Main Menu, 0 on Opening Cutscene, works on compatibility mode int trophyCount : 0x3C5A6C, 0x28; // Running total of gained trophies int inRace : 0x3B7E74, 0x10, 0x10, 0x10, 0x2D8, 0x14, 0xC, 0x8C; // 0 on completion of Race, 1 during Race, 2 on Countdown, -1 in Hub World int loadScreen : 0x3C5A78, 0x30, 0x4C; // 1 whilst loading, else 0 } state("Cars", "ES") { int gameState : 0x3C6F14, 0x8; // 1 on Main Menu, 0 on Opening Cutscene, works on compatibility mode int trophyCount : 0x3C4AAC, 0x28; // Running total of gained trophies int inRace : 0x3B6EB4, 0x10, 0x10, 0x10, 0x2D8, 0x14, 0xC, 0x8C; // 0 on completion of Race, 1 during Race, 2 on Countdown, -1 in Hub World int loadScreen : 0x3C4AB8, 0x30, 0x4C; // 1 whilst loading, else 0 } state("Cars", "NO") { int gameState : 0x3C5D44, 0x8; // 1 on Main Menu, 0 on Opening Cutscene, works on compatibility mode int trophyCount : 0x3C38DC, 0x28; // Running total of gained trophies int inRace : 0x3B5CE4, 0x10, 0x10, 0x10, 0x2D8, 0x14, 0xC, 0x8C; // 0 on completion of Race, 1 during Race, 2 on Countdown, -1 in Hub World int loadScreen : 0x3C38E8, 0x30, 0x4C; // 1 whilst loading, else 0 } state("Cars", "PL") { int gameState : 0x3C5D44, 0x8; // 1 on Main Menu, 0 on Opening Cutscene, works on compatibility mode int trophyCount : 0x3C38DC, 0x28; // Running total of gained trophies int inRace : 0x3B5CE4, 0x10, 0x10, 0x10, 0x2D8, 0x14, 0xC, 0x8C; // 0 on completion of Race, 1 during Race, 2 on Countdown, -1 in Hub World int loadScreen : 0x3C38E8, 0x30, 0x4C; // 1 whilst loading, else 0 } state("Cars", "IT") { int gameState : 0x3C5D44, 0x8; // 1 on Main Menu, 0 on Opening Cutscene, works on compatibility mode int trophyCount : 0x3C38DC, 0x28; // Running total of gained trophies int inRace : 0x3B5CE4, 0x10, 0x10, 0x10, 0x2D8, 0x14, 0xC, 0x8C; // 0 on completion of Race, 1 during Race, 2 on Countdown, -1 in Hub World int loadScreen : 0x3C38E8, 0x30, 0x4C; // 1 whilst loading, else 0 } state("Cars", "NL") { int gameState : 0x3C6F14, 0x8; // 1 on Main Menu, 0 on Opening Cutscene, works on compatibility mode int trophyCount : 0x3C4AAC, 0x28; // Running total of gained trophies int inRace : 0x3B6EB4, 0x10, 0x10, 0x10, 0x2D8, 0x14, 0xC, 0x8C; // 0 on completion of Race, 1 during Race, 2 on Countdown, -1 in Hub World int loadScreen : 0x3C4AB8, 0x30, 0x4C; // 1 whilst loading, else 0 } state("Cars", "DK") { int gameState : 0x3C5D44, 0x8; // 1 on Main Menu, 0 on Opening Cutscene, works on compatibility mode int trophyCount : 0x3C38DC, 0x28; // Running total of gained trophies int inRace : 0x3B5CE4, 0x10, 0x10, 0x10, 0x2D8, 0x14, 0xC, 0x8C; // 0 on completion of Race, 1 during Race, 2 on Countdown, -1 in Hub World int loadScreen : 0x3C38E8, 0x30, 0x4C; // 1 whilst loading, else 01 } state("Cars", "SE") { int gameState : 0x3C5D44, 0x8; // 1 on Main Menu, 0 on Opening Cutscene, works on compatibility mode int trophyCount : 0x3C38DC, 0x28; // Running total of gained trophies int inRace : 0x3B5CE4, 0x10, 0x10, 0x10, 0x2D8, 0x14, 0xC, 0x8C; // 0 on completion of Race, 1 during Race, 2 on Countdown, -1 in Hub World int loadScreen : 0x3C38E8, 0x30, 0x4C; // 1 whilst loading, else 01 } state("Cars", "PT") { int gameState : 0x3C6F14, 0x8; // 1 on Main Menu, 0 on Opening Cutscene, works on compatibility mode int trophyCount : 0x3C4AAC, 0x28; // Running total of gained trophies int inRace : 0x3B6EB4, 0x10, 0x10, 0x10, 0x2D8, 0x14, 0xC, 0x8C; // 0 on completion of Race, 1 during Race, 2 on Countdown, -1 in Hub World int loadScreen : 0x3C4AB8, 0x30, 0x4C; // 1 whilst loading, else 0 } state("Cars", "FI") { int gameState : 0x3C5D44, 0x8; // 1 on Main Menu, 0 on Opening Cutscene, works on compatibility mode int trophyCount : 0x3C38DC, 0x28; // Running total of gained trophies int inRace : 0x3B5CE4, 0x10, 0x10, 0x10, 0x2D8, 0x14, 0xC, 0x8C; // 0 on completion of Race, 1 during Race, 2 on Countdown, -1 in Hub World int loadScreen : 0x3C38E8, 0x30, 0x4C; // 1 whilst loading, else 0 } state("Cars", "SU") { int gameState : 0x3C6D44, 0x8; // 1 on Main Menu, 0 on Opening Cutscene, works on compatibility mode int trophyCount : 0x3C48DC, 0x28; // Running total of gained trophies int inRace : 0x3B6CE4, 0x10, 0x10, 0x10, 0x2D8, 0x14, 0xC, 0x8C; // 0 on completion of Race, 1 during Race, 2 on Countdown, -1 in Hub World int loadScreen : 0x3C48E8, 0x30, 0x4C; // 1 whilst loading, else 0 } startup { refreshRate = 30; settings.Add("loadRemover", false, "Load Remover"); settings.SetToolTip("loadRemover", @"Allows for loadless timing when ''Game Time'' is selected under ''Compare Against'' in livesplit"); } init { //refreshRate = 30; // Game runs at 30FPS, default refresh of 60 (the default) is excessive // Version checking. print("ModuleMemorySize: " + modules.First().ModuleMemorySize.ToString()); // Lets DebugView show the ModuleMemorySize of the executable byte[] exeMD5HashBytes = new byte[0]; using (var md5 = System.Security.Cryptography.MD5.Create()) { using (var s = File.Open(modules.First().FileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { exeMD5HashBytes = md5.ComputeHash(s); } } var MD5Hash = exeMD5HashBytes.Select(x => x.ToString("X2")).Aggregate((a, b) => a + b); print("MD5Hash: " + MD5Hash.ToString()); // Lets DebugView show the MD5Hash of theexecutable switch (MD5Hash.ToString()) { case "7BC85EB15381F4D96124965D7E232209": // English exe version = "EN"; break; case "A170ADB5508F8E0EA331707AA5369826": // French exe version = "FR"; break; case "B07888CFB1B6760FBC5F6C5E0642938F": // German exe version = "DE"; break; case "39F39FECF11FCAB959818968F6144478": // Spanish exe version = "ES"; break; case "6A27C7C8108D25EF7B39AEE75825B942": // Norweigan exe version = "NO"; break; case "A5481EB0D517A84D170293B1C08A13EF": // Polish exe version = "PL"; break; case "57EC8EADD0B33CF2395F7B17E411B1A8": // Italian exe version = "IT"; break; case "258264302FEC29B1626FECE9CE61C787": // Dutch exe version = "NL"; break; case "25DC2E03A49C23201D62FF5CAA677E8B": // Danish exe version = "DK"; break; case "8845F0ECABCF98A6B6852BB7B94A8E19": // Swedish exe version = "SE"; break; case "11742131039810613299C44D424FCA8F": // Portuguese exe version = "PT"; break; case "FAC76F0BE2A8B20294C7EED2C1072AA4": // Finnish exe version = "FI"; break; case "937AB1102AF423CE8C6F3166F1EBE317": // steamunlocked version = "SU"; break; } } update { if (current.loadScreen == 1) { vars.hasSplit = 0; } } split { if(current.inRace == 0 && old.inRace == 1) // Splits on the frame you cross the line { vars.hasSplit = 1; return true; } else if (current.trophyCount > old.trophyCount && vars.hasSplit == 0) // Splits if trophy count increases out of race (luigi, tractor tipping etc) { return true; } } start { if (old.gameState == 1 && current.gameState == 0 && old.trophyCount == 0 && current.trophyCount == 0) { return true; } } reset { if (old.gameState == 1 && current.gameState == 0 && old.trophyCount == 0 && current.trophyCount == 0) { return true; } } isLoading { if (settings["loadRemover"]) { return current.loadScreen == 1; } }