(Graphic_RandomRotated?) Graphic_Random rotation bug?

Started by cuproPanda, June 12, 2015, 05:33:30 PM

Previous topic - Next topic

cuproPanda

When I try to place a rotated painting, the blueprint shows the rotation I want, but then once installed the painting reverts to the unrotated graphic. Is this an issue with using Graphic_Random? I know there is currently an issue using Graphic_Random with mask info, but I don't know if this is something similar or not.

The code block, for reference
<ThingDef ParentName="PaintingBase">
<defName>Painting</defName>
<label>painting</label>
<description>A painting. Useful for covering up holes, and quite easy on the eyes.</description>
<graphicData>
<texPath>Things/Building/Furniture/Painting</texPath>
<graphicClass>Graphic_Random</graphicClass>
</graphicData>
<minifiedDef>MinifiedFurniture</minifiedDef>
<socialPropernessMatters>true</socialPropernessMatters>
<hasInteractionCell>true</hasInteractionCell>
<interactionCellOffset>(0,0,-1)</interactionCellOffset>
<fillPercent>0.0</fillPercent>
<altitudeLayer>MoteOverhead</altitudeLayer>
<rotatable>true</rotatable>
<statBases>
<MarketValue>25</MarketValue>
<MaxHitPoints>10</MaxHitPoints>
<Flammability>1.0</Flammability>
<Beauty>30</Beauty>
</statBases>
</ThingDef>


In the image below:
The left painting is the install blueprint with the interaction cell facing north
The right painting is already installed, also with the interaction cell facing north, but the graphic is unrotated.

[attachment deleted due to age]
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

jacob814

Try out instead of Graphic_Random, Graphic_Single if you haven't. I dont think Graphic_Random was meant to be used with a single texture. I would like to know if this will work.
My Mods:
Glass&Lights

cuproPanda

#2
Quote from: jacob814 on June 12, 2015, 06:47:49 PM
Try out instead of Graphic_Random, Graphic_Single if you haven't. I dont think Graphic_Random was meant to be used with a single texture. I would like to know if this will work.

It's not a single graphic, though, it's randomly 1 out of 10. It is the same as the sculptures, rock chunks, and slag: the graphic is in it's own folder with (for example) PaintingA, PaintingB, PaintingC and Graphic_Random chooses one of those. Notice how the two paintings look different even though they're the same object? They are similar looking, so it may be hard to tell
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

cuproPanda

OK I have more info now. I have been trying to use Graphic_RandomRotated in the hopes that it would do what I needed it to, but so far no luck. I keep getting the below error. I have tried adding in the rotations and masks (thankfully only to 3 to test) using PaintingA_front and PaintingA_frontm along with the respective variations, but so far nothing is working, and the error I am getting isn't making any sense. Can someone translate it? I feel completely stuck, and I know this problem can't be as hard as it seems.

[attachment deleted due to age]
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!