Data/Footprints

## Footprints

### Description

Pathing data determining how units can be placed and moved over. Buildings need footprints to prevent units from walking through them, and for placement.

### Hints

* The footprints have a unique editor UI when modifying
* Footprints are stored as triangular geometries with more complex footprints requiring more triangles to form
* Custom pathing footprints are bugged and will not initially show up in the editor (as of Mar 03, 2011). In order to preview your footprint in the editors pathing mesh close the Terrain Editor and reopen it.
* Footprints forbides units from turning. Only turrets can outpass this issue.
* The integration of a footprint in game is poor of possiblities/content. You can put a footprint innate on a unit or a doodad and that's about it. There is no upgrade, behavior (other than Creep Source) that can create footprint content, perhaps only a create unit effect that would create a stationnary dummy unit with predefined footprint. Even Creep Source behaviors are limited to Creep apply, and can't use any other footprint effect. A unit with a footprint inside a transport/inventory/magazine does not generates its effects either.

To understand this type of data, one must understand the main parts of this screenshot. The **bold** names can be directly be refered to the image above.

* The **square** in the center is the **Area** field of this data. You can paint it with variety of set ups and there are mainly 3 categories (**Layer**). Each category has its own **square**, which means that painting one of them will not affect what the other **layers** currently have.
	1. **Pathing**: The active pathing of the unit. This marks and tells how many squares the unit/structure is currently using, especially if you are to build another structure around.
	2. **Placement Apply** (said as ***Place*** on Table View): Determines what placement flags are applied to cells; The effect caused on surrounding terrain/units once the footprint is active. Ex: Generates Creep, Uncreeps, Blocks Vision, etc. This could also be used for creating shrubs (hiding spots in which ground units cannot see from the outside, but insiders can see from it).
	3. **Placement Check** (said as ***Check*** on Table View): Determines placement flag requirements for cells when a unit with this footprint is being placed

* The Placement **Apply** and **Check** both have their Sets. Each sets represent a variety of flags that can be modified using the the **Define Set** button (seen in **Excluded** and **Required** on table view). The flags purposes are unique to the **layer** type. The **None** selection only means "do not use/modify any of those". It is not mandatory to use every set, as only one could do, but it is possible to use up to 4 sets to create variety in the footprint. Just take note that according the flags checked, the color of the square painted by the selected set can change in various colors, based on those flags.

## Fields Description

### Footprint Group

* Used for classification of footprints
* **None:** (Unknown)
* **Generic:** (Unknown)
* **Shapes:** (Unknown)
* **Shapes\Contours:** (Unknown)
* **Shapes\Tiles:** (Unknown)
* **Specific:** Unique Footprints used for a specific unit/doodad
* **Specific\Doodads:** (Unknown)
* **Specific\Others:** (Unknown)
* **Specific\Structures:** (Unknown)

### Layers - Area

Determines the size of the footprint area for the pathing and placement relative to the unit/doodad origin

* Automatically calculated by the Footprint Editor

### Layers - Rows

* The arrays for the placement apply and placement check maps for the footprint
* The left is placement check and the right is placement apply

### Layers - Sets - Character

* The symbols used for the set numbers on the placement maps for the footprint
* Period (.) = (None)
* x = Set One
* o = Set Two
* f = Set Three
* m = Set Four

### Layers - Sets - Excluded

Flags for the placement check and placement apply **Invalid** conditions for each **Set**

* Although available for placement apply they are not used by the footprint editor
* No.1 = Ground - No Spawn
* No.2 = No Build
* No.3 = Near Resources
* No.4 = Resource Drop Off
* No,5 = Creep
* No.6 = No Creep
* No.7 = No Creep Permanent
* No.8 = Masked
* No.9 = Fogged
* No.10 = Block Vision
* No.11 = Boost Cliff
* No.12 = Boost Height
* No.13 = Shrub Vision
* No.14 = No Burrowing
* No.15 = No Can See

### Layers - Sets - Required

Flags for the placement check and placement apply **Required** and **Acts As** conditions for each **Set**

* No.1 = Ground - No Spawn
* No.2 = No Build
* No.3 = Near Resources
* No.4 = Resource Drop Off
* No.5 = Creep
* No.6 = No Creep
* No.7 = No Creep Permanent
* No.8 = Masked
* No.9 = Fogged
* No.10 = Block Vision
* No.11 = Boost Cliff
* No.12 = Boost Height
* No.13 = Shrub Vision
* No.14 = No Burrowing
* No.15 = No Can See

### Shape - Borders

* Used to determine the shape of the pathing layer
* Automatically calculated by the Footprint Editor
* First digit appears to be some point index number
* Third digit is the pathing value/type
	+ 0 = Unpathable Terrain
	+ 1 = Ground
	+ 2 = Building
	+ 3 = Cliff

### Shape - Mode

