Skip to content

Instantly share code, notes, and snippets.

View Yandols's full-sized avatar

Yandols Z'eon X Yandols

View GitHub Profile
@Zhentar
Zhentar / patchoperation.md
Last active April 27, 2026 02:04
Introduction to PatchOperation

There are 11 new "PatchOperation" actions we can perform to modify Defs without copying the whole thing. This in turn improves mod compatability dramatically - it allows two mods to modify different parts of the same Def without conflict. This guide only describes the basics of each operation available to us.

Patches go in xml files in a subfolder named "Patches" in your mod folder (So "MyMod\Patches", just like you might have "MyMod\Defs" or "MyMod\Textures"). Example.

Each PatchOperation has an "xpath" node, which should contain an xpath selector for the xml node(s) that the operation should affect. This is not an xpath tutorial. If you don't know xpath, not my problem. But minimurgle has you covered!

To illustrate the operations, I'll use this simple example def:

  <DesignationCategoryDef>
@Yandols
Yandols / icarus-imeji.sxcu
Last active July 30, 2019 11:45
Updated ShareX integration for Icarus Imeji Uploader at https://imeji.yandols.xyz
{
"Version": "12.4.1",
"Name": "Icarus Imeji Uploader Service",
"DestinationType": "ImageUploader",
"RequestMethod": "POST",
"RequestURL": "https://imeji.yandols.xyz/upload.php",
"Headers": {
"Authorization": "c2VraWhvdV8xOTA3RTA4QGltZWppX3ZhcmllZF9zdHJlYW1fdXBsb2Fk"
},
"Body": "MultipartFormData",
@Yandols
Yandols / fedora-autorestart-guide.txt
Last active July 23, 2016 07:50
Autorestarting on Fedora / systemd
How to make Red auto restart in case of crash, using systemd. This guide assumes you used the Fedora guide to install Red.
Run this command in terminal:
sudo nano /etc/systemd/system/multi-user.target.wants/red.service
Next, paste the following script (not including the lines), replace all instances of "username" with your fedora account name and "usergroup" with your user’s group (usually the same as the username, but you can check with 'groups username' in the terminal.)
-----------------------------------------------------------
[Unit]
Description=Red-DiscordBot Background Service