边缘世界 RimWorld

边缘世界 RimWorld

Craftable Beam Graser
Erazil 2022 年 10 月 25 日 上午 2:49
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>
< >
正在显示第 1 - 7 条,共 7 条留言
Erazil 2022 年 10 月 25 日 上午 2:54 
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  [开发者] 2022 年 10 月 25 日 上午 3:26 
alright, thanks man!!
gonna push the update soon
Erazil 2022 年 10 月 25 日 上午 3:30 
you're welcome :)
Conniday  [开发者] 2022 年 10 月 25 日 上午 3:43 
Updated
Erazil 2022 年 10 月 31 日 上午 10:52 
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
最后由 Erazil 编辑于; 2022 年 10 月 31 日 上午 10:58
Conniday  [开发者] 2022 年 10 月 31 日 下午 10:28 
Awww heck
Conniday  [开发者] 2022 年 10 月 31 日 下午 10:29 
Oh yeah I completely see what you mean now. Thanks!
< >
正在显示第 1 - 7 条,共 7 条留言
每页显示数: 1530 50