RimWorld
Nature is Beautiful [1.0]
Thom Blair III  [개발자] 2019년 8월 23일 오후 1시 27분
RimCuisine 2.0 support
Hi!
Thom Blair III 님이 마지막으로 수정; 2019년 8월 23일 오후 7시 25분
< >
전체 댓글 38개 중 1~15개 표시 중
NECEROS 2019년 8월 23일 오후 1시 34분 
I'm not sure that each plant needs a specifically unique beautifier. I think a general patch would suffice imo.
NECEROS 2019년 8월 23일 오후 1시 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.
NECEROS 님이 마지막으로 수정; 2019년 8월 23일 오후 1시 36분
Thom Blair III  [개발자] 2019년 8월 23일 오후 1시 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 2019년 8월 23일 오후 1시 37분 
RC2 plants all derive from one base def, and then branch off.
Thom Blair III  [개발자] 2019년 8월 23일 오후 1시 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  [개발자] 2019년 8월 23일 오후 1시 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.

Thom Blair III 님이 마지막으로 수정; 2019년 8월 23일 오후 1시 38분
NECEROS 2019년 8월 23일 오후 1시 38분 
One sec I'll look into it, but I think so. Give me a min ^_^
Thom Blair III  [개발자] 2019년 8월 23일 오후 1시 38분 
Ok
:)
NECEROS 2019년 8월 23일 오후 1시 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 2019년 8월 23일 오후 1시 45분 
Oh this uses jecstools, btw
Thom Blair III  [개발자] 2019년 8월 23일 오후 1시 54분 
Ok, I'll check it out
Thom Blair III  [개발자] 2019년 8월 23일 오후 2시 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.
:/
Thom Blair III 님이 마지막으로 수정; 2019년 8월 23일 오후 2시 48분
NECEROS 2019년 8월 23일 오후 6시 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  [개발자] 2019년 8월 23일 오후 6시 38분 
Awesome! I'll try it right now! Thanks!
NECEROS 2019년 8월 23일 오후 6시 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.
< >
전체 댓글 38개 중 1~15개 표시 중
페이지당 표시 개수: 1530 50