Editing Grid - atom description

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
[[Atom types|<- back to all classes]]
 
 
=== General description ===
 
=== General description ===
 
[[File:grid_surface2.png]]
 
[[File:grid_surface2.png]]
*Grid atoms represent '''type of terrain''' on a vertex of any tiles.
 
*They '''do not hold graphical''' representation.
 
**[[Surface - atom description|Surface]] atoms hold the graphical representation, but used Surface atom is determined by '''Grid atoms in its four vertices'''.
 
*Grid type can be '''set/changed''' in map editor by appropriate '''editor tool'''.
 
*In the image above you can see single Surface in the '''cyan rhombus''' and its four Grid in the '''red rects'''.
 
**Left and bottom Grid 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 ===
 
{| class="wikitable"
 
! Name || Type || Default value /<br>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 - atom description|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 ===
 
<pre>
 
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,
 
})
 
</pre>
 

Please note that all contributions to Nebuchadnezzar Modding Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Nebuchadnezzar Modding Wiki:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)