边缘世界 RimWorld

边缘世界 RimWorld

Vanometric Cell Combining
Spürgelwürg 2021 年 1 月 8 日 下午 8:16
Tried fixing your mod
I have barely any Idea what I'm doing, especially when it comes to coding, so there was most certainly a better way at doing this. But it works now without any errors and without any dependencies. SOS2 Patch is also in there. Why you couldn't fit that one in here I don't know. I haven't made any mods myself. There must be way, though. I mean look how gigantic SOS2 is itself.


Vanilla.xml
<?xml version="1.0" encoding="utf-8" ?> <Patch> <Operation Class="PatchOperationFindMod"> <mods> <li>Save Our Ship 2</li> </mods> <match Class="PatchOperationSequence"> <operations> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName = "VanometricPowerCell"]/costList</xpath> <value> <VanometricPowerCore>2</VanometricPowerCore> </value> </li> <li Class="PatchOperationRemove"> <xpath>/Defs/ThingDef[defName = "VanometricPowerCell"]/costList/ArchotechExoticParticles</xpath> </li> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="VanometricPowerCell"]/researchPrerequisites</xpath> <value><li>VanometricTinkering</li></value> </li> <li Class="PatchOperationFindMod"> <mods> <li>Royalty</li> </mods> <match Class="PatchOperationAdd"> <xpath>/Defs</xpath> <value> <ResearchProjectDef> <defName>VanometricBasics</defName> <label>Vanometric Basics</label> <description>Learn to repurpose single vanometric cores.</description> <baseCost>2000</baseCost> <techLevel>Ultra</techLevel> <prerequisites> <li>AdvancedFabrication</li> </prerequisites> <requiredResearchBuilding>HiTechResearchBench</requiredResearchBuilding> <requiredResearchFacilities> <li>MultiAnalyzer</li> </requiredResearchFacilities> <researchViewX>18.00</researchViewX> <researchViewY>2</researchViewY> </ResearchProjectDef> <ResearchProjectDef> <defName>VanometricTinkering</defName> <label>Vanometric Tinkering</label> <description>Learn to combine 2 vanometric power cores into a single unit.</description> <baseCost>3000</baseCost> <techLevel>Ultra</techLevel> <prerequisites> <li>VanometricBasics</li> </prerequisites> <requiredResearchBuilding>HiTechResearchBench</requiredResearchBuilding> <requiredResearchFacilities> <li>MultiAnalyzer</li> </requiredResearchFacilities> <researchViewX>19.00</researchViewX> <researchViewY>2</researchViewY> </ResearchProjectDef> </value> </match> <nomatch Class="PatchOperationAdd"> <xpath>/Defs</xpath> <value> <ResearchProjectDef> <defName>VanometricTinkering</defName> <label>Vanometric Tinkering</label> <description>Learn to combine 2 vanometric power cores into a single unit.</description> <baseCost>3000</baseCost> <techLevel>Ultra</techLevel> <prerequisites> <li>ShipReactor</li> </prerequisites> <requiredResearchBuilding>HiTechResearchBench</requiredResearchBuilding> <requiredResearchFacilities> <li>MultiAnalyzer</li> </requiredResearchFacilities> <researchViewX>21.00</researchViewX> <researchViewY>3.60</researchViewY> </ResearchProjectDef> </value> </nomatch> </li> <li Class="PatchOperationAdd"> <xpath>Defs</xpath> <value> <RecipeDef> <defName>Make_VanometricPowerCore</defName> <label>make vanometric power core</label> <description>Make a vanometric core.</description> <jobString>Making vanometric power core.</jobString> <workSpeedStat>GeneralLaborSpeed</workSpeedStat> <effectWorking>Cook</effectWorking> <soundWorking>Recipe_Machining</soundWorking> <workAmount>5000</workAmount> <unfinishedThingDef>UnfinishedComponent</unfinishedThingDef> <recipeUsers> <li>FabricationBench</li> </recipeUsers> <ingredients> <li> <filter> <thingDefs> <li>ArchotechExoticParticles</li> </thingDefs> </filter> <count>2</count> </li> </ingredients> <fixedIngredientFilter> <thingDefs> <li>ArchotechExoticParticles</li> </thingDefs> </fixedIngredientFilter> <products> <VanometricPowerCore>1</VanometricPowerCore> </products> <researchPrerequisite>ArchotechVanometrics</researchPrerequisite> <skillRequirements> <Crafting>8</Crafting> </skillRequirements> <workSkill>Crafting</workSkill> </RecipeDef> </value> </li> </operations> </match> <nomatch Class="PatchOperationSequence"> <operations> <li Class="PatchOperationFindMod"> <mods> <li>Royalty</li> </mods> <nomatch Class="PatchOperationAdd"> <xpath>/Defs</xpath> <value> <ResearchProjectDef> <defName>VanometricTinkering</defName> <label>Vanometric Tinkering</label> <description>Learn to combine 2 vanometric power cores into a single unit.</description> <baseCost>3000</baseCost> <techLevel>Spacer</techLevel> <prerequisites> <li>ShipReactor</li> </prerequisites> <requiredResearchBuilding>HiTechResearchBench</requiredResearchBuilding> <requiredResearchFacilities> <li>MultiAnalyzer</li> </requiredResearchFacilities> <researchViewX>21.00</researchViewX> <researchViewY>3.60</researchViewY> </ResearchProjectDef> </value> </nomatch> </li> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="VanometricPowerCell"]</xpath> <value><researchPrerequisites><li>VanometricTinkering</li></researchPrerequisites></value> </li> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="VanometricPowerCell"]</xpath> <value><designationCategory>Power</designationCategory></value> </li> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="VanometricPowerCell"]/costList</xpath> <value><VanometricPowerCore>2</VanometricPowerCore></value> </li> </operations> </nomatch> </Operation> </Patch>
最后由 Spürgelwürg 编辑于; 2021 年 1 月 11 日 下午 5:05
< >
正在显示第 1 - 6 条,共 6 条留言
Spürgelwürg 2021 年 1 月 8 日 下午 8:17 
Royalty.xml
<?xml version="1.0" encoding="utf-8" ?> <Patch> <Operation Class="PatchOperationFindMod"> <mods> <li>Royalty</li> </mods> <match Class="PatchOperationFindMod"> <mods> <li>Save Our Ship 2</li> </mods> <nomatch Class="PatchOperationSequence"> <operations> <li Class="PatchOperationAdd"> <xpath>/Defs</xpath> <value> <ResearchProjectDef> <defName>VanometricBasics</defName> <label>Vanometric Basics</label> <description>Learn to repurpose single vanometric cores.</description> <baseCost>2000</baseCost> <techLevel>Industrial</techLevel> <prerequisites> <li>AdvancedFabrication</li> </prerequisites> <requiredResearchBuilding>HiTechResearchBench</requiredResearchBuilding> <requiredResearchFacilities> <li>MultiAnalyzer</li> </requiredResearchFacilities> <researchViewX>18.00</researchViewX> <researchViewY>2</researchViewY> </ResearchProjectDef> </value> </li> </operations> </nomatch> </match> </Operation> <Operation Class="PatchOperationFindMod"> <mods> <li>Royalty</li> </mods> <match Class="PatchOperationSequence"> <operations> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="UnstablePowerCell"]/costList</xpath> <value><VanometricPowerCore>1</VanometricPowerCore></value> </li> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="UnstablePowerCell"]</xpath> <value><researchPrerequisites><li>VanometricBasics</li></researchPrerequisites></value> </li> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="UnstablePowerCell"]</xpath> <value><designationCategory>Power</designationCategory></value> </li> <!--<li Class="PatchOperationAdd"> <xpath>/Defs/ResearchProjectDef[defName="VanometricTinkering"]/prerequisites</xpath> <prerequisites> <li>VanometricBasics</li> </prerequisites> </li> --> </operations> </match> </Operation> </Patch>
最后由 Spürgelwürg 编辑于; 2021 年 1 月 11 日 下午 4:53
Spürgelwürg 2021 年 1 月 8 日 下午 8:17 
VFE_Power.xml
<?xml version="1.0" encoding="utf-8" ?> <Patch> <Operation Class="PatchOperationFindMod"> <mods> <li>Vanilla Furniture Expanded - Power</li> </mods> <match Class="PatchOperationSequence"> <operations> <li Class="PatchOperationFindMod"> <mods> <li>Royalty</li> </mods> <match Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="VFE_SmallVanometricPowerCell"]</xpath> <value><researchPrerequisites><li>VanometricBasics</li></researchPrerequisites></value> </match> <nomatch Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="VFE_SmallVanometricPowerCell"]</xpath> <value><researchPrerequisites><li>VanometricTinkering</li></researchPrerequisites></value> </nomatch> </li> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="VFE_SmallVanometricPowerCell"]/costList</xpath> <value><VanometricPowerCore>1</VanometricPowerCore></value> </li> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="VFE_SmallVanometricPowerCell"]</xpath> <value><designationCategory>Power</designationCategory></value> </li> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="VFE_LargeVanometricPowerCell"]/costList</xpath> <value><VanometricPowerCore>4</VanometricPowerCore></value> </li> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="VFE_LargeVanometricPowerCell"]</xpath> <value><researchPrerequisites><li>VanometricAdvanced</li></researchPrerequisites></value> </li> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="VFE_LargeVanometricPowerCell"]</xpath> <value><designationCategory>Power</designationCategory></value> </li> <li Class="PatchOperationAdd"> <xpath>/Defs</xpath> <value> <ResearchProjectDef> <defName>VanometricAdvanced</defName> <label> Advanced Vanometrics</label> <description>Repurpose 4 vanometric cores into a single unit.</description> <baseCost>6000</baseCost> <techLevel>Ultra</techLevel> <prerequisites> <li>VanometricTinkering</li> </prerequisites> <requiredResearchBuilding>HiTechResearchBench</requiredResearchBuilding> <requiredResearchFacilities> <li>MultiAnalyzer</li> </requiredResearchFacilities> <researchViewX>21.00</researchViewX> <researchViewY>4.85</researchViewY> </ResearchProjectDef> </value> </li> </operations> </match> </Operation> </Patch>
最后由 Spürgelwürg 编辑于; 2021 年 1 月 8 日 下午 8:27
Spürgelwürg 2021 年 1 月 8 日 下午 8:18 
VFE_Mechanoids.xml
<?xml version="1.0" encoding="utf-8" ?> <Patch> <Operation Class="PatchOperationFindMod"> <mods> <li>Royalty</li> </mods> <match Class="PatchOperationFindMod"> <mods> <li>Save Our Ship 2</li> </mods> <nomatch Class="PatchOperationSequence"> <operations> <li Class="PatchOperationAdd"> <xpath>/Defs</xpath> <value> <ResearchProjectDef> <defName>VanometricBasics</defName> <label>Vanometric Basics</label> <description>Learn to repurpose single vanometric cores.</description> <baseCost>2000</baseCost> <techLevel>Industrial</techLevel> <prerequisites> <li>AdvancedFabrication</li> </prerequisites> <requiredResearchBuilding>HiTechResearchBench</requiredResearchBuilding> <requiredResearchFacilities> <li>MultiAnalyzer</li> </requiredResearchFacilities> <researchViewX>18.00</researchViewX> <researchViewY>2</researchViewY> </ResearchProjectDef> <ResearchProjectDef> <defName>VanometricTinkering</defName> <label>Vanometric Tinkering</label> <description>Learn to combine 2 vanometric power cores into a single unit.</description> <baseCost>3000</baseCost> <techLevel>Ultra</techLevel> <prerequisites> <li>VanometricBasics</li> </prerequisites> <requiredResearchBuilding>HiTechResearchBench</requiredResearchBuilding> <requiredResearchFacilities> <li>MultiAnalyzer</li> </requiredResearchFacilities> <researchViewX>19.00</researchViewX> <researchViewY>2</researchViewY> </ResearchProjectDef> </value> </li> </operations> </nomatch> </match> </Operation> <Operation Class="PatchOperationFindMod"> <mods> <li>Royalty</li> </mods> <match Class="PatchOperationSequence"> <operations> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="UnstablePowerCell"]/costList</xpath> <value><VanometricPowerCore>1</VanometricPowerCore></value> </li> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="UnstablePowerCell"]</xpath> <value><researchPrerequisites><li>VanometricBasics</li></researchPrerequisites></value> </li> <li Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="UnstablePowerCell"]</xpath> <value><designationCategory>Power</designationCategory></value> </li> <!--<li Class="PatchOperationAdd"> <xpath>/Defs/ResearchProjectDef[defName="VanometricTinkering"]/prerequisites</xpath> <prerequisites> <li>VanometricBasics</li> </prerequisites> </li> --> </operations> </match> </Operation> </Patch>
最后由 Spürgelwürg 编辑于; 2021 年 1 月 11 日 下午 5:05
esev  [开发者] 2021 年 1 月 9 日 下午 11:17 
did you test this with any combination of mods to make sure its all compatible? This is why i could not put it in the same mod. Also because i couldnt/dont know how to patch your own mod in the presense of another mod. In my case i needed to change my research to after SOS2. It wouldnt work when i did patch operation find mod in my patches folder. Also this mod needs to integrate seamlessly with or without royalty, VFE Power, VFE Mechs, and/or SOS2. I will test and input your contributions tomorrow when i have time. Thanks for your help
esev  [开发者] 2021 年 1 月 9 日 下午 11:21 
I just realized Combat extended most likely patches itself for another mod. I will look there
Spürgelwürg 2021 年 1 月 10 日 上午 8:41 
I did test it in many combinations but it was late, so I don't remember if I did them all. (especially because SOS2 takes so long to load), but pretty shure I did most of them. Also works in my 300+ mod list. Tested also with and without royalty. Works.

Thing is, you tried patching patches and that doesn't work, so what I did is to make for each possibility many different versions of the researches and turned them on and off with match and no match. The only thing you must make shure of, is that this mod is the last in the load order.
< >
正在显示第 1 - 6 条,共 6 条留言
每页显示数: 1530 50