ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Flat: Difference between revisions

From ModEnc
Jump to navigation Jump to search
DeathFish (talk | contribs)
No edit summary
Crimsonum (talk | contribs)
A little cleanup on the intro, feel free to adjust if I made a mistake.
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
|name={{PAGENAME}}
|name={{PAGENAME}}
|files={{Categ|ini=art}}
|files={{Categ|ini=art}}
|types={{Categ|BuildingTypes}},{{Categ|Animations}},[[Image]]
|types={{Categ|BuildingTypes}}, {{Categ|Animations}}
|values={{Values|boolean}}
|values={{Values|boolean}}
|default=no
|default=no
Line 12: Line 12:
|ares=yes
|ares=yes
}}
}}
States if this [[BuildingTypes|building]]+[[animation]]+[[Image]] lays flat on the ground. Decide whether the [[ZAdjust|Z-depth]] is laid out in the northwest direction on the plane or in the upward direction in space. The specific algorithm can be found in the coordinate system of a RA2DIY forum post linked in the See Also section at the bottom of the [[ZAdjust]] page.<br>
Specifies whether or not this [[BuildingTypes|building's]] or [[Animations|animation's]] [[image]] lays flat on the ground. Normally, the object's Z-axis extends in upward direction in 3D-space. If this flag is enabled, the [[ZAdjust|Z-axis]] for this object is laid out "flat" in the northwest direction on the XY-plane of reference. The specific algorithm can be found in the coordinate system of [https://bbs.ra2diy.com/forum.php?mod=viewthread&tid=24951 this RA2DIY forum post].
For animations, this flag also moves the animation 3 pixels up on the Y-axis, and has code for disabling the animation's shadow (in TS animation shadows don't work anyway).<br>
 
On animations, this flag disables the animation's [[shadow]] (note that in {{ts}}, animations cannot have shadows anyway).
 
The attack height (the height set by the [[FLH]] tag) affects the <b>Flat</b> tag if the <b>H</b> value (from [[FLH]]) is a negative value that will affect the height of the animation. The more negative The animation will be much lower (only <b>H=-1</b> to <b>H=-9</b> is supported. Values ​​greater than <b>9</b> will Make the animation disappear and heard only the sound)<br>[[File:H=-9.png]]<br><h3><b>H=-9</b></h3><br>The {{f|Tiled|yes|link}} tag destroys changes made to <b>H</b> values.<br>tag [[YDrawOffset]] can compensate for changed <b>H</b> values The value inside the [[YDrawOffset]] tag must be negative equal to the negative <b>H</b> value. Example: <b>H=-9</b> {{f|YDrawOffset|-9|link}}
The attack height (the height set by the [[FLH]] tag) affects the <b>Flat</b> tag if the <b>H</b> value (from [[FLH]]) is a negative value that will affect the height of the animation. The more negative The animation will be much lower (only <b>H=-1</b> to <b>H=-9</b> is supported. Values ​​greater than <b>9</b> will Make the animation disappear and heard only the sound)<br>[[File:H=-9.png]]<br><h3><b>H=-9</b></h3><br>The {{f|Tiled|yes|link}} tag destroys changes made to <b>H</b> values.<br>tag [[YDrawOffset]] can compensate for changed <b>H</b> values The value inside the [[YDrawOffset]] tag must be negative equal to the negative <b>H</b> value. Example: <b>H=-9</b> {{f|YDrawOffset|-9|link}}



Latest revision as of 11:14, 14 March 2025

Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: Flat
File(s): art(md).ini
Values: Boolean values: yes or no, true or false, 1 or 0
Default: no
Applicable to: BuildingTypes, Animations


Specifies whether or not this building's or animation's image lays flat on the ground. Normally, the object's Z-axis extends in upward direction in 3D-space. If this flag is enabled, the Z-axis for this object is laid out "flat" in the northwest direction on the XY-plane of reference. The specific algorithm can be found in the coordinate system of this RA2DIY forum post.

On animations, this flag disables the animation's shadow (note that in Tiberian Sun, animations cannot have shadows anyway).

The attack height (the height set by the FLH tag) affects the Flat tag if the H value (from FLH) is a negative value that will affect the height of the animation. The more negative The animation will be much lower (only H=-1 to H=-9 is supported. Values ​​greater than 9 will Make the animation disappear and heard only the sound)

H=-9


The Tiled=yes tag destroys changes made to H values.
tag YDrawOffset can compensate for changed H values The value inside the YDrawOffset tag must be negative equal to the negative H value. Example: H=-9 YDrawOffset=-9

Note

"and has code for disabling the animation's shadow (in TS animation shadows don't work anyway)"

  • In fact, the shadow logic on this tag still works. The actual shadow color will not work. But if you try adding other colors to the shadows. Shadow colors will work as normal.

  • The Flat tag has side effects. When used with large animations or animations that are too tall

  • Shadows of images defined in the Projectile section will be displayed normally.

Bugs/Side-Effects/Unexpected Limitations

  • If Projectile has Image=Voxel x any Then Voxel x have Flat=true in the Art.ini or Artmd.ini section will cause Voxel to not work efficiently
    According to the video below

https://www.youtube.com/watch?v=bwB6BhmGX6g

  • If the vehicle animation Voxel is currently playing. while the unit is tilting will produce strange results.
  • Flat=yes (Tilting)
The FLH level can be adjusted or the YDrawOffset tag can be used to resolve this issue.