Difference between revisions of "Grid Feature - atom description"

From Nebuchadnezzar Modding Wiki
Jump to navigation Jump to search
Line 2: Line 2:
 
=== General description ===
 
=== General description ===
 
*Grid Feature atoms represent additional properties of [[Grid - atom description|Grid]]  atoms which can be referenced by buildings to limit construction only on tiles with specific [[Surface - atom description|Surface]] or [[Grid - atom description|Grid]].
 
*Grid Feature atoms represent additional properties of [[Grid - atom description|Grid]]  atoms which can be referenced by buildings to limit construction only on tiles with specific [[Surface - atom description|Surface]] or [[Grid - atom description|Grid]].
 +
*For example Grid Feature can represent water or metal deposits.
  
 
=== Properties description ===
 
=== Properties description ===

Revision as of 11:53, 15 April 2021

<- back to all classes

General description

  • Grid Feature atoms represent additional properties of Grid atoms which can be referenced by buildings to limit construction only on tiles with specific Surface or Grid.
  • For example Grid Feature can represent water or metal deposits.

Properties description

Name Type Default value /
Obligatory
Description
name locale string obligatory Name of the grid type. Shown only in map editor.
water_power int 0 Determines how big is the surroundings in which this tile can irrigate other tiles.
water_repellent bool false Water repelent tiles cannot be irrigated by no means.
features vec_1D[atom[Grid_Feature]] obligatory List of grid features.
surface_representant atom[Grid] null Grid atom which is used, instead of this atom, for determination of Surface type.

Properties in detail

features

  • Each Grid can support multiple "features".
  • These features then describe additional properties.

surface_representant

  • Sometimes you can have multiple Grid atoms which are different is some properties, but which do not influence which Surface should be used with them. For example soil without water power and soil with water power in base mod.
  • In such cases is best to choose one of them as a representant because it reduces number of required surface atoms.

Example

atom ('grid.stone',
{
    name = "@grid.stone",
    features = {'gf.A', 'gf.G', 'gf.Si'},
    water_repellent = true,
})

atom ('grid.river',
{
    name = "@grid.river",
    features = {'gf.A', 'gf.W'},
    water_power = 4,
})