RimWorld

RimWorld

Craftable Beam Graser
Erazil 25 Oct, 2022 @ 2:49am
Patch Fix
<?xml version="1.0" encoding="utf-8" ?> <Patch> <!-- Biotech DLC RangedMechanoid_Medium.xml --> <Operation Class="PatchOperationFindMod"> <mods> <li>Biotech</li> </mods> <match Class="PatchOperationSequence"> <success>Always</success> <operations> <!--CRAFT THAT GRASER!--> <li Class="PatchOperationReplace"> <xpath>/Defs/ThingDef[defName = "Gun_BeamGraser"]/destroyOnDrop</xpath> <value> <destroyOnDrop>false</destroyOnDrop> </value> </li> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName = "Gun_BeamGraser"]</xpath> <value> <costList> <Plasteel>40</Plasteel> <ComponentSpacer>2</ComponentSpacer> </costList> </value> </li> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName = "Gun_BeamGraser"]</xpath> <value> <recipeMaker> <researchPrerequisites><li>ChargedShot</li></researchPrerequisites> <skillRequirements><Crafting>7</Crafting></skillRequirements> <workSkill>Crafting</workSkill> <recipeUsers><li>FabricationBench</li></recipeUsers> <unfinishedThingDef>UnfinishedGun</unfinishedThingDef> <soundWorking>Recipe_Machining</soundWorking> <workSpeedStat>GeneralLaborSpeed</workSpeedStat> </recipeMaker> </value> </li> </operations> </match> </Operation> </Patch>
< >
Showing 1-7 of 7 comments
Erazil 25 Oct, 2022 @ 2:54am 
I replaced the sequential operation by a verification of the active presence of Biotech
I changed PatchOperationAdd to PatchOperationReplace for destroyOnDrop (not tested ingame)
i remove WorkToMake because it already exists with the same value in the original

I think that's all ;)
Conniday  [developer] 25 Oct, 2022 @ 3:26am 
alright, thanks man!!
gonna push the update soon
Erazil 25 Oct, 2022 @ 3:30am 
you're welcome :)
Conniday  [developer] 25 Oct, 2022 @ 3:43am 
Updated
Erazil 31 Oct, 2022 @ 10:52am 
Bad code : you try add a already existing key
sample :
<li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName = "Gun_ToxicNeedle"]/</xpath> <value> <statBases> <WorkToMake>38000</WorkToMake> </statBases> </value> </li>

the patch try add all txt inside <value> tag, but the <statBases> key already exist in original

for not have this you need specify the exatc path where you want add txt

<li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName = "Gun_ToxicNeedle"]/statBases</xpath> <value> <WorkToMake>38000</WorkToMake> </value> </li>

( i dont test this in game but not avec red line for this mod in log pop up ;) )

when I work on my personal patch use this site
https://rimworldwiki.com/wiki/Modding_Tutorials/PatchOperations
Last edited by Erazil; 31 Oct, 2022 @ 10:58am
Conniday  [developer] 31 Oct, 2022 @ 10:28pm 
Awww heck
Conniday  [developer] 31 Oct, 2022 @ 10:29pm 
Oh yeah I completely see what you mean now. Thanks!
< >
Showing 1-7 of 7 comments
Per page: 1530 50