RimWorld

RimWorld

Realistic Humansounds HAR Patch
Yuka 19 Dec, 2022 @ 6:37am
How to patch it yourself
After fiddling with this a bit I understood how to patch a race to work with this patch.


First, find the HAR_Sounds_Patch.xml under the folder for this mod(1.3 or 1.4, then patches)

Open it, and it will contain this somewhere:

<!-- Kurin HAR Edition -->
<Operation Class="PatchOperationFindMod">
<mods><li>Kurin HAR Edition</li></mods>
<match Class="PatchOperationAdd">
<success>Always</success>
<xpath>/Defs/AlienRace.ThingDef_AlienRace[defName="Kurin_race"]/race/lifeStageAges/li[def="HumanlikeAdult"]</xpath>
<value>
<soundWounded>Pawn_Human_Wounded</soundWounded>
<soundDeath>Pawn_Human_Death</soundDeath>
<soundCall>Pawn_Human_Wounded</soundCall>
<soundAngry>Pawn_Human_Wounded</soundAngry>
</value>
</match>
</Operation>

But this is for HAR Edition, so it uses "Kurin_race" while deluxe edition uses "Kurin" and "Kimiri".
To make the sounds work on another race, replace the mod names and the race names in the above format by finding their defName in the mod's Thingdef Alienrace xml in the mod's respective folder.

For example, patching Kurin Deluxe if it's not working for you:




<!-- Kurin, The Three Tailed Fox [Deluxe Edition] -->
<Operation Class="PatchOperationFindMod">
<mods><li>Kurin, The Three Tailed Fox [Deluxe Edition]</li></mods>
<match Class="PatchOperationAdd">
<success>Always</success>
<xpath>/Defs/AlienRace.ThingDef_AlienRace[defName="Kurin"]/race/lifeStageAges/li[def="HumanlikeAdult"]</xpath>
<value>
<soundWounded>Pawn_Human_Wounded</soundWounded>
<soundDeath>Pawn_Human_Death</soundDeath>
<soundCall>Pawn_Human_Wounded</soundCall>
<soundAngry>Pawn_Human_Wounded</soundAngry>
</value>
</match>
</Operation>

<!-- Kurin, The Three Tailed Fox [Deluxe Edition] -->
<Operation Class="PatchOperationFindMod">
<mods><li>Kurin, The Three Tailed Fox [Deluxe Edition]</li></mods>
<match Class="PatchOperationAdd">
<success>Always</success>
<xpath>/Defs/AlienRace.ThingDef_AlienRace[defName="Kimiri"]/race/lifeStageAges/li[def="HumanlikeAdult"]</xpath>
<value>
<soundWounded>Pawn_Human_Wounded</soundWounded>
<soundDeath>Pawn_Human_Death</soundDeath>
<soundCall>Pawn_Human_Wounded</soundCall>
<soundAngry>Pawn_Human_Wounded</soundAngry>
</value>
</match>
</Operation>