边缘世界 RimWorld

边缘世界 RimWorld

[1.3] Vanilla Animals Expanded — Extreme Desert
JoeDoX 2022 年 1 月 1 日 下午 12:59
Patch for translation - WoolCamel
Hello,

I'm trying to make a patch on the WoolCamel so that I can translate the mod and not have any errors.
Current file :


<?xml version="1.0" encoding="utf-8" ?>
<Patch>
<!-- Vanilla Animals Expanded — Extreme Desert -->

<Operation Class="PatchOperationFindMod">

<mods>
<li>Vanilla Animals Expanded — Extreme Desert</li>
</mods>

<match Class="PatchOperationSequence">
<success>Always</success>
<operations>

<!-- ThingDefs -->
<!-- NomDuThing -->
<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName = "WoolCamel"]/defName</xpath>
<value>
<defName>AEXP_WoolCamel</defName>
</value>
</li>

<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[woolDef = "WoolCamel"]/woolDef</xpath>
<value>
<woolDef>AEXP_WoolCamel</woolDef>
</value>
</li>

</operations>
</match>

</Operation>

</Patch>

Error :
https://gist.github.com/HugsLibRecordKeeper/fc13c742b3a7efa5bffe8d091c920f2e

If anyone knows how to make the patch to correct the error:
Could not resolve cross-reference: No Verse.ThingDef named WoolCamel found to give to RimWorld.CompProperties_Shearable RimWorld.CompProperties_Shearable
< >
正在显示第 1 - 2 条,共 2 条留言
JoeDoX 2022 年 1 月 1 日 下午 10:40 
Ok, I finally found my mistake.
Fixed patch:

<?xml version="1.0" encoding="utf-8" ?>
<Patch>
<!-- Vanilla Animals Expanded — Extreme Desert -->

<Operation Class="PatchOperationFindMod">

<mods>
<li>Vanilla Animals Expanded — Extreme Desert</li>
</mods>

<match Class="PatchOperationSequence">
<success>Always</success>
<operations>

<!-- ThingDefs -->
<!-- WoolCamel -->
<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName = "WoolCamel"]/defName</xpath>
<value>
<defName>AEXP_WoolCamel</defName>
</value>
</li>

<li Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName = "AEXP_Camel"]/comps/li/woolDef</xpath>
<value>
<woolDef>AEXP_WoolCamel</woolDef>
</value>
</li>

</operations>
</match>

</Operation>

</Patch>
☭ Covre 2022 年 2 月 28 日 上午 10:20 
thanks :)
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50