- 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.
Entity token
v53.08 · v0.47.05 This article is about the current version of DF.Note that some content may still need to be updated. |
| Modding |
|---|
| Tokens |
| Audio · Biome · Graphics · Tile page · Interaction · Mod info · Plant · Speech · Sphere · Syndrome · World |
| Body tokens |
| Body · Body detail plan · Bodygloss · Tissue |
| Creature tokens |
| Creature · Creature mannerism · Personality facet · Creature variation · Procedural graphics layer |
| Descriptor tokens |
| Descriptor color · Color · Descriptor pattern · Descriptor shape |
| Entity tokens |
| Entity · Ethic · Language · Value · Position |
| Job tokens |
| Building · Labor · Reaction · Skill · Unit type |
| Item tokens |
| Item type · Item definition · Ammo · Armor · Instrument · Tool · Trap component · Weapon |
| Material tokens |
| Material type · Material definition · Inorganic material definition |
|
Lua |
| Scripting · Examples · Functions |
Entity tokens define entities, or civilizations, in entity_*.txt files.
The [OBJECT:ENTITY] token begins the definition of an entity raw file. Each new entity definition that follows begins with the [ENTITY:entity_ID] token, where entity_ID is a unique identifier for that entity, and the entity's properties are then specified by the use of further entity tokens; or, tokens can be added to existing entities using [SELECT_ENTITY:entity_ID] instead.
All known entity tokens are listed below.
Gameplay
| Token | Arguments | Description |
|---|---|---|
| ALL_MAIN_POPS_CONTROLLABLE | Allows adventure mode for entities with sites. | |
| SITE_CONTROLLABLE | Allows fortress mode. If multiple entities have the SITE_CONTROLLABLE token, then at embark the specific civs can be chosen on the civ list screen. At least one civilization must have this token. | |
| CREATURE | creature | The type of creature that will inhabit the civilization. If multiple creature types are specified, each civilization will randomly choose one of the creatures. In entities with multiple possible creatures, you can manipulate the chance of one creature being chosen by adding multiple identical creature tags. For instance adding [CREATURE:DWARF][CREATURE:DWARF][CREATURE:DWARF][CREATURE:ELF] to the same entity will make the civs created about 75% dwarven, 25% elven. It should be noted that civilizations are in general weighted by this token: for example, if you have one entity with three [CREATURE:DWARF] entries and another separate entity with a single [CREATURE:ELF] entry, then you can expect to see three times as many of the former placed as the latter.[Verify] |
| SOURCE_HFID | integer | Found on generated angel entities. Appears to draw from creatures with this HFID, which associates the entity with a historical figure of the same ID corresponding to a deity. |
Placement
| Token | Arguments | Description |
|---|---|---|
| BIOME_SUPPORT |
|
Controls the expansion of the civilization's territory. The higher the number is relative to other BIOME_SUPPORT tokens in the entity, the faster it can spread through the biome. These numbers are evaluated relative to each other, i.e. if one biome is 1 and the other is 2, the spread will be the same as if one was 100 and the other was 200. Civs can spread out over biomes they cannot actually build in; for example, humans spread quickly over oceans but cannot actually build in them.
[BIOME_SUPPORT:ANY_GRASSLAND:4] |
| SETTLEMENT_BIOME | biome | If the civ's territory crosses over this biome, it can build settlements here.
[SETTLEMENT_BIOME:ANY_GRASSLAND] |
| START_BIOME | biome | Combination of EXCLUSIVE_START_BIOME and SETTLEMENT_BIOME; allows the civ to start in and create settlements in the biome.
[START_BIOME:ANY_FOREST] |
| EXCLUSIVE_START_BIOME | biome | The birth of the civilization can occur in this biome, but cannot (necessarily) build in it. If the civ does not have SETTLEMENT_BIOME or START_BIOME for the biome in question, it will only construct a single settlement there.
[EXCLUSIVE_START_BIOME:MOUNTAIN] |
| DEFAULT_SITE_TYPE | site type | Valid site types are DARK_FORTRESS (π), CAVE (•), CAVE_DETAILED (Ω), TREE_CITY (î), and CITY (#). Also recognizes PLAYER_FORTRESS (creates a civ of hillocks only), and MONUMENT (creates a civ without visible sites (except tombs and castles), but may cause worldgen crashes). FORTRESS is no longer a valid entry, castles are currently controlled by BUILDS_OUTDOOR_FORTIFICATIONS. Defaults to CITY. Selecting CAVE causes the classic kobold behavior of not showing up on the "neighbors" section of the site selection screen. Selecting DARK_FORTRESS also allows generation of certain other structures. It also gives the civ a special overlord.
CAVE_DETAILED civilizations will create fortresses in mountainous regions and hillocks in non-mountainous regions. [DEFAULT_SITE_TYPE:CAVE_DETAILED] |
| LIKES_SITE | site type | Most residents will try to move to this site type, unless already at one.
[LIKES_SITE:CAVE_DETAILED] |
| TOLERATES_SITE | site type | Some residents will try to move to this site type, unless already at one.
[TOLERATES_SITE:CITY] |
| WORLD_CONSTRUCTION | construction | Controls which constructions the civ will build on the world map. Valid constructions are ROAD, TUNNEL, BRIDGE, and WALL.
[WORLD_CONSTRUCTION:BRIDGE] [WORLD_CONSTRUCTION:ROAD] [WORLD_CONSTRUCTION:TUNNEL] [WORLD_CONSTRUCTION:WALL] |
Population
| Token | Arguments | Description |
|---|---|---|
| MAX_POP_NUMBER | number | Max historical population per entity. Multiply this by max starting civ to get the total maximum historical population of the species. Defaults to 500.
[MAX_POP_NUMBER:500] |
| MAX_SITE_POP_NUMBER | number | Max historical population per individual site. Defaults to 50.
[MAX_SITE_POP_NUMBER:200] |
| MAX_STARTING_CIV_NUMBER | number | Max number of civ to spawn at world generation. Worldgen picks entities in some sequential order from the raws, and once it reaches the end of the list, it will begin again at the top. Setting this number lower than 100, like say, 7, will cause worldgen to skip over the civ for placement if there are already 7 civs of this type. Note that if all civs are set to lower numbers, and the number of starting civs is set higher than the maximum possible amount of civs in total, it will gracefully stop placing civs and get down to the history aspect of worldgen. Defaults to 3.
[MAX_STARTING_CIV_NUMBER:3] |
Flavor
| Token | Arguments | Description |
|---|---|---|
| PERMITTED_BUILDING | building name | The named, custom building can be built by a civilization in Fortress Mode.
[PERMITTED_BUILDING:SOAP_MAKER] |
| PERMITTED_JOB | profession | Allows this job type to be selected. This applies to worldgen creatures, in the embark screen, and in play. Certain professions also influence the availability of materials for trade.
[PERMITTED_JOB:MINER] |
| PERMITTED_REACTION | reaction name | Allows this reaction to be used by a civilization. It is used primarily in Fortress Mode, but also allows certain resources, such as steel, to be available to a race. When creating custom reactions, this token must be present or the player will not be able to use the reaction in Fortress Mode.
[PERMITTED_REACTION:TAN_A_HIDE] |
| CURRENCY_BY_YEAR | Causes the civ's currency to be numbered with the year it was minted. | |
| CURRENCY |
|
What kind of metals the civ uses for coin minting, as well as the value of the coin. Due to the Dwarven economy having been disabled since version 0.31, the value doesn't actually do anything.
[CURRENCY:SILVER:5] |
| ART_FACET_MODIFIER |
|
OWN_RACE, FANCIFUL, EVIL, GOOD
Number goes from 0 to 25600 where 256 is the default. [ART_FACET_MODIFIER:OWN_RACE:512] |
| ART_IMAGE_ELEMENT_MODIFIER |
|
CREATURE, PLANT, TREE, SHAPE, ITEM 0-25600 Determines the chance of each image occurring in that entity's artwork, such as engravings and on artifacts, for default (non-historical) artwork. [ART_IMAGE_ELEMENT_MODIFIER:TREE:512] |
| ITEM_IMPROVEMENT_MODIFIER |
|
ART_IMAGE, COVERED or GLAZED, RINGS_HANGING, BANDS, SPIKES, ITEMSPECIFIC, THREAD, CLOTH, SEWN_IMAGE 0-25600 Determines the chance of the entity using that particular artwork method, such as "encircled with bands" or "menaces with spikes". [ITEM_IMPROVEMENT_MODIFIER:SPIKES:0] This also seems to change the amount that the entity will pay for items that are improved in these ways in their tokens. |
| TRANSLATION | language | What language raw the entity uses.
[TRANSLATION:DWARF] |
| SELECT_SYMBOL |
|
ALL, REMAINING, BATTLE, BRIDGE, CIV, CRAFT_GUILD, FESTIVAL, LIBRARY, MERCHANT_COMPANY, MILITARY_UNIT, OTHER, RELIGION, ROAD, SIEGE, SITE, TEMPLE, TUNNEL, VESSEL, WALL, WAR
Causes the entity to more often use these symbols in the particular SYM set. REMAINING will select all symbols that have not already been declared above it. [SELECT_SYMBOL:ALL:PEACE] |
| SUBSELECT_SYMBOL |
|
Causes the symbol set to be preferred as adjectives by the civilization. Used in vanilla to put violent names in sieges and batttles.
[SELECT_SYMBOL:SIEGE:NAME_SIEGE] [SUBSELECT_SYMBOL:SIEGE:VIOLENT] |
| CULL_SYMBOL |
|
Causes the entity to not use the words in these SYM sets.
[CULL_SYMBOL:ALL:UGLY] |
| FRIENDLY_COLOR | see color |
The color of this entity's civilization settlements in the world gen and embark screens, also used when announcing arrival of their caravan. Defaults to 7:0:1. [FRIENDLY_COLOR:1:0:1] |
Religion
| Token | Arguments | Description |
|---|---|---|
| RELIGION | type |
[RELIGION:PANTHEON] |
| RELIGION_SPHERE | sphere | Can be any available sphere - multiple entries are possible. Choosing a religious sphere will automatically make its opposing sphere not possible for the species to have: adding WATER, for example, means civs of this entity will never get FIRE as a religious sphere. Note that the DEATH sphere favours the appearance of necromancers (and therefore, towers) "in" the entity.
[RELIGION_SPHERE:FORTRESSES] |
| SPHERE_ALIGNMENT |
|
This token forces an entity to favor or disfavor particular religious spheres, causing them to acquire those spheres more often when generating a pantheon. Default is 256, minimum is 0, maximum is 25600. [SPHERE_ALIGNMENT:TREES:512] |
Leadership
| Token | Arguments | Description |
|---|---|---|
| POSITION | string | Defines a leader/noble position for a civilization. These replace previous tags such as [MAYOR] and [CAN_HAVE_SITE_LEADER] and so on. To define a position further, see Position token. |
| LAND_HOLDER_TRIGGER |
|
Defines when a particular land-holding noble (baron, count, duke in vanilla) will arrive at a fortress. As of version 0.44.11, however, this is obsolete due to the changes in how sites are elevated in status. |
| SITE_VARIABLE_POSITIONS | Position responsibility or ALL | Allows a site responsibility to be taken up by a dynamically generated position (lords, hearthpersons, etc.). Any defined positions holding a given responsibility will take precedence over generated positions for that responsibility. Also appears to cause site disputes.[Verify] |
| VARIABLE_POSITIONS | Position responsibility or ALL | Allows a responsibility to be taken up by a dynamically generated position (such as Law-maker). Any defined positions holding a given responsibility will take precedence over generated positions for that responsibility. |
Behavior
| Token | Arguments | Description |
|---|---|---|
| ETHIC |
|
Sets the civ's view of ethics (certain behaviors), from capital punishment to completely acceptable. This also causes the civ to look upon opposing ethics with disfavor if their reaction to it is opposing, and when at extremes (one ACCEPTABLE, another civ UNTHINKABLE; for example) they will often go to war over it.
[ETHIC:EAT_SAPIENT_KILL:ACCEPTABLE] |
| VALUE |
|
Sets the civ's cultural values. Numbers range from -50 (complete anathema) to 0 (neutral) to 50 (highly valued).
[VALUE:CRAFTSMANSHIP:50] Certain values must be set to 15 or more for civs to create structures and form entities during history gen:
|
| VARIABLE_VALUE |
|
Makes values randomized rather than specified.
This tag overrides the VALUE tag. Using [VARIABLE_VALUE:ALL:x:y] and then overwriting single values with further [VARIABLE_VALUE:value:x:y] tags works. |
| WILL_ACCEPT_TRIBUTE | Makes the civ's traders accept offered goods. | |
| WANDERER, BEAST_HUNTER, SCOUT, MERCENARY | The civ will send out these sorts of adventurers in worldgen, which seems to increase Tracker skill. These types of adventurers will sometimes be seen leading a battle (instead of war leaders or generals) in remote locations during world-gen, in charge of the defenders.
Mercenaries and monster hunters from the civ may visit player's fortress and petition for residency there to enlist in the military or hunt monsters in caverns, respectively. | |
| ABUSE_BODIES | <