Misc game-related tweaks and tools that I tend to write
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



Just a collection of accumulated stuff in no particular order, to be able to link or remember stuff occasionally.

Scripts here pretty much always have some -h/--help option/output, with purpose/usage and all options documented there, as tend to write these down to avoid forgetting them myself.

Likely to be out of date to a various degree for most games/mods that get updates.


Sometimes needs a bunch of fixes and/or balancing tweaks for whatever weird and unexpected game scenario you end up with, though extra content mods are nice too.

Mods are for post-2.0 era.

  • Fast Cyborg Assimilation

    Cybernetic assimilation mechanics were clearly developed for either gestalt consciousness empires which have no politics, or egalitarian ones that have all species rights granted by default.

    Don't work well for authoritarian/xenophobe slavers, as this sets all assimilating pops "free" for a long time, and keep resetting rights for assimilated pops to "full citizenship" for no good reason.

    Simple workaround implemented in this mod is to make process fast enough to be less painful - more of a quick disruption than decades-long PITA.

  • Strike Craft as Fleet Support

    Rebalance mod for strike craft in Stellaris 2.0, making them into general "jack of all trades, master of none" fleet support weapon, good against all ship types without straight-up countering anything.

  • Microwarpdrives

    Adds technology and ship module similar to MWDs in EVE Online - hypercharged afterburners that have some combat penalties at the expense of even higher speed.

    Here they're mostly for logistical purposes - redeploy support ships faster between starbases or chase down pirates with an overwhelming fleet of lighter ships.

  • Glavius AI Sector Development Edicts

    Tweak for Glavius's Ultimate AI Megamod to allow more control over some annoying Sector AI decisions via empire/planetary edicts.

  • Free Sector Resource Drain

    Another simple (and likely temporary) tweak to fix weird cost on clicking "transfer resources" button for AI-managed sectors, making them less of a nuisance.

  • Tech Tier Numbers on Laser Icons

    Also a tiny graphics fix for tech icons on one branch missing proper tech tier identifiers.

  • Tech Tier Numbers on Tech Icons

    Icon tweak similar to previous one, adding tech tier number to icons for most techs that have a linear upgrade path.

  • Shadowrun Name List

    Extensive Name List from The Sixth World of Shadowrun cyberpunk dystopia universe.

    Pulled/generated by scripts from shadowrun.itemcards.com name generator.
    Scripts are in the repo alongside resulting list.
  • Sector AI Building Edicts

    Toggleable empire/planetary edicts which allow to veto some of the sector AI building decisions, e.g. prohibit it to build farms everywhere or on some subset of planets where it doesn't make sense.

  • track-mod-changes.py

    Script to run before starting Steam to track changes in all subscribed and local mods.

    Useful to spot recent mod changes that can potentially break the game or might be the cause for whatever weirdness suddenly happening there, as well as tracking whether these get up-to-date with the mainline patches.

  • combine-music-packs.py

    Script to parse all .asset/.txt/.yml files in music mods and combine all tracks from these into one mod, with track names having "mod-name :: title" format in in-game player.

    Using that with hundreds of tracks from mods will break in-game music player, as it turns out (will render overflow as blank playlist) - definitely not designed for that many :)


Great game, but found large-scale production required in late-game a bit too slow or tedious to setup or debug without bunch of repetition.

Easy to fix with mods though, which are one of the best parts of the game.

  • Burner Drill 4x4 Area

    Changes Burner Mining Drills to have 4x4 resource search area instead of default 2x2 (right under), and nothing else.

  • Will-o'-the-Wisps updated

    Compatibility update (for Factorio 0.16.x) and bunch of tweaks to Will-o'-the-Wisps mod by Betep3akata, which seem to be abandoned since 0.15.x. License: CC BY-NC-SA

  • Vehicle Cruise Control

    Adds GUI panel with buttons to toggle acceleration and brakes, so that you don't have to hold W or S.

  • ReducedResearchX

    Local mod to reduce all research costs by somewhat complicated formula, designed to keep early-game tech costs pretty-much as-is, but have massive reductions for late-game techs.

    Formula (python3 notation): cost = lambda v: (a + max(0,v-a)*b**(v/(v+c)))

    Chart for what costs end up being can be checked in doc/research-cost-chart.html

    Shows how late-game techs that cost 1k/2k/5k research units get down to ~300/500/1k, while early-game ones get much smaller to no reductions.

    Does not change research time by default, as it's not a bottleneck anyway.
    Based on simple "ReducedResearch" mod (~10 lines of lua), but with updated formula.
  • mod-list.yaml - list of mods from when I last played (should include base game version number) and backed it up.

  • blueprints.yaml - misc blueprints I came up with, esp. for defence units or stuff like circuit logic parts.

Useful companion links for the game:

