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

How The Engine Uses Files

From ModEnc
Jump to: navigation, search

(This example focuses on InfantryTypes, however, all other object types (VehicleTypes, AircraftTypes, BuildingTypes) work roughly the same way.

A crude graphic version of this explanation

The engine loads the object artwork like this:

  • Reads the [InfantryTypes] section from Rules(md).ini and creates a list of all objects listed in it.
  • For each object listed, it:
    • Tries to find a section with the same name as the object.
      • If it fails, it continues to the next object.
    • Tries to read the Image flag from that section.
      • If it fails, it assumes that the object's Image is the same as section name.
    • Tries to read a section in Art(md).ini with the same name as the object's Image.
    • Reads the Cameo and AltCameo flags from that section. Let's say the section says
Cameo = ioncicon
AltCameo = tanyicon
    • Loads the object's artwork from a file named section_name.shp 1 2.
      • If it fails, the object will be rendered invisible.
    • Loads the object's cameo from a SHP file named the same as the Cameo value, in this case, ioncicon.shp.
    • Loads the object's alternative cameo from a SHP file named the same as the AltCameo value, in this case, tanyicon.shp.
      • If either of these loads fails, the dummy cameo, from the file xxicon.shp is loaded instead.

1 If the object has Voxel=yes, the extension changes to .vxl , and another file with the same name, but the extension .hva, is also loaded.

2 For certain object type, the Image value in art(md).ini is acknowledged and overrides over the Rules(md).ini value of Image. (To the revision author's knowledge, this does not apply to InfantryTypes (proof = CAML), VehicleTypes (proof = BFRT) and AircraftTypes, but applies to BuildingTypes and Animations (proof = any damaged active animation). )