Map Indexing

From ALiVE Wiki
Revision as of 07:12, 19 June 2015 by Friznit (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Indexing maps for ALiVE is relatively straight forward process but there are some laborious manual steps involved. By far the most time consuming is defining the Static Data for custom maps so that ALiVE can understand the context in which building objects are used. For example, a "house" object could be used in both a military context such as a compound or army base but it may also be used in a civilian town context. To make matters worse, there is no standard naming convention or pattern to it, even with stock BIS objects. ArmA2 buildings are named differently to ArmA3 ones and that's before we even get into mods and addons. A computer isn't intelligent enough to correlate the data so we need to give it instructions in the form of static data. Finally, the only way to know if you've got it right is to run the map analysis, which can take up to 30 mins on larger maps!

Indexing Steps

This is a very basic summary of the main steps taken to index a map for ALiVE:

  1. Capture and parse a list of all map objects to scrub irrelevant junk like trees and rocks
  2. Manually define building types in the context they are used by the map maker (Static Data)
  3. Autodetect building clusters to identify civilian and military centres
  4. Generate ALiVE objectives


Defining Static Data

Understanding how the map maker has used building objects and ensuring they are placed in the right context is key to successfully indexing a map. This can take a lot of trial and error and literally teleporting around a new map cursorTargetting buildings with the debug console to see where they're used. If you get it wrong, the subsequent automatic analysis has to be redone.

The different contexts recognised by ALiVE are as follows:

Military Buildings

ALIVE_militaryBuildingTypes ALIVE_militaryParkingBuildingTypes ALIVE_militarySupplyBuildingTypes ALIVE_militaryHQBuildingTypes ALIVE_militaryAirBuildingTypes ALIVE_militaryHeliBuildingTypes

Civilian Buildings

ALIVE_civilianAirBuildingTypes ALIVE_civilianHeliBuildingTypes ALIVE_civilianPopulationBuildingTypes ALIVE_civilianHQBuildingTypes ALIVE_civilianSettlementBuildingTypes

Civilian Infrastructure

ALIVE_civilianPowerBuildingTypes ALIVE_civilianCommsBuildingTypes ALIVE_civilianMarineBuildingTypes ALIVE_civilianRailBuildingTypes ALIVE_civilianFuelBuildingTypes ALIVE_civilianConstructionBuildingTypes


Example Static Data

The static data arrays look something like this once they're all plugged in. Note that you do not need the full object name in the variable, so for example the variable mil_house recognises mil_house_1; mil_house_2; mil_house_2a...etc

    ALIVE_airBuildingTypes = ALIVE_airBuildingTypes + [
    	"hangar"
    ];
 
    ALIVE_militaryParkingBuildingTypes = ALIVE_militaryParkingBuildingTypes + [
    	"bunker",
    	"cargo_patrol_",
    	"research",
    	"barrack",
    	"airport",
        "mil_house",
        "mil_controltower",
        "mil_guardhouse",
        "deerstand",
        "u_barracks_v2_f"
    ];
 
    ALIVE_militarySupplyBuildingTypes = ALIVE_militarySupplyBuildingTypes + [
    	"barrack",
    	"cargo_hq_",
    	"cargo_patrol_",
    	"research",
    	"posed",
    	"mil_controltower",
    	"fuelstation_army",
    	"mil_house"
    ];
 
    ALIVE_militaryHQBuildingTypes = ALIVE_militaryHQBuildingTypes + [
    	"barrack",
    	"cargo_hq_",
    	"barrack",
        "mil_house"
    ];
 
    ALIVE_militaryAirBuildingTypes = ALIVE_militaryAirBuildingTypes + [
         "airport_tower"
 
    ];
 
    ALIVE_civilianAirBuildingTypes = ALIVE_civilianAirBuildingTypes + [
    	"ss_hangar",
        "hangar_2",
        "hangar",
        "runway_beton",
        "runway_end",
        "runway_main",
        "runway_secondary"
    ];
 
    ALIVE_militaryHeliBuildingTypes = ALIVE_militaryHeliBuildingTypes + [
 
    ];
 
    ALIVE_civilianHeliBuildingTypes = ALIVE_civilianHeliBuildingTypes + [
    	"heli_h_civil"
    ];
 
    ALIVE_militaryBuildingTypes = ALIVE_militaryBuildingTypes + [
    	"airport_tower",
    	"bunker",
    	"cargo_patrol_",
    	"research",
    	"army_hut",
    	"mil_wall",
    	"fortification",
    	"dome",
    	"deerstand",
        "barrack",
        "mil_house",
        "mil_controltower",
        "mil_guardhouse",
        "deerstand",
        "hospital"
    ];
 
    ALIVE_civilianPopulationBuildingTypes = ALIVE_civilianPopulationBuildingTypes + [
        "house_",
        "shop_",
        "garage_",
        "stone_"
    ];
 
    ALIVE_civilianHQBuildingTypes = ALIVE_civilianHQBuildingTypes + [
    	"offices",
    	"a_office01"
    ];
 
    ALIVE_civilianPowerBuildingTypes = ALIVE_civilianPowerBuildingTypes + [
    	"dp_main",
    	"spp_t",
    	"pec_",
        "powerstation",
        "trafostanica"
    ];
 
    ALIVE_civilianCommsBuildingTypes = ALIVE_civilianCommsBuildingTypes + [
    	"communication_f",
        "telek",
        "telek1",
        "transmitter_tower"
    ];
 
    ALIVE_civilianMarineBuildingTypes = ALIVE_civilianMarineBuildingTypes + [
    	"crane",
    	"lighthouse",
    	"nav_pier",
    	"pier_",
    	"pier"
    ];
 
    ALIVE_civilianRailBuildingTypes = ALIVE_civilianRailBuildingTypes + [
 
    ];
 
    ALIVE_civilianFuelBuildingTypes = ALIVE_civilianFuelBuildingTypes + [
    	"fuelstation",
    	"dp_bigtank",
        "indpipe",
        "komin",
        "ind_tankbig"
    ];
 
    ALIVE_civilianConstructionBuildingTypes = ALIVE_civilianConstructionBuildingTypes + [
    	"wip",
    	"bridge_highway",
    	"sawmillpen",
    	"workshop"
    ];
 
    ALIVE_civilianSettlementBuildingTypes = ALIVE_civilianSettlementBuildingTypes + [
        "church",
    	"hospital",
    	"amphitheater",
    	"chapel_v",
    	"households",
    	"generalstore",
        "house",
        "domek",
        "dum_",
        "kulna",
        "afbar",
        "panelak",
        "deutshe",
        "dum_mesto_in",
        "dum_mesto2",
        "hotel"
    ];
};


How Can You Help?

Providing the Static Data array for a map would be a huge help to the ALiVE team. We have tools to generate the raw indices and report a list of building types used in the map but plugging it all together takes considerable effort. There is still a fair degree of trouble shooting that we need to do but completing these steps would help us crack on with more user made maps!

Please post on the alivemod.com forums for further information if you are interested.