Skip to content

Instantly share code, notes, and snippets.

@i30817
i30817 / mkwin9xfs.sh
Last active September 25, 2025 12:05
dosbox FAT16/FAT32 image disk creator and expander\shrinker. Doesn't clone the windows system partition correctly (doesn't boot).
#!/usr/bin/env bash
ex=0
hash parted 2>/dev/null || { echo >&2 "Program requires parted but it's not installed."; ex=1; }
hash numfmt 2>/dev/null || { echo >&2 "Program requires numfmt but it's not installed."; ex=1; }
hash truncate 2>/dev/null || { echo >&2 "Program requires truncate but it's not installed."; ex=1; }
hash mcopy 2>/dev/null || { echo >&2 "Program requires mtools but it's not installed."; ex=1; }
hash sed 2>/dev/null || { echo >&2 "Program requires sed but it's not installed."; ex=1; }
[ "$ex" -eq "1" ] && exit 1
ME=$(basename "$0")
#!/usr/bin/bash
hash gedit 2>/dev/null || { echo >&2 "Program requires gedit to open the files right on the problem areas, but it's not installed. Aborting."; exit 1; }
echo "Script to help port Shadowrun Dragonfall UGCs to the Shadowrun Hong Kong engine, use it on the source directory of a dragonfall UGC. NOT a Hong Kong or SRR UGC and only the source not the compiled version"
[ ! -f "./project.cpack.txt" ] && { echo "Not called on a UGC source directory"; exit 0; }
grep -l 'project_name: "CFiC"' ./project.cpack.txt && {
Index: CQM/dlg/downtown la/damsel.dlg
===================================================================
--- CQM.orig/dlg/downtown la/damsel.dlg
+++ CQM/dlg/downtown la/damsel.dlg
@@ -1297,11 +1297,11 @@
{ 1297 }{ (Starting Condition) }{ }{ 751 }{ G.Player_Anarch == 1 and G.Story_State == 115 }{ }{ }{ }{ }{ }{ }{ }{ }
{ 1298 }{ (Starting Condition) }{ }{ 711 }{ G.Prince_Truce == 1 and G.Player_Anarch == 0 and G.Griffith_Open == 0 }{ }{ }{ }{ }{ }{ }{ }{ }
{ 1299 }{ (Starting Condition) }{ }{ 1031 }{ pc.GetQuestState("Bmagic") == 1 or pc.GetQuestState("Bmagic") == 6 }{ }{ }{ }{ }{ }{ }{ }{ }
-{ 1300 }{ (Starting Condition) }{ }{ 900 }{ G.Player_Anarch == 1 and G.Regent_Pissed < 3 and IsClan(pc,"Brujah") and G.Lost_Damsel_Quest < 1 and pc.GetQuestState("Bmagic") < 1 }{ }{ }{ }{ }{ }{ }{ }{ }
+{ 1300 }{ (Starting Condition) }{ }{ 900 }{ G.Player_Anarch == 1 and G.Regent_Pissed < 3 and G.Lost_Damsel_Quest < 1 and pc.GetQuestState("Bmagic") < 1 }{ }{ }{ }{ }{ }{ }{ }{ }
forums.sufficientvelocity.com##article[data-author="insert username here"]
forums.spacebattles.com##li[data-author="insert username here"]
@i30817
i30817 / git-branch-pull
Last active May 20, 2023 21:08
a navi (bash helper for automation) file to build some projects i build often which helps choose the branch to build and automates pulls
#!/bin/bash
ME=$(basename "$0")
function usage(){
cat >&2 <<ENDOFHELP
Usage: $ME [-h] [-c OPT1 -c OPT2...] [-m OPT1 -m OPT2...] [BRANCH_NAME]
$ME optionally updates a local branch from a upstream,
and assuming that there is a configure file and -s
is not passed, calls ./configure with arguments,
#!/usr/bin/env bash
hash parted 2>/dev/null || { echo >&2 "Program requires parted but it's not installed. Exit."; exit 1; }
hash udisksctl 2>/dev/null || { echo >&2 "Program requires udisksctl but it's not installed. Exit."; exit 1; }
hash fdisk 2>/dev/null || { echo >&2 "Program requires fdisk but it's not installed. Exit."; exit 1; }
hash mkdosfs 2>/dev/null || { echo >&2 "Program requires mkdosfs but it's not installed. Exit."; exit 1; }
hash numfmt 2>/dev/null || { echo >&2 "Program requires numfmt but it's not installed. Exit."; exit 1; }
hash truncate 2>/dev/null || { echo >&2 "Program requires truncate but it's not installed. Exit."; exit 1; }
hash mcopy 2>/dev/null || { echo >&2 "Program requires mtools but it's not installed. Exit."; exit 1; }
hash mattrib 2>/dev/null || { echo >&2 "Program requires mtools but it's not installed. Exit."; exit 1; }
hash dd 2>/dev/null || { echo >&2 "Program requires dd but it's not installed. Exit."; exit 1; }
@i30817
i30817 / create_m3u.sh
Last active November 4, 2025 17:38
create m3u for retroarch based on name
#!/usr/bin/env bash
me=$(basename "$0")
export me
function usage(){
cat >&2 <<ENDOFHELP
Usage: $me [-r|--relative] [-c|--children] [-h|--help] TARGET [DESTINATION]
$me examines rom media files in TARGET and subdirectories
and for each set of filenames that only differs from a media
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 472d69a..8225075 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -332,7 +332,22 @@ void ARX_Player_Rune_Add(RuneFlag _ulRune)
}
}
+ unsigned int v = player.rune_flags; // count the number of runes
+ unsigned int c;
#!/usr/bin/env python3
from struct import pack, unpack
from datetime import date
from pathlib import Path
import os.path
import argparse
import sys
import re
from typing import List