Difference between revisions of "Surface - atom description"

From Nebuchadnezzar Modding Wiki
Jump to navigation Jump to search
Line 11: Line 11:
 
! Name || Type || Default value /<br>Obligatory || Description
 
! Name || Type || Default value /<br>Obligatory || Description
 
|-
 
|-
|name || locale string || obligatory || Name of the grid type. Shown only in map editor.
+
|grid || atom<Grid> || obligatory || Main Grid of this Surface
 
|-
 
|-
|is_water || bool || false || Determines if this Grid is accessible by ships.
+
|masque || masque || obligatory || Surface masque.
 
|-
 
|-
|water_power || int || 0 || Determines how big is the surroundings in which this tile can irrigate other tiles.
+
|neighbor_grid || atom<Grid> || null || Transition Grid of this Surface
 
|-
 
|-
|water_repellent || bool || false || Water repelent tiles cannot be irrigated by no means.
+
|neighbor_transition || int || obligatory if<br>neighbor_grid set || Transition type
 
|-
 
|-
|supported_subsoils || string || obligatory || Sequence of characters which describes all subsoils which represents this Grid.
+
|grass || atom<Grass> || null || Grass representation atom.
 
|-
 
|-
|surface_representant || atom<Grid> || null || Grid atom which is used, instead of this atom, for determination of Surface type.
+
|grass_ending || atom<Grass> || null || Grass ending representation atom.
 
|}
 
|}
  

Revision as of 15:57, 12 February 2021

<- back to all classes

General description

Grid surface2.png

  • Surface atoms represent graphical representation of each tile.
  • Type of Surface on specific tile is determined by set Grid atoms of its four vertices.
  • In the image above you can see single Surface in the cyan rhombus and its four Grid in the red rects.
    • Left and bottom Grit atoms are of type soil and top and right are of type desert, so the result Surface atom is transition from soil to desert.

Properties description

Name Type Default value /
Obligatory
Description
grid atom<Grid> obligatory Main Grid of this Surface
masque masque obligatory Surface masque.
neighbor_grid atom<Grid> null Transition Grid of this Surface
neighbor_transition int obligatory if
neighbor_grid set
Transition type
grass atom<Grass> null Grass representation atom.
grass_ending atom<Grass> null Grass ending representation atom.

Properties in detail

supported_subsoils

  • Each Grid can support multiple "subsoils".
  • Each subsoil is determined by single letter.
  • These subsoils are then used to determine is specififc buildings is allowed to be built on a specific place.
  • For example soil and desert have both type G (as a ground) and that means that standart buildings can be built on them.

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.