RimWorld

RimWorld

Nature is Beautiful [1.0]
Thom Blair III  [developer] 23 Aug, 2019 @ 1:27pm
RimCuisine 2.0 support
Hi!
Last edited by Thom Blair III; 23 Aug, 2019 @ 7:25pm
< >
Showing 1-15 of 38 comments
NECEROS 23 Aug, 2019 @ 1:34pm 
I'm not sure that each plant needs a specifically unique beautifier. I think a general patch would suffice imo.
NECEROS 23 Aug, 2019 @ 1:36pm 
Patch RC2_PlantBase to have 1-2 beauty, then give RC2_FruitTreeBase a few extra because everyone loves fruit trees. I think that would cover all of the plants.
Last edited by NECEROS; 23 Aug, 2019 @ 1:36pm
Thom Blair III  [developer] 23 Aug, 2019 @ 1:36pm 
It doesn't work that way, so far as I know. I think I have to assign a numerical value to each plant that you want to have effected.
NECEROS 23 Aug, 2019 @ 1:37pm 
RC2 plants all derive from one base def, and then branch off.
Thom Blair III  [developer] 23 Aug, 2019 @ 1:37pm 
I'm not really familiar with a general patch...does such a thing exist? If so, how do I do it?
Thom Blair III  [developer] 23 Aug, 2019 @ 1:37pm 
Oh ok, so then just assign a beauty value to that one base def? Sorry, I'm not that great of a programmer at all.

Last edited by Thom Blair III; 23 Aug, 2019 @ 1:38pm
NECEROS 23 Aug, 2019 @ 1:38pm 
One sec I'll look into it, but I think so. Give me a min ^_^
Thom Blair III  [developer] 23 Aug, 2019 @ 1:38pm 
Ok
:)
NECEROS 23 Aug, 2019 @ 1:45pm 
Something like this maybe ( I haven't tested this, mind you... I would if I weren't so busy )

<?xml version="1.0" encoding="UTF-8"?> <Patch> <!-- Using the magical wonders of JecsTools --> <Operation Class="PatchOperationFindMod"> <mods> <li>[1.0] RimCuisine 2 Core</li> </mods> <match Class="PatchOperationSequence"> <success>Always</success> <operations> <li Class="PatchOperationAdd"> <xpath>Defs/ThingDef[defName="RC2_PlantBase"]/statBases</xpath> <value> <Beauty>2</Beauty> </value> </li> <li Class="PatchOperationAdd"> <xpath>Defs/ThingDef[defName="RC2_FruitTreeBase"]/statBases</xpath> <value> <Beauty>5</Beauty> </value> </li> </operations> </match> </Operation> </Patch>
NECEROS 23 Aug, 2019 @ 1:45pm 
Oh this uses jecstools, btw
Thom Blair III  [developer] 23 Aug, 2019 @ 1:54pm 
Ok, I'll check it out
Thom Blair III  [developer] 23 Aug, 2019 @ 2:46pm 
Ok, so I don't really know what I'm doing. So, I'm trying to copy someone else's mod support XML and adapt it for RimCuisine...that way I don't have to use Jecstools because I don't know what that is. This is the code block that supports Impassable Chest-deep Water. How would I adapt it for RimCuisine?

<Operation Class="ModCheck.IfElse"> <test Class="ModCheck.isModLoaded"> <modName>Impassable Chest-deep Water</modName> <errorOnFail>false</errorOnFail> <MessageFail>From Nature Is Beautiful: "Impassable Chest-deep Water" not detected, using default patch values.</MessageFail> <MessageSuccess>From Nature Is Beautiful: "Impassable Chest-deep Water" detected, loading adjusted beauty values.</MessageSuccess> </test> <passed Class="PatchOperationAdd"> <xpath>Defs/TerrainDef[defName="WaterMovingChestDeep"]</xpath> <value> <statBases><Beauty>15</Beauty></statBases> </value> </passed> <failed Class="PatchOperationAdd"> <xpath>Defs/TerrainDef[defName="WaterMovingChestDeep"]</xpath> <value> <statBases><Beauty>5</Beauty></statBases> </value> </failed> </Operation>

I tried several things and it kept giving me errors.
:/
Last edited by Thom Blair III; 23 Aug, 2019 @ 2:48pm
NECEROS 23 Aug, 2019 @ 6:12pm 
Ok so I looked into it somemore, I don't think jecstools is required. I believe this is built in xml operations.

See: https://rimworldwiki.com/wiki/Modding_Tutorials/PatchOperations#PatchOperationInsert

Specifically for
<Operation Class="PatchOperationFindMod"> <mods> <li>[1.0] RimCuisine 2 Core</li> </mods>

This looks for a mod, and if it's there, does the patch. Built into rimworld natively.
Thom Blair III  [developer] 23 Aug, 2019 @ 6:38pm 
Awesome! I'll try it right now! Thanks!
NECEROS 23 Aug, 2019 @ 6:44pm 
Anytime, man. I love your mods, happy to help.

After more research I learned the xpath needed to target an abstract name is like this:

<xpath>Defs/ThingDef[@Name="RC2_PlantBase"]/statBases</xpath>

This let's you specify via attributes, like Name, since the abstract defs don't have a defName.
< >
Showing 1-15 of 38 comments
Per page: 1530 50