Change color of object... and texture of object that shares a texture

Started by jabbamonkey, December 27, 2018, 09:48:31 AM

Previous topic - Next topic

jabbamonkey

I have two issues.  Here is a preview of the work I've been doing, with the two issues circled:
http://classicgaming.cc/temp/rimsynthmeat.jpg

1. Recolor Synth Meat
First, issue is with Synthetic Meat.  I changed the texture for all the meats ... and synthetic meat uses the same texture for Meat_Big, but changes the color/hue of the meat. Right now, the color isn't great, and I want to change it. I searched the core def files for "synthetic" but found NO reference to synthetic meat anywhere. Unfortunately, that's the only place I know where to look ... and even if I found it, I have no idea how to adjust the color... Can someone help?

2. Replace Flake Texture ... but not yayo
Second issue is with flake. It uses the same texture as yayo, and recolors it. I just want to replace the texture entirely (with NO recoloring). Once again, I searched the core DEF files, but didn't find any reference to flake textures. Any idea what to do?
Please help. Thanks...

Mehni

can't load image. What's Synthmeat anyway? I've never come across it in vanilla.

> 2. Replace Flake Texture ... but not yayo

    <defName>Flake</defName>
    <graphicData>
      <texPath>Things/Item/Drug/Yayo</texPath>
      <graphicClass>Graphic_StackCount</graphicClass>
      <color>(150,170,150)</color>
      <drawSize>0.75</drawSize>
    </graphicData>


You're already familiar with xpath, aren't you? Change the texPath or what ever other parts of the graphicData node to that of your liking.

jabbamonkey

Quote from: Mehni on December 27, 2018, 11:46:58 AM
can't load image.

Hmmm.... that's odd. It's coming up fine for me.

Quote from: Mehni on December 27, 2018, 11:46:58 AM
What's Synthmeat anyway? I've never come across it in vanilla.

Ah, you know what, it's probably from someone else's mod that I have installed. I think it's probably Rimsenal - Federation (the robots that attack drop synthetic meat). I'll take a look in there and see if I can clarify...  Maybe I can solve it (and if not, I'll be back).  :)

Quote from: Mehni on December 27, 2018, 11:46:58 AM
You're already familiar with xpath, aren't you? Change the texPath or what ever other parts of the graphicData node to that of your liking.

I'm not SO familiar with xpathing, but I'm learning (I'm more of a designer). I tried to xpath a solution, but wasn't getting anywhere ... then, when you suggested it again, I took another shot ...

        <li Class="patchOperationReplace">
         <success>Always</success>
         <xpath>Defs/ThingDef[defName = "Flake"]/graphicData/texPath</xpath>
         <value>
            <texPath>Things/Item/Drug/Flake</texPath>
         </value>
      </li>

... and this worked (since you showed me to info to the Flake info, I was able to double check the paths and naming convention):