v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Utility:Obsidian/Cell definition files

From Dwarf Fortress Wiki
< Utility:Obsidian
Revision as of 03:34, 30 May 2010 by Skeggox (talk | contribs) (Added the fortress definition file)
Jump to navigation Jump to search

Cell definition files

This list of files represent the internal representation of the Cell engine, to be exposed to Lua and used by other modules (like the geometry generator)

Fortress

This describes the top level object that holds all of the components like terrain, creatures, etc., as well as static information about the fortress.

	<class name="Fortress" api="yes">
		<ctor/>
		
		<!-- TODO: Need a good default fortress size. How many tiles is the default 4x4 embark? -->

		<property name="SizeX" type="Int32" default="16">
			<get/>
		</property>

		<property name="SizeY" type="Int32" default="16">
			<get/>
		</property>

		<property name="SizeZ" type="Int32" default="16">
			<get/>
		</property>

		<vector name="Maps" type="Map">
			<note>A fortress can have multiple maps, to represent timestamps of the fortress terrain over time</note>
			<get_index/>
			<size/>
			<push_back/>
		</vector>

		<vector name="Materials" type="Material">
			<get_index/>
		</vector>

		<method name="LoadFromDF">
			<return type="Void"/>
		</method>
	</class>

Map

File:Map.xml This just a a collection of cells that describes the map

Cell

File:Cell.xml Each cell holds everything that you need to know about a specific tile in the fortress, including the terrain information, lists of buildings, constructions, items, contaminants, liquids and creatures in that tile.