* The pathing footprint priority for rewriting the pathing mesh
* Known as **Type** in the Footprint Editor
* **Regular/Standard:** Able to overwrite **Ground** pathing
	+ Use for structures
* **Overlay:** Able to overwrite all pathing except ground. Unable to create ground pathing over unpathable terrain
* **Persistent:** Permanently overwrites the pathing mesh even on unit death/removal.
	+ Use for Bridges
	+ It is advisable to have units that use this kind of footprint morph into a form that has a persistent a footprint that restores the pathing grid to its original state before death/removal of the unit
	+ Known to cause cumulative leaks/lag if changed too frequently

### Shape - Offsets

* Location of the points used to create the pathing mesh for the footprint
* The number relates to the "Complexity" of the footprint
* Automatically calculated by the Footprint Editor

## Footprint Editor

### Complexity

* Related to the number of triangles needed to make the footprint
* Has a cap to reduce potential lag caused by the number of calculations needed to change the pathing mesh/unit pathing

### Size

* How many Terrain Editor placement grid squares the footprint covers
* Units are always centered in the middle (small yellow dot)

### Layer

* Footprints have 3 layers: **Pathing** (affects unit pathing), **Placement Apply** (determines what placement flags are applied to cells), and **Placement Check** (determines placement flag requirements for cells when a unit with this footprint is being placed)

### Resolution

* Adjusts the resolution of footprints with each setting increasing the resolution by the power of 2
* **Large:** Same scale as the map placement grid
* **Medium:** 1/4 scale
* **Small:** 1/16 scale
* **Tiny:** 1/64 scale
* Useful if the map maker wants to maximize utility of map size by scale reduction
* Changing to a higher resolution will result in being able to make more detailed and meticulous pathing

### Value

* **Nothing:** Works as an eraser and removes pathing already placed. Grey in color.
* **Building:** This portion of terrain is unbuildable but still able to be pathed by ground units. Yellow in colour.
* **Unpathable:** This portion of terrain is unable to be moved on by units with ground based movers. Red in colour
* **Ground:** This portion of terrain is considered as part of the ground and can be walked on. Green in colour
* **Cliff:** This portion of terrain is a cliff and can only be traversed by flying units or units with a Scaler mover. Blue in colour

### Brush Size

* Changes how much or how little the cursor paints the selected pathing on the footprint.
* Resolution based

### Type

* **Standard:** Standard footprints are used for most units and buildings. They can only change pathing from ground on the same cliff level.
* **Overlay:** Overlay footprints will overwrite all non-ground pathing. They are rarely used.
* **Persistent:** Persistent footprints will permanently stamp the pathing mesh with its image. They can be overridden but never removed. Use this for bridges.
	+ Not removed on unit death/removal
	+ Needs a footprint of the same type to revert the pathing mesh back to the original on unit death/removal

### Placement Apply

* Placement flags applied to the surrounding terrain around units/doodads with this footprint
* Every **Set** except Set One needs to be defined using the **Define Sets** button before painting
* Each tile can only have one set so factor in flag overlap in designing the footprint
* **Block Vision:** Prevents units being able to see across the footprint if on the same **UI: Height** as the unit/doodad with this footprint or lower
* **Boost Cliff:** Cells flagged as Boost Cliff will adjust the cliff level to match the value used by the object placing the footprint.
* **Boost Height:** (Unknown)
* **Creep:** If used by a Creep Source behaviour will generate creep in the designated area
* **Ground - No Spawn:** Prevents abilities, behaviours and effects from creating units in the designated area
* **Near Resources:** Used by the **Invalid** flags of the **Placement Check** layers of Resource Drop Off unit footprints to prevent placement too close to technology resources eg. minerals
* **No Build:** Prevents building on the designated tiles
* **No Burrowing:** Prevents (not sure) morphing on the designated tiles
* **No Can See:** Prevents the area from being revealed by any means.
* **No Creep:** Instantly removes creep on the designated tiles.
* **No Creep Permanent:** Instantly removes creep on the designated tiles and prevents creep growth even after death/removal of the unit/doodad
* **Resource Drop Off:** If larger than the **Movement: Radius** of the unit with this footprint, the proximity of this layer of the footprint will be used for technology resource drop off by units using a Harvest ability
* **Shrub Vision:** Blocks ground vision sight of line if the unit is not inside the shrub flagged terrain. Used by Shrub doodads like Vents & Shrub Foliage.

### Placement Check

* Determines placement flag requirements for cells when a unit with this footprint is being placed.
* Every **Set** except Set One needs to be specified before painting
* Required = must have and Invalid = cannot have
* Same flags as **Placement Apply** except the following:
	+ **Fogged:** Is the terrain visible or hidden by fog of war
	+ **Masked:** Is the terrain explored or not

## Related

* Units
* Doodad
* Creep Source