Graphics Question

Started by CannibarRechter, August 19, 2017, 12:52:47 PM

Previous topic - Next topic

CannibarRechter

Hi,

I downloaded the (unofficial) A17 core art assets. In there, when I search for Corn, I find two entries:

CornPlantA_2 (with corn cobs on it), and
CornPlantA (without corn cobs on it)

When I look at the ThingDef for "PlantCorn" in Plants_Cultivated_Farm.xml, I see that the <graphicData> for PlantCorn points to Things/Plant/Corn/Plant, with graphicClass = GraphicRandom.

Under the <plant> entery, there is also an immatureGraphicPath of Things/Plant/Corn/Immature.

This is confusing. I am aware that when a graphic item has Graphic_Random, the reference is expected to be to a folder. I get that. But the folder and the .png file usually share a name. Note how "CornImmature" is not in any file name from the A17 texture dump. Can someone pretty please help out and tell me which file goes where if I were to override the definition of the corn plant with my own textures?

Is my copy of the A17 textures perhaps wrong?
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

jamaicancastle

The A17 texture dump doesn't include the original folder structure. In this case, the two graphics are presumably in different folders in the actual assets file, which the texture download doesn't reflect for whatever reason.

CannibarRechter

Yes. The A17 texture dump will mislead you. If one is modifying a graphics_random that also has an immature or leafless graphics, the files must be NAMED THE SAME, but be present in directories like this:

Corn/
    CornA.png
    CornB.png
Immature/Corn/
    CornA.png
    CornB.png
Leafless/Corn/
    CornA.png
    CornB.png

Note that leafless is a crops winter rendition. I'm not sure if it would do anything with something like Corn, but you would use it for something more like a tree or bush skeleton in winter.

CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

jamaicancastle

Quote from: CannibarRechter on August 21, 2017, 03:44:15 PM
Note that leafless is a crops winter rendition. I'm not sure if it would do anything with something like Corn, but you would use it for something more like a tree or bush skeleton in winter.
Most farmable crops have the dieWhenLeafless flag which... does what you'd expect from the name. If you remove that flag, they should use a leafless texture during winter like other plants.