Skip to content

Instantly share code, notes, and snippets.

View kaptain-kavern's full-sized avatar
🤠
Back at RimWorld modding

KapTaiN KaVerN kaptain-kavern

🤠
Back at RimWorld modding
  • Rouen, France
View GitHub Profile
@cobyism
cobyism / gh-pages-deploy.md
Last active April 18, 2024 13:44
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

<Patch>
<Operation Class="PatchOperationReplace">
<xpath>//HediffDef[defName = "Heatstroke"]/lethalSeverity</xpath>
<value>
<lethalSeverity>0.1</lethalSeverity>
</value>
</Operation>
<Operation Class="PatchOperationInsert">
@Zhentar
Zhentar / patchoperation.md
Last active November 12, 2023 23:06
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>