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

Image/On most objects in rules(md).ini

From ModEnc
Jump to navigation Jump to search
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: Image
File(s): rules(md).ini
Values: Strings: Normal text. (Limited to: art(md).ini sections)
Default: same as section name
Applicable to: TechnoTypes: AircraftTypes, BuildingTypes, InfantryTypes and VehicleTypes
as well as ObjectTypes: Animations, Projectiles, TMPTiles, OverlayTypes, ParticleSystems, Particles, SmudgeTypes, TerrainTypes and VoxelAnimTypes


Defines the art section name used by the object, and the latter controls many display-related definitions such as the specific resource files to read and firing coordinates.

In Red Alert

Reverse-Engineered Content
The following page/section possibly contradicts several ideas accepted by the community. However, it contains information reverse-engineered from the game's executable code, not observations or theories, and as such should be considered more likely to be correct.

Since there is no art(md).ini, the Image= in Red Alert directly determines the image definition at the INI level. After obtaining the string xxx from INI, the program processes the image as follows:

  1. The object's own image is xxx.shp.
  2. The object's icon image is xxxicon.shp.
    • If it is an InfantryType, then xxx takes only the first 4 characters;
    • If it is a BuildingType, then its Fake version replaces the 4th character with f.
  3. The building's construction animation is xxxmake.shp.

Notes

Starting from Tiberian Sun, if a vehicle has Turret=yes, it will automatically match files named <artname>barl with extensions .vxl and .hva as the Barrel. If the art entry used by the vehicle has Voxel=yes, then it will match files named <artname>tur with extensions .vxl and .hva. Otherwise, it uses the 32 frames after the body sequence in the shape resource file and the 32 frames after the body shadow sequence as the shadow.

In Tiberian Sun, a vehicle named [APC] that uses a Voxel=yes image will use the image specified by its Image= in art(md).ini on land, but in water, it will hardcode switch to an image with "w" appended to the end of its art section name. For example, if [APC]Image=MCV, then in water, it will switch to the MCVW series files as the image.

In Tiberian Sun, a vehicle with Harvester=yes will switch to the image of the unit specified by [AudioVisual]UnloadingHarvester= during the process of docking to a building with DockUnload=yes to perform unload.

  • Starting from Red Alert 2, this is changed to use the image of the unit specified by the vehicle's own UnloadingClass=.

In Yuri's Revenge, a vehicle with IsSimpleDeployer=yes will switch to the image defined by its UnloadingClass= after deploy, until undeploy.

Bugs/Side-Effects/Unexpected Limitations

A vehicle in Red Alert with Image=none

In Red Alert, a unit set with a non-existent image will render using an empty shp like in later games, but it additionally disables the display of health bar and select box. The unit's cameo will use a solid color effect of 28,20,0, and text drawn on it cannot be properly cleared. For example, after production, the Ready text will continue to flash, and if On Hold text has been drawn, the two will overlay.

If [APC]Turret=yes, then in water, only xxxtur will be displayed without the xxx body image.

If [APC]Turret=yes and there are resource files for xxxwtur but no resource files for xxxtur, then it will trigger EIP#00668654 (TS 2.03).

If a BuildingType uses Image= to specify another image, then the values of flags such as CanBeHidden will use those from the art section with the same name as the BuildingType, rather than from the art section specified by Image=. For example, if the two art sections have different values set for Foundation, then unless the art section with the same name in rules does not define a valid Foundation value, the value from the art section specified by Image= will not be used.

References

Starting from Ares 0.1, vehicles using Voxel resource files can, through WaterVoxel=yes, switch from the .vxl and .hva files of xxx to using the .vxl and .hva files of xxxwo in water.

Starting from Ares 0.2, WaterVoxel=yes was changed to WaterImage= (VehicleType) to specify a vehicle and use its image, and added support for Shape resource files.

Starting from Phobos Build#47, vehicles can, in addition to distinguishing whether on water, also define images for different damaged states when on land and in water, respectively. Refer to Phobos documentation - Damaged unit image changes.

Starting from Phobos Build#48, aircraft can also define images based on damaged states. Refer to Phobos documentation - Damaged aircraft image changes.

See Also

How The Engine Uses Files