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

How The Engine Uses Files: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Created
 
rw
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
(This example focuses on InfantryTypes, however, all other object types (VehicleTypes, AircraftTypes, BuildingTypes) work roughly the same way.
(This example focuses on InfantryTypes, however, all other object types (VehicleTypes, AircraftTypes, BuildingTypes) work roughly the same way.


[[Image:Artwork scheme.png|thumb|150px|right|A crude graphic version of this explanation]]
The engine loads the object artwork like this:
The engine loads the object artwork like this:
* Reads the [{{Tt|InfantryTypes}}] section from {{Tt|Rules(md).ini}} and creates a list of all objects listed in it.
* Reads the [{{Tt|InfantryTypes}}] section from {{Tt|Rules(md).ini}} and creates a list of all objects listed in it.
Line 21: Line 22:


{{Fn|2|For certain object type, the {{Tt|Image}} value in {{Tt|art(md).ini}} is acknowledged and overrides over the {{Tt|Rules(md).ini}} value of {{Tt|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). ) }}
{{Fn|2|For certain object type, the {{Tt|Image}} value in {{Tt|art(md).ini}} is acknowledged and overrides over the {{Tt|Rules(md).ini}} value of {{Tt|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). ) }}
Also see [[Media:Artwork scheme.png|a crude graphic version of this explanation]].


[[Category: General Editing Information]]
[[Category: General Editing Information]]
[[Category: Tutorials]]
[[Category: General Tutorials]]

Latest revision as of 12:38, 30 March 2008

(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). )