Skip to content

Instantly share code, notes, and snippets.

View jbzdarkid's full-sized avatar

Joseph Blackman jbzdarkid

  • Microsoft
  • Washington
View GitHub Profile
@jbzdarkid
jbzdarkid / test_stones_early_fail.c
Created February 25, 2021 05:40
The Witness logic for handling for 3-color triple
Entity_Machine_Panel* panel;
bool shouldSolve = false;
Entity_Record_Player* recordPlayer = get_record_player(panel->entity_manager)
if (recordPlayer != NULL) {
if (strings_match(panel->pattern_name, recordPlayer->lotus_onlyone_tricolor_solvable_name)) {
shouldSolve = true;
}
}
do {
function TryRandomBattle() {
if (_root.noBattles || !IsPC() || actions.length > 0 || _root.freeze || _root.conv._visible || CheatVars.BATOG) {
return undefined;
}
tile = getTile(_parent._x, _parent._y);
var chance = Math.random() * (150 - risk);
if (chance <= _root.btlChance && _root.btlChance != 0 && GameData.steps >= 30 || _root.forceBattle) {
if (_root.forceBattle) {
_root.forceBattle = false;
}
@jbzdarkid
jbzdarkid / Livesplit.BattleBlockTheater.asl
Last active January 19, 2018 08:01
Autosplitter for BattleBlock Theater
// Animation IDs:
// 0: Standing, changing weapon
// 1: Running
// 2: Ducking
// 3: Falling after double jump
// 4: Teleporting
// 5: Falling after no jump
// 14: Wall sliding
// 15: Drowning
// 18: Water paddle
@jbzdarkid
jbzdarkid / Livesplit.Braid.asl
Last active December 20, 2017 06:47
Autosplitter for Braid
state("braid", "steam") {
int world : 0x1F718C;
int level : 0x1F7190;
bool flagPole : 0x1F942C;
int gameFrames : 0x1F9434;
}
state("braid", "standalone") {
int world : 0x1F110C;
int level : 0x1F1110;
@jbzdarkid
jbzdarkid / Livesplit.TheWitness.asl
Last active February 26, 2018 03:35
Autosplitter for The Witness
state("witness64_d3d11") {}
// TODO: "Split on lasers" should actually split on lasers
// TODO: Entity_Machine_Panel::init_pattern_data_lotus
// TODO: globals, 18, BFF*8, 100/108, 0 (text) -> triple which is valid
startup {
// Environmental puzzles/patterns, the +135
settings.Add("Split on environmental patterns", false);
// Tracked via obelisks, which report their counts
// TODO (for the adventurous):
// 1. Find splits for some non-cutscene events (Batman suit, disabling disruptors)
// 2. Find a way to fix the Joker Cutscene being removed from timing
// 3. Find a way to identify the current cutscene to allow users to choose which they want to split on
state("BatmanAC") {
int cutscenePlaying : "BatmanAC.exe", 0x12CAB74; // Out-of engine cutscenes
int inMainMenu : "BatmanAC.exe", 0x151BF2C;
int isLoading : "BatmanAC.exe", 0x1179F90; // Loading via black screen, i.e. area change
int isRestartingCheckpoint : "BatmanAC.exe", 0x12D0848, 0x90, 0x788, 0x17C, 0x314, 0x14; // Holds 1 if restarting, any value o.w.
int fightingClayface : "BatmanAC.exe", 0x151BBF4;
@jbzdarkid
jbzdarkid / LiveSplit.TheTalosPrinciple.asl
Last active January 28, 2018 20:49
Autosplitter for The Talos Principle
state("Talos") {}
// TODO: Splitter doesn't restart when resetting from a terminal? Confirmed, but what to do about it?
// https://www.twitch.tv/videos/217795611?t=01h20m20s
// TODO: "Split when returning to nexus" triggered in A5? https://www.twitch.tv/videos/217795611?t=01h24m27s
startup {
// Commonly used, defaults to true
settings.Add("Don't start the run if cheats are active", true);
settings.Add("Split on return to Nexus or DLC Hub", true);
settings.Add("Split on tetromino tower doors", true);
# -*- coding: utf-8 -*-
from zipfile import ZipFile
from os import sep
from re import findall, sub
dialogues = '''
TermDlg.CLI_Global.Ln0013.0.text.LoadingLibraryOSW1W1
TermDlg.ElevatorFloors.Ln0004.0.text.DetectingAuxiliaryHardware
>
~TermDlg.Common.List