Skip to content

Instantly share code, notes, and snippets.

@tmpbased
tmpbased / bencode.lisp
Created September 12, 2017 10:35
bencode decoder
;;; https://gist.github.com/osa1/2021424
(in-package :cl-user)
(defpackage bencode
(:use :cl)
(:export :decode))
(in-package #:bencode)
{
Copy records with (possibly localized) text from selected plugin(s) to a new file, to
then replace that text with master's.
Can be used for lighting overhauls. Select lighting plugins with Ctrl+Click in TES5Edit
and apply this script. Created new patch file must be loaded last and recreated every
time you uninstall/reorder/update master plugins.
}
unit UserScript;
const debug = False;
public class Configuration_OriginalStrings
{
[Tooltip("Export original texts (w/o translation overrides) for later processing.")]
public bool Export { get; set; } = true;
[Tooltip("The plugins (that have been translated by overriding STRINGS files) from which the original (english) texts are to be exported. Translation overrides should be temporary removed/disabled.")]
public List<ModKey> Plugins { get; set; } = new()
{
"Skyrim.esm",
"Update.esm",