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.

Lua functions

From Dwarf Fortress Wiki
Revision as of 16:12, 26 March 2025 by DPhKraken (talk | contribs) (→‎Options: Added options)
Jump to navigation Jump to search

Options

Key Usage Notes
do_water get_random_creature_profile() Use an aquatic RCP (water_based_random_creature)
humanoid_only get_random_creature_profile() Use a RCP that can be turned into a humanoid form (humanoidable_random_creature)
is_good

get_random_creature_profile()
build_body_from_rcp()
build_description()

Forbids "evil" RCPs (cannot_be_good_random_creature).

Affects options for materials, tweaks, description.

is_evil build_body_from_rcp()

build_description()

Affects options for materials, tweaks, description.
beast_only get_random_creature_profile() Forbids generic humanoid/blob/quadruped RCPs (not_beast_random_creature).
normal_biological add_regular_tokens() If false, adds [AMPHIBIOUS], [SWIMS_INNATE], [NONAUSEA], [NOEXERT], [NO_DIZZINESS], [NOPAIN], [NOSTUN].
material_weakness add_regular_tokens() Will gain a 10x [MATERIAL_FORCE_MULTIPLIER] to a random weapon metal and a [GENERAL_MATERIAL_FORCE_MULTIPLIER:1:2].
body_size build_description()

build_pcg_graphics()

Set by body_size_properties(). Stores the creature's volume for later use.
spheres populate_sphere_info()

color_picker_functions
build_description()

A set of the creature's spheres.
do_sphere_rcm populate_sphere_info() Adds a 1/2 chance to set sphere_rcm to a material relevant to their spheres.
pick_sphere_rcm random_creature_class If uniform, adds an additional 1/2 chance to use a material relevant to their spheres.
pos_sphere_rcm populate_sphere_info() Data storage for possible sphere RCM during populate_sphere_info().
sphere_rcm Forces the creature to be uniform and made of that random_creature_material.
body_string build_body_from_rcp() An array of all [BODY] tokens used.

beak
brain
cheeks
eyelids
guts
heart
lips
lungs
mouth
neck
nose
ribs
skull
spine
teeth
throat
tongue

build_body_from_rcp() Normally set by the creature's random_creature_class (MAMMAL, CHITIN_EXO, etc).

Adds the listed parts to the creature's body plan.

blood
ichor
goo

build_body_from_rcp() Normally set by the creature's random_creature_class (MAMMAL, CHITIN_EXO, etc).

Sets the creature's default [BLOOD] type.

RCP Parameters

CancelHideAbout

Rating Lua functions