Stop clothing piece from changing colour based on materials

Started by EzraN, August 12, 2016, 12:48:07 AM

Previous topic - Next topic

Ben84

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?

skullywag

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)
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Ben84

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]

skullywag

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.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Ben84

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.