Skip to content

Instantly share code, notes, and snippets.

@apple1417
apple1417 / Readme.md
Last active July 6, 2024 00:57
All Willow SDK Mods

Downloaded 2024-06-06 at about 10am UTC.

URLs and names are originally sourced from https://bl-sdk.github.io/mods.json. Several needed manual fixups to point directly at the archive to download.

Five mods couldn't get a valid url, and thus are left empty:

  • BL2 Exodus + TPS Exodus - these point to Nexus mods, which don't allow downloads without registering, not something you can do from a script.
  • Chronos, HitSounds, PizzaForFastball - these point at an __init__.py directly and have no archive. I made an archive containing their mod folder, to let the next scripts work better with them.

The urls in archives.csv should work for the rest.

<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="42">
<CheatEntries>
<CheatEntry>
<ID>2890</ID>
<Description>"World"</Description>
<ShowAsHex>1</ShowAsHex>
<ShowAsSigned>0</ShowAsSigned>
<VariableType>Array of byte</VariableType>
<ByteLength>0</ByteLength>
@apple1417
apple1417 / dump_gvas.py
Last active December 14, 2023 23:12
Talos 2 GVAS save file dumper
#! /usr/bin/env python3
# ruff: noqa: D102, D103
from __future__ import annotations
import struct
from collections.abc import Mapping, Sequence
from dataclasses import dataclass, field
from datetime import datetime, timedelta
from enum import Enum
@apple1417
apple1417 / proton_debugging.md
Created May 8, 2023 05:04
Debugging Games Running Under Proton in VSCode

Debugging Games Running Under Proton

These are the steps I've been following to debug games under proton (or rather debug a mod loaded into the game via dll shadowing). It works ok, it's not amazing, but it's the best I've managed to work out.

To start, use a known good build and just get the game running stably. You don't want to be messing with proton options at the same time.

Once the game runs, add PROTON_DUMP_DEBUG_COMMANDS=1 %command% to your launch args, and run it once. This will create a bunch of files in /tmp/proton_$USER/, which dump the entire proton

@apple1417
apple1417 / blackmarkets.py
Last active May 13, 2023 06:03
simulate bl3 black market locations/pools
import struct
from datetime import datetime, timedelta
# See this sheet for what locations these actually line up to
# https://docs.google.com/spreadsheets/d/1RFsSUkvAmFWdS_b5Umfl9hDRUfcTLcRcA3kBUAN1nFY/edit#gid=0
SPAWNERS = (
"/Game/PatchDLC/SubmapPatch/Maps/Zone_0/Prologue/Prologue_SubmapPatch.Prologue_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_0/Prologue/Prologue_SubmapPatch.Prologue_SubmapPatch:PersistentLevel.OakSpawner_0",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_0/Prologue/Prologue_SubmapPatch.Prologue_SubmapPatch:PersistentLevel.OakSpawner_1",
"/Game/PatchDLC/SubmapPatch/Maps/Zone_0/Sacrifice/Sacrifice_SubmapPatch.Sacrifice_SubmapPatch:PersistentLevel.OakSpawner_5",
@apple1417
apple1417 / unreal_introspection.md
Last active May 10, 2023 23:49
Crash Course in Unreal Engine Introspection

In Dismissal of Datatables

Datatables have a multitude of issues, making them completely unsuitable for data mining, reverse engineering and modding. Rather than using datatables, you should always go back to the source, and extract values (or mod them to new ones) from there.

/* Move findbar to top right */
.browserContainer > findbar {
position: absolute;
top: -1px;
right: 0px;
contain: content;
border-radius: 0 0 var(--toolbarbutton-border-radius) var(--toolbarbutton-border-radius);
}
/* Hide status */
@apple1417
apple1417 / background.md
Last active August 30, 2022 08:49
Universal Borderlands Mod File Format

Background

The existing Borderlands mod file formats kind of suck, so let's come up with a new one.

Issues with the BLCMM file format

  • They look like xml, but have completely custom escape logic (see here)
  • Due to the above, very easy to "corrupt" files if you start getting into edge cases
  • Not the most human readable
  • Overly restrictive about what is and isn't allowed to be in a command (to try avoid the above edge cases, though it fails)
import unrealsdk
import csv
from typing import Dict, Set
INVBAL_CLS_BLACKLIST = (
"CustomizationInventoryBalanceData",
"InventoryBalanceData_Generated",
"VaultCardRewardBalanceData",
)
INVDATA_CLS_BLACKLIST = (