I am trying to create a piece of clothing that will not be affected by the materials it is made by, is there a setting to turn this off?
did you checked xml def of common "piece" before asking on forum?
How can I check the xml def?
meaning "read" here
Just open the files with a text editor
take any item/object that is not affected by material/stuff (like beer, medicine, etc)
I haven't been clear enough :
In fact nearly all objects in games are not affected by theirs materials.
So you'd better check how they're done (those affected by) and compare with other "normal" objects to see (and try to guess) what <xml tag/s> is/are responsible for this behaviour; and not using them.
Hope it was clearer this time
I just compared ordinary apparel to power armor just now. While power armor doesn't take the coloration of the stuff it's made with, it also doesn't have a stuffCategory. Is there an item in the game that has a stuffCategory, but doesn't take the coloration of the stuff? I can't think of one off the top of my head.
Side note. I've spent a lot of time in the XML files. I think this thread is less than helpful to the poster, and somewhat hostile to newbies. We should encourage new modders by giving them slightly more directed tips.
you need to remove the comp colorable from the item and it's parent def to get it to not use stuffcolour (but then you'll have to manually colour the texture yourself if you want it to have any colour of it's own)
As a newbie I agree with CannibarRechter's assessment that kaptain_kavern's posts seem hostile to newbies :(
@Shinzy can you please be more specific? My objects get recolored even though neither they nor their parent def have <comps>...</comps> OR anything about "colorable" OR anything about "stuffcolor" anywhere in them. I assume I'm misunderstanding what you're talking about since my objects are still being recolored. I'm doing walls though, not clothing.
Hi ckjzam,
Which types of objects are you trying to alter?
I'm adding fences based on Itchy Flea's fence mod. The category and thingClass for them are both "Building." I don't mean to monopolize EzraN's thread if it doesn't help with the clothes though! I just want to learn.
Looking over sculptures, which are an instance of SculptureBase, these don't have the colorable comp, so I'd venture that the prior advice doesn't work for buildings. You might play around and try to make a clothes item not colorable, to see if it actually does work for apparel. Whatever the mechanism is, it doesn't appear generic.
Quote from: ckjzam on August 15, 2016, 12:17:27 PM
As a newbie I agree with CannibarRechter's assessment that kaptain_kavern's posts seem hostile to newbies :(
Please don't. I consider myself a newbie too seriously.
And again sorry for my weird way of talking. I'm no natural english speaker and i ve learned by myself. If all of this was in my natural language i'm sure you will not feel me hostile.
Again sorry I don't want to be hostile at all. I mean I replied to help not to insult you in any way
Edit : I literally spend several hours a day trying to help people on this forum, on Reddit (and the Slackware when i'm here). All this, since a quite amount of time, and it's just lately that I have been "insulting" or "harsh" against people(w/o me wanting to).
Is that folks from the Steam Release are more fragile/delicate ? I mean i replied and provide information on how to proceed/learn. How is that insulting ?
(asking all that to try talk in a better way next time ;) )
Yeah the comp colorable is apparel only thing, it works just for them
with buildings my best guess would be to just use the Costlist instead of CostStuffcount
looking at the defs only the buildings that get coloured in vanilla use those. Check some of the vanilla buildings (like cooking stove) for some pointers
And knowing Kavern he was just being as helpful as he could, trying to point the OP to a working example from vanilla =P
It's hard to give any definitive answers unless you have done the thing yourself first
Hello, I just oppened the def folder: "ThingDefs_Misc" where you can find "Apparel_Various.xml", there you can find all the clothes and its colours, taking for example the parka:
<ThingDef ParentName="ApparelMakeableBase">
<defName>Apparel_Parka</defName>
<label>parka</label>
<description>A thick parka for staying warm in even the coldest of temperatures.</description>
<graphicData>
<texPath>Things/Pawn/Humanlike/Apparel/Parka/Parka</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<costStuffCount>120</costStuffCount>
<stuffCategories>
<li>Fabric</li>
<li>Leathery</li>
</stuffCategories>
<thingCategories>
<li>Apparel</li>
</thingCategories>
<statBases>
<MaxHitPoints>140</MaxHitPoints>
<WorkToMake>30000</WorkToMake>
<ArmorRating_Sharp>0.03</ArmorRating_Sharp>
<ArmorRating_Heat>0.03</ArmorRating_Heat>
<Insulation_Cold>-40</Insulation_Cold>
<Insulation_Heat>-3</Insulation_Heat>
</statBases>
<equippedStatOffsets>
<MoveSpeed>-0.05</MoveSpeed>
<WorkSpeedGlobal>-0.20</WorkSpeedGlobal>
</equippedStatOffsets>
<apparel>
<bodyPartGroups>
<li>Torso</li>
<li>Shoulders</li>
<li>Arms</li>
</bodyPartGroups>
<worngraphicPath>Things/Pawn/Humanlike/Apparel/Parka/Parka</worngraphicPath>
<layers>
<li>Shell</li>
</layers>
<commonality>1</commonality>
<tags>
<li>Outlander</li>
<li>Tribal</li>
</tags>
<defaultOutfitTags>
<li>Worker</li>
<li>Soldier</li>
</defaultOutfitTags>
</apparel>
<colorGenerator Class="ColorGenerator_Options">
<options>
<li>
<weight>10</weight>
<only>RGBA(0.33,0.33,0.33,1)</only>
</li>
<li>
<weight>10</weight>
<only>RGBA(0.65,0.65,0.65,1)</only>
</li>
<li>
<weight>10</weight>
<only>RGBA(0.4,0.3,0.15,1)</only>
</li>
<li>
<weight>15</weight>
<min>RGBA(0.3,0.3,0.3,1)</min>
<max>RGBA(0.5,0.5,0.5,1)</max>
</li>
<li>
<weight>6</weight>
<min>RGBA(0.5,0.5,0.5,1)</min>
<max>RGBA(1,1,1,1)</max>
</li>
</options>
</colorGenerator>
</ThingDef>
the part at the end:
<colorGenerator Class="ColorGenerator_Options">
<options>
<li>
<weight>10</weight>
<only>RGBA(0.33,0.33,0.33,1)</only>
</li>
<li>
<weight>10</weight>
<only>RGBA(0.65,0.65,0.65,1)</only>
</li>
<li>
<weight>10</weight>
<only>RGBA(0.4,0.3,0.15,1)</only>
</li>
<li>
<weight>15</weight>
<min>RGBA(0.3,0.3,0.3,1)</min>
<max>RGBA(0.5,0.5,0.5,1)</max>
</li>
<li>
<weight>6</weight>
<min>RGBA(0.5,0.5,0.5,1)</min>
<max>RGBA(1,1,1,1)</max>
</li>
</options>
</colorGenerator>
Are color codes (RGBA), I took a look inside the source code and the color of the apparel is generated randomly between the <min>colorcodehere</min> and the <max>colorcodehere</max> color codes, for your objective(as a first test) take the part I added in the second big code box, put in the end of the apparel definition of the thing you don't want to change color (just like it is on the parka right before </ThingDef>, keep the weights like they are and make all color codes: RGBA(1,1,1,1), if you get an error try making all mins RGBA(0.98,0.98,0.98,1) and all max RGBA(1,1,1,1) let me know what happened.
I don't think the colorGenerator impacts items that you make. I think it affects items that drop. I'm not positive, but I think that's how that goes.
Quote from: CallMeDio on August 16, 2016, 11:14:29 AM
-snip-
Adjusting the colour generator thing only works with
nonstuffed apparel. Iif the thing uses any stuffy stuff in it's recipe it'll inherit it's colour from that unless the colorcomp is removed
Ok, I thought it was it.
Quote from: Shinzy on August 15, 2016, 03:22:28 PM
Yeah the comp colorable is apparel only thing, it works just for them
with buildings my best guess would be to just use the Costlist instead of CostStuffcount
looking at the defs only the buildings that get coloured in vanilla use those. Check some of the vanilla buildings (like cooking stove) for some pointers
I've found out that buildings not being coloured is a symptom of using the <shaderType>CutoutComplex</shaderType> tag within the graphicData node of the ThingDef. It is entirely possible to use a costStuffCount and still have the buildings coloured -- e.g., the Hand Tailoring Bench uses only a costStuffCount with no costList. =)
Quote from: JT on August 17, 2016, 12:52:26 PM
Quote from: Shinzy on August 15, 2016, 03:22:28 PM
Yeah the comp colorable is apparel only thing, it works just for them
with buildings my best guess would be to just use the Costlist instead of CostStuffcount
looking at the defs only the buildings that get coloured in vanilla use those. Check some of the vanilla buildings (like cooking stove) for some pointers
I've found out that buildings not being coloured is a symptom of using the <shaderType>CutoutComplex</shaderType> tag within the graphicData node of the ThingDef. It is entirely possible to use a costStuffCount and still have the buildings coloured -- e.g., the Hand Tailoring Bench uses only a costStuffCount with no costList. =)
Oh that makes so much more sense ;D I just had a quick glance at the files and bit of guesswork =P thanks!
Quote from: Shinzy on August 15, 2016, 09:47:04 AM
you need to remove the comp colorable from the item and it's parent def to get it to not use stuffcolour (but then you'll have to manually colour the texture yourself if you want it to have any colour of it's own)
Hello everyone,
I'm totally new to RimWorld Modding and I need your help,please.
I've the same problem/issue like the OP.
I've made an Uniform which is craftable by leather and fabric, but because it uses stuff, the uniform gets the colour of used stuff instead of using my texture colour. Searched a lot and subscribed also a lot of workshop items and searched their files (found a lot of other useful things), but apparently I'm not able to get it to work. The only thing is a lazy workaraound with using steel instead of stuff, but I don't want to use this method.
Like Shinzy stated, I don't have any clue how to get rid of that comp colorable value.Which tag/s is/are that/those? Do I need an additional xml file? Have you an example?
I tried this in my Apparel_Uniform.xml :
<comps>
<li Class="CompProperties_Forbiddable"/>
<li>
<compClass>CompColorable</compClass>
</li>
<li>
<compClass>CompQuality</compClass>
</li>
</comps>
And also this at the end:
<colorGenerator Class="ColorGenerator_StandardApparel" />
Any help is really much appreciated and sorry for my bad english, not my native language.
Regards
Ben
Quote from: Shinzy on August 15, 2016, 09:47:04 AM
you need to remove the comp colorable from the item and it's parent def to get it to not use stuffcolour (but then you'll have to manually colour the texture yourself if you want it to have any colour of it's own)
To me that means to remove :
<li>
<compClass>CompColorable</compClass>
</li>
no?
Unfortunately no.
I used the vanilla parka as template. There are not any comp tags in that xml and it still uses the colour of the used stuff instead of using the colour of the texture itself.
Another way to do this would be to change the shader and use a mask texture. Mask the texture so nothing is effected by "stuff", you can then keep the stuff type recipe so it can be made of whatever but the image will always be the colour you made it.
Quote from: Ben84 on July 04, 2017, 08:24:16 AM
Unfortunately no.
I used the vanilla parka as template. There are not any comp tags in that xml and it still uses the colour of the used stuff instead of using the colour of the texture itself.
Parka inherit from "ApparelMakeableBase" which inherit from "ApparelBase" which has it
Quote from: skullywag on July 04, 2017, 08:38:51 AM
Another way to do this would be to change the shader and use a mask texture. Mask the texture so nothing is effected by "stuff", you can then keep the stuff type recipe so it can be made of whatever but the image will always be the colour you made it.
Sounds interesting, but I have absolutely no idea what to do exactly !? :/
Quote from: kaptain_kavern on July 04, 2017, 08:40:23 AM
Quote from: Ben84 on July 04, 2017, 08:24:16 AM
Unfortunately no.
I used the vanilla parka as template. There are not any comp tags in that xml and it still uses the colour of the used stuff instead of using the colour of the texture itself.
Parka inherit from "ApparelMakeableBase" which inherit from "ApparelBase" which has it
Okay, so I have made two files now:
The first one is my uniform, called WehrUniform in Apparel_WehrUniform.xml
<?xml version="1.0" encoding="utf-8" ?>
<ThingDefs>
<ThingDef ParentName="ApparelMakeableBase">
<defName>Apparel_WehrUniform</defName>
<label>WehrUniform</label>
<description>Die schneidige WehrUniform lässt jeden noch so beleibten Soldaten schlank und rank aussehen.</description>
<graphicData>
<texPath>Things/Apparel/WehrUniform/WehrUniform</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<techLevel>Neolithic</techLevel>
<costStuffCount>10</costStuffCount>
<stuffCategories>
<li>Fabric</li>
<li>Leathery</li>
</stuffCategories>
<thingCategories>
<li>Apparel</li>
</thingCategories>
<statBases>
<MaxHitPoints>200</MaxHitPoints>
<WorkToMake>100</WorkToMake>
<Mass>2.0</Mass>
<ArmorRating_Sharp>0.2</ArmorRating_Sharp>
<ArmorRating_Heat>0.05</ArmorRating_Heat>
<Insulation_Cold>-20</Insulation_Cold>
<Insulation_Heat>25</Insulation_Heat>
</statBases>
<equippedStatOffsets>
<MoveSpeed>-0.02</MoveSpeed>
<WorkSpeedGlobal>-0.10</WorkSpeedGlobal>
<MentalBreakThreshold>-0.15</MentalBreakThreshold>
<RecruitPrisonerChance>0.20</RecruitPrisonerChance>
<SocialImpact>0.1</SocialImpact>
<TradePriceImprovement>0.2</TradePriceImprovement>
<ShootingAccuracy>0.20</ShootingAccuracy>
<MeleeHitChance>0.25</MeleeHitChance>
<AimingDelayFactor>-0.2</AimingDelayFactor>
</equippedStatOffsets>
<generateCommonality>0.2</generateCommonality>
<apparel>
<bodyPartGroups>
<li>Torso</li>
<li>Shoulders</li>
<li>Arms</li>
<li>Legs</li>
</bodyPartGroups>
<worngraphicPath>Things/Apparel/WehrUniform/WehrUniform</worngraphicPath>
<layers>
<li>Shell</li>
</layers>
<tags>
<li>Outlander</li>
<li>Spacer</li>
</tags>
<defaultOutfitTags>
<li>Soldier</li>
</defaultOutfitTags>
</apparel>
</ThingDef>
</ThingDefs>
The second file is Bases_WehrUniform.xml :
<?xml version="1.0" encoding="utf-8" ?>
<ThingDefs>
<!-- normal bases -->
<ThingDef Name="WehrUniformApparelBase" Abstract="True">
<thingClass>Apparel</thingClass>
<category>Item</category>
<selectable>True</selectable>
<pathCost>10</pathCost>
<useHitPoints>True</useHitPoints>
<graphicData>
<onGroundRandomRotateAngle>35</onGroundRandomRotateAngle>
</graphicData>
<drawGUIOverlay>true</drawGUIOverlay>
<statBases>
<MaxHitPoints>100</MaxHitPoints>
<Flammability>1.0</Flammability>
<DeteriorationRate>2</DeteriorationRate>
<SellPriceFactor>0.5</SellPriceFactor>
</statBases>
<altitudeLayer>Item</altitudeLayer>
<alwaysHaulable>True</alwaysHaulable>
<tickerType>Never</tickerType>
<comps>
<li Class="CompProperties_Forbiddable"/>
<li>
<compClass>CompQuality</compClass>
</li>
</comps>
</ThingDef>
<ThingDef Name="WehrUniformApparelMakeableBase" ParentName="WehrUniformApparelBase" Abstract="True">
<recipeMaker>
<workSpeedStat>TailoringSpeed</workSpeedStat>
<workSkill>Crafting</workSkill>
<effectWorking>Tailor</effectWorking>
<soundWorking>Recipe_Tailor</soundWorking>
<recipeUsers>
<li>ElectricTailoringBench</li>
<li>HandTailoringBench</li>
</recipeUsers>
<unfinishedThingDef>UnfinishedApparel</unfinishedThingDef>
</recipeMaker>
</ThingDef>
</ThingDefs>
Here I deleted the line:
<li>
<compClass>CompColorable</compClass>
</li>
The Uniform is craftable but still uses the colour of the used stuff.
I don't get any errors at start of the game. Do I linked something wrong?
I'm near to give up on this topic :(
Don't give up! you're near the end.
now you need to make your modded apparel to use the modded base you just made.
Try to just change
<ThingDef ParentName="ApparelMakeableBase">
<defName>Apparel_WehrUniform</defName>
<....>
to
<ThingDef ParentName="WehrUniformApparelMakeableBase">
<defName>Apparel_WehrUniform</defName>
<....>
A base or Abstract is like a template you do to not have to retype everything from scratch.
And a Defs always inherits from it's parentBase if there is one
Quote from: kaptain_kavern on July 04, 2017, 11:07:08 AM
Don't give up! you're near the end.
now you need to make your modded apparel to use the modded base you just made.
Try to just change
<ThingDef ParentName="ApparelMakeableBase">
<defName>Apparel_WehrUniform</defName>
<....>
to
<ThingDef ParentName="WehrUniformApparelMakeableBase">
<defName>Apparel_WehrUniform</defName>
<....>
I changed it, but the WehrUniform still uses the colour of the used stuff instead of my texture colour :(
[attachment deleted by admin due to age]
Quote from: skullywag on July 04, 2017, 08:38:51 AM
Another way to do this would be to change the shader and use a mask texture. Mask the texture so nothing is effected by "stuff", you can then keep the stuff type recipe so it can be made of whatever but the image will always be the colour you made it.
Do you talk about a completely black shader or completely red? I'm pretty sure it's black but I'm not that gifted with "graphical stuff" ^^
@Ben84 : It's related to this : https://github.com/seraphile/rimshare/wiki/Colouring-in-Images
Quote from: kaptain_kavern on July 04, 2017, 12:08:11 PM
Quote from: skullywag on July 04, 2017, 08:38:51 AM
Another way to do this would be to change the shader and use a mask texture. Mask the texture so nothing is effected by "stuff", you can then keep the stuff type recipe so it can be made of whatever but the image will always be the colour you made it.
Do you talk about a completely black shader or completely red? I'm pretty sure it's black but I'm not that gifted with "graphical stuff" ^^
@Ben84 : It's related to this : https://github.com/seraphile/rimshare/wiki/Colouring-in-Images
Thanks for your patience so far. But I wonder, why it's not working with the bases.xml file !?
Also for this shader thing, i will try that,too. But where to put the xml code in? Is it a seperate xml file, if yes how to name and where to locate it? If not, then where to put the xml code in, in apparel.xml or bases.xml ?
So that means I have to made 3xMale, 3xFemale,3xHulk, 3xFat and 3xThin black 128x128px files named with the m before .png....
I really wish there just was a xml tag like: <UseColorVariation>FALSE</UseColorVariation>
Honestly idk why it's not working but it should work like. It was last time I tried a couple of alphas back I admit. Maybe you can share with us the files directly so we can look at what is not working.
About the shader it's just some tags like explained in the link. The game can ignore some area while applying a color, the black parts of the "shading" texture so I'm guessing skully was talking about using this with a totally black "shading" texture file so the game will coloring but it will also ignore the whole of your texture will doing so
Now I created these black alphas and named it like mentioned in your link, but nothing happens. My ugly greyish Uniform gets still colored by the stuff colours :/
And with the bases.xml, maybe I made some wrong links somewhere or just simple spelling mistakes, idk.
But my two different helmets are shown correctly in game, cause they use steel and not beaver stuff ;)
And the texture of my WehrUniform also works except the colour issue. So the path structure is very simple and seems to work.
I attached my very simple first mod, hopefully you find the bug.
I keep testing and checking the files and report,if I find something, but for now I'm really demotivated -.-
[attachment deleted by admin due to age]
if youre using graphic_single you need the shader added:
<ShaderType>CutoutComplex</ShaderType>
inside the graphicData section.
Quote from: skullywag on July 04, 2017, 03:02:18 PM
if youre using graphic_single you need the shader added:
<ShaderType>CutoutComplex</ShaderType>
inside the graphicData section.
I did that for both xml, so apparel and bases.xml. Now it is shown correctly, if the Uniform item is dropped.
But when its equipped, it still uses stuff used colour (ó.Ò)
Here the entries I added for both:
Apparel:
<graphicData>
<texPath>Things/Apparel/WehrUniform/WehrUniform</texPath>
<graphicClass>Graphic_Single</graphicClass>
<ShaderType>CutoutComplex</ShaderType>
</graphicData>
Bases:
<graphicData>
<onGroundRandomRotateAngle>35</onGroundRandomRotateAngle>
<ShaderType>CutoutComplex</ShaderType>
</graphicData>
(If I understood correctly, the 'shader entry' is only necessary for the bases.xml, cause apparel will inherit its entry) Anyway, I tried it with both entries at the same time, I tried it with single entry just only for bases and next time only for apparel.xml, but still same result as described above.
[attachment deleted by admin due to age]
can't you just make it to use costList instead if nothing else is working ? So it wouldn't try to colorize it
Or making like it's done in vanilla ? make your texture grey (?desaturized? i'm not sure the right term) and applying the color you like ?
Juts so you are clear one 1 point the "bases" are inherited and then overriden by duplicate entries in the def using them. You dont need any xml element in both.
Quote from: kaptain_kavern on July 04, 2017, 08:16:56 PM
can't you just make it to use costList instead if nothing else is working ? So it wouldn't try to colorize it
That would feel like a lazy workaround to me.
Quote from: kaptain_kavern on July 04, 2017, 08:16:56 PM
Or making like it's done in vanilla ? make your texture grey (?desaturized? i'm not sure the right term) and applying the color you like ?
I don't know how to do that. But I think I will end my little modding exp. ,cause its just demotivating to don't be able to get a simple thing like that working correctly.
Quote from: skullywag on July 05, 2017, 04:30:00 AM
Juts so you are clear one 1 point the "bases" are inherited and then overriden by duplicate entries in the def using them. You dont need amy xml element in both.
But where is this' amy xml' element in both?
So my last try was to make the whole structure like FashionRIMsta Mod incl. path structure.
But the problem still persists. Helmets are craftable and shown correctly when dropped AND equipped.
Uniform is craftable and is shown correctly when dropped, but NOT when equipped.
(When equipped it still uses the colour of the used stuff)
So I tried to play around with this:
<worngraphicPath>Things/Pawn/Humanlike/Apparel/Coats/WehrUniform</worngraphicPath>
and added a 'm' to WehrUniformm to force to make use the alpha masks, but then they wearing 128x128 pink squares.
So I just don't know how to solve this behaviour -.-
[attachment deleted by admin due to age]
I dun typoed. Meant "any xml element" :D
But then what exactly do you mean with "You dont need any xml element in both." ?
so if you have <thingClass> in a def you dont need to have it in the "parent" or the base abstract (theyre the same thing), the point in an abstract is so you dont have to make a FULL def each time, for example lets say you are making a load of items and they all have the same HitPoints, you would put that in the parent abstract and NOT put it in the defs, they would inherit that value. Make sense?
Sounds reasonable and makes sense, yes. And I will take that for the future, but it doesn't solve my problem actually :(
Ok im just gonna clarify those reading at this point. If im understanding the problem right you want to use stuff to make the WehrUniform on any other thing in the game this is doable as you have seen, you simply add the shader to graphic_single and add a mask texture. However, for apparel there is a second draw method that draws the worn graphic, this does not use a shader you can set therefore this is impossible without c# modding. To make the WehrUniform work you would have to switch to using a costlist as others have suggested.
Ok, thanks @skullywag for that clarification.
Cause when its generally not possible, then I don't need a base xml nor I need these shader and alpha masks things.
So it is simply NOT possible that apparels made by stuff take the colour of the texture when equipped !
And thats exactly that what I asked for all the time :s
When using a base xml and deleting the <li><compClass>CompColorable</compClass></li> line there, it
just did nothing. So my base is actually completely useless, cause I only made it to try to avoid that the apparel is colored by the stuff.
And for the shader and alpha masks; it only works for dropped apparels, which is nice to know, but like you said and I noticed ingame it doesn't work for equipped (worn) apparel.
But the whole thread is about this topic
--> Stop clothing piece from changing colour based on materials<--
So we can answer and end this thread with saying: Is NOT possible without C# modding.
It's a pity by the way.
So another question: Is a mod out there that just transfers any kind of stuff to normal simple cloth (maybe by adding a new task to the tailors bench) ???
I know some people have tgier own personal mods that simply adds a recioe that takes any leather stuff and outputs either cloth or another type of fabric. Simple enough mod to make if you want a crack at it. Simply add a recipe that takes say 10 leather stuff and outputs 10 (or whatever) cloth. Add the tailor table to the recipe via recipeUsers xml node.
Quote from: skullywag on July 06, 2017, 03:17:19 AM
I know some people have tgier own personal mods that simply adds a recioe that takes any leather stuff and outputs either cloth or another type of fabric. Simple enough mod to make if you want a crack at it. Simply add a recipe that takes say 10 leather stuff and outputs 10 (or whatever) cloth. Add the tailor table to the recipe via recipeUsers xml node.
I tried....and after nearly 2 hours ^^ I was able to reduce the errors caused by my new recipe to only one left, but I don't find a way to strike this one last remaining error.
So this my simple recipe:
<?xml version="1.0" encoding="utf-8" ?>
<RecipeDefs>
<RecipeDef>
<defName>LederVerarbeitung</defName>
<label>Leder Verarbeitung</label>
<description>Verarbeite Leder zu normalem Stoff.</description>
<jobString>Stoff aus Lederverarbeitung.</jobString>
<workAmount>200</workAmount>
<workSpeedStat>TailoringSpeed</workSpeedStat>
<workSkill>Crafting</workSkill>
<effectWorking>Tailor</effectWorking>
<workSkillLearnFactor>0.15</workSkillLearnFactor>
<soundWorking>Recipe_Tailor</soundWorking>
<allowMixingIngredients>true</allowMixingIngredients>
<ingredients>
<li>
<filter>
<Categories>
<StuffCategories>
<li>Leathery</li>
<li>Fabric</li>
</StuffCategories>
</Categories>
</filter>
<count>20</count>
</li>
</ingredients>
<products>
<Cloth>10</Cloth>
</products>
<fixedIngredientFilter>
<Categories>
<StuffCategories>
<li>Leathery</li>
<li>Fabric</li>
</StuffCategories>
</Categories>
</fixedIngredientFilter>
<defaultIngredientFilter>
<Categories>
<StuffCategories>
<li>Leathery</li>
<li>Fabric</li>
</StuffCategories>
</Categories>
</defaultIngredientFilter>
<recipeUsers>
<li>ElectricTailoringBench</li>
<li>HandTailoringBench</li>
<li>CraftingSpot</li>
</recipeUsers>
</RecipeDef>
</RecipeDefs>
And this is the last error I can't get rid off:
XML format error: List item found with name that is not <li>, and which does not have a custom XML loader method, in <Categories><StuffCategories><li>Leathery</li><li>Fabric</li></StuffCategories></Categories>
When I used <ThingDefs> tag instead of <Categories> I get even more errors.
So what I'm missing here?
Can you attach your mod as it is now, im thinking this is something in the file itself (whitespace or dodgy char encoding or something)
Cause of that xml format error I think it has to do with this used Category tags and my bad english knowledge. Is there anoher term for 'Leathery' and 'Fabric' ...maybe RawTextiles ?
I attached the current version.
[attachment deleted by admin due to age]
Ah wait you have used StuffCategories, replace the relevant sections with:
<fixedIngredientFilter>
<categories>
<li>Leathers</li>
<li>Textiles</li>
</categories>
</fixedIngredientFilter>
<defaultIngredientFilter>
<categories>
<li>Leathers</li>
<li>Textiles</li>
</categories>
</defaultIngredientFilter>
That might add too many types to use (but it should still work fine), if you need only a couple of items out of Textiles let me know i can adjust it to be ALL leather and SOME fabrics.
Quote from: skullywag on July 06, 2017, 11:09:06 AM
Ah wait you have used StuffCategories, replace the relevant sections with:
<fixedIngredientFilter>
<categories>
<li>Leathers</li>
<li>Textiles</li>
</categories>
</fixedIngredientFilter>
<defaultIngredientFilter>
<categories>
<li>Leathers</li>
<li>Textiles</li>
</categories>
</defaultIngredientFilter>
That might add too many types to use (but it should still work fine), if you need only a couple of items out of Textiles let me know i can adjust it to be ALL leather and SOME fabrics.
Yeah, cool. It works now. So it was this 'stuffCategory' tag. Thanks so much @skullywag :)
The funny thing is, the cloth made by beaver leather for example looks brown ^^ but can be stacked with the white cloth, hopefully my new Uniforms made by brown cloth will still take the texture colour and not the brown cloth colour.
And yes I have to add some exceptions, cause crafting 10 cloth of using 20 cloth is a bad deal I think ;)
Also I have a huge lag of the ingame terms, cause in core files I saw 'Leathery' and 'Fabrics' and here it is 'Leathers' and 'Textiles'.
Anyway, thanks so much for your patience and help ! I really appreciate that.