RimWorld

RimWorld

Nature is Beautiful [1.0]
Thom Blair III  [utvikler] 23. aug. 2019 kl. 13.27
RimCuisine 2.0 support
Hi!
Sist redigert av Thom Blair III; 23. aug. 2019 kl. 19.25
< >
Viser 115 av 38 kommentarer
NECEROS 23. aug. 2019 kl. 13.34 
I'm not sure that each plant needs a specifically unique beautifier. I think a general patch would suffice imo.
NECEROS 23. aug. 2019 kl. 13.36 
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.
Sist redigert av NECEROS; 23. aug. 2019 kl. 13.36
Thom Blair III  [utvikler] 23. aug. 2019 kl. 13.36 
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 kl. 13.37 
RC2 plants all derive from one base def, and then branch off.
Thom Blair III  [utvikler] 23. aug. 2019 kl. 13.37 
I'm not really familiar with a general patch...does such a thing exist? If so, how do I do it?
Thom Blair III  [utvikler] 23. aug. 2019 kl. 13.37 
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.

Sist redigert av Thom Blair III; 23. aug. 2019 kl. 13.38
NECEROS 23. aug. 2019 kl. 13.38 
One sec I'll look into it, but I think so. Give me a min ^_^
Thom Blair III  [utvikler] 23. aug. 2019 kl. 13.38 
Ok
:)
NECEROS 23. aug. 2019 kl. 13.45 
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 kl. 13.45 
Oh this uses jecstools, btw
Thom Blair III  [utvikler] 23. aug. 2019 kl. 13.54 
Ok, I'll check it out
Thom Blair III  [utvikler] 23. aug. 2019 kl. 14.46 
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.
:/
Sist redigert av Thom Blair III; 23. aug. 2019 kl. 14.48
NECEROS 23. aug. 2019 kl. 18.12 
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  [utvikler] 23. aug. 2019 kl. 18.38 
Awesome! I'll try it right now! Thanks!
NECEROS 23. aug. 2019 kl. 18.44 
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.
< >
Viser 115 av 38 kommentarer
Per side: 1530 50