Best use for production chain calculators (that I've found) is to know in advance how much basic resources (like copper and steel) to put into main belts for some desired output level, and how many assemblers/throughput it'd require.

Surviving Mars

Great sci-fi city builder, kinda like Outpost games of old, but with much lighter tone, and on Mars.

Minor quality-of-life and balancing lua tweaks, most of which only live in repo history, obsoleted by official game updates:

  • cheaper-consumer-items

    70% cheaper Art and Electronics shop consumables for crowded domes, as they really slow production down needlessly otherwise.

  • university-entrance-exams

    Bars mentally challenged colonists from studying in Martian University, leaving them in service jobs forever, where they can do relatively little harm.

  • no-border-scrolling

    For some reason it's extremely sensitive and annoying here, though maybe because I tend to move cursor from the window to tweak lua way too often.

  • place-mark-at-cursor

    Adds hotkeys to place colored hexes to mark locations anywhere on the map.
    Useful to remember or temporarily mark various building reach areas to plan stuff.
  • disable-maintenance-button

    Adds button to toggle whether drones will patch building up when maintenance is required.

  • green-mars-terraforming-lightmodel

    Covers mars terrain and atmosphere with greenish bioluminescent microbiotic life.

  • polymers-production-buff, unlock-oval-dome, quick-cash-refund

    More small local balancing hacks and local tweaks to other mods.

  • console

    Mod Editor console extension with a bunch of useful tools, like recursive pretty-printers, dumping stuff to files, running lua scripts from files and such.

    Requres bootstrap via initial console via c.init(load) command, to give access to full _G env for all subroutines there, c.h() for more info on all the tools there.

Darkest Dungeon: darkest-dungeon-save-manager.py

Cheat tool to backup DD save games, as it's too hardcore, random-bs and grindy for my tastes.

So simple fix is just to allow some (minor) save-scumming, which is what this tool does - allows to copy saved game state to multiple slots, like with any less hardcore game.


% ./darkest-dungeon-sm save
% ./darkest-dungeon-sm save some-slot-name

% ./darkest-dungeon-sm list
% ./darkest-dungeon-sm   # same thing

% ./darkest-dungeon-sm restore   # latest slot
% ./darkest-dungeon-sm restore some-slot-name
% ./darkest-dungeon-sm restore any-name-part
% ./darkest-dungeon-sm restore .5.

% ./darkest-dungeon-sm remove -n10   # show 10 oldest slots to cleanup
% ./darkest-dungeon-sm remove -n10 -x   # actually remove stuff

Remove some tension from the game for sure, if you know that the save is not that far-off, but at least it's playable that way.

Satellite Reign: sat-reign-pick-clone.py

Simple script to find clone id in savegame xml by specified parameters.

Mostly cosmetic thing - allows to transplant some game-important parameters into clone/agent with specific appearance, which was (maybe still is) cool because there are all sorts of fancy cyberpunk character models in that game, but you can't switch these for agents without sacrificing stats.


  • Pick whatever clone you want to use ingame, remember their stats.

  • Run tool to find id of that clone in savegame by stats:

    ./sat-reign-pick-clone.py 'h: 5, s: 9, hr: 0.05, e: 0, er: 0' sr_save.xml
  • Find that id in xml, paste stats from current (up-to-date) agent clone into weak clone with that id and appearance, so it'd be viable to use.

  • Load game and swap agent into that clone.

Anno 2070

City layouts and production chains, as that's pretty much all there is in that game, plus pretty graphics ofc.

  • layout-*.png

    City layout templates, probably nicked from wikia.
    For early techs this is kinda important, as costs are quite high there.
    Usually use large corridor layout for sprawling non-tech cities.
  • production-chains-best.{png,xcf}

    Production chain ratios, space requirements (production "field" count/size), and numbers for how much demand they satisfy, as getting them right through trial and error is very wasteful and hard to remember them all.

Kerbal Space Program (ksp)

Bunch of delta-V and aerobraking maps, along with some outdated mod tweaks.

OpenXCOM XPirateZ mod

Very extensive total conversion for OpenXCOM, and one of the best strategies of its type if complexity, longevity and rather slow pacing is your thing.

Fair warning though - art/text in that mod can get a bit weird.

  • piratez-melee-calc.html

    Web-based calculator tool for quick item comparison, mainly for melee item stats' calculations, as these get complicated quickly in this mod.

    Can be used with json cache file comitted in the repo via link above, otherwise just put html and generated json cache (see below) into same path and run html via browser.

    Intended use is to search and pick any number of currently-available weapons for comparison table, then plug unit stats at the top and pick whatever is best based on rough "dpu" value (power * accuracy / tu cost).

    Can calculate power/accuracy/dpu for ranged weapons that have formulas as well, but without taking range and all penalties associated with it into account.

    Based on an earlier curses-based linux console python calculator tool (which can be found in the repo history), translated to web-based to not be linux-specific.

    Uses json cache file generated from multiple ruleset/localization files of the mod by piratez-melee-calc.py script.

  • piratez-melee-calc.py

    Generates json cache files like piratez-melee-calc.json next to it in the repo.

    See -h/--help output there for option info, but basic usage goes something like this:

    % ./piratez-melee-calc.py cache.json \
      -r user/mods/Piratez/Ruleset/Piratez.rul \
      -m user/mods/Piratez/Ruleset/'Gun CqC'.rul \
      -l standard/xcom1/Language/en-US.yml \
      -l user/mods/Piratez/Language/en-US.yml

    piratez-extract-rulesets.sh helper script next to it basically does that for all XPiratez dirs under current one, extracting versioned/cleaned rulesets (to run diff on them) and creating json caches for each.

Misc Scripts

Helper scripts not related to specific games.

  • gog-unpack.sh

    Script to unpack GoG (gog.com) linux archives without running makeself and mojosetup.

    They seem to have [ N lines of makeself script ] || mojosetup.tar.gz || game.zip format, and script creates *.mojosetup.tar.gz and *.zip in the current directory from specified .sh pack, using only grep/head/tail coreutils.

    Usage: ./gog-unpack.sh /path/to/gog-game.sh

    Note that zip can have configuration and post-install instructions for mojosetup in it (under "scripts/"), plus misc assets like icons and such.