Keyboard shortcuts

Press ← or β†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Lua API reference

Note

This page is auto-generated from data/raw/generate_docs.lua and should not be edited directly.

Warning

In Lua, functions can be called with a : and pass the object itself as the first argument, eg:

Members where this behaviour is intended to be used are marked as πŸ‡² Methods
Their signature documentation hides the first argument to reflect that

  • Call πŸ‡« Function members with a .
  • Call πŸ‡² Method members with a :

Alternatively, you can still call πŸ‡² Methods with a ., from the class type or the variable itself but a value of the given type must be passed as the first parameter (that is hidden)

All of these do the same thing:

  • print(Angle.from_radians(3):to_degrees())
    
  • print(Angle.to_degrees(Angle.from_radians(3)))
    
  • local a = Angle.from_radians(3)
    print(a:to_degrees())
    
  • local a = Angle.from_radians(3)
    print(a.to_degrees(a))
    
  • local a = Angle.from_radians(3)
    print(Angle.to_degrees(a))
    

ActivityTypeId

Bases

No base classes.

Constructors

  • ActivityTypeId.new( )
  • ActivityTypeId.new( ActivityTypeId )
  • ActivityTypeId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> ActivityTypeId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> ActivityTypeRaw

str

πŸ‡² Method –> ( ) -> string

AmmunitionEffectId

Bases

No base classes.

Constructors

Members

NULL_ID

πŸ‡« Function –> ( ) -> AmmunitionEffectId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

int_id

πŸ‡² Method –> ( ) -> AmmunitionEffectIntId

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> AmmunitionEffectRaw

str

πŸ‡² Method –> ( ) -> string

AmmunitionEffectIntId

Bases

No base classes.

Constructors

Members

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> AmmunitionEffectRaw

str_id

πŸ‡² Method –> ( ) -> AmmunitionEffectId

AmmunitionTypeId

Bases

No base classes.

Constructors

  • AmmunitionTypeId.new( )
  • AmmunitionTypeId.new( AmmunitionTypeId )
  • AmmunitionTypeId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> AmmunitionTypeId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> AmmunitionTypeRaw

str

πŸ‡² Method –> ( ) -> string

Angle

Bases

No base classes.

Constructors

No constructors.

Members

from_arcmin

πŸ‡« Function –> ( number ) -> Angle

from_degrees

πŸ‡« Function –> ( number ) -> Angle

from_radians

πŸ‡« Function –> ( number ) -> Angle

to_arcmin

πŸ‡² Method –> ( ) -> number

to_degrees

πŸ‡² Method –> ( ) -> number

to_radians

πŸ‡² Method –> ( ) -> number

ArmorPortionData

Bases

No base classes.

Constructors

No constructors.

Members

coverage

πŸ‡» Variable –> integer

encumber

πŸ‡» Variable –> integer

max_encumber

πŸ‡» Variable –> integer

get_covered_parts

πŸ‡² Method –> ( ) -> BodyPartTypeIntId[]

Avatar

Bases

  • Player
  • Character
  • Creature

Constructors

No constructors.

Members

get_active_missions

πŸ‡² Method –> ( ) -> Mission[]

get_completed_missions

πŸ‡² Method –> ( ) -> Mission[]

get_failed_missions

πŸ‡² Method –> ( ) -> Mission[]

Bionic

Bases

No base classes.

Constructors

No constructors.

Members

ammo_count

πŸ‡» Variable –> integer

charge_timer

πŸ‡» Variable –> integer

energy_stored

πŸ‡» Variable –> Energy

incapacitated_time

πŸ‡» Variable –> TimeDuration

invlet

πŸ‡» Variable –> integer

powered

πŸ‡» Variable –> boolean

show_sprite

πŸ‡» Variable –> boolean

activate

πŸ‡² Method –> ( Character, boolean? ) -> boolean

Activates this bionic on the given character. Optional block_message (default true) suppresses messages.

ammo_loaded

πŸ‡² Method –> ( ) -> string

deactivate

πŸ‡² Method –> ( Character, boolean? ) -> boolean

Deactivates this bionic on the given character. Optional block_message (default true) suppresses messages.

get_auto_start_thresh

πŸ‡² Method –> ( ) -> number

get_quality

πŸ‡² Method –> ( string ) -> integer

has_flag

πŸ‡² Method –> ( string ) -> boolean

id

πŸ‡² Method –> ( ) -> BionicDataId

info

πŸ‡² Method –> ( ) -> BionicDataRaw

Returns the BionicData definition for this bionic.

is_auto_start_keep_full

πŸ‡² Method –> ( ) -> boolean

is_auto_start_on

πŸ‡² Method –> ( ) -> boolean

is_fueled_by

πŸ‡² Method –> ( string ) -> boolean

remove_flag

πŸ‡² Method –> ( string )

set_auto_start_thresh

πŸ‡² Method –> ( number )

set_flag

πŸ‡² Method –> ( string )

toggle_auto_start_mod

πŸ‡² Method –> ( )

toggle_safe_fuel_mod

πŸ‡² Method –> ( )

BionicDataId

Bases

No base classes.

Constructors

  • BionicDataId.new( )
  • BionicDataId.new( BionicDataId )
  • BionicDataId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> BionicDataId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> BionicDataRaw

str

πŸ‡² Method –> ( ) -> string

BionicDataRaw

Bases

No base classes.

Constructors

No constructors.

Members

activated

πŸ‡» Variable –> boolean

can_uninstall

πŸ‡» Variable –> boolean

capacity

πŸ‡» Variable –> Energy

charge_time

πŸ‡» Variable –> integer

exothermic_power_gen

πŸ‡» Variable –> boolean

fuel_capacity

πŸ‡» Variable –> integer

fuel_efficiency

πŸ‡» Variable –> number

fuel_multiplier

πŸ‡» Variable –> integer

included

πŸ‡» Variable –> boolean

is_remote_fueled

πŸ‡» Variable –> boolean

kcal_trigger

πŸ‡» Variable –> integer

no_uninstall_reason

πŸ‡» Variable –> string

passive_fuel_efficiency

πŸ‡» Variable –> number

points

πŸ‡» Variable –> integer

power_activate

πŸ‡» Variable –> Energy

power_deactivate

πŸ‡» Variable –> Energy

power_over_time

πŸ‡» Variable –> Energy

power_trigger

πŸ‡» Variable –> Energy

remote_fuel_draw

πŸ‡» Variable –> Energy

starting_bionic

πŸ‡» Variable –> boolean

weight_capacity_bonus

πŸ‡» Variable –> Mass

weight_capacity_modifier

πŸ‡» Variable –> number

available_upgrades

πŸ‡² Method –> ( ) -> string[]

Available upgrade paths for this bionic.

bash_protec

πŸ‡² Method –> ( ) -> table<string, integer>

Bash protection by body part.

bullet_protec

πŸ‡² Method –> ( ) -> table<string, integer>

Bullet protection by body part.

canceled_mutations

πŸ‡² Method –> ( ) -> string[]

Mutations/traits removed when this bionic is installed.

coverage_power_gen_penalty

πŸ‡² Method –> ( ) -> number?

Returns the coverage power gen penalty, or nil if not set.

cut_protec

πŸ‡² Method –> ( ) -> table<string, integer>

Cut protection by body part.

description

πŸ‡² Method –> ( ) -> string

Returns the translated description of this bionic.

enchantments

πŸ‡² Method –> ( ) -> string[]

Returns enchantment IDs as string values.

encumbrance

πŸ‡² Method –> ( ) -> table<string, integer>

Encumbrance caused by this bionic on each body part.

env_protec

πŸ‡² Method –> ( ) -> table<string, integer>

Environmental protection by body part.

fake_item

πŸ‡² Method –> ( ) -> string

flags

πŸ‡² Method –> ( ) -> string[]

Returns the set of flag IDs on this bionic definition.

fuel_opts

πŸ‡² Method –> ( ) -> string[]

Returns fuel type IDs that can power this bionic.

get_all

πŸ‡« Function –> ( ) -> BionicDataRaw[]

Returns a list of every bionic definition in the game.

has_flag

πŸ‡² Method –> ( string ) -> boolean

Checks whether this bionic has a specific flag.

id

πŸ‡² Method –> ( ) -> BionicDataId

included_bionics

πŸ‡² Method –> ( ) -> string[]

Bionics automatically installed alongside this one.

learned_spells

πŸ‡² Method –> ( ) -> table<string, integer>

Spells learned when this bionic is installed, mapped to level.

name

πŸ‡² Method –> ( ) -> string

Returns the translated name of this bionic.

occupied_bodyparts

πŸ‡² Method –> ( ) -> table<string, integer>

Body parts occupied by this bionic and slot space required.

power_gen_emission

πŸ‡² Method –> ( ) -> string

required_bionics

πŸ‡² Method –> ( ) -> string[]

Other bionics required for this one to be installed.

stat_bonus

πŸ‡² Method –> ( ) -> table<string, integer>

Returns stat bonuses as a table mapping stat name to bonus value. Stat names are the translated abbreviations (STR, DEX, INT, PER in English).

upgraded_bionic

πŸ‡² Method –> ( ) -> string

BodyPartTypeId

Bases

No base classes.

Constructors

Members

NULL_ID

πŸ‡« Function –> ( ) -> BodyPartTypeId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

int_id

πŸ‡² Method –> ( ) -> BodyPartTypeIntId

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> BodyPartTypeRaw

str

πŸ‡² Method –> ( ) -> string

BodyPartTypeIntId

Bases

No base classes.

Constructors

Members

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> BodyPartTypeRaw

str_id

πŸ‡² Method –> ( ) -> BodyPartTypeId

BookRecipe

Bases

No base classes.

Constructors

No constructors.

Members

hidden

πŸ‡» Variable –> boolean

name

πŸ‡» Variable –> CppVal<translation>

recipe

πŸ‡» Variable –> RecipeRaw

skill_level

πŸ‡» Variable –> integer

Character

Bases

  • Creature

Constructors

No constructors.

Members

cash

πŸ‡» Variable –> integer

focus_pool

πŸ‡» Variable –> integer

follower_ids

πŸ‡» Variable –> CharacterId[]

male

πŸ‡» Variable –> boolean

mutation_category_level

πŸ‡» Variable –> table<MutationCategoryTraitId, integer>

Strength of each mutation category, computed from the character’s mutations and their prerequisites. Categories without mutations are absent.

name

πŸ‡» Variable –> string

activate_bionic

πŸ‡² Method –> ( BionicDataId, boolean? ) -> boolean

activate_mutation

πŸ‡² Method –> ( MutationBranchId )

activate_mutation_id

πŸ‡² Method –> ( MutationBranchId )

add_addiction

πŸ‡² Method –> ( AddictionType, integer )

add_bionic

πŸ‡² Method –> ( BionicDataId )

add_item

πŸ‡² Method –> ( Detached<Item> )

Adds a detached item to the player inventory

add_known_trap

πŸ‡² Method –> ( TripointBubMs, TrapIntId )

Character learns that the given trap is on the given tripoint. If the trap is null, the character learns that there is no trap there.

add_morale

πŸ‡² Method –> ( MoraleTypeDataId, integer, integer, TimeDuration, TimeDuration, boolean, ItypeRaw? )

add_perk

πŸ‡² Method –> ( PerkId )

addiction_level

πŸ‡² Method –> ( AddictionType ) -> integer

age

πŸ‡² Method –> ( ) -> integer

all_items

πŸ‡² Method –> ( boolean ) -> Item[]

Gets all items

all_items_with_flag

πŸ‡² Method –> ( JsonFlagId, boolean ) -> Item[]

Gets all items with the given flag

assign_activity

πŸ‡² Method –> ( ActivityTypeId, integer, integer, integer, string )

assign_lua_activity

πŸ‡² Method –> ( table )

Assigns a Lua-backed activity.
The callbacks receive a table with keys user (Character), activity (PlayerActivity), name, data and pos.
Takes a table with keys:

  • type (ActivityTypeId): Activity type.
  • duration (TimeDuration): How long the activity takes.
  • on_finish (string, optional): Key in game.activity_functions called when the activity finishes.
  • on_turn (string, optional): Key in game.activity_functions called every turn of the activity.
  • data (table, optional): Serializable Lua state passed back to the callbacks as params.data.
  • pos (TripointBubMs, optional): Activity position. Callbacks receive it as params.pos in absolute coordinates.
  • name (string, optional): Activity name, passed to the callbacks as params.name.
  • interruptable (boolean, optional): Whether a key press can interrupt the activity. Defaults to true.

base_age

πŸ‡² Method –> ( ) -> integer

base_height

πŸ‡² Method –> ( ) -> integer

bionic_armor_bonus

πŸ‡² Method –> ( BodyPartTypeIntId, DamageType ) -> number

bionics_weight

πŸ‡² Method –> ( ) -> Mass

blood_loss

πŸ‡² Method –> ( BodyPartTypeIntId ) -> integer

blossoms

πŸ‡² Method –> ( )

bodypart_exposure

πŸ‡² Method –> ( ) -> table<BodyPartTypeIntId, number>

Returns how exposed each body part is through worn items, from 0.0 (fully covered) to 1.0 (bare).

bodyweight

πŸ‡² Method –> ( ) -> Mass

bonus_from_enchantments

πŸ‡² Method –> ( number, EnchantmentValueId, boolean? ) -> number

Gets the bonus from the enchantment value. Doesn’t handle max logic itself.

can_hear

πŸ‡² Method –> ( TripointBubMs, integer ) -> boolean

can_mount

πŸ‡² Method –> ( Monster ) -> boolean

can_pick_volume

πŸ‡² Method –> ( Volume ) -> boolean

can_pick_weight

πŸ‡² Method –> ( Mass, boolean ) -> boolean

can_run

πŸ‡² Method –> ( ) -> boolean

can_takeoff

πŸ‡² Method –> ( Item ) -> boolean

Checks if a given <code>[Item](#sol::Item)</code> can be taken off.

can_unwield

πŸ‡² Method –> ( Item ) -> boolean

can_wear

πŸ‡² Method –> ( Item, boolean ) -> boolean

Checks if creature can wear a given item. If boolean parameter is true, ignores already worn items

can_wield

πŸ‡² Method –> ( Item ) -> boolean

cancel_activity

πŸ‡² Method –> ( )

check_mount_is_spooked

πŸ‡² Method –> ( ) -> boolean

check_mount_will_move

πŸ‡² Method –> ( TripointBubMs ) -> boolean

clear_bionics

πŸ‡² Method –> ( )

clear_morale

πŸ‡² Method –> ( )

clear_mutations

πŸ‡² Method –> ( )

clear_skills

πŸ‡² Method –> ( )

consume_items

πŸ‡² Method –> ( CppVal<item_comp>[] )

Consumes items from inventory based on item component list

consume_requirement

πŸ‡² Method –> ( RequirementData, table ) -> boolean

Consumes a requirement’s item components from the inventory and nearby map. Tools and qualities are not used. Returns false if the player cancels a component choice.
Takes a table with keys:

  • range (integer, optional): Radius for nearby map items. Defaults to the pickup range.
  • count (integer, optional): Number of times to consume the requirement. Defaults to 1.

consume_tools

πŸ‡² Method –> ( CppVal<tool_comp>[] )

Consumes tool charges from inventory based on tool component list

cough

πŸ‡² Method –> ( boolean, integer )

crafting_inventory

πŸ‡² Method –> ( ) -> Inventory

Returns the crafting inventory for this character (includes nearby items)

create_item

πŸ‡² Method –> ( ItypeId, integer ) -> Item

Creates an item with the given id and adds it to the player inventory. count sets the item’s charges, not the number of items: exactly one item is created. For stackable (count-by-charges) items such as ammo, count is the stack size. For non-stackable items, pass a negative value (e.g. -1), since a positive one is still applied as charges. Tools spawned with a negative value get their default charges.

crossed_threshold

πŸ‡² Method –> ( ) -> boolean

deactivate_bionic

πŸ‡² Method –> ( BionicDataId, boolean? ) -> boolean

deactivate_mutation

πŸ‡² Method –> ( MutationBranchId )

deactivate_mutation_id

πŸ‡² Method –> ( MutationBranchId )

dismount

πŸ‡² Method –> ( )

drench

πŸ‡² Method –> ( integer, BodyPartTypeIntId[], boolean )

drop_all_items

πŸ‡² Method –> ( )

Drops all items (inventory, worn, wielded) at the character’s current position.

drop_inv

πŸ‡² Method –> ( integer )

enough_power_for

πŸ‡² Method –> ( BionicDataId ) -> boolean

expose_to_disease

πŸ‡² Method –> ( DiseaseTypeId )

fall_asleep

πŸ‡² Method –> ( )
πŸ‡² Method –> ( TimeDuration )

forced_dismount

πŸ‡² Method –> ( )

getID

πŸ‡² Method –> ( ) -> CharacterId

get_activity

πŸ‡² Method –> ( ) -> PlayerActivity

get_all_skills

πŸ‡² Method –> ( ) -> SkillLevelMap

get_armor_acid

πŸ‡² Method –> ( BodyPartTypeIntId ) -> integer

get_auto_start_thresh

πŸ‡² Method –> ( BionicDataId ) -> number

get_base_traits

πŸ‡² Method –> ( ) -> MutationBranchId[]

get_bionic

πŸ‡² Method –> ( BionicDataId ) -> Bionic

get_bionics

πŸ‡² Method –> ( ) -> BionicDataId[]

get_dependant_worn_items

πŸ‡² Method –> ( Item ) -> Item[]

get_dex

πŸ‡² Method –> ( ) -> integer

get_dex_base

πŸ‡² Method –> ( ) -> integer

get_dex_bonus

πŸ‡² Method –> ( ) -> integer

get_faction_id

πŸ‡² Method –> ( ) -> FactionId

get_fatigue

πŸ‡² Method –> ( ) -> integer

get_free_bionics_slots

πŸ‡² Method –> ( BodyPartTypeIntId ) -> integer

get_healthy

πŸ‡² Method –> ( ) -> number

get_healthy_mod

πŸ‡² Method –> ( ) -> number

get_highest_category

πŸ‡² Method –> ( ) -> MutationCategoryTraitId

get_hostile_creatures

πŸ‡² Method –> ( integer ) -> Creature[]

get_int

πŸ‡² Method –> ( ) -> integer

get_int_base

πŸ‡² Method –> ( ) -> integer

get_int_bonus

πŸ‡² Method –> ( ) -> integer

get_item_with_id

πŸ‡² Method –> ( ItypeId, boolean ) -> Item

Gets the first occurrence of an item with the given id

get_items_if

πŸ‡² Method –> ( table ) -> Item[]

Returns items from the inventory, wielded and worn, matching every given filter as an array of Item.
Takes a table where each key is a filter; unknown keys show a debug message and are ignored. Available filters:

  • category (string or string[]): Item category id is one of these, e.g. β€œfood”.
  • type (ItemTypeId or ItemTypeId[]): Item type is one of these.
  • is_food (boolean): Whether the item is food.
  • flags (FlagId or FlagId[]): Item has at least one of these flags.
  • need_charges (boolean): Tool items must have charges left.
  • has_charges (table): { id = ItemTypeId, amount = integer }: item type is id and has at least amount charges.
  • addiction_type (AddictionType, string, or array of those): Comestible’s addiction type is one of these, e.g. <code>[AddictionType](#sol::AddictionType)</code>.ALCOHOL or "alcohol".
  • material (MaterialTypeId, string, or array of those): Item is made of at least one of these materials, e.g. "stone".
  • worn (boolean): Whether the item is worn.
  • wielded (boolean): Whether the item is wielded.

get_kcal_percent

πŸ‡² Method –> ( ) -> number

get_lowest_hp

πŸ‡² Method –> ( ) -> integer

get_magic

πŸ‡² Method –> ( ) -> KnownMagic

Access the character’s spellbook and mana pool.

get_max_power_level

πŸ‡² Method –> ( ) -> Energy

get_melee_stamina_cost

πŸ‡² Method –> ( Item ) -> integer

get_morale

πŸ‡² Method –> ( MoraleTypeDataId ) -> integer

get_morale_level

πŸ‡² Method –> ( ) -> integer

get_movement_mode

πŸ‡² Method –> ( ) -> CharacterMoveMode

get_mutations

πŸ‡² Method –> ( boolean ) -> MutationBranchId[]

get_painkiller

πŸ‡² Method –> ( ) -> integer

get_part_encumbrance

πŸ‡² Method –> ( BodyPartTypeId ) -> integer

get_part_temp_btu

πŸ‡² Method –> ( BodyPartTypeIntId ) -> integer

Deprecated: use get_part_temp_celsius instead. Gets the current temperature of a specific body part in legacy Body Temperature Units.

get_part_temp_celsius

πŸ‡² Method –> ( BodyPartTypeIntId ) -> Temperature

Gets the current temperature of a specific body part in Celsius.

get_per

πŸ‡² Method –> ( ) -> integer

get_per_base

πŸ‡² Method –> ( ) -> integer

get_per_bonus

πŸ‡² Method –> ( ) -> integer

get_power_level

πŸ‡² Method –> ( ) -> Energy

get_rad

πŸ‡² Method –> ( ) -> integer

get_shout_volume

πŸ‡² Method –> ( ) -> integer

get_skill_level

πŸ‡² Method –> ( SkillId ) -> integer

get_skill_level_object

πŸ‡² Method –> ( SkillId ) -> SkillLevel

get_sleep_deprivation

πŸ‡² Method –> ( ) -> integer

get_stamina

πŸ‡² Method –> ( ) -> integer

get_stamina_max

πŸ‡² Method –> ( ) -> integer

get_stim

πŸ‡² Method –> ( ) -> integer

get_stored_kcal

πŸ‡² Method –> ( ) -> integer

get_str

πŸ‡² Method –> ( ) -> integer

get_str_base

πŸ‡² Method –> ( ) -> integer

get_str_bonus

πŸ‡² Method –> ( ) -> integer

get_temp_btu

πŸ‡² Method –> ( ) -> table<BodyPartTypeIntId, integer>

Deprecated: use get_temp_celsius instead. Gets all bodyparts and their associated temperatures in legacy Body Temperature Units.

get_temp_celsius

πŸ‡² Method –> ( ) -> table<BodyPartTypeIntId, Temperature>

Gets all bodyparts and their associated temperatures in Celsius.

get_thirst

πŸ‡² Method –> ( ) -> integer

get_time_died

πŸ‡² Method –> ( ) -> TimePoint

get_total_bionics_slots

πŸ‡² Method –> ( BodyPartTypeIntId ) -> integer

get_used_bionics_slots

πŸ‡² Method –> ( BodyPartTypeIntId ) -> integer

get_visible_creatures

πŸ‡² Method –> ( integer ) -> Creature[]

get_working_arm_count

πŸ‡² Method –> ( ) -> integer

get_working_leg_count

πŸ‡² Method –> ( ) -> integer

get_worn_items

πŸ‡² Method –> ( ) -> Item[]

global_sm_location

πŸ‡² Method –> ( ) -> TripointAbsSm

global_square_location

πŸ‡² Method –> ( ) -> TripointAbsMs

has_active_bionic

πŸ‡² Method –> ( BionicDataId ) -> boolean

has_active_mutation

πŸ‡² Method –> ( MutationBranchId ) -> boolean

has_activity

πŸ‡² Method –> ( ActivityTypeId ) -> boolean

has_addiction

πŸ‡² Method –> ( AddictionType ) -> boolean

has_alarm_clock

πŸ‡² Method –> ( ) -> boolean

has_any_bionic

πŸ‡² Method –> ( ) -> boolean

has_base_trait

πŸ‡² Method –> ( MutationBranchId ) -> boolean

has_bionic

πŸ‡² Method –> ( BionicDataId ) -> boolean

has_bionics

πŸ‡² Method –> ( ) -> boolean

has_child_flag

πŸ‡² Method –> ( MutationBranchId ) -> boolean

has_enchantment_flag

πŸ‡² Method –> ( EnchantmentFlagId ) -> boolean

has_item_with_flag

πŸ‡² Method –> ( JsonFlagId, boolean ) -> boolean

Checks for an item with the given flag

has_item_with_id

πŸ‡² Method –> ( ItypeId, boolean ) -> boolean

Checks for an item with the given id

has_mabuff

πŸ‡² Method –> ( MartialArtsBuffId ) -> boolean

has_max_power

πŸ‡² Method –> ( ) -> boolean

has_morale

πŸ‡² Method –> ( MoraleTypeDataId ) -> boolean

has_morale_to_craft

πŸ‡² Method –> ( ) -> boolean

has_morale_to_read

πŸ‡² Method –> ( ) -> boolean

has_opposite_trait

πŸ‡² Method –> ( MutationBranchId ) -> boolean

has_perk

πŸ‡² Method –> ( PerkId ) -> boolean

has_power

πŸ‡² Method –> ( ) -> boolean

has_trait_flag

πŸ‡² Method –> ( JsonTraitFlagId ) -> boolean

has_trait_type

πŸ‡² Method –> ( string ) -> boolean

has_two_arms

πŸ‡² Method –> ( ) -> boolean

has_watch

πŸ‡² Method –> ( ) -> boolean

heal

πŸ‡² Method –> ( BodyPartTypeIntId, integer )

healall

πŸ‡² Method –> ( integer )

healing_rate

πŸ‡² Method –> ( number ) -> number

healing_rate_medicine

πŸ‡² Method –> ( number, BodyPartTypeIntId ) -> number

hearing_ability

πŸ‡² Method –> ( ) -> number

height

πŸ‡² Method –> ( ) -> integer

hitall

πŸ‡² Method –> ( integer, integer, Creature ) -> integer

hurtall

πŸ‡² Method –> ( integer, Creature, boolean )

in_climate_control

πŸ‡² Method –> ( ) -> boolean

invalidate_crafting_inventory

πŸ‡² Method –> ( )

Invalidates the cached crafting inventory

irradiate

πŸ‡² Method –> ( number, boolean ) -> boolean

is_armed

πŸ‡² Method –> ( ) -> boolean

is_auto_start_keep_full

πŸ‡² Method –> ( BionicDataId ) -> boolean

is_auto_start_on

πŸ‡² Method –> ( BionicDataId ) -> boolean

is_blind

πŸ‡² Method –> ( ) -> boolean

is_deaf

πŸ‡² Method –> ( ) -> boolean

is_hauling

πŸ‡² Method –> ( ) -> boolean

is_invisible

πŸ‡² Method –> ( ) -> boolean

is_limb_broken

πŸ‡² Method –> ( BodyPartTypeIntId ) -> boolean

is_limb_disabled

πŸ‡² Method –> ( BodyPartTypeIntId ) -> boolean

is_max_power

πŸ‡² Method –> ( ) -> boolean

is_mounted

πŸ‡² Method –> ( ) -> boolean

is_quiet

πŸ‡² Method –> ( ) -> boolean

is_rad_immune

πŸ‡² Method –> ( ) -> boolean

is_stealthy

πŸ‡² Method –> ( ) -> boolean

is_throw_immune

πŸ‡² Method –> ( ) -> boolean

is_weak_to_water

πŸ‡² Method –> ( ) -> boolean

is_wearing

πŸ‡² Method –> ( Item ) -> boolean

is_wearing_active_optcloak

πŸ‡² Method –> ( ) -> boolean

is_wearing_active_power_armor

πŸ‡² Method –> ( ) -> boolean

is_wearing_helmet

πŸ‡² Method –> ( ) -> boolean

is_wearing_on_bp

πŸ‡² Method –> ( ItypeId, BodyPartTypeIntId ) -> boolean

is_wearing_power_armor

πŸ‡² Method –> ( boolean ) -> boolean

is_wielding

πŸ‡² Method –> ( Item ) -> boolean

is_worn

πŸ‡² Method –> ( Item ) -> boolean

item_worn_with_flag

πŸ‡² Method –> ( JsonFlagId, BodyPartTypeIntId ) -> Item

item_worn_with_id

πŸ‡² Method –> ( ItypeId, BodyPartTypeIntId ) -> Item

items_with

πŸ‡² Method –> ( bool ) -> Item[]

Filters items

knows_martial_art

πŸ‡² Method –> ( MartialArtsId ) -> boolean

knows_recipe

πŸ‡² Method –> ( RecipeId ) -> boolean

knows_trap

πŸ‡² Method –> ( TripointBubMs ) -> boolean

Whether the character knows about the trap at the given tripoint.

learn_martial_art

πŸ‡² Method –> ( MartialArtsId )

learn_recipe

πŸ‡² Method –> ( RecipeId )

mabuff_armor_bonus

πŸ‡² Method –> ( DamageType ) -> integer

mabuff_arpen_bonus

πŸ‡² Method –> ( DamageType ) -> integer

mabuff_attack_cost_mult

πŸ‡² Method –> ( ) -> number

mabuff_attack_cost_penalty

πŸ‡² Method –> ( ) -> integer

mabuff_block_bonus

πŸ‡² Method –> ( ) -> integer

mabuff_damage_bonus

πŸ‡² Method –> ( DamageType ) -> integer

mabuff_damage_mult

πŸ‡² Method –> ( DamageType ) -> number

mabuff_dodge_bonus

πŸ‡² Method –> ( ) -> number

mabuff_speed_bonus

πŸ‡² Method –> ( ) -> integer

mabuff_tohit_bonus

πŸ‡² Method –> ( ) -> number

max_stored_kcal

πŸ‡² Method –> ( ) -> integer

metabolic_rate

πŸ‡² Method –> ( ) -> number

mod_base_age

πŸ‡² Method –> ( integer )

mod_base_height

πŸ‡² Method –> ( integer )

mod_dex_bonus

πŸ‡² Method –> ( integer )

mod_fatigue

πŸ‡² Method –> ( integer )

mod_healthy

πŸ‡² Method –> ( number )

mod_healthy_mod

πŸ‡² Method –> ( number, number )

mod_int_bonus

πŸ‡² Method –> ( integer )

mod_max_power_level

πŸ‡² Method –> ( Energy )

mod_painkiller

πŸ‡² Method –> ( integer )

mod_per_bonus

πŸ‡² Method –> ( integer )

mod_power_level

πŸ‡² Method –> ( Energy )

mod_rad

πŸ‡² Method –> ( integer )

mod_skill_level

πŸ‡² Method –> ( SkillId, integer )

mod_sleep_deprivation

πŸ‡² Method –> ( integer )

mod_speed_bonus

πŸ‡² Method –> ( integer )

mod_stamina

πŸ‡² Method –> ( integer )

mod_stim

πŸ‡² Method –> ( integer )

mod_stored_kcal

πŸ‡² Method –> ( integer )

mod_str_bonus

πŸ‡² Method –> ( integer )

mod_thirst

πŸ‡² Method –> ( integer )

mount_creature

πŸ‡² Method –> ( Monster )

mutate

πŸ‡² Method –> ( )

mutate_category

πŸ‡² Method –> ( MutationCategoryTraitId )
πŸ‡² Method –> ( MutationCategoryTraitId, boolean )

mutate_towards

πŸ‡² Method –> ( MutationBranchId[], integer ) -> boolean
πŸ‡² Method –> ( MutationBranchId ) -> boolean

mutation_armor

πŸ‡² Method –> ( BodyPartTypeIntId, DamageType ) -> number

mutation_effect

πŸ‡² Method –> ( MutationBranchId )

mutation_loss_effect

πŸ‡² Method –> ( MutationBranchId )

mutation_ok

πŸ‡² Method –> ( MutationBranchId, boolean, boolean ) -> boolean

mutation_value

πŸ‡² Method –> ( string ) -> number

practice

πŸ‡² Method –> ( SkillId, integer, integer, boolean )

read_speed

πŸ‡² Method –> ( boolean ) -> integer

rem_addiction

πŸ‡² Method –> ( AddictionType )

rem_morale

πŸ‡² Method –> ( MoraleTypeDataId )

remove_bionic

πŸ‡² Method –> ( BionicDataId )

remove_child_flag

πŸ‡² Method –> ( MutationBranchId )

remove_item

πŸ‡² Method –> ( Item ) -> Detached<Item>

Removes given <code>[Item](#sol::Item)</code> from character’s inventory. The <code>[Item](#sol::Item)</code> must be in the inventory, neither wielded nor worn.

remove_items_if

πŸ‡² Method –> ( table ) -> Detached<Item>[]

Removes and returns items from the inventory, wielded and worn, matching every given filter as an array of Item.
Accepts the same filter table as get_items_if.

remove_mutation

πŸ‡² Method –> ( MutationBranchId, boolean )

remove_perk

πŸ‡² Method –> ( PerkId )

remove_worn

πŸ‡² Method –> ( Item ) -> Detached<Item>?

Attempts to remove the worn <code>[Item](#sol::Item)</code> from character.

reset

πŸ‡² Method –> ( )

reset_encumbrance

πŸ‡² Method –> ( )

rest_quality

πŸ‡² Method –> ( ) -> number

restore_scent

πŸ‡² Method –> ( )

rooted

πŸ‡² Method –> ( )

rust_rate

πŸ‡² Method –> ( ) -> integer

setID

πŸ‡² Method –> ( CharacterId, boolean )

set_auto_start_thresh

πŸ‡² Method –> ( BionicDataId, number )

set_base_age

πŸ‡² Method –> ( integer )

set_base_height

πŸ‡² Method –> ( integer )

set_dex_bonus

πŸ‡² Method –> ( integer )

set_faction_id

πŸ‡² Method –> ( FactionId )

set_fatigue

πŸ‡² Method –> ( integer )

set_healthy

πŸ‡² Method –> ( number )

set_healthy_mod

πŸ‡² Method –> ( number )

set_int_bonus

πŸ‡² Method –> ( integer )

set_max_power_level

πŸ‡² Method –> ( Energy )

set_movement_mode

πŸ‡² Method –> ( CharacterMoveMode )

set_mutation

πŸ‡² Method –> ( MutationBranchId )

set_painkiller

πŸ‡² Method –> ( integer )

set_part_temp_btu

πŸ‡² Method –> ( BodyPartTypeIntId, integer )

Deprecated: use set_part_temp_celsius instead. Sets a specific body part to a given legacy Body Temperature Units value.

set_part_temp_celsius

πŸ‡² Method –> ( BodyPartTypeIntId, Temperature )

Sets a specific body part to a temperature in Celsius.

set_per_bonus

πŸ‡² Method –> ( integer )

set_power_level

πŸ‡² Method –> ( Energy )

set_rad

πŸ‡² Method –> ( integer )

set_skill_level

πŸ‡² Method –> ( SkillId, integer )

set_sleep_deprivation

πŸ‡² Method –> ( integer )

set_speed_bonus

πŸ‡² Method –> ( integer )

set_stamina

πŸ‡² Method –> ( integer )

set_stim

πŸ‡² Method –> ( integer )

set_stored_kcal

πŸ‡² Method –> ( integer )

set_str_bonus

πŸ‡² Method –> ( integer )

set_temp_btu

πŸ‡² Method –> ( integer )

Deprecated: use set_temp_celsius instead. Sets ALL body parts on a creature to the given legacy Body Temperature Units value.

set_temp_celsius

πŸ‡² Method –> ( Temperature )

Sets ALL body parts on a creature to the given temperature in Celsius.

set_thirst

πŸ‡² Method –> ( integer )

shout

πŸ‡² Method –> ( string, boolean )

sight_impaired

πŸ‡² Method –> ( ) -> boolean

sound_hallu

πŸ‡² Method –> ( )

spores

πŸ‡² Method –> ( )

suffer

πŸ‡² Method –> ( )

takeoff

πŸ‡² Method –> ( Item ) -> boolean

Attempts to take off the worn <code>[Item](#sol::Item)</code> from character.

toggle_auto_start_mod

πŸ‡² Method –> ( BionicDataId )

toggle_safe_fuel_mod

πŸ‡² Method –> ( BionicDataId )

uncanny_dodge

πŸ‡² Method –> ( ) -> boolean

unset_mutation

πŸ‡² Method –> ( MutationBranchId )

unwield

πŸ‡² Method –> ( ) -> boolean

use_charges

πŸ‡² Method –> ( ItypeId, integer ) -> Detached<Item>[]
πŸ‡² Method –> ( ItypeId, integer, function ) -> Detached<Item>[]

use_charges_if_avail

πŸ‡² Method –> ( ItypeId, integer ) -> boolean

vitamin_get

πŸ‡² Method –> ( VitaminId ) -> integer

vitamin_mod

πŸ‡² Method –> ( VitaminId, integer, boolean ) -> integer

vitamin_set

πŸ‡² Method –> ( VitaminId, integer ) -> boolean

volume_capacity

πŸ‡² Method –> ( ) -> Volume

volume_carried

πŸ‡² Method –> ( ) -> Volume

vomit

πŸ‡² Method –> ( )

wake_up

πŸ‡² Method –> ( )

wear

πŸ‡² Method –> ( Item, boolean ) -> boolean

Attempts to wear an item in the creature inventory. If boolean parameter is false, item is worn instantly

wear_detached

πŸ‡² Method –> ( Detached<Item>, boolean ) -> boolean

Attempts to wear an item not in the creature inventory. If boolean parameter is false, item is worn instantly

wearing_something_on

πŸ‡² Method –> ( BodyPartTypeIntId ) -> boolean

weight_carried

πŸ‡² Method –> ( ) -> Mass

wield

πŸ‡² Method –> ( Item ) -> boolean

wielded_items

πŸ‡² Method –> ( ) -> Item[]

worn_with_flag

πŸ‡² Method –> ( JsonFlagId, BodyPartTypeIntId ) -> boolean

worn_with_id

πŸ‡² Method –> ( ItypeId, BodyPartTypeIntId ) -> boolean

CharacterId

Bases

No base classes.

Constructors

  • CharacterId.new( )
  • CharacterId.new( int )

Members

get_value

πŸ‡² Method –> ( ) -> integer

is_valid

πŸ‡² Method –> ( ) -> boolean

Creature

Bases

No base classes.

Constructors

No constructors.

Members

abs_pos

πŸ‡² Method –> ( ) -> TripointAbsMs

add_effect

πŸ‡² Method –> ( EffectTypeId, TimeDuration, BodyPartTypeId?, integer? )

Effect type, duration, bodypart and intensity

apply_damage

πŸ‡² Method –> ( Creature, BodyPartTypeIntId, integer, boolean )

as_avatar

πŸ‡² Method –> ( ) -> Avatar

as_character

πŸ‡² Method –> ( ) -> Character

as_monster

πŸ‡² Method –> ( ) -> Monster

as_npc

πŸ‡² Method –> ( ) -> Npc

attitude_to

πŸ‡² Method –> ( Creature ) -> Attitude

bub_pos

πŸ‡² Method –> ( ) -> TripointBubMs

clear_effects

πŸ‡² Method –> ( )

deal_damage

πŸ‡² Method –> ( Creature, BodyPartTypeIntId, DamageInstance ) -> DealtDamageInstance

digging

πŸ‡² Method –> ( ) -> boolean

disp_name

πŸ‡² Method –> ( possessive: boolean, capitalize_first: boolean ) -> string

dodge_roll

πŸ‡² Method –> ( ) -> number

erase

πŸ‡² Method –> ( )

Removes this creature from the game without death notifications or a corpse.

get_all_body_parts

πŸ‡² Method –> ( boolean ) -> BodyPartTypeIntId[]

get_armor_bash

πŸ‡² Method –> ( BodyPartTypeIntId ) -> integer

get_armor_bash_base

πŸ‡² Method –> ( BodyPartTypeIntId ) -> integer

get_armor_bash_bonus

πŸ‡² Method –> ( ) -> integer

get_armor_bullet

πŸ‡² Method –> ( BodyPartTypeIntId ) -> integer

get_armor_bullet_base

πŸ‡² Method –> ( BodyPartTypeIntId ) -> integer

get_armor_bullet_bonus

πŸ‡² Method –> ( ) -> integer

get_armor_cut

πŸ‡² Method –> ( BodyPartTypeIntId ) -> integer

get_armor_cut_base

πŸ‡² Method –> ( BodyPartTypeIntId ) -> integer

get_armor_cut_bonus

πŸ‡² Method –> ( ) -> integer

get_armor_type

πŸ‡² Method –> ( DamageType, BodyPartTypeIntId ) -> integer

get_block_bonus

πŸ‡² Method –> ( ) -> integer

get_dodge

πŸ‡² Method –> ( ) -> number

get_dodge_base

πŸ‡² Method –> ( ) -> number

get_dodge_bonus

πŸ‡² Method –> ( ) -> number

get_effect

πŸ‡² Method –> ( EffectTypeId, BodyPartTypeId? ) -> Effect

get_effect_dur

πŸ‡² Method –> ( EffectTypeId, BodyPartTypeId? ) -> TimeDuration

get_effect_int

πŸ‡² Method –> ( EffectTypeId, BodyPartTypeId? ) -> integer

get_env_resist

πŸ‡² Method –> ( BodyPartTypeIntId ) -> integer

get_grammatical_genders

πŸ‡² Method –> ( ) -> string[]

get_hit

πŸ‡² Method –> ( ) -> number

get_hit_base

πŸ‡² Method –> ( ) -> number

get_hit_bonus

πŸ‡² Method –> ( ) -> number

get_hp

πŸ‡² Method –> ( BodyPartTypeIntId? ) -> integer

get_hp_max

πŸ‡² Method –> ( BodyPartTypeIntId? ) -> integer

get_melee

πŸ‡² Method –> ( ) -> number

get_moves

πŸ‡² Method –> ( ) -> integer

get_name

πŸ‡² Method –> ( ) -> string

get_num_blocks

πŸ‡² Method –> ( ) -> integer

get_num_dodges

πŸ‡² Method –> ( ) -> integer

get_pain

πŸ‡² Method –> ( ) -> integer

get_part_healed_total

πŸ‡² Method –> ( BodyPartTypeIntId ) -> integer

get_part_hp_cur

πŸ‡² Method –> ( BodyPartTypeIntId ) -> integer

get_part_hp_max

πŸ‡² Method –> ( BodyPartTypeIntId ) -> integer

get_perceived_pain

πŸ‡² Method –> ( ) -> integer

get_pos_ms

πŸ‡² Method –> ( ) -> TripointBubMs

get_random_body_part

πŸ‡² Method –> ( boolean ) -> BodyPartTypeIntId

get_size

πŸ‡² Method –> ( ) -> MonsterSize

get_speed

πŸ‡² Method –> ( ) -> integer

get_speed_base

πŸ‡² Method –> ( ) -> integer

get_speed_bonus

πŸ‡² Method –> ( ) -> integer

get_speed_mult

πŸ‡² Method –> ( ) -> number

get_value

πŸ‡² Method –> ( string ) -> string

Retrieves an arbitrary entry using the same key format as set_value.

get_weight

πŸ‡² Method –> ( ) -> Mass

get_weight_capacity

πŸ‡² Method –> ( ) -> integer

has_effect

πŸ‡² Method –> ( EffectTypeId, BodyPartTypeId? ) -> boolean

has_effect_with_flag

πŸ‡² Method –> ( JsonFlagId, BodyPartTypeId? ) -> boolean

has_flag

πŸ‡² Method –> ( MonsterFlag ) -> boolean

has_grab_break_tec

πŸ‡² Method –> ( ) -> boolean

has_trait

πŸ‡² Method –> ( MutationBranchId ) -> boolean

has_weapon

πŸ‡² Method –> ( ) -> boolean

hp_percentage

πŸ‡² Method –> ( ) -> integer

in_species

πŸ‡² Method –> ( SpeciesTypeId ) -> boolean

is_avatar

πŸ‡² Method –> ( ) -> boolean

is_dead

πŸ‡² Method –> ( ) -> boolean

is_elec_immune

πŸ‡² Method –> ( ) -> boolean

is_hallucination

πŸ‡² Method –> ( ) -> boolean

is_immune_damage

πŸ‡² Method –> ( DamageType ) -> boolean

is_immune_effect

πŸ‡² Method –> ( EffectTypeId ) -> boolean

is_monster

πŸ‡² Method –> ( ) -> boolean

is_npc

πŸ‡² Method –> ( ) -> boolean

is_on_ground

πŸ‡² Method –> ( ) -> boolean

is_underwater

πŸ‡² Method –> ( ) -> boolean

is_warm

πŸ‡² Method –> ( ) -> boolean

knock_back_to

πŸ‡² Method –> ( TripointBubMs )

mod_all_parts_hp_cur

πŸ‡² Method –> ( integer )

mod_moves

πŸ‡² Method –> ( integer )

mod_pain

πŸ‡² Method –> ( integer )

mod_pain_noresist

πŸ‡² Method –> ( integer )

mod_part_hp_cur

πŸ‡² Method –> ( BodyPartTypeIntId, integer )

mod_part_hp_max

πŸ‡² Method –> ( BodyPartTypeIntId, integer )

power_rating

πŸ‡² Method –> ( ) -> number

ranged_target_size

πŸ‡² Method –> ( ) -> number

remove_effect

πŸ‡² Method –> ( EffectTypeId, BodyPartTypeId? ) -> boolean

remove_value

πŸ‡² Method –> ( string )

Removes an arbitrary entry using the same key format as set_value.

sees

πŸ‡² Method –> ( TripointBubMs ) -> boolean

set_all_parts_hp_cur

πŸ‡² Method –> ( integer )

set_all_parts_hp_to_max

πŸ‡² Method –> ( )

set_armor_bash_bonus

πŸ‡² Method –> ( integer )

set_armor_bullet_bonus

πŸ‡² Method –> ( integer )

set_armor_cut_bonus

πŸ‡² Method –> ( integer )

set_moves

πŸ‡² Method –> ( integer )

set_pain

πŸ‡² Method –> ( integer )

set_part_hp_cur

πŸ‡² Method –> ( BodyPartTypeIntId, integer )

set_part_hp_max

πŸ‡² Method –> ( BodyPartTypeIntId, integer )

set_pos

πŸ‡² Method –> ( TripointBubMs )
πŸ‡² Method –> ( TripointAbsMs )

set_pos_ms

πŸ‡² Method –> ( TripointBubMs )

set_underwater

πŸ‡² Method –> ( boolean )

set_value

πŸ‡² Method –> ( string, string )

Sets an arbitrary key : value pair for the creature.NPC dialogue system uses this, with the format(β€œnpctalk_var” + β€œβ€ + type_var + β€œβ€ + var_context + β€œ_” + var_base_name) used for the key, skipping type or context if empty.

sight_range

πŸ‡² Method –> ( integer ) -> integer

size_melee_penalty

πŸ‡² Method –> ( ) -> integer

skin_name

πŸ‡² Method –> ( ) -> string

speed_rating

πŸ‡² Method –> ( ) -> number

stability_roll

πŸ‡² Method –> ( ) -> number

values_table

πŸ‡² Method –> ( ) -> table

Returns all stored creature vars as a table mapping each key (string) to its value (string), as written by set_value.

DamageInstance

Represents a bunch of damage amounts
Constructors are:
new(damageType, amount, armorPen, remainingArmorMultiplier, damageMultiplier)

Bases

No base classes.

Constructors

  • DamageInstance.new( )
  • DamageInstance.new( DamageType, double, double, double, double )

Members

damage_units

πŸ‡» Variable –> DamageUnit[]

add

πŸ‡² Method –> ( DamageUnit )

add_damage

πŸ‡² Method –> ( DamageType, number, number, number, number )

clear

πŸ‡² Method –> ( )

empty

πŸ‡² Method –> ( ) -> boolean

mult_damage

πŸ‡² Method –> ( number, boolean )

total_damage

πŸ‡² Method –> ( ) -> number

type_damage

πŸ‡² Method –> ( DamageType ) -> number

DamageUnit

Represents a damage amount
Constructors are:
new()
new(damageType, amount, armorPen, remainingArmorMultiplier, damageMultiplier)

Bases

No base classes.

Constructors

  • DamageUnit.new( DamageType, double, double, double, double )

Members

amount

πŸ‡» Variable –> number

damage_multiplier

πŸ‡» Variable –> number

res_mult

πŸ‡» Variable –> number

res_pen

πŸ‡» Variable –> number

type

πŸ‡» Variable –> DamageType

DealtDamageInstance

Represents the final dealt damage

Bases

No base classes.

Constructors

No constructors.

Members

bp_hit

πŸ‡» Variable –> BodyPartTypeId

dealt_dams

πŸ‡» Variable –> integer[]

total_damage

πŸ‡² Method –> ( ) -> integer

type_damage

πŸ‡² Method –> ( DamageType ) -> integer

DiseaseTypeId

Bases

No base classes.

Constructors

  • DiseaseTypeId.new( )
  • DiseaseTypeId.new( DiseaseTypeId )
  • DiseaseTypeId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> DiseaseTypeId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> DiseaseTypeRaw

str

πŸ‡² Method –> ( ) -> string

DistributionGrid

A grid that organizes producers, storage and consumers of a resource like electricity

Bases

No base classes.

Constructors

No constructors.

Members

empty

πŸ‡² Method –> ( ) -> boolean

Check if grid is empty

get_contents

πŸ‡² Method –> ( ) -> TripointAbsMs[]

Get current resource amount. Boolean argument (optional) controls recursive behavior (default true) Get vector of absolute map square coordinates of grid contents

get_power_stat

πŸ‡² Method –> ( ) -> PowerStat

Get power generation and consumption statistics for the grid

get_resource

πŸ‡² Method –> ( boolean? ) -> integer

Modify resource amount. First argument is amount, second (optional) controls recursive behavior (default true)

is_valid

πŸ‡² Method –> ( ) -> boolean

Check if grid is valid

mod_resource

πŸ‡² Method –> ( integer, boolean? ) -> integer

update

πŸ‡² Method –> ( TimePoint )

Update the grid to the given time point

DistributionGridTracker

Manages all active distribution grids

Bases

No base classes.

Constructors

No constructors.

Members

debug_grid_id

πŸ‡² Method –> ( TripointAbsOmt ) -> integer

Get unique identifier for grid at given overmap tile (for debug purposes, returns 0 if no grid)

grid_at

πŸ‡² Method –> ( TripointAbsMs ) -> DistributionGrid
πŸ‡² Method –> ( TripointAbsMs ) -> DistributionGrid

Get grid at absolute map square position

on_changed

πŸ‡² Method –> ( TripointAbsMs )

Notify tracker that a tile at the given position has changed

on_options_changed

πŸ‡² Method –> ( )

Notify tracker that game options have changed

update

πŸ‡² Method –> ( TimePoint )

Update all grids to the given time point

Effect

Bases

No base classes.

Constructors

No constructors.

Members

activated

πŸ‡² Method –> ( TimePoint, string, integer, boolean, number ) -> boolean

decay

πŸ‡² Method –> ( TimePoint, boolean ) -> boolean

disp_desc

πŸ‡² Method –> ( boolean ) -> string

disp_name

πŸ‡² Method –> ( ) -> string

disp_short_desc

πŸ‡² Method –> ( boolean ) -> string

get_addict_mod

πŸ‡² Method –> ( string, integer ) -> number

get_amount

πŸ‡² Method –> ( string, boolean ) -> integer

get_avg_mod

πŸ‡² Method –> ( string, boolean ) -> integer

get_blocks_effects

πŸ‡² Method –> ( ) -> EffectTypeId[]

get_bp

πŸ‡² Method –> ( ) -> BodyPartTypeId

get_dur_add_perc

πŸ‡² Method –> ( ) -> integer

get_duration

πŸ‡² Method –> ( ) -> TimeDuration

get_harmful_cough

πŸ‡² Method –> ( ) -> boolean

get_id

πŸ‡² Method –> ( ) -> EffectTypeId

get_int_add_val

πŸ‡² Method –> ( ) -> integer

get_int_dur_factor

πŸ‡² Method –> ( ) -> TimeDuration

get_intensity

πŸ‡² Method –> ( ) -> integer

get_max_duration

πŸ‡² Method –> ( ) -> TimeDuration

get_max_intensity

πŸ‡² Method –> ( ) -> integer

get_max_val

πŸ‡² Method –> ( string, boolean ) -> integer

get_min_val

πŸ‡² Method –> ( string, boolean ) -> integer

get_mod

πŸ‡² Method –> ( string, boolean ) -> integer

get_percentage

πŸ‡² Method –> ( string, integer, boolean ) -> number

get_removes_effects

πŸ‡² Method –> ( ) -> EffectTypeId[]

get_resist_effects

πŸ‡² Method –> ( ) -> EffectTypeId[]

get_resist_traits

πŸ‡² Method –> ( ) -> MutationBranchId[]

get_sizing

πŸ‡² Method –> ( string ) -> boolean

get_start_time

πŸ‡² Method –> ( ) -> TimePoint

get_type

πŸ‡² Method –> ( ) -> EffectTypeRaw

has_flag

πŸ‡² Method –> ( JsonFlagId ) -> boolean

is_permanent

πŸ‡² Method –> ( ) -> boolean

mod_duration

πŸ‡² Method –> ( TimeDuration, boolean )

mod_intensity

πŸ‡² Method –> ( integer, boolean ) -> integer

mult_duration

πŸ‡² Method –> ( number, boolean )

set_duration

πŸ‡² Method –> ( TimeDuration, boolean )

set_intensity

πŸ‡² Method –> ( integer, boolean ) -> integer

set_permanent

πŸ‡² Method –> ( )

use_part_descs

πŸ‡² Method –> ( ) -> boolean

EffectTypeId

Bases

No base classes.

Constructors

  • EffectTypeId.new( )
  • EffectTypeId.new( EffectTypeId )
  • EffectTypeId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> EffectTypeId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> EffectTypeRaw

str

πŸ‡² Method –> ( ) -> string

EnchantmentFlagId

Bases

No base classes.

Constructors

  • EnchantmentFlagId.new( )
  • EnchantmentFlagId.new( EnchantmentFlagId )
  • EnchantmentFlagId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> EnchantmentFlagId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> EnchantmentFlagRaw

str

πŸ‡² Method –> ( ) -> string

EnchantmentId

Bases

No base classes.

Constructors

  • EnchantmentId.new( )
  • EnchantmentId.new( EnchantmentId )
  • EnchantmentId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> EnchantmentId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> Enchantment

str

πŸ‡² Method –> ( ) -> string

EnchantmentValueId

Bases

No base classes.

Constructors

  • EnchantmentValueId.new( )
  • EnchantmentValueId.new( EnchantmentValueId )
  • EnchantmentValueId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> EnchantmentValueId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> EnchantmentValueRaw

str

πŸ‡² Method –> ( ) -> string

Energy

Bases

No base classes.

Constructors

No constructors.

Members

from_joule

πŸ‡« Function –> ( integer ) -> Energy

from_kilojoule

πŸ‡« Function –> ( integer ) -> Energy

to_joule

πŸ‡² Method –> ( ) -> integer

to_kilojoule

πŸ‡² Method –> ( ) -> integer

ExplosionData

Bases

No base classes.

Constructors

No constructors.

Members

damage

πŸ‡» Variable –> integer

Damage dealt by the explosion

fire

πŸ‡» Variable –> boolean

Whether the explosion creates fire

radius

πŸ‡» Variable –> number

Radius of the explosion

safe_range

πŸ‡² Method –> ( ) -> integer

Returns the safe range of the explosion

FactionId

Bases

No base classes.

Constructors

  • FactionId.new( )
  • FactionId.new( FactionId )
  • FactionId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> FactionId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> FactionRaw

str

πŸ‡² Method –> ( ) -> string

FactionRaw

Bases

No base classes.

Constructors

No constructors.

Members

str_id

πŸ‡² Method –> ( ) -> FactionId

FaultId

Bases

No base classes.

Constructors

  • FaultId.new( )
  • FaultId.new( FaultId )
  • FaultId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> FaultId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> FaultRaw

str

πŸ‡² Method –> ( ) -> string

FieldEmitId

Bases

No base classes.

Constructors

  • FieldEmitId.new( )
  • FieldEmitId.new( FieldEmitId )
  • FieldEmitId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> FieldEmitId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> FieldEmitRaw

str

πŸ‡² Method –> ( ) -> string

FieldTypeId

Bases

No base classes.

Constructors

Members

NULL_ID

πŸ‡« Function –> ( ) -> FieldTypeId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

int_id

πŸ‡² Method –> ( ) -> FieldTypeIntId

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> FieldTypeRaw

str

πŸ‡² Method –> ( ) -> string

FieldTypeIntId

Bases

No base classes.

Constructors

Members

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> FieldTypeRaw

str_id

πŸ‡² Method –> ( ) -> FieldTypeId

FieldTypeRaw

Bases

No base classes.

Constructors

No constructors.

Members

moppable

πŸ‡» Variable –> boolean

FurnId

Bases

No base classes.

Constructors

  • FurnId.new( )
  • FurnId.new( FurnId )
  • FurnId.new( FurnIntId )
  • FurnId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> FurnId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

int_id

πŸ‡² Method –> ( ) -> FurnIntId

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> FurnRaw

str

πŸ‡² Method –> ( ) -> string

FurnIntId

Bases

No base classes.

Constructors

Members

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> FurnRaw

str_id

πŸ‡² Method –> ( ) -> FurnId

FurnRaw

Bases

No base classes.

Constructors

No constructors.

Members

close

πŸ‡» Variable –> FurnId

open

πŸ‡» Variable –> FurnId

transforms_into

πŸ‡» Variable –> FurnId

get_coverage

πŸ‡² Method –> ( ) -> integer

get_flags

πŸ‡² Method –> ( ) -> string[]

get_light_emitted

πŸ‡² Method –> ( ) -> integer

get_max_volume

πŸ‡² Method –> ( ) -> Volume

get_movecost

πŸ‡² Method –> ( ) -> integer

has_flag

πŸ‡² Method –> ( string ) -> boolean

int_id

πŸ‡² Method –> ( ) -> FurnIntId

name

πŸ‡² Method –> ( ) -> string

set_coverage

πŸ‡² Method –> ( integer )

set_flag

πŸ‡² Method –> ( string )

set_light_emitted

πŸ‡² Method –> ( integer )

set_max_volume

πŸ‡² Method –> ( Volume )

set_movecost

πŸ‡² Method –> ( integer )

str_id

πŸ‡² Method –> ( ) -> FurnId

Inventory

Represents a character’s inventory

Bases

No base classes.

Constructors

  • Inventory.new( )

Members

clear

πŸ‡² Method –> ( )

Clear all items from the inventory

count_item

πŸ‡² Method –> ( ItypeId ) -> integer

Count items of a specific type

find_item

πŸ‡² Method –> ( integer ) -> Item

Find item at position

has_charges

πŸ‡² Method –> ( ItypeId, integer ) -> boolean

Check if inventory has the specified charges

has_components

πŸ‡² Method –> ( ItypeId, integer ) -> boolean

Check if inventory has the specified components

has_tools

πŸ‡² Method –> ( ItypeId, integer ) -> boolean

Check if inventory has the specified tool

position_by_type

πŸ‡² Method –> ( ItypeId ) -> integer

Get item position by type

size

πŸ‡² Method –> ( ) -> integer

Get the number of item stacks in the inventory

volume

πŸ‡² Method –> ( ) -> Volume

Get the total volume of the inventory

weight

πŸ‡² Method –> ( ) -> Mass

Get the total weight of the inventory

IslotAmmo

Bases

  • RangedData

Constructors

No constructors.

Members

ammo_effects

πŸ‡» Variable –> AmmunitionEffectId[]

ammo_id

πŸ‡» Variable –> AmmunitionTypeId

Ammo type, basically the β€œform” of the ammo that fits into the gun/tool

casing_id

πŸ‡» Variable –> ItypeId?

Type id of casings, if any

cookoff

πŸ‡» Variable –> boolean

Should this ammo explode in fire?

def_charges

πŸ‡» Variable –> integer

Default charges

dont_recover_one_in

πŸ‡» Variable –> integer

Chance to fail to recover the ammo used.

drop

πŸ‡» Variable –> ItypeId

drop_active

πŸ‡» Variable –> boolean

drop_count

πŸ‡» Variable –> integer

force_stat_display

πŸ‡» Variable –> boolean?

loudness

πŸ‡» Variable –> integer

Base loudness of ammo (possibly modified by gun/gunmods)

recoil

πŸ‡» Variable –> integer

Recoil (per shot), roughly equivalent to kinetic energy (in Joules)

special_cookoff

πŸ‡» Variable –> boolean

Should this ammo apply a special explosion effect when in fire?

speed

πŸ‡» Variable –> integer

Base speed of ammo (possibly modified by gun/gunmods)

IslotArmor

Bases

No base classes.

Constructors

No constructors.

Members

env_resist

πŸ‡» Variable –> integer

Resistance to environmental effects

env_resist_w_filter

πŸ‡» Variable –> integer

Environmental protection of a gas mask with installed filter

layer_data

πŸ‡» Variable –> ArmorPortionData[]

Layer, encumbrance and coverage information

resistance

πŸ‡» Variable –> Resistances

Damage negated by this armor. Usually calculated from materials+thickness

sided

πŸ‡» Variable –> boolean

Whether this item can be worn on either side of the body

storage

πŸ‡» Variable –> Volume

How much storage this items provides when worn

thickness

πŸ‡» Variable –> integer

Multiplier on resistances provided by armor’s materials. Damaged armors have lower effective thickness, low capped at 1. Note: 1 thickness means item retains full resistance when damaged.

valid_mods

πŸ‡» Variable –> string[]

Whitelisted clothing mods. Restricted clothing mods must be listed here by id to be compatible.

warmth

πŸ‡» Variable –> integer

How much warmth this item provides

weight_capacity_bonus

πŸ‡» Variable –> Mass

Bonus to weight capacity

weight_capacity_modifier

πŸ‡» Variable –> number

Factor modifying weight capacity

IslotArtifact

Bases

No base classes.

Constructors

No constructors.

Members

charge_req

πŸ‡» Variable –> ArtifactChargeReq

charge_type

πŸ‡» Variable –> ArtifactCharge

dream_freq_met

πŸ‡» Variable –> integer

dream_freq_unmet

πŸ‡» Variable –> integer

dream_msg_met

πŸ‡» Variable –> string[]

dream_msg_unmet

πŸ‡» Variable –> string[]

effects_activated

πŸ‡» Variable –> ArtifactEffectPassive[]

effects_carried

πŸ‡» Variable –> ArtifactEffectActive[]

effects_wielded

πŸ‡» Variable –> ArtifactEffectActive[]

effects_worn

πŸ‡» Variable –> ArtifactEffectActive[]

charge_req_description

πŸ‡² Method –> ( ) -> string

charge_type_description

πŸ‡² Method –> ( ) -> string

effects_activated_descriptions

πŸ‡² Method –> ( ) -> string[]

effects_activated_names

πŸ‡² Method –> ( ) -> string[]

effects_carried_descriptions

πŸ‡² Method –> ( ) -> string[]

effects_carried_names

πŸ‡² Method –> ( ) -> string[]

effects_wielded_descriptions

πŸ‡² Method –> ( ) -> string[]

effects_wielded_names

πŸ‡² Method –> ( ) -> string[]

effects_worn_descriptions

πŸ‡² Method –> ( ) -> string[]

effects_worn_names

πŸ‡² Method –> ( ) -> string[]

IslotBattery

Bases

No base classes.

Constructors

No constructors.

Members

max_capacity

πŸ‡» Variable –> Energy

Maximum energy the battery can store

IslotBionic

Bases

No base classes.

Constructors

No constructors.

Members

bionic_id

πŸ‡» Variable –> BionicDataId

Id of the bionic

difficulty

πŸ‡» Variable –> integer

Arbitrary difficulty scale

installation_data

πŸ‡» Variable –> ItypeId

Item with installation data that can be used to provide almost guaranteed successful install of corresponding bionic

is_upgrade

πŸ‡» Variable –> boolean

Whether this CBM is an upgrade of another

IslotBook

Bases

No base classes.

Constructors

No constructors.

Members

chapters

πŸ‡» Variable –> integer

Fun books have chapters; after all are read, the book is less fun.

fun

πŸ‡» Variable –> integer

How fun reading this is, can be negative

intelligence

πŸ‡» Variable –> integer

Intelligence required to read it

martial_art

πŸ‡» Variable –> MartialArtsId

Which martial art it teaches. Can be MartialArtsId.NULL_ID

recipes

πŸ‡» Variable –> BookRecipe[]

Recipes contained in this book

skill

πŸ‡» Variable –> SkillId

Which skill it upgrades, if any. Can be SkillId.NULL_ID

skill_max

πŸ‡» Variable –> integer

The skill level the book provides

skill_min

πŸ‡» Variable –> integer

The skill level required to understand it

time

πŸ‡» Variable –> integer

How long in minutes it takes to read. β€œTo read” means getting 1 skill point, not all of them.

IslotBrewable

Bases

No base classes.

Constructors

No constructors.

Members

results

πŸ‡» Variable –> ItypeId[]

What are the results of fermenting this item

time

πŸ‡» Variable –> TimeDuration

How long for this brew to ferment

IslotComestible

Bases

No base classes.

Constructors

No constructors.

Members

addict_type

πŸ‡» Variable –> AddictionType

effects of addiction

addict_value

πŸ‡» Variable –> integer

addiction potential

comest_type

πŸ‡» Variable –> string

comestible subtype - eg. FOOD, DRINK, MED

contamination

πŸ‡» Variable –> table<DiseaseTypeId, integer>

List of diseases carried by this comestible and their associated probability

cooks_like

πŸ‡» Variable –> ItypeId

Reference to other item that replaces this one as a component in recipe results

def_charges

πŸ‡» Variable –> integer

Defaults # of charges (drugs, loaf of bread? etc)

fatigue_mod

πŸ‡» Variable –> integer

fatigue altering effect

freeze_point

πŸ‡» Variable –> integer

freezing point in degrees Fahrenheit, below this temperature item can freeze

healthy

πŸ‡» Variable –> integer

latent_heat

πŸ‡» Variable –> number

monotony_penalty

πŸ‡» Variable –> integer

A penalty applied to fun for every time this food has been eaten in the last 48 hours

parasites

πŸ‡» Variable –> integer

chance (odds) of becoming parasitised when eating (zero if never occurs)

petfood

πŸ‡» Variable –> string[]

pet food category

quench

πŸ‡» Variable –> integer

effect on character thirst (may be negative)

radiation

πŸ‡» Variable –> integer

Amount of radiation you get from this comestible

rot_spawn

πŸ‡» Variable –> MonsterGroupId

The monster group that is drawn from when the item rots away

rot_spawn_chance

πŸ‡» Variable –> integer

Chance the above monster group spawns

smoking_result

πŸ‡» Variable –> ItypeId

Reference to item that will be received after smoking current item

specific_heat_liquid

πŸ‡» Variable –> number

specific heats in J/(g K) and latent heat in J/g

specific_heat_solid

πŸ‡» Variable –> number

spoils

πŸ‡» Variable –> TimeDuration

Time until becomes rotten at standard temperature, or zero if never spoils

stimulant_type

πŸ‡» Variable –> integer

stimulant effect

tool

πŸ‡» Variable –> ItypeId

tool needed to consume (e.g. lighter for cigarettes)

get_default_nutr

πŸ‡² Method –> ( ) -> integer

get_default_nutrition

πŸ‡² Method –> ( ) -> table<VitaminId, integer>

Nutrition values to use for this type when they aren’t calculated from components

has_calories

πŸ‡² Method –> ( ) -> boolean

IslotContainer

Bases

No base classes.

Constructors

No constructors.

Members

contains

πŸ‡» Variable –> Volume

Inner volume of the container

preserves

πŸ‡» Variable –> boolean

Contents do not spoil

seals

πŸ‡» Variable –> boolean

Can be resealed

unseals_into

πŸ‡» Variable –> ItypeId

If this is set to anything but β€œnull”, changing this container’s contents in any way will turn this item into that type

watertight

πŸ‡» Variable –> boolean

Can hold liquids

IslotEngine

Bases

No base classes.

Constructors

No constructors.

Members

displacement

πŸ‡» Variable –> integer

For combustion engines, the displacement

IslotFuel

Bases

No base classes.

Constructors

No constructors.

Members

energy

πŸ‡» Variable –> number

Energy of the fuel (kilojoules per charge)

explosion_data

πŸ‡» Variable –> CppVal<fuel_explosion>

has_explosion_data

πŸ‡» Variable –> boolean

pump_terrain

πŸ‡» Variable –> TerIntId

IslotGun

Bases

  • RangedData

Constructors

No constructors.

Members

ammo

πŸ‡» Variable –> AmmunitionTypeId[]

What type of ammo this gun uses

ammo_effects

πŸ‡» Variable –> AmmunitionEffectId[]

Effects that are applied to the ammo when fired

ammo_to_fire

πŸ‡» Variable –> integer

How much ammo is consumed per shot

barrel_volume

πŸ‡» Variable –> Volume

Volume of material removed by sawing down the barrel, if left unspecified barrel can’t be sawed down

blackpowder_tolerance

πŸ‡» Variable –> integer

One in X chance for gun to require major cleanup after firing blackpowder shot

built_in_mods

πŸ‡» Variable –> ItypeId[]

Built in mods. string is id of mod. These mods will get the IRREMOVABLE flag set

burst

πŸ‡» Variable –> integer

Burst size for AUTO mode (legacy field for items not migrated to specify modes )

clip

πŸ‡» Variable –> integer

For guns with an integral magazine what is the capacity?

default_mods

πŸ‡» Variable –> ItypeId[]

Default mods, string is id of mod. These mods are removable but are default on the weapon

durability

πŸ‡» Variable –> integer

Gun durability, affects gun being damaged during shooting

handling

πŸ‡» Variable –> integer

How easy is control of recoil? If unset value automatically derived from weapon type

loudness

πŸ‡» Variable –> integer

Modifies base loudness as provided by the currently loaded ammo

min_cycle_recoil

πŸ‡» Variable –> integer

Minimum ammo recoil for gun to be able to fire more than once per attack

recoil

πŸ‡» Variable –> integer

Additional recoil applied per shot before effects of handling are considered, useful for adding recoil effect to guns which otherwise consume no ammo

reload_noise

πŸ‡» Variable –> string

Noise displayed when reloading the weapon

reload_noise_volume

πŸ‡» Variable –> Sound

Volume of the noise made when reloading this weapon

reload_time

πŸ‡» Variable –> integer

Reload time, in moves

sight_dispersion

πŸ‡» Variable –> integer

Maximum aim achievable using base weapon sights

skill_used

πŸ‡» Variable –> SkillId

What skill this gun uses

speed

πŸ‡» Variable –> integer

Modifies projectile speed as provided by the currently loaded ammo

ups_charges

πŸ‡» Variable –> integer

If this uses UPS charges, how many (per shoot), 0 for no UPS charges at all

get_gunmod_locations

πŸ‡² Method –> ( ) -> table<string, integer>

Location for gun mods. Key is the location (untranslated!), value is the number of mods that the location can have. The value should be > 0

get_modes

πŸ‡² Method –> ( ) -> string[]

Firing modes are supported by the gun. Always contains at least DEFAULT mode

IslotGunmod

Bases

  • RangedData

Constructors

No constructors.

Members

aim_speed

πŸ‡» Variable –> integer

For sights (see @ref sight_dispersion), this value affects time cost of aiming. Higher is better. In case of multiple usable sights, the one with highest aim speed is used.

ammo_effects

πŸ‡» Variable –> AmmunitionEffectId[]

ammo_to_fire_modifier

πŸ‡» Variable –> integer

Increases base gun ammo to fire by this value per shot

ammo_to_fire_multiplier

πŸ‡» Variable –> number

Increases base gun ammo to fire by this many times per shot

consume_chance

πŸ‡» Variable –> integer

Percentage value change to the gun’s loading time. Higher is less likely

consume_divisor

πŸ‡» Variable –> integer

Divsor to scale back gunmod consumption damage. lower is more damaging. Affected by ammo loudness and recoil, see ranged.cpp for how much.

exclusion

πŸ‡» Variable –> CppVal<std_unordered_set<string_id<itype>>>

What kind of weapons this gunmod can’t be used with

exclusion_category

πŸ‡» Variable –> CppVal<std_unordered_set<string_id<weapon_category>>>[]

What category of weapons this gunmod can’t be used with

handling

πŸ‡» Variable –> integer

Relative adjustment to base gun handling

install_time

πŸ‡» Variable –> integer

How many moves does this gunmod take to install?

loudness

πŸ‡» Variable –> integer

Modifies base loudness as provided by the currently loaded ammo

min_str_required_mod

πŸ‡» Variable –> integer

Modifies base strength required

reload_modifier

πŸ‡» Variable –> integer

Percentage value change to the gun’s loading time. Higher is slower

sight_dispersion

πŸ‡» Variable –> integer

If this value is set (non-negative), this gunmod functions as a sight. A sight is only usable to aim by a character whose current Character::recoil is at or below this value.

speed

πŸ‡» Variable –> integer

Modifies projectile speed as provided by the currently loaded ammo

ups_charges_modifier

πŸ‡» Variable –> integer

Increases base gun UPS consumption by this value per shot

ups_charges_multiplier

πŸ‡» Variable –> number

Increases base gun UPS consumption by this many times per shot

usable

πŸ‡» Variable –> CppVal<std_unordered_set<string_id<itype>>>

What kind of weapons this gunmod can be used with

usable_category

πŸ‡» Variable –> CppVal<std_unordered_set<string_id<weapon_category>>>[]

What category of weapons this gunmod can be used with

volume_multiplier

πŸ‡» Variable –> number

Increases gun volume by this many times

weight_multiplier

πŸ‡» Variable –> number

Increases gun weight by this many times

get_added_slots

πŸ‡² Method –> ( ) -> table<string, integer>

Additional gunmod slots to add to the gun. Key is the location (untranslated!), value is the number of extra mods that location can hold.

get_location

πŸ‡² Method –> ( ) -> string

Where is this gunmod installed (e.g. β€œstock”, β€œrail”)?

get_mod_blacklist

πŸ‡² Method –> ( ) -> string[]

Not compatible on weapons that have this mod slot

get_mode_modifiers

πŸ‡² Method –> ( ) -> string[]

Firing modes added to or replacing those of the base gun

IslotMagazine

Bases

No base classes.

Constructors

No constructors.

Members

ammo_type

πŸ‡» Variable –> AmmunitionTypeId[]

What type of ammo this magazine can be loaded with

capacity

πŸ‡» Variable –> integer

Capacity of magazine (in equivalent units to ammo charges)

count

πŸ‡» Variable –> integer

Default amount of ammo contained by a magazine (often set for ammo belts)

default_ammo

πŸ‡» Variable –> ItypeId

Default type of ammo contained by a magazine (often set for ammo belts)

linkage

πŸ‡» Variable –> ItypeId?

For ammo belts one linkage (of given type) is dropped for each unit of ammo consumed

protects_contents

πŸ‡» Variable –> boolean

If false, ammo will cook off if this mag is affected by fire

reliability

πŸ‡» Variable –> integer

How reliable this magazine on a range of 0 to 10?

reload_time

πŸ‡» Variable –> integer

How long it takes to load each unit of ammo into the magazine

IslotMilling

Bases

No base classes.

Constructors

No constructors.

Members

conversion_rate

πŸ‡» Variable –> integer

converts_into

πŸ‡» Variable –> ItypeId

IslotMod

Bases

No base classes.

Constructors

No constructors.

Members

acceptable_ammo

πŸ‡» Variable –> AmmunitionTypeId[]

If non-empty restrict mod to items with those base (before modifiers) ammo types

ammo_modifier

πŸ‡» Variable –> AmmunitionTypeId[]

If set modifies parent ammo to this type

capacity_multiplier

πŸ‡» Variable –> number

Proportional adjustment of parent item ammo capacity

magazine_adaptor

πŸ‡» Variable –> table<AmmunitionTypeId, ItypeId[]>

If non-empty replaces the compatible magazines for the parent item

IslotPetArmor

Bases

No base classes.

Constructors

No constructors.

Members

bodytype

πŸ‡» Variable –> string

What animal bodytype can wear this armor

env_resist

πŸ‡» Variable –> integer

Resistance to environmental effects

env_resist_w_filter

πŸ‡» Variable –> integer

Environmental protection of a gas mask with installed filter

max_vol

πŸ‡» Variable –> Volume

The maximum volume a pet can be and wear this armor

min_vol

πŸ‡» Variable –> Volume

The minimum volume a pet can be and wear this armor

storage

πŸ‡» Variable –> Volume

How much storage this items provides when worn

thickness

πŸ‡» Variable –> integer

Multiplier on resistances provided by this armor

IslotSeed

Bases

No base classes.

Constructors

No constructors.

Members

byproducts

πŸ‡» Variable –> ItypeId[]

Additionally items (a list of their item ids) that will spawn when harvesting the plant.

fruit_div

πŸ‡» Variable –> integer

Amount of harvested charges of fruits is divided by this number.

fruit_id

πŸ‡» Variable –> ItypeId

Type id of the fruit item.

grow

πŸ‡» Variable –> TimeDuration

Time it takes for a seed to grow (based of off a season length of 91 days).

get_plant_name

πŸ‡² Method –> ( integer ) -> string

Name of the plant.

IslotTool

Bases

No base classes.

Constructors

No constructors.

Members

ammo_id

πŸ‡» Variable –> AmmunitionTypeId[]

charge_factor

πŸ‡» Variable –> integer

charges_per_use

πŸ‡» Variable –> integer

def_charges

πŸ‡» Variable –> integer

default_ammo

πŸ‡» Variable –> ItypeId

max_charges

πŸ‡» Variable –> integer

power_draw

πŸ‡» Variable –> integer

rand_charges

πŸ‡» Variable –> integer[]

revert_msg

πŸ‡» Variable –> string

revert_to

πŸ‡» Variable –> ItypeId?

subtype

πŸ‡» Variable –> ItypeId

turns_active

πŸ‡» Variable –> integer

turns_per_charge

πŸ‡» Variable –> integer

ups_eff_mult

πŸ‡» Variable –> integer

ups_recharge_rate

πŸ‡» Variable –> integer

IslotWheel

Bases

No base classes.

Constructors

No constructors.

Members

diameter

πŸ‡» Variable –> integer

Diameter of wheel in millimeters. Integer JSON values are legacy inches.

width

πŸ‡» Variable –> integer

Width of wheel in millimeters. Integer JSON values are legacy inches.

Item

Bases

No base classes.

Constructors

No constructors.

Members

charges

πŸ‡» Variable –> integer

activate

πŸ‡² Method –> ( )

add_enchantment

πŸ‡² Method –> ( EnchantmentId ) -> boolean
πŸ‡² Method –> ( Enchantment ) -> boolean

Adds an enchantment to this item

add_item_with_id

πŸ‡² Method –> ( ItypeId, integer )

Creates an item with the given id and adds it to contents. count sets the item’s charges, not the number of items: exactly one item is created. For stackable (count-by-charges) items such as ammo, count is the stack size. For non-stackable items, pass a negative value (e.g. -1), since a positive one is still applied as charges. Tools spawned with a negative value get their default charges.

add_technique

πŸ‡² Method –> ( MartialArtsTechniqueId )

Adds the technique. It isn’t treated original, but additional.

ammo_capacity

πŸ‡² Method –> ( boolean ) -> integer

Gets the maximum capacity of a magazine

ammo_consume

πŸ‡² Method –> ( integer, TripointBubMs ) -> integer

ammo_current

πŸ‡² Method –> ( ) -> ItypeId

ammo_data

πŸ‡² Method –> ( ) -> ItypeRaw

ammo_remaining

πŸ‡² Method –> ( ) -> integer

Get remaining ammo, works with batteries & stuff too

ammo_required

πŸ‡² Method –> ( ) -> integer

ammo_set

πŸ‡² Method –> ( ItypeId, integer )

ammo_unset

πŸ‡² Method –> ( )

attack_cost

πŸ‡² Method –> ( ) -> integer

can_contain

πŸ‡² Method –> ( Item ) -> boolean

Checks if this item can contain another

clear_vars

πŸ‡² Method –> ( )

Erase all variables

conductive

πŸ‡² Method –> ( ) -> boolean

convert

πŸ‡² Method –> ( ItypeId )

Converts the item as given <code>[ItypeId](#sol::ItypeId)</code>.

covers

πŸ‡² Method –> ( BodyPartTypeIntId ) -> boolean

Checks if the item covers a bodypart

current_magazine

πŸ‡² Method –> ( ) -> Item

Gets the current magazine

deactivate

πŸ‡² Method –> ( )

display_name

πŸ‡² Method –> ( integer ) -> string

Display name with all bells and whistles like ammo and prefixes

energy_remaining

πŸ‡² Method –> ( ) -> Energy

erase_var

πŸ‡² Method –> ( string )

Erase variable

get_category_id

πŸ‡² Method –> ( ) -> string

Gets the category id this item is in

get_comestible_fun

πŸ‡² Method –> ( ) -> integer

get_counter

πŸ‡² Method –> ( ) -> integer

get_damage

πŸ‡² Method –> ( ) -> integer

Get current item damage value (durability). Higher values mean more damaged. Default range is -1000 (min) to 4000 (max), configurable via β€˜damage_states’ in JSON.

get_damage_level

πŸ‡² Method –> ( ) -> integer
πŸ‡² Method –> ( integer ) -> integer

Get item damage as a level from 0 to max. Used for UI display and damage thresholds.

get_dispersion_bonus

πŸ‡² Method –> ( ) -> integer

get_kcal

πŸ‡² Method –> ( ) -> integer

get_max_damage

πŸ‡² Method –> ( ) -> integer

Get maximum possible damage value before item is destroyed. Default is 4000, configurable via β€˜damage_states’ in JSON.

get_melee_damage_bonus

πŸ‡² Method –> ( ) -> DamageInstance

get_melee_hit_bonus

πŸ‡² Method –> ( ) -> integer

get_min_damage

πŸ‡² Method –> ( ) -> integer

Get minimum possible damage value (can be negative for reinforced items). Default is -1000, configurable via β€˜damage_states’ in JSON.

get_mtype

πŸ‡² Method –> ( ) -> MonsterTypeId

Almost for a corpse.

get_owner

πŸ‡² Method –> ( ) -> FactionId

Gets the faction id that owns this item

get_owner_name

πŸ‡² Method –> ( ) -> string

get_quench

πŸ‡² Method –> ( ) -> integer

get_range_bonus

πŸ‡² Method –> ( ) -> integer

get_ranged_damage_bonus

πŸ‡² Method –> ( ) -> DamageInstance

get_recoil_bonus

πŸ‡² Method –> ( ) -> integer

get_relative_health

πŸ‡² Method –> ( ) -> number

Get relative health as ratio 0.0-1.0, where 1.0 is undamaged and 0.0 is destroyed

get_reload_time

πŸ‡² Method –> ( ) -> integer

get_rot

πŸ‡² Method –> ( ) -> TimeDuration

Gets the TimeDuration until this item rots

get_techniques

πŸ‡² Method –> ( ) -> MartialArtsTechniqueId[]

Gets all techniques. Including original techniques.

get_type

πŸ‡² Method –> ( ) -> ItypeId

get_var_num

πŸ‡² Method –> ( string, number ) -> number

Get variable as float number

get_var_str

πŸ‡² Method –> ( string, string ) -> string

Get variable as string

get_var_tri

πŸ‡² Method –> ( string, Tripoint ) -> Tripoint

Get variable as tripoint

has_flag

πŸ‡² Method –> ( JsonFlagId ) -> boolean

has_infinite_charges

πŸ‡² Method –> ( ) -> boolean

has_item_with_id

πŸ‡² Method –> ( ItypeId ) -> boolean

Checks item contents for a given item id

has_own_flag

πŸ‡² Method –> ( JsonFlagId ) -> boolean

has_technique

πŸ‡² Method –> ( MartialArtsTechniqueId ) -> boolean

Checks if this item has the technique as an addition. Doesn’t check original techniques.

has_use

πŸ‡² Method –> ( string ) -> CppVal<use_function>

has_var

πŸ‡² Method –> ( string ) -> boolean

Check for variable of any type

invoke_at

πŸ‡² Method –> ( TripointBubMs ) -> integer

Immediately invokes this item’s use action at the given map-square position. Returns the charges consumed by the use action.

is_active

πŸ‡² Method –> ( ) -> boolean

is_ammo

πŸ‡² Method –> ( ) -> boolean

is_ammo_belt

πŸ‡² Method –> ( ) -> boolean

is_ammo_container

πŸ‡² Method –> ( ) -> boolean

is_armor

πŸ‡² Method –> ( ) -> boolean

is_artifact

πŸ‡² Method –> ( ) -> boolean

is_bandolier

πŸ‡² Method –> ( ) -> boolean

is_bionic

πŸ‡² Method –> ( ) -> boolean

is_book

πŸ‡² Method –> ( ) -> boolean

is_brewable

πŸ‡² Method –> ( ) -> boolean

is_bucket

πŸ‡² Method –> ( ) -> boolean

is_bucket_nonempty

πŸ‡² Method –> ( ) -> boolean

is_comestible

πŸ‡² Method –> ( ) -> boolean

is_container

πŸ‡² Method –> ( ) -> boolean

is_container_empty

πŸ‡² Method –> ( ) -> boolean

is_corpse

πŸ‡² Method –> ( ) -> boolean

is_craft

πŸ‡² Method –> ( ) -> boolean

is_dangerous

πŸ‡² Method –> ( ) -> boolean

is_deployable

πŸ‡² Method –> ( ) -> boolean

is_emissive

πŸ‡² Method –> ( ) -> boolean

is_engine

πŸ‡² Method –> ( ) -> boolean

is_faulty

πŸ‡² Method –> ( ) -> boolean

is_firearm

πŸ‡² Method –> ( ) -> boolean

is_food

πŸ‡² Method –> ( ) -> boolean

is_food_container

πŸ‡² Method –> ( ) -> boolean

is_fuel

πŸ‡² Method –> ( ) -> boolean

is_gun

πŸ‡² Method –> ( ) -> boolean

is_gunmod

πŸ‡² Method –> ( ) -> boolean

is_holster

πŸ‡² Method –> ( ) -> boolean

is_irremovable

πŸ‡² Method –> ( ) -> boolean

is_made_of

πŸ‡² Method –> ( MaterialTypeId ) -> boolean

is_magazine

πŸ‡² Method –> ( ) -> boolean

Is this a magazine? (batteries are magazines)

is_map

πŸ‡² Method –> ( ) -> boolean

is_med_container

πŸ‡² Method –> ( ) -> boolean

is_medication

πŸ‡² Method –> ( ) -> boolean

is_melee

πŸ‡² Method –> ( DamageType ) -> boolean

Is this item an effective melee weapon for the given damage type?

is_money

πŸ‡² Method –> ( ) -> boolean

is_non_resealable_container

πŸ‡² Method –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_owned_by

πŸ‡² Method –> ( Character, boolean ) -> boolean

Checks if this item owned by a character

is_power_armor

πŸ‡² Method –> ( ) -> boolean

is_relic

πŸ‡² Method –> ( boolean ) -> boolean

is_reloadable

πŸ‡² Method –> ( ) -> boolean

is_salvageable

πŸ‡² Method –> ( boolean ) -> boolean

is_seed

πŸ‡² Method –> ( ) -> boolean

is_sided

πŸ‡² Method –> ( ) -> boolean

is_silent

πŸ‡² Method –> ( ) -> boolean

is_soft

πŸ‡² Method –> ( ) -> boolean

is_stackable

πŸ‡² Method –> ( ) -> boolean

is_tainted

πŸ‡² Method –> ( ) -> boolean

is_tool

πŸ‡² Method –> ( ) -> boolean

is_toolmod

πŸ‡² Method –> ( ) -> boolean

is_transformable

πŸ‡² Method –> ( ) -> boolean

is_unarmed_weapon

πŸ‡² Method –> ( ) -> boolean

is_upgrade

πŸ‡² Method –> ( ) -> boolean

is_watertight_container

πŸ‡² Method –> ( ) -> boolean

is_wheel

πŸ‡² Method –> ( ) -> boolean

made_of

πŸ‡² Method –> ( ) -> MaterialTypeId[]

mod_charges

πŸ‡² Method –> ( integer )

mod_damage

πŸ‡² Method –> ( integer ) -> boolean
πŸ‡² Method –> ( integer, DamageType ) -> boolean

Modify item damage by given amount. Returns true if item should be destroyed.

price

πŸ‡² Method –> ( boolean ) -> number

Cents of the item. bool is whether it is a post-cataclysm value.

remaining_capacity_for_id

πŸ‡² Method –> ( ItypeId, boolean ) -> integer

Gets the remaining space available for a type of liquid

remove_technique

πŸ‡² Method –> ( MartialArtsTechniqueId )

Removes the additional technique. Doesn’t affect originial techniques.

set_charges

πŸ‡² Method –> ( integer )

set_counter

πŸ‡² Method –> ( integer )

set_damage

πŸ‡² Method –> ( integer )

Set item damage to specified value. Clamped between min_damage and max_damage.

set_dispersion_bonus

πŸ‡² Method –> ( integer )

set_flag

πŸ‡² Method –> ( JsonFlagId )

set_flag_recursive

πŸ‡² Method –> ( JsonFlagId )

set_melee_damage_bonus

πŸ‡² Method –> ( DamageInstance )

set_melee_hit_bonus

πŸ‡² Method –> ( integer )

set_owner

πŸ‡² Method –> ( FactionId )
πŸ‡² Method –> ( Character )

Sets the ownership of this item to a faction or character

set_range_bonus

πŸ‡² Method –> ( integer )

set_ranged_damage_bonus

πŸ‡² Method –> ( DamageInstance )

set_recoil_bonus

πŸ‡² Method –> ( integer )

set_var_col

πŸ‡² Method –> ( string, RGBColor )

set_var_num

πŸ‡² Method –> ( string, number )

set_var_str

πŸ‡² Method –> ( string, string )

set_var_tri

πŸ‡² Method –> ( string, Tripoint )

spawn

πŸ‡« Function –> ( ItypeId, integer ) -> Detached<Item>

Spawns a new item. Same as gapi.create_item count sets the item’s charges, not the number of items: exactly one item is created. For stackable (count-by-charges) items such as ammo, count is the stack size. For non-stackable items, pass a negative value (e.g. -1), since a positive one is still applied as charges. Tools spawned with a negative value get their default charges.

stamina_cost

πŸ‡² Method –> ( ) -> integer

tname

πŸ‡² Method –> ( integer, boolean, integer ) -> string

Translated item name with prefixes

total_capacity

πŸ‡² Method –> ( ) -> Volume

Gets maximum volume this item can hold (liquids, ammo, etc)

unset_flag

πŸ‡² Method –> ( JsonFlagId )

unset_flags

πŸ‡² Method –> ( )

vars_table

πŸ‡² Method –> ( ) -> table

Returns all stored item vars as a table mapping each var name (string) to its raw value (string).

volume

πŸ‡² Method –> ( boolean? ) -> Volume

Volume of the item. bool is whether it is integral_volume.

weapon_categories

πŸ‡² Method –> ( ) -> WeaponCategoryId[]

Gets the weapon category of the item.

weight

πŸ‡² Method –> ( boolean?, boolean? ) -> Mass

Weight of the item. The first bool is whether including contents, second bool is whether it is integral_weight.

ItemStack

Iterate over this using pairs() for reading. Can also be indexed.

Bases

No base classes.

Constructors

No constructors.

Members

amount_can_fit

πŸ‡² Method –> ( Item ) -> integer

clear

πŸ‡² Method –> ( ) -> Detached<Item>[]

count

πŸ‡² Method –> ( ) -> integer

count_limit

πŸ‡² Method –> ( ) -> integer

free_volume

πŸ‡² Method –> ( ) -> Volume

insert

πŸ‡² Method –> ( Detached<Item> )

items

πŸ‡² Method –> ( ) -> Item[]

Modifying the stack while iterating may cause problems. This returns a frozen copy of the items in the stack for safe modification of the stack (eg. removing items while iterating).

max_volume

πŸ‡² Method –> ( ) -> Volume

move_all_to

πŸ‡² Method –> ( ItemStack )

only_item

πŸ‡² Method –> ( ) -> Item

remove

πŸ‡² Method –> ( Item ) -> Detached<Item>

stacks_with

πŸ‡² Method –> ( Item ) -> Item

stored_volume

πŸ‡² Method –> ( ) -> Volume

ItypeId

Bases

No base classes.

Constructors

  • ItypeId.new( )
  • ItypeId.new( ItypeId )
  • ItypeId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> ItypeId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> ItypeRaw

str

πŸ‡² Method –> ( ) -> string

ItypeRaw

Slots for various item type properties. Each slot may contain a valid value or nil

Bases

No base classes.

Constructors

No constructors.

Members

attacks

πŸ‡» Variable –> table<string, CppVal<attack_statblock>>

Attacks this weapon can perform, keyed by attack id.

countdown_destroy

πŸ‡» Variable –> boolean

countdown_interval

πŸ‡» Variable –> integer

default_container

πŸ‡» Variable –> ItypeId?

emits

πŸ‡» Variable –> FieldEmitId[]

explode_in_fire

πŸ‡» Variable –> boolean

explosion_data

πŸ‡» Variable –> ExplosionData

faults

πŸ‡» Variable –> FaultId[]

integral_volume

πŸ‡» Variable –> Volume

integral_weight

πŸ‡» Variable –> Mass

item_tags

πŸ‡» Variable –> JsonFlagId[]

layer

πŸ‡» Variable –> CppVal<layer_level>

light_emission

πŸ‡» Variable –> integer

looks_like

πŸ‡» Variable –> ItypeId

materials

πŸ‡» Variable –> MaterialTypeId[]

melee_to_hit

πŸ‡» Variable –> integer

min_dex

πŸ‡» Variable –> integer

min_int

πŸ‡» Variable –> integer

min_per

πŸ‡» Variable –> integer

min_skills

πŸ‡» Variable –> table<SkillId, integer>

Minimum skill levels required to use this item, keyed by skill.

min_str

πŸ‡» Variable –> integer

phase

πŸ‡» Variable –> Phase

properties

πŸ‡» Variable –> table<string, string>

Free-form string properties from the item’s JSON properties field, keyed by property name.

qualities

πŸ‡» Variable –> table<QualityId, integer>

Tool qualities this item provides, mapped to their level.

recipes

πŸ‡» Variable –> RecipeId[]

repair

πŸ‡» Variable –> ItypeId[]

repairs_like

πŸ‡» Variable –> ItypeId

rigid

πŸ‡» Variable –> boolean

stack_size

πŸ‡» Variable –> integer

techniques

πŸ‡» Variable –> MartialArtsTechniqueId[]

thrown_damage

πŸ‡» Variable –> DamageInstance

volume

πŸ‡» Variable –> Volume

weapon_category

πŸ‡» Variable –> WeaponCategoryId[]

weight

πŸ‡» Variable –> Mass

can_have_charges

πŸ‡² Method –> ( ) -> boolean

can_use

πŸ‡² Method –> ( string ) -> boolean

charge_factor

πŸ‡² Method –> ( ) -> integer

charges_default

πŸ‡² Method –> ( ) -> integer

charges_per_volume

πŸ‡² Method –> ( Volume ) -> integer

charges_to_use

πŸ‡² Method –> ( ) -> integer

damage_max

πŸ‡² Method –> ( ) -> integer

damage_min

πŸ‡² Method –> ( ) -> integer

get_countdown_action

πŸ‡² Method –> ( ) -> string

get_description

πŸ‡² Method –> ( integer ) -> string

get_drop_action

πŸ‡² Method –> ( ) -> string

get_flags

πŸ‡² Method –> ( ) -> JsonFlagId[]

get_name

πŸ‡² Method –> ( integer ) -> string

get_uses

πŸ‡² Method –> ( ) -> string[]

has_flag

πŸ‡² Method –> ( JsonFlagId ) -> boolean

has_use

πŸ‡² Method –> ( ) -> boolean

is_stackable

πŸ‡² Method –> ( ) -> boolean

maximum_charges

πŸ‡² Method –> ( ) -> integer

price

πŸ‡² Method –> ( ) -> integer

price_post

πŸ‡² Method –> ( ) -> integer

slot_ammo

πŸ‡² Method –> ( ) -> IslotAmmo

slot_armor

πŸ‡² Method –> ( ) -> IslotArmor

slot_artifact

πŸ‡² Method –> ( ) -> IslotArtifact

slot_battery

πŸ‡² Method –> ( ) -> IslotBattery

slot_bionic

πŸ‡² Method –> ( ) -> IslotBionic

slot_book

πŸ‡² Method –> ( ) -> IslotBook

slot_brewable

πŸ‡² Method –> ( ) -> IslotBrewable

slot_comestible

πŸ‡² Method –> ( ) -> IslotComestible

slot_container

πŸ‡² Method –> ( ) -> IslotContainer

slot_engine

πŸ‡² Method –> ( ) -> IslotEngine

slot_fuel

πŸ‡² Method –> ( ) -> IslotFuel

slot_gun

πŸ‡² Method –> ( ) -> IslotGun

slot_gunmod

πŸ‡² Method –> ( ) -> IslotGunmod

slot_magazine

πŸ‡² Method –> ( ) -> IslotMagazine

slot_milling

πŸ‡² Method –> ( ) -> IslotMilling

slot_mod

πŸ‡² Method –> ( ) -> IslotMod

slot_pet_armor

πŸ‡² Method –> ( ) -> IslotPetArmor

slot_relic

πŸ‡² Method –> ( ) -> Relic

slot_seed

πŸ‡² Method –> ( ) -> IslotSeed

slot_tool

πŸ‡² Method –> ( ) -> IslotTool

slot_wheel

πŸ‡² Method –> ( ) -> IslotWheel

source_mod

πŸ‡² Method –> ( ) -> ModInfoId[]

type_id

πŸ‡² Method –> ( ) -> ItypeId

JsonFlagId

Bases

No base classes.

Constructors

  • JsonFlagId.new( )
  • JsonFlagId.new( JsonFlagId )
  • JsonFlagId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> JsonFlagId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> JsonFlagRaw

str

πŸ‡² Method –> ( ) -> string

JsonTraitFlagId

Bases

No base classes.

Constructors

  • JsonTraitFlagId.new( )
  • JsonTraitFlagId.new( JsonTraitFlagId )
  • JsonTraitFlagId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> JsonTraitFlagId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> JsonTraitFlagRaw

str

πŸ‡² Method –> ( ) -> string

KnownMagic

Represents a character’s spellbook and mana pool. Manages all spells known by a character, their mana, and spell learning/forgetting.

Bases

No base classes.

Constructors

No constructors.

Members

casting_ignore

πŸ‡» Variable –> boolean

Whether casting ignores all distractions. Can be read and written.

available_mana

πŸ‡² Method –> ( ) -> integer

Get the current available mana.

can_learn_spell

πŸ‡² Method –> ( Character, SpellTypeId ) -> boolean

Check if the character can learn a specific spell, considering traits and other restrictions.

forget_spell

πŸ‡² Method –> ( SpellTypeId )

Forget a known spell by spell_id.

get_spell

πŸ‡² Method –> ( SpellTypeId ) -> Spell

Get a reference to a known spell for editing. Returns the spell associated with the given spell_id.

get_spells

πŸ‡² Method –> ( ) -> Spell[]

Get all known spells as a vector of spell pointers.

has_enough_energy

πŸ‡² Method –> ( Character, Spell ) -> boolean

Check if the character has enough energy (of the appropriate type) to cast the given spell.

knows_spell

πŸ‡² Method –> ( SpellTypeId ) -> boolean
πŸ‡² Method –> ( ) -> boolean

Check if the character knows a specific spell by spell_id.

learn_spell

πŸ‡² Method –> ( SpellTypeId, Character, boolean? )

Learn a new spell. Requires a Character reference and spell_id. Optional force(boolean) parameter bypasses restrictions.

mana_regen_rate

πŸ‡² Method –> ( Character ) -> number

Get the mana regeneration rate in units per turn for the given character.

max_mana

πŸ‡² Method –> ( Character ) -> integer

Get the maximum mana for the given character.

mod_mana

πŸ‡² Method –> ( Character, integer )

Modify the current mana by adding or subtracting an amount.

set_mana

πŸ‡² Method –> ( integer )

Set the current mana to a specific value.

spells

πŸ‡² Method –> ( ) -> SpellTypeId[]

Get a vector of all known spell IDs.

time_to_learn_spell

πŸ‡² Method –> ( Character, SpellTypeId ) -> integer

Calculate the time in moves required for the character to memorize/learn a spell.

Map

Bases

No base classes.

Constructors

No constructors.

Members

abs_to_bub

πŸ‡² Method –> ( TripointAbsMs ) -> TripointBubMs
πŸ‡² Method –> ( TripointAbsSm ) -> TripointBubSm

Convert absolute coordinates to bubble coordinates.

add_field_at

πŸ‡² Method –> ( TripointBubMs, FieldTypeIntId, integer, TimeDuration ) -> boolean

add_item

πŸ‡² Method –> ( TripointBubMs, Detached<Item> ) -> Detached<Item>
πŸ‡² Method –> ( Tripoint, Detached<Item> ) -> Detached<Item>

Places a detached item onto the map. Returns nil on success (item now owned by map), or returns the item back if placement failed.

ambient_light_at

πŸ‡² Method –> ( TripointBubMs ) -> number

bub_to_abs

πŸ‡² Method –> ( TripointBubMs ) -> TripointAbsMs
πŸ‡² Method –> ( TripointBubSm ) -> TripointAbsSm

Convert bubble coordinates to absolute coordinates.

clear_items_at

πŸ‡² Method –> ( TripointBubMs )
πŸ‡² Method –> ( Tripoint )

create_corpse_at

πŸ‡² Method –> ( TripointBubMs, MonsterTypeId?, TimePoint?, string?, integer? )

Creates a new corpse at a position on the map. You can skip Opt ones by omitting them or passing nil. <code>[MonsterTypeId](#sol::MonsterTypeId)</code> specifies which monster’s body it is, <code>[TimePoint](#sol::TimePoint)</code> indicates when it died, string gives it a custom name, and int determines the revival time if the monster has the REVIVES flag.

create_item_at

πŸ‡² Method –> ( TripointBubMs, ItypeId, integer )

Creates a new item at a position on the map. count sets the item’s charges, not the number of items: exactly one item is created. For stackable (count-by-charges) items such as ammo, count is the stack size. For non-stackable items, pass a negative value (e.g. -1), since a positive one is still applied as charges. Tools spawned with a negative value get their default charges. Returns nil. Use gapi.create_item and Map:add_item to modify before placement.

destroy

πŸ‡² Method –> ( TripointBubMs )

detach_item_at

πŸ‡² Method –> ( TripointBubMs, Item ) -> Detached<Item>
πŸ‡² Method –> ( Tripoint, Item ) -> Detached<Item>

Removes an item from the map and returns it as a detached_ptr. The item is now owned by Lua - store it in a table to keep it alive, or let it be GC’d to destroy it. Use add_item to place it back on a map.

disarm_trap_at

πŸ‡² Method –> ( TripointBubMs )

Disarms a trap using your skills and stats, with consequences depending on success or failure.

drain_vehicle_fuel_at

πŸ‡² Method –> ( TripointBubMs, string, ItypeId, integer ) -> integer

Drains fuel charges from the vehicle when the position has a part with the given feature. Returns the charges drained.

draw_fill_background

πŸ‡² Method –> ( string )

erase_furn_var_at

πŸ‡² Method –> ( TripointBubMs, string ) -> boolean

Removes a furniture variable at the position. Returns whether a variable was removed.

erase_ter_var_at

πŸ‡² Method –> ( TripointBubMs, string ) -> boolean

Removes a terrain variable at the position. Returns whether a variable was removed.

get_bound_dimension

πŸ‡² Method –> ( ) -> string

Returns the dimension id currently bound to this map. Empty string means the overworld.

get_field_age_at

πŸ‡² Method –> ( TripointBubMs, FieldTypeIntId ) -> TimeDuration

get_field_ids_at

πŸ‡² Method –> ( TripointBubMs ) -> FieldTypeIntId[]

get_field_int_at

πŸ‡² Method –> ( TripointBubMs, FieldTypeIntId ) -> integer

get_field_name_at

πŸ‡² Method –> ( TripointBubMs, FieldTypeIntId ) -> string

get_furn_at

πŸ‡² Method –> ( TripointBubMs ) -> FurnIntId

get_furn_var_at

πŸ‡² Method –> ( TripointBubMs, string, string? ) -> string

Returns a furniture variable at the position, or default (empty string if omitted) when it is not set.

get_furn_vars_table_at

πŸ‡² Method –> ( TripointBubMs ) -> table

Returns all furniture variables at the position as a table mapping each name to its value.

get_items_at

πŸ‡² Method –> ( TripointBubMs ) -> MapStack
πŸ‡² Method –> ( Tripoint ) -> MapStack

get_items_in_radius

πŸ‡² Method –> ( TripointBubMs, integer ) -> MapStack[]

get_map_size

πŸ‡² Method –> ( ) -> integer

In map squares

get_map_size_in_submaps

πŸ‡² Method –> ( ) -> integer

get_temperature_c

πŸ‡² Method –> ( TripointBubMs ) -> number

Get the local ambient temperature in degrees Celsius at a map-square position.

get_ter_at

πŸ‡² Method –> ( TripointBubMs ) -> TerIntId

get_ter_var_at

πŸ‡² Method –> ( TripointBubMs, string, string? ) -> string

Returns a terrain variable at the position, or default (empty string if omitted) when it is not set.

get_ter_vars_table_at

πŸ‡² Method –> ( TripointBubMs ) -> table

Returns all terrain variables at the position as a table mapping each name to its value.

get_trap_at

πŸ‡² Method –> ( TripointBubMs ) -> TrapIntId

get_vehicle_fuel_left_at

πŸ‡² Method –> ( TripointBubMs, string, ItypeId, boolean? ) -> integer

Returns the vehicle’s available fuel charges when the position has a part with the given feature.

get_vehicles

πŸ‡² Method –> ( ) -> WrappedVehicle[]

Returns every vehicle currently on the map.

has_field_at

πŸ‡² Method –> ( TripointBubMs, FieldTypeIntId ) -> boolean

has_flag_at

πŸ‡² Method –> ( string, TripointBubMs ) -> boolean

has_furn_flag_at

πŸ‡² Method –> ( string, TripointBubMs ) -> boolean

has_furn_var_at

πŸ‡² Method –> ( TripointBubMs, string ) -> boolean

Returns whether a furniture variable is set at the position.

has_items_at

πŸ‡² Method –> ( TripointBubMs ) -> boolean
πŸ‡² Method –> ( Tripoint ) -> boolean

has_ter_flag_at

πŸ‡² Method –> ( string, TripointBubMs ) -> boolean

has_ter_var_at

πŸ‡² Method –> ( TripointBubMs, string ) -> boolean

Returns whether a terrain variable is set at the position.

has_vehicle_part_with_feature_at

πŸ‡² Method –> ( TripointBubMs, string, boolean? ) -> boolean

Returns whether a vehicle at this position has an available part with the given feature.

is_in_sunlight

πŸ‡² Method –> ( TripointBubMs ) -> boolean

is_ot_match

πŸ‡« Function –> ( string, OterIntId, OtMatchType ) -> boolean

is_out_of_bounds

πŸ‡² Method –> ( TripointBubMs ) -> boolean

Returns whether a local map position lies outside the current dimension bounds.

is_outside

πŸ‡² Method –> ( TripointBubMs ) -> boolean

is_sheltered

πŸ‡² Method –> ( TripointBubMs ) -> boolean

make_rubble

πŸ‡² Method –> ( TripointBubMs, FurnIntId, TerIntId )

mod_field_age_at

πŸ‡² Method –> ( TripointBubMs, FieldTypeIntId, TimeDuration ) -> TimeDuration

mod_field_int_at

πŸ‡² Method –> ( TripointBubMs, FieldTypeIntId, integer ) -> integer

move_item_to

πŸ‡² Method –> ( TripointBubMs, Item, TripointBubMs )

Moves an item from one position to another, preserving all item state including contents.

place_items

πŸ‡² Method –> ( string, integer, TripointBubMs, TripointBubMs, boolean )

place_npc

πŸ‡² Method –> ( TripointBubMs, string ) -> Npc

Forcibly places an npc using a template at a position on the map. Returns the npc.

place_spawns

πŸ‡² Method –> ( string, integer, TripointBubMs, TripointBubMs, number, boolean )

points_in_radius

πŸ‡² Method –> ( TripointBubMs, integer, integer? ) -> TripointBubMs[]

Returns all points within a radius from the center point. radiusz defaults to 0.

remove_field_at

πŸ‡² Method –> ( TripointBubMs, FieldTypeIntId )

remove_item_at

πŸ‡² Method –> ( TripointBubMs, Item )
πŸ‡² Method –> ( Tripoint, Item )

remove_trap_at

πŸ‡² Method –> ( TripointBubMs )

Simpler version of set_trap_at with trap_null.

replace_vehicle

πŸ‡² Method –> ( WrappedVehicle, string, table? ) -> boolean
πŸ‡² Method –> ( TripointBubMs, string, table? ) -> boolean

Replaces a specific vehicle with a different prototype at the same origin tile.
Returns false if the vehicle id or an option is invalid.
Pass an optional table with keys:

  • orientation (Angle or number, optional): Facing of the new vehicle, as an Angle or in degrees. Defaults to the old vehicle’s facing.
  • status (integer, optional): Initial damage. -1 is light damage, 0 is undamaged, 1 is disabled (destroyed tires or engine). Defaults to -1.
  • locks (boolean, optional): If false, removes locking door parts and spawns the vehicle unlocked with keys. Otherwise locks follow the normal spawn rules.

rotate

πŸ‡² Method –> ( integer )

set_field_age_at

πŸ‡² Method –> ( TripointBubMs, FieldTypeIntId, TimeDuration, boolean ) -> TimeDuration

set_field_int_at

πŸ‡² Method –> ( TripointBubMs, FieldTypeIntId, integer, boolean ) -> integer

set_furn_at

πŸ‡² Method –> ( TripointBubMs, FurnIntId )

set_furn_var_at

πŸ‡² Method –> ( TripointBubMs, string, string ) -> boolean

Sets a furniture variable at the position. Returns false if the position is out of bounds.

set_temperature

πŸ‡² Method –> ( TripointBubMs, integer )

set_ter_at

πŸ‡² Method –> ( TripointBubMs, TerIntId ) -> boolean

set_ter_var_at

πŸ‡² Method –> ( TripointBubMs, string, string ) -> boolean

Sets a terrain variable at the position. Returns false if the position is out of bounds.

set_trap_at

πŸ‡² Method –> ( TripointBubMs, TrapIntId )

Set a trap at a position on the map. It can also replace existing trap, even with trap_null.

spawn_artifact_at

πŸ‡² Method –> ( TripointBubMs )

Spawns a random artifact at a position on the map.

spawn_natural_artifact_at

πŸ‡² Method –> ( TripointBubMs, string? )

Spawns a natural artifact at a position on the map. Omit property to choose one at random.

MapStack

Bases

  • ItemStack

Constructors

No constructors.

Members

as_item_stack

πŸ‡² Method –> ( ) -> ItemStack

MapgenConstructor

Bases

No base classes.

Constructors

No constructors.

Members

add_field_at

πŸ‡² Method –> ( PointOmtMs, FieldTypeIntId, integer, TimeDuration ) -> boolean

add_item

πŸ‡² Method –> ( PointOmtMs, Detached<Item> ) -> Detached<Item>

clear_items_at

πŸ‡² Method –> ( PointOmtMs )

create_corpse_at

πŸ‡² Method –> ( PointOmtMs, MonsterTypeId?, TimePoint?, string?, integer? )

create_item_at

πŸ‡² Method –> ( PointOmtMs, ItypeId, integer )

Creates a new item at a position on the mapgen surface. count sets the item’s charges, not the number of items: exactly one item is created. For stackable (count-by-charges) items such as ammo, count is the stack size. For non-stackable items, pass a negative value (e.g. -1), since a positive one is still applied as charges. Tools spawned with a negative value get their default charges.

destroy

πŸ‡² Method –> ( PointOmtMs )

draw_fill_background

πŸ‡² Method –> ( string )

erase_furn_var_at

πŸ‡² Method –> ( PointOmtMs, string ) -> boolean

Removes a furniture variable at the position. Returns whether a variable was removed.

erase_ter_var_at

πŸ‡² Method –> ( PointOmtMs, string ) -> boolean

Removes a terrain variable at the position. Returns whether a variable was removed.

get_furn_at

πŸ‡² Method –> ( PointOmtMs ) -> FurnIntId

get_furn_var_at

πŸ‡² Method –> ( PointOmtMs, string, string? ) -> string

Returns a furniture variable at the position, or default (empty string if omitted) when it is not set.

get_furn_vars_table_at

πŸ‡² Method –> ( PointOmtMs ) -> table

Returns all furniture variables at the position as a table mapping each name to its value.

get_items_at

πŸ‡² Method –> ( PointOmtMs ) -> MapStack

get_items_in_radius

πŸ‡² Method –> ( PointOmtMs, integer ) -> MapStack[]

get_map_size

πŸ‡² Method –> ( ) -> integer

get_map_size_in_submaps

πŸ‡² Method –> ( ) -> integer

get_temperature

πŸ‡² Method –> ( PointOmtMs ) -> integer

get_ter_at

πŸ‡² Method –> ( PointOmtMs ) -> TerIntId

get_ter_var_at

πŸ‡² Method –> ( PointOmtMs, string, string? ) -> string

Returns a terrain variable at the position, or default (empty string if omitted) when it is not set.

get_ter_vars_table_at

πŸ‡² Method –> ( PointOmtMs ) -> table

Returns all terrain variables at the position as a table mapping each name to its value.

get_trap_at

πŸ‡² Method –> ( PointOmtMs ) -> TrapIntId

get_vehicles

πŸ‡² Method –> ( ) -> CppVal<vehicle>[]

has_flag_at

πŸ‡² Method –> ( string, PointOmtMs ) -> boolean

has_furn_flag_at

πŸ‡² Method –> ( string, PointOmtMs ) -> boolean

has_furn_var_at

πŸ‡² Method –> ( PointOmtMs, string ) -> boolean

Returns whether a furniture variable is set at the position.

has_ter_flag_at

πŸ‡² Method –> ( string, PointOmtMs ) -> boolean

has_ter_var_at

πŸ‡² Method –> ( PointOmtMs, string ) -> boolean

Returns whether a terrain variable is set at the position.

is_ot_match

πŸ‡« Function –> ( string, OterIntId, OtMatchType ) -> boolean

make_rubble

πŸ‡² Method –> ( PointOmtMs, FurnIntId, TerIntId )

place_items

πŸ‡² Method –> ( string, integer, PointOmtMs, PointOmtMs, boolean )

place_npc

πŸ‡² Method –> ( PointOmtMs, string ) -> Npc

Forcibly places an npc using a template at a position on the mapgen surface. Returns the npc.

place_spawns

πŸ‡² Method –> ( string, integer, PointOmtMs, PointOmtMs, number, boolean )

points_in_radius

πŸ‡² Method –> ( PointOmtMs, integer ) -> PointOmtMs[]

remove_field_at

πŸ‡² Method –> ( PointOmtMs, FieldTypeIntId )

remove_trap_at

πŸ‡² Method –> ( PointOmtMs )

replace_vehicle

πŸ‡² Method –> ( CppVal<vehicle>, string, table? ) -> boolean

Replaces a vehicle spawned by mapgen with a different prototype at the same position.
Returns false if the vehicle id or an option is invalid.
Pass an optional table with keys:

  • orientation (Angle or number, optional): Facing of the new vehicle, as an Angle or in degrees. Defaults to the old vehicle’s facing.
  • status (integer, optional): Initial damage. -1 is light damage, 0 is undamaged, 1 is disabled (destroyed tires or engine). Defaults to -1.
  • locks (boolean, optional): If false, removes locking door parts and spawns the vehicle unlocked with keys. Otherwise locks follow the normal spawn rules.

rotate

πŸ‡² Method –> ( integer )

set_furn_at

πŸ‡² Method –> ( PointOmtMs, FurnIntId )

set_furn_var_at

πŸ‡² Method –> ( PointOmtMs, string, string ) -> boolean

Sets a furniture variable at the position. Returns false if the position is out of bounds.

set_temperature

πŸ‡² Method –> ( PointOmtMs, integer )

set_ter_at

πŸ‡² Method –> ( PointOmtMs, TerIntId ) -> boolean

set_ter_var_at

πŸ‡² Method –> ( PointOmtMs, string, string ) -> boolean

Sets a terrain variable at the position. Returns false if the position is out of bounds.

set_trap_at

πŸ‡² Method –> ( PointOmtMs, TrapIntId )

MapgenData

Bases

No base classes.

Constructors

No constructors.

Members

above

πŸ‡² Method –> ( ) -> OterIntId

Gets the oter id to the above.

below

πŸ‡² Method –> ( ) -> OterIntId

Gets the oter id to the below.

east

πŸ‡² Method –> ( ) -> OterIntId

Gets the oter id to the east.

fill_groundcover

πŸ‡² Method –> ( )

Fills the ground with default terrain.

generate

πŸ‡² Method –> ( string )

Generates Normal Mapgen

get_nesw

πŸ‡² Method –> ( integer ) -> OterIntId

Returns t_nesw at index i

get_rot_suffix

πŸ‡² Method –> ( ) -> string

Gets rotation string

get_rotation

πŸ‡² Method –> ( ) -> integer

Gets rotation

id

πŸ‡² Method –> ( ) -> OterIntId

Gets it’s oter id.

neast

πŸ‡² Method –> ( ) -> OterIntId

Gets the oter id to the neast.

nest

πŸ‡² Method –> ( string, PointRelMs )

Generates Nested Mapgen

north

πŸ‡² Method –> ( ) -> OterIntId

Gets the oter id to the north.

nwest

πŸ‡² Method –> ( ) -> OterIntId

Gets the oter id to the nwest.

seast

πŸ‡² Method –> ( ) -> OterIntId

Gets the oter id to the seast.

set_dir

πŸ‡² Method –> ( integer, integer )

Sets the direction of the mapgen.

south

πŸ‡² Method –> ( ) -> OterIntId

Gets the oter id to the south.

swest

πŸ‡² Method –> ( ) -> OterIntId

Gets the oter id to the swest.

west

πŸ‡² Method –> ( ) -> OterIntId

Gets the oter id to the west.

zlevel

πŸ‡² Method –> ( ) -> integer

Gets the z-level that it is generated at.

MartialArtsBuffId

Bases

No base classes.

Constructors

  • MartialArtsBuffId.new( )
  • MartialArtsBuffId.new( MartialArtsBuffId )
  • MartialArtsBuffId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> MartialArtsBuffId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> MartialArtsBuffRaw

str

πŸ‡² Method –> ( ) -> string

MartialArtsId

Bases

No base classes.

Constructors

  • MartialArtsId.new( )
  • MartialArtsId.new( MartialArtsId )
  • MartialArtsId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> MartialArtsId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> MartialArtsRaw

str

πŸ‡² Method –> ( ) -> string

MartialArtsTechniqueId

Bases

No base classes.

Constructors

  • MartialArtsTechniqueId.new( )
  • MartialArtsTechniqueId.new( MartialArtsTechniqueId )
  • MartialArtsTechniqueId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> MartialArtsTechniqueId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> MartialArtsTechniqueRaw

str

πŸ‡² Method –> ( ) -> string

MartialArtsTechniqueRaw

Bases

No base classes.

Constructors

No constructors.

Members

avatar_message

πŸ‡» Variable –> string

block_counter

πŸ‡» Variable –> boolean

controlled_knockback

πŸ‡» Variable –> boolean

crit_ok

πŸ‡» Variable –> boolean

crit_tec

πŸ‡» Variable –> boolean

defensive

πŸ‡» Variable –> boolean

disarms

πŸ‡» Variable –> boolean

dodge_counter

πŸ‡» Variable –> boolean

down_dur

πŸ‡» Variable –> integer

force_unarmed

πŸ‡» Variable –> boolean

grab_break

πŸ‡» Variable –> boolean

knockback_dist

πŸ‡» Variable –> integer

knockback_follow

πŸ‡» Variable –> boolean

knockback_spread

πŸ‡» Variable –> number

miss_recovery

πŸ‡» Variable –> boolean

name

πŸ‡» Variable –> string

npc_message

πŸ‡» Variable –> string

powerful_knockback

πŸ‡» Variable –> boolean

side_switch

πŸ‡» Variable –> boolean

stun_dur

πŸ‡» Variable –> integer

take_weapon

πŸ‡» Variable –> boolean

get_description

πŸ‡² Method –> ( ) -> string

Mass

Bases

No base classes.

Constructors

No constructors.

Members

from_gram

πŸ‡« Function –> ( integer ) -> Mass

from_kilogram

πŸ‡« Function –> ( integer ) -> Mass

from_milligram

πŸ‡« Function –> ( integer ) -> Mass

from_newton

πŸ‡« Function –> ( integer ) -> Mass

to_gram

πŸ‡² Method –> ( ) -> integer

to_kilogram

πŸ‡² Method –> ( ) -> integer

to_milligram

πŸ‡² Method –> ( ) -> integer

to_newton

πŸ‡² Method –> ( ) -> integer

MaterialTypeId

Bases

No base classes.

Constructors

  • MaterialTypeId.new( )
  • MaterialTypeId.new( MaterialTypeId )
  • MaterialTypeId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> MaterialTypeId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> MaterialTypeRaw

str

πŸ‡² Method –> ( ) -> string

MaterialTypeRaw

Bases

No base classes.

Constructors

No constructors.

Members

name

πŸ‡² Method –> ( ) -> string

str_id

πŸ‡² Method –> ( ) -> MaterialTypeId

Mission

Bases

No base classes.

Constructors

  • Mission.new( )

Members

assign

πŸ‡² Method –> ( Avatar )

Assigns this mission to the given avatar.

fail

πŸ‡² Method –> ( )

Fails the mission.

get_deadline

πŸ‡² Method –> ( ) -> TimePoint

Returns the mission’s deadline as a time_point.

get_description

πŸ‡² Method –> ( ) -> string

Returns the mission description.

get_follow_up

πŸ‡² Method –> ( ) -> MissionTypeIdRaw

Returns the follow-up mission type ID.

get_id

πŸ‡² Method –> ( ) -> integer

Returns the mission’s unique ID.

get_item_id

πŸ‡² Method –> ( ) -> ItypeId

Returns the item ID associated with the mission.

get_likely_rewards

πŸ‡² Method –> ( ) -> (integer, ItypeId)[]

Returns the likely rewards of the mission (vector of (int chance, itype_id) pairs).

get_npc_id

πŸ‡² Method –> ( ) -> CharacterId

Returns the NPC character ID associated with the mission.

get_target_point

πŸ‡² Method –> ( ) -> TripointAbsOmt

Returns the target of the mission as absolute overmap terrain coordinates.

get_type

πŸ‡² Method –> ( ) -> MissionType

Returns the mission type of the target (pointer to mission_type).

get_value

πŸ‡² Method –> ( ) -> integer

Returns the mission’s value as an integer.

has_deadline

πŸ‡² Method –> ( ) -> boolean

Returns true if the mission has a deadline.

has_failed

πŸ‡² Method –> ( ) -> boolean

Returns true if the mission has failed.

has_follow_up

πŸ‡² Method –> ( ) -> boolean

Returns true if the mission has a follow-up mission.

has_generic_rewards

πŸ‡² Method –> ( ) -> boolean

Returns true if the mission has generic rewards.

has_target

πŸ‡² Method –> ( ) -> boolean

Returns true if the mission has a target.

in_progress

πŸ‡² Method –> ( ) -> boolean

Returns true if the mission is currently in progress.

is_assigned

πŸ‡² Method –> ( ) -> boolean

Returns true if the mission is currently assigned.

is_complete

πŸ‡² Method –> ( CharacterId? ) -> boolean

Returns true if the mission goal has been completed (optionally checked against given NPC ID).

mission_id

πŸ‡² Method –> ( ) -> MissionTypeIdRaw

Returns the mission type ID of this mission.

name

πŸ‡² Method –> ( ) -> string

Returns the mission’s name as a string.

reserve_new

πŸ‡« Function –> ( MissionTypeIdRaw, CharacterId ) -> Mission

Reserves a new mission of the given type for the specified NPC. Returns the new mission.

reserve_random

πŸ‡« Function –> ( MissionOrigin, TripointAbsOmt, CharacterId ) -> Mission

Reserves a random mission at the specified origin and position for the given NPC. Returns the new mission.

step_complete

πŸ‡² Method –> ( integer )

Marks a mission step as complete, taking an integer step index.

wrap_up

πŸ‡² Method –> ( )

Wraps up the mission successfully.

MissionType

Bases

No base classes.

Constructors

  • MissionType.new( )

Members

deadline_high

πŸ‡» Variable –> TimeDuration

Returns the maximum allowed deadline for the mission.

deadline_low

πŸ‡» Variable –> TimeDuration

Returns the minimum allowed deadline for the mission.

description

πŸ‡» Variable –> CppVal<translation>

Returns the mission’s description as a string.

dialogue

πŸ‡» Variable –> table<string, CppVal<translation>>

Returns any associated dialogue for the mission, keyed by situation: describe, offer, accepted, rejected, advice, inquire, success, success_lie and failure.

difficulty

πŸ‡» Variable –> integer

Returns the mission’s difficulty as an integer.

empty_container

πŸ‡» Variable –> ItypeId

Returns true if the mission requires the container to be empty.

follow_up

πŸ‡» Variable –> MissionTypeIdRaw

Returns any follow-up mission type ID.

goal

πŸ‡» Variable –> MissionGoal

Returns the mission’s goal text.

has_generic_rewards

πŸ‡» Variable –> boolean

Returns true if the mission has generic rewards.

item_count

πŸ‡» Variable –> integer

Returns the count of items involved in the mission.

item_id

πŸ‡» Variable –> ItypeId

Returns the ID of the mission’s main item target, if applicable.

likely_rewards

πŸ‡» Variable –> (integer, ItypeId)[]

Returns a vector of likely rewards (chance, itype_id pairs).

monster_kill_goal

πŸ‡» Variable –> integer

Returns the number of monsters required to kill for this mission.

monster_type

πŸ‡» Variable –> MonsterTypeId

Returns the monster type associated with the mission, if any.

origins

πŸ‡» Variable –> MissionOrigin[]

Returns a list of origins from which this mission can be generated.

remove_container

πŸ‡» Variable –> boolean

Returns true if the mission requires removing a container.

target_npc_id

πŸ‡» Variable –> CharacterId

Returns the ID of the target NPC for the mission, if any.

urgent

πŸ‡» Variable –> boolean

Returns true if the mission is marked as urgent.

value

πŸ‡» Variable –> integer

Returns the mission’s reward value as an integer.

get_all

πŸ‡« Function –> ( ) -> MissionType[]

Returns all available missions.

get_random_mission_id

πŸ‡« Function –> ( MissionOrigin, TripointAbsOmt ) -> MissionTypeIdRaw

Returns a random mission type ID at the specified origin and overmap tile position.

tname

πŸ‡² Method –> ( ) -> string

MissionTypeIdRaw

Bases

No base classes.

Constructors

  • MissionTypeIdRaw.new( string )

Members

No members.

ModInfoId

Bases

No base classes.

Constructors

  • ModInfoId.new( )
  • ModInfoId.new( ModInfoId )
  • ModInfoId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> ModInfoId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> ModInfoRaw

str

πŸ‡² Method –> ( ) -> string

Mongroup

Bases

No base classes.

Constructors

No constructors.

Members

diffuse

πŸ‡» Variable –> boolean

horde

πŸ‡» Variable –> boolean

horde_behaviour

πŸ‡» Variable –> string

interest

πŸ‡» Variable –> integer

population

πŸ‡» Variable –> integer

radius

πŸ‡» Variable –> integer

type

πŸ‡» Variable –> MonsterGroupId

abs_pos

πŸ‡² Method –> ( ) -> TripointAbsSm

Get the group position in absolute submap coordinates.

avg_speed

πŸ‡² Method –> ( ) -> number

Average movement speed of monsters in the group.

clear

πŸ‡² Method –> ( )

Remove all monsters and clear population.

dec_interest

πŸ‡² Method –> ( integer )

Decrease horde interest by the given amount (clamped 15..100).

inc_interest

πŸ‡² Method –> ( integer )

Increase horde interest by the given amount (clamped 15..100).

is_empty

πŸ‡² Method –> ( ) -> boolean

Check if the group has no members or population.

is_safe

πŸ‡² Method –> ( ) -> boolean

Check if the group is safe.

monsters

πŸ‡² Method –> ( ) -> Monster[]

Get individual monster instances tracked inside the horde (if any).

nemesis_target

πŸ‡² Method –> ( ) -> TripointAbsSm

Get the nemesis target for this group.

set_interest

πŸ‡² Method –> ( integer )

Set horde interest directly (clamped 15..100).

set_nemesis_target

πŸ‡² Method –> ( TripointAbsSm )

Set the nemesis target for this group using absolute submap coordinates.

set_pos

πŸ‡² Method –> ( TripointAbsSm )

Set the group position in absolute submap coordinates.

set_target

πŸ‡² Method –> ( TripointAbsSm )

Set the current target in absolute submap coordinates.

target

πŸ‡² Method –> ( ) -> TripointAbsSm

Get the current target in absolute submap coordinates.

Monster

Bases

  • Creature

Constructors

No constructors.

Members

anger

πŸ‡» Variable –> integer

death_drops

πŸ‡» Variable –> boolean

faction

πŸ‡» Variable –> MonsterFactionIntId

friendly

πŸ‡» Variable –> integer

morale

πŸ‡» Variable –> integer

pet_bond_level

πŸ‡» Variable –> integer

Bond level with the character this pet is bonded to.

training_level

πŸ‡» Variable –> integer

Pet training level gained through pet training.

unique_name

πŸ‡» Variable –> string

add_armor_item

πŸ‡² Method –> ( Detached<Item> ) -> Detached<Item>

add_battery_item

πŸ‡² Method –> ( Detached<Item> ) -> Detached<Item>

add_detached_item

πŸ‡² Method –> ( Detached<Item> )

add_faction_anger

πŸ‡² Method –> ( string, integer )

add_item

πŸ‡² Method –> ( Item )

add_saddle_item

πŸ‡² Method –> ( Detached<Item> ) -> Detached<Item>

add_storage_item

πŸ‡² Method –> ( Detached<Item> ) -> Detached<Item>

attack_target

πŸ‡² Method –> ( ) -> Creature

Hostile creature this monster sees at its move target, or nil while wandering.

attitude

πŸ‡² Method –> ( Character ) -> MonsterAttitude

bash_at

πŸ‡² Method –> ( TripointBubMs ) -> boolean
πŸ‡² Method –> ( Tripoint ) -> boolean

can_act

πŸ‡² Method –> ( ) -> boolean

Whether this monster has moves left and is not stunned, downed or webbed.

can_climb

πŸ‡² Method –> ( ) -> boolean

can_dig

πŸ‡² Method –> ( ) -> boolean

can_drown

πŸ‡² Method –> ( ) -> boolean

can_hear

πŸ‡² Method –> ( ) -> boolean

can_see

πŸ‡² Method –> ( ) -> boolean

can_submerge

πŸ‡² Method –> ( ) -> boolean

can_upgrade

πŸ‡² Method –> ( ) -> boolean

clear_items

πŸ‡² Method –> ( ) -> Detached<Item>[]

clear_move_target

πŸ‡² Method –> ( )

clear_special_attack_budget

πŸ‡² Method –> ( )

Frees the budget so a further use_special_attack can run in the same action. Only for a deliberately multi-attack action; the budget is what stops Lua and the stock scheduler from stacking attacks onto one action.

climbs

πŸ‡² Method –> ( ) -> boolean

digs

πŸ‡² Method –> ( ) -> boolean

drop_items

πŸ‡² Method –> ( TripointBubMs )

drop_items_here

πŸ‡² Method –> ( )

flies

πŸ‡² Method –> ( ) -> boolean

get_armor_item

πŸ‡² Method –> ( ) -> Item

get_battery_item

πŸ‡² Method –> ( ) -> Item

get_faction_anger

πŸ‡² Method –> ( string ) -> integer

get_grab_strength

πŸ‡² Method –> ( ) -> integer

Intensity of the grabbed effect this monster applies.

get_items

πŸ‡² Method –> ( ) -> Item[]

get_saddle_item

πŸ‡² Method –> ( ) -> Item

get_special_attack_cooldown

πŸ‡² Method –> ( string ) -> integer?

Remaining cooldown in turns, or nil for attacks this monster does not have.

get_special_attack_ids

πŸ‡² Method –> ( ) -> string[]

Sorted IDs of every special attack this monster’s current type defines.

get_storage_item

πŸ‡² Method –> ( ) -> Item

get_type

πŸ‡² Method –> ( ) -> MonsterTypeId

get_upgrade_time

πŸ‡² Method –> ( ) -> integer

has_special_attack

πŸ‡² Method –> ( string ) -> boolean

Whether this monster’s current type and runtime state contain the exact attack ID.

hasten_upgrade

πŸ‡² Method –> ( )

heal

πŸ‡² Method –> ( integer, boolean ) -> integer

is_dead_or_dying

πŸ‡² Method –> ( ) -> boolean

Whether this monster is dead or at 0 HP. Unlike is_dead, which checks only HP, this also includes monsters that already died with HP left, e.g. by self-destructing.

is_fleeing

πŸ‡² Method –> ( Character ) -> boolean

Whether this monster flees from the given character.

is_wandering

πŸ‡² Method –> ( ) -> boolean

made_of

πŸ‡² Method –> ( MaterialTypeId ) -> boolean

make_ally

πŸ‡² Method –> ( Monster )

make_friendly

πŸ‡² Method –> ( )

make_fungus

πŸ‡² Method –> ( ) -> boolean

make_pet

πŸ‡² Method –> ( )

move_target

πŸ‡² Method –> ( ) -> TripointBubMs

move_to

πŸ‡² Method –> ( TripointBubMs, boolean, boolean, number ) -> boolean
πŸ‡² Method –> ( Tripoint, boolean, boolean, number ) -> boolean

movement_impaired

πŸ‡² Method –> ( ) -> boolean

Whether this monster has an effect that impairs movement.

name

πŸ‡² Method –> ( integer ) -> string

name_with_armor

πŸ‡² Method –> ( ) -> string

refill_udders

πŸ‡² Method –> ( )

remove_armor_item

πŸ‡² Method –> ( ) -> Detached<Item>

remove_battery_item

πŸ‡² Method –> ( ) -> Detached<Item>

remove_item

πŸ‡² Method –> ( Item ) -> Detached<Item>

remove_saddle_item

πŸ‡² Method –> ( ) -> Detached<Item>

remove_storage_item

πŸ‡² Method –> ( ) -> Detached<Item>

run_normal_ai_turn

πŸ‡² Method –> ( )

set_attitude

πŸ‡² Method –> ( MonsterAttitude )

set_hp

πŸ‡² Method –> ( integer )

set_move_target

πŸ‡² Method –> ( TripointBubMs )
πŸ‡² Method –> ( Tripoint )

set_special_attack_cooldown

πŸ‡² Method –> ( string, integer )

Sets the remaining cooldown in turns. Negative values are clamped to 0. Does nothing for attacks this monster does not have.

set_special_attack_enabled

πŸ‡² Method –> ( string, boolean )

Enables or disables an attack without touching its cooldown. The enabled flag is serialized, so it persists across save/load. A disabled attack is skipped by the stock scheduler and by special_attack_ready.

set_target

πŸ‡² Method –> ( Creature )

spawn

πŸ‡² Method –> ( TripointBubMs )

special_attack_budget_spent

πŸ‡² Method –> ( ) -> boolean

Whether this action’s one special attack has already been spent.

special_attack_enabled

πŸ‡² Method –> ( string ) -> boolean

Whether the attack is enabled. False for attacks this monster does not have.

special_attack_ready

πŸ‡² Method –> ( string ) -> boolean

Checks only enabled state and zero cooldown; does not predict range, target, sight or ammo.

swims

πŸ‡² Method –> ( ) -> boolean

try_reproduce

πŸ‡² Method –> ( )

try_upgrade

πŸ‡² Method –> ( boolean )

use_special_attack

πŸ‡² Method –> ( string ) -> boolean

Calls a ready special attack once. True means the actor handled use, not necessarily a hit or shot. Resets cooldown only on true. Actor side effects are not rolled back on false. Does not apply the scheduler’s pacified/hallucination restrictions or plan a target. On true the stock scheduler skips its own pick for the rest of this action.

wander_to

πŸ‡² Method –> ( TripointBubMs, integer )

MonsterFactionId

Bases

No base classes.

Constructors

Members

NULL_ID

πŸ‡« Function –> ( ) -> MonsterFactionId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

int_id

πŸ‡² Method –> ( ) -> MonsterFactionIntId

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> MonsterFactionRaw

str

πŸ‡² Method –> ( ) -> string

MonsterFactionIntId

Bases

No base classes.

Constructors

Members

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> MonsterFactionRaw

str_id

πŸ‡² Method –> ( ) -> MonsterFactionId

MonsterGroupEntry

Bases

No base classes.

Constructors

No constructors.

Members

conditions

πŸ‡» Variable –> string[]

cost_multiplier

πŸ‡» Variable –> integer

ends

πŸ‡» Variable –> TimeDuration

frequency

πŸ‡» Variable –> integer

name

πŸ‡» Variable –> MonsterTypeId

pack_maximum

πŸ‡» Variable –> integer

pack_minimum

πŸ‡» Variable –> integer

starts

πŸ‡» Variable –> TimeDuration

lasts_forever

πŸ‡² Method –> ( ) -> boolean

MonsterGroupId

Bases

No base classes.

Constructors

  • MonsterGroupId.new( )
  • MonsterGroupId.new( MonsterGroupId )
  • MonsterGroupId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> MonsterGroupId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> MonsterGroupRaw

str

πŸ‡² Method –> ( ) -> string

MonsterGroupRaw

Bases

No base classes.

Constructors

No constructors.

Members

defaultMonster

πŸ‡» Variable –> MonsterTypeId

freq_total

πŸ‡» Variable –> integer

is_animal

πŸ‡» Variable –> boolean

is_safe

πŸ‡» Variable –> boolean

monster_group_time

πŸ‡» Variable –> TimeDuration

monsters

πŸ‡» Variable –> MonsterGroupEntry[]

name

πŸ‡» Variable –> MonsterGroupId

new_monster_group

πŸ‡» Variable –> MonsterGroupId

replace_monster_group

πŸ‡» Variable –> boolean

contains

πŸ‡² Method –> ( MonsterTypeId ) -> boolean

Check if a monster type appears in this group.

MonsterTypeId

Bases

No base classes.

Constructors

  • MonsterTypeId.new( )
  • MonsterTypeId.new( MonsterTypeId )
  • MonsterTypeId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> MonsterTypeId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> MonsterTypeRaw

str

πŸ‡² Method –> ( ) -> string

MonsterTypeRaw

Bases

No base classes.

Constructors

No constructors.

Members

difficulty

πŸ‡» Variable –> integer

difficulty_base

πŸ‡» Variable –> integer

grab_strength

πŸ‡» Variable –> integer

Intensity of the grabbed effect this monster type applies.

id

πŸ‡» Variable –> MonsterTypeId

melee_damage

πŸ‡» Variable –> DamageInstance

Base melee attack damage.

melee_dice

πŸ‡» Variable –> integer

Number of dice of bonus bashing damage on melee hit.

melee_sides

πŸ‡» Variable –> integer

Number of sides of the melee bonus damage dice.

nname

πŸ‡² Method –> ( integer ) -> string

MoraleTypeDataId

Bases

No base classes.

Constructors

  • MoraleTypeDataId.new( )
  • MoraleTypeDataId.new( MoraleTypeDataId )
  • MoraleTypeDataId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> MoraleTypeDataId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> MoraleTypeDataRaw

str

πŸ‡² Method –> ( ) -> string

MutationBranchId

Bases

No base classes.

Constructors

  • MutationBranchId.new( )
  • MutationBranchId.new( MutationBranchId )
  • MutationBranchId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> MutationBranchId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> MutationBranchRaw

str

πŸ‡² Method –> ( ) -> string

MutationBranchRaw

Bases

No base classes.

Constructors

No constructors.

Members

activated

πŸ‡» Variable –> boolean

Whether this mutation can be activated at will.

allow_soft_gear

πŸ‡» Variable –> boolean

Mutation allows soft gear to be worn over otherwise-restricted parts.

attackcost_modifier

πŸ‡» Variable –> number

bleed_resist

πŸ‡» Variable –> number

bodytemp_max_btu

πŸ‡» Variable –> CppVal<units_quantity<int,units_temperature_delta_in_millidegree_celsius_tag>>

bodytemp_min_btu

πŸ‡» Variable –> CppVal<units_quantity<int,units_temperature_delta_in_millidegree_celsius_tag>>

bodytemp_sleep_btu

πŸ‡» Variable –> CppVal<units_quantity<int,units_temperature_delta_in_millidegree_celsius_tag>>

construction_speed_modifier

πŸ‡» Variable –> number

Construction speed multiplier. 2.0 doubles construction speed; 0.5 halves it.

cooldown

πŸ‡» Variable –> integer

Costs are incurred every β€˜cooldown’ turns.

cost

πŸ‡» Variable –> integer

crafting_speed_modifier

πŸ‡» Variable –> number

Crafting speed multiplier. 2.0 doubles crafting speed; 0.5 halves it.

debug

πŸ‡» Variable –> boolean

Whether or not this mutation is limited to debug use.

dodge_modifier

πŸ‡» Variable –> number

falling_damage_multiplier

πŸ‡» Variable –> number

fatigue

πŸ‡» Variable –> boolean

Mutation causes fatigue when used.

fatigue_modifier

πŸ‡» Variable –> number

fatigue_regen_modifier

πŸ‡» Variable –> number

healing_awake

πŸ‡» Variable –> number

Healing per turn from mutation.

healing_resting

πŸ‡» Variable –> number

Healing per turn from mutation, while asleep.

healthy_rate

πŸ‡» Variable –> number

How quickly health (not HP) trends toward healthy_mod.

hearing_modifier

πŸ‡» Variable –> number

hp_adjustment

πŸ‡» Variable –> number

Flat adjustment to HP.

hp_modifier

πŸ‡» Variable –> number

Bonus HP multiplier. 1.0 doubles HP; -0.5 halves it.

hp_modifier_secondary

πŸ‡» Variable –> number

Secondary HP multiplier; stacks with the other one. 1.0 doubles HP; -0.5 halves it.

hunger

πŸ‡» Variable –> boolean

Mutation deducts calories when used.

id

πŸ‡» Variable –> MutationBranchId

local_detail_sight

πŸ‡» Variable –> number

max_stamina_modifier

πŸ‡» Variable –> number

mending_modifier

πŸ‡» Variable –> number

Multiplier applied to broken limb regeneration. Normally 0.25; clamped to 0.25..1.0.

metabolism_modifier

πŸ‡» Variable –> number

mixed_effect

πŸ‡» Variable –> boolean

Whether this mutation has positive /and/ negative effects.

movecost_flatground_modifier

πŸ‡» Variable –> number

movecost_modifier

πŸ‡» Variable –> number

movecost_obstacle_modifier

πŸ‡» Variable –> number

movecost_swim_modifier

πŸ‡» Variable –> number

night_vision_range

πŸ‡» Variable –> number

noise_modifier

πŸ‡» Variable –> number

overmap_multiplier

πŸ‡» Variable –> number

overmap_sight

πŸ‡» Variable –> number

packmule_modifier

πŸ‡» Variable –> number

Packmule multiplier. 2.0 doubles backpack/container volume; 0.5 halves it.

pain_recovery

πŸ‡» Variable –> number

Pain recovery per turn from mutation.

player_display

πŸ‡» Variable –> boolean

Whether or not this mutation shows up in the status (@) menu.

points

πŸ‡» Variable –> integer

Point cost in character creation(?).

profession

πŸ‡» Variable –> boolean

Whether this trait is ONLY gained through professional training/experience (and/or quests).

purifiable

πŸ‡» Variable –> boolean

Whether this mutation is possible to remove through Purifier. False for β€˜special’ mutations.

reading_speed_multiplier

πŸ‡» Variable –> number

scent_modifier

πŸ‡» Variable –> number

skill_rust_multiplier

πŸ‡» Variable –> number

speed_modifier

πŸ‡» Variable –> number

stamina_regen_modifier

πŸ‡» Variable –> number

starting_trait

πŸ‡» Variable –> boolean

Whether this trait can normally be taken during character generation.

starts_active

πŸ‡» Variable –> boolean

Whether a mutation activates when granted.

stealth_modifier

πŸ‡» Variable –> number

str_modifier

πŸ‡» Variable –> number

Adjustment to Strength that doesn’t affect HP.

temperature_speed_modifier

πŸ‡» Variable –> number

thirst

πŸ‡» Variable –> boolean

Mutation dehydrates when used.

thirst_modifier

πŸ‡» Variable –> number

threshold

πŸ‡» Variable –> boolean

Whether this is a Threshold mutation, and thus especially difficult to mutate. One per character.

ugliness

πŸ‡» Variable –> integer

How physically unappealing the mutation is. Can be negative.

valid

πŸ‡» Variable –> boolean

Whether this mutation is available through generic mutagen.

visibility

πŸ‡» Variable –> integer

How visible the mutation is to others.

weight_capacity_modifier

πŸ‡» Variable –> number

addition_mutations

πŸ‡² Method –> ( ) -> MutationBranchId[]

categories

πŸ‡² Method –> ( ) -> MutationCategoryTraitId[]

Lists the categories this mutation belongs to.

conflicts_with

πŸ‡² Method –> ( ) -> MutationBranchId[]

Lists conflicting mutations.

desc

πŸ‡² Method –> ( ) -> string

get_all

πŸ‡« Function –> ( ) -> MutationBranchRaw[]

Returns a (long) list of every mutation in the game.

mutation_types

πŸ‡² Method –> ( ) -> string[]

Lists the type(s) of this mutation. Mutations of a given type are mutually exclusive.

name

πŸ‡² Method –> ( ) -> string

other_prerequisites

πŸ‡² Method –> ( ) -> MutationBranchId[]

Lists the secondary mutation(s) needed to gain this mutation.

prerequisites

πŸ‡² Method –> ( ) -> MutationBranchId[]

Lists the primary mutation(s) needed to gain this mutation.

replaced_by

πŸ‡² Method –> ( ) -> MutationBranchId[]

Lists mutations that replace (e.g. evolve from) this one.

thresh_requirements

πŸ‡² Method –> ( ) -> MutationBranchId[]

Lists the threshold mutation(s) required to gain this mutation.

MutationCategoryTraitId

Bases

No base classes.

Constructors

  • MutationCategoryTraitId.new( )
  • MutationCategoryTraitId.new( MutationCategoryTraitId )
  • MutationCategoryTraitId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> MutationCategoryTraitId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> MutationCategoryTraitRaw

str

πŸ‡² Method –> ( ) -> string

MutationCategoryTraitRaw

Bases

No base classes.

Constructors

No constructors.

Members

id

πŸ‡» Variable –> MutationCategoryTraitId

iv_additional_mutations

πŸ‡» Variable –> integer

iv_additional_mutations_chance

πŸ‡» Variable –> integer

iv_fatigue

πŸ‡» Variable –> integer

iv_hunger

πŸ‡» Variable –> integer

iv_message

πŸ‡» Variable –> CppVal<std_basic_string<char>()const>

iv_min_mutations

πŸ‡» Variable –> integer

iv_morale

πŸ‡» Variable –> integer

iv_morale_max

πŸ‡» Variable –> integer

iv_noise

πŸ‡» Variable –> integer

iv_pain

πŸ‡» Variable –> integer

iv_sleep

πŸ‡» Variable –> boolean

iv_sleep_dur

πŸ‡» Variable –> integer

iv_sleep_message

πŸ‡» Variable –> CppVal<std_basic_string<char>()const>

iv_sound

πŸ‡» Variable –> boolean

iv_sound_id

πŸ‡» Variable –> CppVal<std_basic_string<char>()const>

iv_sound_message

πŸ‡» Variable –> CppVal<std_basic_string<char>()const>

iv_sound_variant

πŸ‡» Variable –> CppVal<std_basic_string<char>()const>

iv_thirst

πŸ‡» Variable –> integer

junkie_message

πŸ‡» Variable –> CppVal<std_basic_string<char>()const>

memorial_message_female

πŸ‡» Variable –> CppVal<std_basic_string<char>()const>

memorial_message_male

πŸ‡» Variable –> CppVal<std_basic_string<char>()const>

mutagen_fatigue

πŸ‡» Variable –> integer

mutagen_hunger

πŸ‡» Variable –> integer

mutagen_message

πŸ‡» Variable –> CppVal<std_basic_string<char>()const>

mutagen_morale

πŸ‡» Variable –> integer

mutagen_pain

πŸ‡» Variable –> integer

mutagen_thirst

πŸ‡» Variable –> integer

threshold_muts

πŸ‡» Variable –> MutationBranchId[]

The traits that you gain when you break the thresholds for this category.

get_mutations

πŸ‡² Method –> ( ) -> MutationBranchId[]

Returns a list of all mutations in this category.

name

πŸ‡² Method –> ( ) -> string

Npc

Bases

  • Player
  • Character
  • Creature

Constructors

No constructors.

Members

current_activity_id

πŸ‡» Variable –> ActivityTypeId

hit_by_player

πŸ‡» Variable –> boolean

marked_for_death

πŸ‡» Variable –> boolean

needs

πŸ‡» Variable –> NpcNeed[]

op_of_u

πŸ‡» Variable –> NpcOpinion

patience

πŸ‡» Variable –> integer

personality

πŸ‡» Variable –> NpcPersonality

can_move_to

πŸ‡² Method –> ( TripointBubMs, boolean ) -> boolean

can_open_door

πŸ‡² Method –> ( TripointBubMs, boolean ) -> boolean

complain

πŸ‡² Method –> ( ) -> boolean

Finds something to complain about and complains. Returns if complained.

complain_about

πŸ‡² Method –> ( string, TimeDuration, string, boolean? ) -> boolean

Complain about an issue if enough time has passed. The first string is the issue identifier, with the second being the complaint text. The optional bool allows you to force a complaint without concern for the input time.

current_ally

πŸ‡² Method –> ( ) -> Creature

Returns the npc’s current ally, if it has one.

current_target

πŸ‡² Method –> ( ) -> Creature

Returns the npc’s current target as a creature, if it has one.

danger_assessment

πŸ‡² Method –> ( ) -> number

Gets a value based on the npc’s perspective of the area’s danger.

evaluate_enemy

πŸ‡² Method –> ( Creature ) -> number

Rates how dangerous a target is from 0 (harmless) to 1 (max danger).

follow_distance

πŸ‡² Method –> ( ) -> integer

Gets the npc’s follow distance. This can only be a few values, and is determined by npc rules.

get_attitude

πŸ‡² Method –> ( ) -> NpcAttitude

get_first_topic

πŸ‡² Method –> ( ) -> string

Returns the first topic of the npc’s chatbin.

get_monster_faction

πŸ‡² Method –> ( ) -> MonsterFactionIntId

Returns the npc’s faction id. If it’s part of a monster faction, it returns the id of the monster faction.

guaranteed_hostile

πŸ‡² Method –> ( ) -> boolean

Returns true if the npc would be hostile to the player on sight regardless of their current attitude.

has_activity

πŸ‡² Method –> ( ) -> boolean

has_omt_destination

πŸ‡² Method –> ( ) -> boolean

has_player_activity

πŸ‡² Method –> ( ) -> boolean

hostile_anger_level

πŸ‡² Method –> ( ) -> integer

is_ally

πŸ‡² Method –> ( Character ) -> boolean

is_enemy

πŸ‡² Method –> ( ) -> boolean

is_following

πŸ‡² Method –> ( ) -> boolean

is_friendly

πŸ‡² Method –> ( Character ) -> boolean

is_guarding

πŸ‡² Method –> ( ) -> boolean

is_leader

πŸ‡² Method –> ( ) -> boolean

is_minion

πŸ‡² Method –> ( ) -> boolean

Returns true if the npc is a player ally and their op_of_u.trust is >= 5.

is_obeying

πŸ‡² Method –> ( Character ) -> boolean

is_patrolling

πŸ‡² Method –> ( ) -> boolean

is_player_ally

πŸ‡² Method –> ( ) -> boolean

is_simulated

πŸ‡² Method –> ( ) -> boolean

True if this NPC is in a simulated (fully loaded, AI-eligible) submap.

is_stationary

πŸ‡² Method –> ( boolean ) -> boolean

is_travelling

πŸ‡² Method –> ( ) -> boolean

Returns true if the npc has the β€˜NPC_MISSION_TRAVELLING’ mission.

is_walking_with

πŸ‡² Method –> ( ) -> boolean

make_angry

πŸ‡² Method –> ( )

move_to

πŸ‡² Method –> ( TripointBubMs, boolean? )

Attempts to move the NPC to an adjacent map square.

mutiny

πŸ‡² Method –> ( )

Causes the npc to leave your faction, incur various negative opinion maluses, and say explatives to the player.

npc_menu

πŸ‡² Method –> ( boolean? )

Triggers the npc menu to open.

saw_player_recently

πŸ‡² Method –> ( ) -> boolean

say

πŸ‡² Method –> ( string )

Has the npc say the given string in the sidebar.

set_attitude

πŸ‡² Method –> ( NpcAttitude )

set_faction_id

πŸ‡² Method –> ( FactionId )

set_first_topic

πŸ‡² Method –> ( string )

Sets the first topic of the npc’s chatbin. Note that some circumstances may cause this to not be the first topic used, such as player allies.

set_move_target

πŸ‡² Method –> ( TripointBubMs, boolean?, boolean? ) -> boolean
πŸ‡² Method –> ( Tripoint, boolean?, boolean? ) -> boolean

smash_ability

πŸ‡² Method –> ( ) -> integer

Gets the npc’s blunt damage with their currently equipped weapon.

talk_to_u

πŸ‡² Method –> ( string?, boolean? )

Causes the npc to talk to you. Passing a topic will force that topic to be used in place of all others, including code enforced topics such as β€˜TALK_STOLE_ITEM’.

turned_hostile

πŸ‡² Method –> ( ) -> boolean

warn_about

πŸ‡² Method –> ( string, TimeDuration, string, integer, TripointBubMs )

Wrapper for complain_about that warns about a specific type of threat, with different warnings for hostile or friendly NPCs and hostile NPCs always complaining.

NpcOpinion

Bases

No base classes.

Constructors

  • NpcOpinion.new( )
  • NpcOpinion.new( int, int, int, int, int )

Members

anger

πŸ‡» Variable –> integer

fear

πŸ‡» Variable –> integer

owed

πŸ‡» Variable –> integer

trust

πŸ‡» Variable –> integer

value

πŸ‡» Variable –> integer

NpcPersonality

Bases

No base classes.

Constructors

  • NpcPersonality.new( )

Members

aggression

πŸ‡» Variable –> integer

altruism

πŸ‡» Variable –> integer

bravery

πŸ‡» Variable –> integer

collector

πŸ‡» Variable –> integer

OmtFindParams

Bases

No base classes.

Constructors

  • OmtFindParams.new( )

Members

exclude_types

πŸ‡» Variable –> (string, OtMatchType)[]

Vector of (terrain_type, match_type) pairs to exclude from search.

existing_only

πŸ‡» Variable –> boolean

If true, restricts search to existing overmaps only.

explored

πŸ‡» Variable –> boolean?

If set, filters by terrain explored status (true = explored only, false = unexplored only).

max_results

πŸ‡» Variable –> integer?

If set, limits the number of results returned.

seen

πŸ‡» Variable –> boolean?

If set, filters by terrain seen status (true = seen only, false = unseen only).

types

πŸ‡» Variable –> (string, OtMatchType)[]

Vector of (terrain_type, match_type) pairs to search for.

add_exclude_type

πŸ‡² Method –> ( string, OtMatchType )

Helper method to add a terrain type to exclude from search.

add_type

πŸ‡² Method –> ( string, OtMatchType )

Helper method to add a terrain type to search for.

set_search_layers

πŸ‡² Method –> ( integer, integer )

Set the search layer range (z-levels).

set_search_range

πŸ‡² Method –> ( integer, integer )

Set the search range in overmap tiles (min, max).

OterId

Bases

No base classes.

Constructors

  • OterId.new( )
  • OterId.new( OterId )
  • OterId.new( OterIntId )
  • OterId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> OterId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

int_id

πŸ‡² Method –> ( ) -> OterIntId

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> OterRaw

str

πŸ‡² Method –> ( ) -> string

OterIntId

Bases

No base classes.

Constructors

Members

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> OterRaw

str_id

πŸ‡² Method –> ( ) -> OterId

OvermapBuffer

Global overmap buffer that manages all overmap data

Bases

No base classes.

Constructors

No constructors.

Members

add_grid_connection

πŸ‡² Method –> ( TripointAbsOmt, TripointAbsOmt ) -> boolean

Add an electric grid connection between two positions

electric_grid_at

πŸ‡² Method –> ( TripointAbsOmt ) -> TripointAbsOmt[]

Get all overmap tiles belonging to the electric grid at the given position

electric_grid_connectivity_at

πŸ‡² Method –> ( TripointAbsOmt ) -> TripointRelOmt[]

Get all electric grid connections from the given position

remove_grid_connection

πŸ‡² Method –> ( TripointAbsOmt, TripointAbsOmt ) -> boolean

Remove an electric grid connection between two positions

PerkId

Bases

No base classes.

Constructors

  • PerkId.new( )
  • PerkId.new( PerkId )
  • PerkId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> PerkId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> PerkRaw

str

πŸ‡² Method –> ( ) -> string

PerkRaw

Bases

No base classes.

Constructors

No constructors.

Members

id

πŸ‡» Variable –> PerkId

get_category

πŸ‡² Method –> ( ) -> string

get_description

πŸ‡² Method –> ( ) -> string

get_name

πŸ‡² Method –> ( ) -> string

Player

Bases

  • Character
  • Creature

Constructors

No constructors.

Members

No members.

PlayerActivity

Bases

No base classes.

Constructors

No constructors.

Members

coords

πŸ‡» Variable –> TripointAbsMs[]

interruptable_with_kb

πŸ‡» Variable –> boolean

moves_left

πŸ‡» Variable –> integer

moves_total

πŸ‡» Variable –> integer

name

πŸ‡» Variable –> string

id

πŸ‡² Method –> ( ) -> ActivityTypeId

id_str

πŸ‡² Method –> ( ) -> string

Point

Bases

No base classes.

Constructors

  • Point.new( )
  • Point.new( Point )
  • Point.new( int, int )

Members

x

πŸ‡» Variable –> integer

y

πŸ‡» Variable –> integer

abs

πŸ‡² Method –> ( ) -> Point

reinterpret_as

πŸ‡² Method –> ( origin: string, scale: string ) -> PointCoord

Reinterpret this raw point as a typed point coordinate without changing x or y.

rotate

πŸ‡² Method –> ( integer, Point ) -> Point

PointCoord

A typed two-dimensional coordinate. Its origin and scale describe how to interpret x and y, and coordinate operations only combine compatible coordinate spaces.

Bases

No base classes.

Constructors

No constructors.

Members

x

πŸ‡» Variable –> integer

y

πŸ‡» Variable –> integer

origin

πŸ‡² Method –> ( ) -> string

project_combine

πŸ‡² Method –> ( fine: any ) -> nil | PointCoord | TripointCoord

Combines this coarse point with a remainder from project_remain. Returns PointCoord or TripointCoord depending on the inputs, or nil if the pair is incompatible.

project_remain

πŸ‡² Method –> ( scale: string ) -> (PointCoord?, PointCoord?)

Splits this point into a coarse PointCoord at the requested scale and a PointCoord remainder at this point’s original scale. Returns nil, nil if the split is not valid.

project_remain_mmr

πŸ‡² Method –> ( ) -> (PointCoord?, PointCoord?)

Shortcut for project_remain("mmr").

project_remain_om

πŸ‡² Method –> ( ) -> (PointCoord?, PointCoord?)

Shortcut for project_remain("om").

project_remain_omt

πŸ‡² Method –> ( ) -> (PointCoord?, PointCoord?)

Shortcut for project_remain("omt").

project_remain_seg

πŸ‡² Method –> ( ) -> (PointCoord?, PointCoord?)

Shortcut for project_remain("seg").

project_remain_sm

πŸ‡² Method –> ( ) -> (PointCoord?, PointCoord?)

Shortcut for project_remain("sm").

raw

πŸ‡² Method –> ( ) -> Point

reinterpret_as

πŸ‡² Method –> ( origin: string, scale: string ) -> PointCoord

Reinterpret this coordinate as another point coordinate kind without changing x or y.

rl_dist

πŸ‡² Method –> ( other: PointCoord ) -> integer?

Rectilinear distance to another PointCoord with matching origin and scale. Returns nil if the argument is incompatible.

rotate

πŸ‡² Method –> ( integer, Point ) -> PointCoord

scale

πŸ‡² Method –> ( ) -> string

square_dist

πŸ‡² Method –> ( other: PointCoord ) -> integer?

Chebyshev distance to another PointCoord with matching origin and scale. Returns nil if the argument is incompatible.

to

πŸ‡² Method –> ( scale: string ) -> PointCoord?

Projects this coordinate to another scale, preserving its origin and point dimension. Returns nil if the conversion is not valid.

to_mmr

πŸ‡² Method –> ( ) -> PointCoord?

Shortcut for to("mmr").

to_ms

πŸ‡² Method –> ( ) -> PointCoord?

Shortcut for to("ms").

to_om

πŸ‡² Method –> ( ) -> PointCoord?

Shortcut for to("om").

to_omt

πŸ‡² Method –> ( ) -> PointCoord?

Shortcut for to("omt").

to_seg

πŸ‡² Method –> ( ) -> PointCoord?

Shortcut for to("seg").

to_sm

πŸ‡² Method –> ( ) -> PointCoord?

Shortcut for to("sm").

to_veh

πŸ‡² Method –> ( ) -> PointCoord?

Shortcut for to("veh").

trig_dist

πŸ‡² Method –> ( other: PointCoord ) -> number?

Euclidean distance to another PointCoord with matching origin and scale. Returns nil if the argument is incompatible.

type

πŸ‡² Method –> ( ) -> string

PopupInputStr

Bases

No base classes.

Constructors

  • PopupInputStr.new( )

Members

desc

πŸ‡² Method –> ( string )

desc is above input field.

query_int

πŸ‡² Method –> ( ) -> integer

Returns your input, but allows numbers only.

query_str

πŸ‡² Method –> ( ) -> string

Returns your input.

title

πŸ‡² Method –> ( string )

title is on the left of input field.

PowerStat

Power generation and consumption statistics for a grid

Bases

No base classes.

Constructors

No constructors.

Members

gen_w

πŸ‡» Variable –> integer

Power generation in watts

use_w

πŸ‡» Variable –> integer

Power consumption in watts

net_w

πŸ‡² Method –> ( ) -> integer

Net power (generation - consumption) in watts

QualityId

Bases

No base classes.

Constructors

  • QualityId.new( )
  • QualityId.new( QualityId )
  • QualityId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> QualityId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> QualityRaw

str

πŸ‡² Method –> ( ) -> string

QueryPopup

Bases

No base classes.

Constructors

  • QueryPopup.new( )

Members

allow_any_key

πŸ‡² Method –> ( boolean )

Set whether to allow any key

message

πŸ‡² Method –> ( any )

message_color

πŸ‡² Method –> ( Color )

query

πŸ‡² Method –> ( ) -> string

Returns selected action

query_yn

πŸ‡² Method –> ( ) -> string

Returns YES or NO. If ESC pressed, returns NO.

query_ynq

πŸ‡² Method –> ( ) -> string

Returns YES, NO or QUIT. If ESC pressed, returns QUIT.

RGBColor

Bases

No base classes.

Constructors

No constructors.

Members

name

πŸ‡» Variable –> CppVal<std_basic_string<char>()const>

RangedData

Bases

No base classes.

Constructors

No constructors.

Members

aimed_crit_bonus

πŸ‡» Variable –> number

aimed_crit_max_bonus

πŸ‡» Variable –> number

damage

πŸ‡» Variable –> DamageInstance

dispersion

πŸ‡» Variable –> integer

range

πŸ‡» Variable –> integer

RecipeId

Bases

No base classes.

Constructors

  • RecipeId.new( )
  • RecipeId.new( RecipeId )
  • RecipeId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> RecipeId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> RecipeRaw

str

πŸ‡² Method –> ( ) -> string

RecipeRaw

Bases

No base classes.

Constructors

No constructors.

Members

booksets

πŸ‡» Variable –> table<ItypeId, integer>

Books that teach this recipe, mapped to the skill level required to learn it from them.

category

πŸ‡» Variable –> string

difficulty

πŸ‡» Variable –> integer

learn_by_disassembly

πŸ‡» Variable –> table<SkillId, integer>

Skill levels required to learn this recipe by disassembling its result.

required_skills

πŸ‡» Variable –> table<SkillId, integer>

Secondary skill levels required to craft this recipe, besides skill_used at difficulty.

skill_used

πŸ‡» Variable –> SkillId

subcategory

πŸ‡» Variable –> string

time

πŸ‡» Variable –> integer

get_all

πŸ‡« Function –> ( ) -> RecipeRaw[]

get_from_flag

πŸ‡« Function –> ( string ) -> RecipeRaw[]

get_from_skill_used

πŸ‡« Function –> ( SkillId ) -> RecipeRaw[]

has_flag

πŸ‡² Method –> ( string ) -> boolean

recipe_id

πŸ‡² Method –> ( ) -> RecipeId

result

πŸ‡² Method –> ( ) -> ItypeId

result_name

πŸ‡² Method –> ( boolean ) -> string

Relic

Bases

No base classes.

Constructors

No constructors.

Members

get_enchantments

πŸ‡² Method –> ( ) -> Enchantment[]

get_recharge_scheme

πŸ‡² Method –> ( ) -> CppVal<relic_recharge>[]

get_spells

πŸ‡² Method –> ( ) -> SpellSimple[]

name

πŸ‡² Method –> ( ) -> string

RequirementData

Represents crafting requirements (tools, components, qualities)

Bases

No base classes.

Constructors

No constructors.

Members

can_make_with_inventory

πŸ‡² Method –> ( Inventory ) -> boolean

Check if requirements can be made with given inventory

get_components

πŸ‡² Method –> ( ) -> CppVal<item_comp>[][]

Get list of all required components

get_qualities

πŸ‡² Method –> ( ) -> CppVal<quality_requirement>[][]

Get list of all required qualities

get_tools

πŸ‡² Method –> ( ) -> CppVal<tool_comp>[][]

Get list of all required tools

id

πŸ‡² Method –> ( ) -> string

Get the requirement ID as string

is_blacklisted

πŸ‡² Method –> ( ) -> boolean

Check if this requirement is blacklisted

is_empty

πŸ‡² Method –> ( ) -> boolean

Check if this requirement is empty

is_null

πŸ‡² Method –> ( ) -> boolean

Check if this is a null requirement

list_all

πŸ‡² Method –> ( ) -> string

Get a formatted list of all requirements

list_missing

πŸ‡² Method –> ( ) -> string

Get a formatted list of missing requirements

Resistances

Bases

No base classes.

Constructors

No constructors.

Members

get_all_resist

πŸ‡² Method –> ( ) -> table<DamageType, number>

Returns flat resistance values keyed by damage type. Damage types without resistance may be absent.

get_effective_resist

πŸ‡² Method –> ( DamageUnit ) -> number

get_resist

πŸ‡² Method –> ( DamageType ) -> number

ScenarioId

Bases

No base classes.

Constructors

  • ScenarioId.new( )
  • ScenarioId.new( ScenarioId )
  • ScenarioId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> ScenarioId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> ScenarioRaw

str

πŸ‡² Method –> ( ) -> string

ScenarioRaw

Bases

No base classes.

Constructors

No constructors.

Members

forbids_bionics

πŸ‡» Variable –> boolean

Returns true if the scenario forbids bionics outright.

forbids_spells

πŸ‡» Variable –> boolean

Returns true if the scenario forbids spells outright.

has_map_extra

πŸ‡» Variable –> boolean

Returns true if the scenario has a starting map extra.

id

πŸ‡» Variable –> string

String id of the scenario, e.g. β€œevacuee”. Useful for equality checks.

is_blacklisted

πŸ‡» Variable –> boolean

Returns true if the scenario is blacklisted.

map_extra

πŸ‡» Variable –> string

String id of the starting map extra, or an empty string if the scenario has none.

point_cost

πŸ‡» Variable –> integer

Point cost of the scenario.

start_name

πŸ‡» Variable –> string

Name of the starting situation shown during character creation.

starting_vehicle

πŸ‡» Variable –> string

String id of the starting vehicle, or an empty string if the scenario has none.

str_id

πŸ‡» Variable –> ScenarioId

allowed_bionics

πŸ‡² Method –> ( ) -> BionicDataId[]

Allowed bionics, empty meaning all starting bionics are allowed.

allowed_spells

πŸ‡² Method –> ( ) -> SpellTypeId[]

Allowed spells, empty meaning all starting spells are allowed.

allowed_start

πŸ‡² Method –> ( CppVal<string_id<start_location>> ) -> boolean

Returns true if the given start location is allowed by this scenario.

allowed_start_locations

πŸ‡² Method –> ( ) -> string[]

String ids of the starting locations allowed by this scenario.

allowed_traits

πŸ‡² Method –> ( ) -> MutationBranchId[]

Allowed traits, empty meaning all starting traits are allowed.

bionicquery

πŸ‡² Method –> ( BionicDataId ) -> boolean

Returns true if the given bionic is allowed in this scenario.

description

πŸ‡² Method –> ( boolean ) -> string

Description of the scenario for the given gender (true = male).

forbidden_bionics

πŸ‡² Method –> ( ) -> BionicDataId[]

Bionics forbidden in this scenario.

forbidden_spells

πŸ‡² Method –> ( ) -> SpellTypeId[]

Spells forbidden in this scenario.

forbidden_traits

πŸ‡² Method –> ( ) -> MutationBranchId[]

Traits forbidden in this scenario.

forced_bionics

πŸ‡² Method –> ( ) -> BionicDataId[]

Bionics forced by the scenario.

forced_spells

πŸ‡² Method –> ( ) -> SpellTypeId[]

Spells forced by the scenario.

forced_traits

πŸ‡² Method –> ( ) -> MutationBranchId[]

Traits forced by the scenario, granted for free during character creation.

get_flags

πŸ‡² Method –> ( ) -> string[]

All scenario flags, e.g. β€œFIRE_START”.

has_flag

πŸ‡² Method –> ( string ) -> boolean

Returns true if the scenario has the given flag.

is_forbidden_bionic

πŸ‡² Method –> ( BionicDataId ) -> boolean

Returns true if the given bionic is forbidden in this scenario.

is_forbidden_spell

πŸ‡² Method –> ( SpellTypeId ) -> boolean

Returns true if the given spell is forbidden in this scenario.

is_forbidden_trait

πŸ‡² Method –> ( MutationBranchId ) -> boolean

Returns true if the given trait is forbidden in this scenario.

is_locked_bionic

πŸ‡² Method –> ( BionicDataId ) -> boolean

Returns true if the given bionic is forced by this scenario.

is_locked_trait

πŸ‡² Method –> ( MutationBranchId ) -> boolean

Returns true if the given trait is forced by this scenario.

missions

πŸ‡² Method –> ( ) -> MissionTypeIdRaw[]

Mission types assigned at the start of the game.

name

πŸ‡² Method –> ( boolean ) -> string

The scenario’s id as a plain string. Display name of the scenario for the given gender (true = male).

perks

πŸ‡² Method –> ( ) -> PerkId[]

Perks forced by the scenario.

permitted_professions

πŸ‡² Method –> ( ) -> string[]

String ids of professions permitted by this scenario.

spellquery

πŸ‡² Method –> ( SpellTypeId ) -> boolean

Returns true if the given spell is allowed in this scenario.

surround_groups

πŸ‡² Method –> ( ) -> (MonsterGroupId, number)[]

Monster groups surrounding the start: array of (mongroup_id, chance) pairs.

traitquery

πŸ‡² Method –> ( MutationBranchId ) -> boolean

Returns true if the given trait is allowed in this scenario.

SkillId

Bases

No base classes.

Constructors

  • SkillId.new( )
  • SkillId.new( SkillId )
  • SkillId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> SkillId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> SkillRaw

str

πŸ‡² Method –> ( ) -> string

SkillLevel

Bases

No base classes.

Constructors

No constructors.

Members

can_train

πŸ‡² Method –> ( ) -> boolean

highest_level

πŸ‡² Method –> ( ) -> integer

is_training

πŸ‡² Method –> ( ) -> boolean

level

πŸ‡² Method –> ( ) -> integer

train

πŸ‡² Method –> ( integer, boolean )

SkillLevelMap

Bases

  • Dict( SkillId, SkillLevel )

Constructors

No constructors.

Members

get_skill_level

πŸ‡² Method –> ( SkillId ) -> integer

get_skill_level_object

πŸ‡² Method –> ( SkillId ) -> SkillLevel

mod_skill_level

πŸ‡² Method –> ( SkillId, integer )

Sound

Bases

No base classes.

Constructors

No constructors.

Members

from_decibel

πŸ‡« Function –> ( integer ) -> Sound

to_decibel

πŸ‡² Method –> ( ) -> integer

SpeciesTypeId

Bases

No base classes.

Constructors

  • SpeciesTypeId.new( )
  • SpeciesTypeId.new( SpeciesTypeId )
  • SpeciesTypeId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> SpeciesTypeId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> SpeciesTypeRaw

str

πŸ‡² Method –> ( ) -> string

Spell

The class used for spells that a player knows, casts, and gains experience for using. If a given spell is not supposed to be directly cast by a player, consider using SpellSimple instead.

Bases

No base classes.

Constructors

Members

id

πŸ‡» Variable –> SpellTypeId

cast

πŸ‡² Method –> ( Creature, TripointBubMs )

Cast this spell, as well as any sub-spells.

cast_single_effect

πŸ‡² Method –> ( Creature, TripointBubMs )

Cast only this spell’s main effects. Generally, cast() should be used instead.

desc

πŸ‡² Method –> ( ) -> string

gain_exp

πŸ‡² Method –> ( integer )

gain_levels

πŸ‡² Method –> ( integer )

get_level

πŸ‡² Method –> ( ) -> integer

name

πŸ‡² Method –> ( ) -> string

set_exp

πŸ‡² Method –> ( integer )

set_level

πŸ‡² Method –> ( integer )

xp

πŸ‡² Method –> ( ) -> integer

SpellSimple

The type for basic spells. If you don’t need to track XP from casting (e.g., if a spell is intended to be cast by anything other than a player), this is likely the appropriate type. Otherwise, see the Spell type.

Bases

No base classes.

Constructors

Members

force_target_source

πŸ‡» Variable –> boolean

Whether or not the target point is locked to the source’s location.

id

πŸ‡» Variable –> SpellTypeId

level

πŸ‡» Variable –> integer

trigger_once_in

πŸ‡» Variable –> integer

Used for enchantments; the spell’s chance to trigger every turn.

cast

πŸ‡² Method –> ( Creature, TripointBubMs, integer? )

max_level

πŸ‡² Method –> ( ) -> integer

Returns the defined maximum level of this SpellSimple instance, if defined. Otherwise, returns 0.

prompt_cast

πŸ‡« Function –> ( SpellTypeId, TripointBubMs, integer? ) -> SpellSimple

Static function: Creates and immediately casts a SimpleSpell, then returns the new spell for potential reuse. If the given tripoint is the player’s location, the spell will be locked to the player. (This does not necessarily cause friendly fire!) If an integer is specified, the spell will be cast at that level.

SpellTypeId

Bases

No base classes.

Constructors

  • SpellTypeId.new( )
  • SpellTypeId.new( SpellTypeId )
  • SpellTypeId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> SpellTypeId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> SpellTypeRaw

str

πŸ‡² Method –> ( ) -> string

SpellTypeRaw

The β€˜raw’ type for storing the information defining every spell in the game. It’s not possible to cast directly from this type; check SpellSimple and Spell.

Bases

No base classes.

Constructors

No constructors.

Members

aoe_increment

πŸ‡» Variable –> number

base_casting_time

πŸ‡» Variable –> integer

base_energy_cost

πŸ‡» Variable –> integer

casting_time_increment

πŸ‡» Variable –> number

damage_increment

πŸ‡» Variable –> number

difficulty

πŸ‡» Variable –> integer

dot_increment

πŸ‡» Variable –> number

duration_increment

πŸ‡» Variable –> integer

effect_name

πŸ‡» Variable –> string

The name of the primary effect this spell will enact.

effect_str

πŸ‡» Variable –> string

Specifics about the effect this spell will enact.

energy_increment

πŸ‡» Variable –> number

field_chance

πŸ‡» Variable –> integer

field_intensity_increment

πŸ‡» Variable –> number

field_intensity_variance

πŸ‡» Variable –> number

final_casting_time

πŸ‡» Variable –> integer

final_energy_cost

πŸ‡» Variable –> integer

id

πŸ‡» Variable –> SpellTypeId

max_aoe

πŸ‡» Variable –> integer

max_damage

πŸ‡» Variable –> integer

max_dot

πŸ‡» Variable –> integer

max_duration

πŸ‡» Variable –> integer

max_field_intensity

πŸ‡» Variable –> integer

max_level

πŸ‡» Variable –> integer

max_range

πŸ‡» Variable –> integer

min_aoe

πŸ‡» Variable –> integer

min_damage

πŸ‡» Variable –> integer

min_dot

πŸ‡» Variable –> integer

min_duration

πŸ‡» Variable –> integer

min_field_intensity

πŸ‡» Variable –> integer

min_range

πŸ‡» Variable –> integer

range_increment

πŸ‡» Variable –> number

additional_spells

πŸ‡² Method –> ( ) -> SpellSimple[]

Other spells cast by this spell.

get_all

πŸ‡« Function –> ( ) -> SpellTypeRaw[]

Returns a (long) list of every spell in the game.

Temperature

Bases

No base classes.

Constructors

No constructors.

Members

from_celsius

πŸ‡« Function –> ( number ) -> Temperature

from_fahrenheit

πŸ‡« Function –> ( number ) -> Temperature

from_kelvin

πŸ‡« Function –> ( number ) -> Temperature

to_celsius

πŸ‡² Method –> ( ) -> number

to_fahrenheit

πŸ‡² Method –> ( ) -> number

to_kelvin

πŸ‡² Method –> ( ) -> number

TerId

Bases

No base classes.

Constructors

  • TerId.new( )
  • TerId.new( TerId )
  • TerId.new( TerIntId )
  • TerId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> TerId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

int_id

πŸ‡² Method –> ( ) -> TerIntId

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> TerRaw

str

πŸ‡² Method –> ( ) -> string

TerIntId

Bases

No base classes.

Constructors

Members

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> TerRaw

str_id

πŸ‡² Method –> ( ) -> TerId

TerRaw

Bases

No base classes.

Constructors

No constructors.

Members

close

πŸ‡» Variable –> TerId

heat_radiation

πŸ‡» Variable –> integer

open

πŸ‡» Variable –> TerId

roof

πŸ‡» Variable –> TerId

transforms_into

πŸ‡» Variable –> TerId

trap_id_str

πŸ‡» Variable –> string

get_coverage

πŸ‡² Method –> ( ) -> integer

get_flags

πŸ‡² Method –> ( ) -> string[]

get_light_emitted

πŸ‡² Method –> ( ) -> integer

get_max_volume

πŸ‡² Method –> ( ) -> Volume

get_movecost

πŸ‡² Method –> ( ) -> integer

has_flag

πŸ‡² Method –> ( string ) -> boolean

int_id

πŸ‡² Method –> ( ) -> TerIntId

name

πŸ‡² Method –> ( ) -> string

set_coverage

πŸ‡² Method –> ( integer )

set_flag

πŸ‡² Method –> ( string )

set_light_emitted

πŸ‡² Method –> ( integer )

set_max_volume

πŸ‡² Method –> ( Volume )

set_movecost

πŸ‡² Method –> ( integer )

str_id

πŸ‡² Method –> ( ) -> TerId

TimeDuration

Represent duration between 2 fixed points in time

Bases

No base classes.

Constructors

  • TimeDuration.new( )

Members

from_days

πŸ‡« Function –> ( integer ) -> TimeDuration

from_hours

πŸ‡« Function –> ( integer ) -> TimeDuration

from_minutes

πŸ‡« Function –> ( integer ) -> TimeDuration

from_seconds

πŸ‡« Function –> ( integer ) -> TimeDuration

from_turns

πŸ‡« Function –> ( integer ) -> TimeDuration

from_weeks

πŸ‡« Function –> ( integer ) -> TimeDuration

make_random

πŸ‡² Method –> ( TimeDuration ) -> TimeDuration

to_days

πŸ‡² Method –> ( ) -> integer

to_hours

πŸ‡² Method –> ( ) -> integer

to_minutes

πŸ‡² Method –> ( ) -> integer

to_seconds

πŸ‡² Method –> ( ) -> integer

to_turns

πŸ‡² Method –> ( ) -> integer

to_weeks

πŸ‡² Method –> ( ) -> integer

TimePoint

Library for dealing with time primitives.
Represent fixed point in time

Bases

No base classes.

Constructors

  • TimePoint.new( )

Members

from_turn

πŸ‡« Function –> ( integer ) -> TimePoint

hour_of_day

πŸ‡² Method –> ( ) -> integer

is_dawn

πŸ‡² Method –> ( ) -> boolean

is_day

πŸ‡² Method –> ( ) -> boolean

is_dusk

πŸ‡² Method –> ( ) -> boolean

is_night

πŸ‡² Method –> ( ) -> boolean

minute_of_hour

πŸ‡² Method –> ( ) -> integer

moon_phase

πŸ‡² Method –> ( ) -> MoonPhase

season

πŸ‡² Method –> ( ) -> string

second_of_minute

πŸ‡² Method –> ( ) -> integer

sunrise

πŸ‡² Method –> ( ) -> TimePoint

sunset

πŸ‡² Method –> ( ) -> TimePoint

to_string_time_of_day

πŸ‡² Method –> ( ) -> string

to_turn

πŸ‡² Method –> ( ) -> integer

TrapId

Bases

No base classes.

Constructors

  • TrapId.new( )
  • TrapId.new( TrapId )
  • TrapId.new( TrapIntId )
  • TrapId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> TrapId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

int_id

πŸ‡² Method –> ( ) -> TrapIntId

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> TrapRaw

str

πŸ‡² Method –> ( ) -> string

TrapIntId

Bases

No base classes.

Constructors

Members

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> TrapRaw

str_id

πŸ‡² Method –> ( ) -> TrapId

Tripoint

Bases

No base classes.

Constructors

  • Tripoint.new( )
  • Tripoint.new( Point, int )
  • Tripoint.new( Tripoint )
  • Tripoint.new( int, int, int )

Members

x

πŸ‡» Variable –> integer

y

πŸ‡» Variable –> integer

z

πŸ‡» Variable –> integer

abs

πŸ‡² Method –> ( ) -> Tripoint

reinterpret_as

πŸ‡² Method –> ( origin: string, scale: string ) -> TripointCoord

Reinterpret this raw tripoint as a typed tripoint coordinate without changing x, y, or z.

rotate_2d

πŸ‡² Method –> ( integer, Point ) -> Tripoint

xy

πŸ‡² Method –> ( ) -> Point

TripointCoord

A typed three-dimensional coordinate. Its origin and scale describe how to interpret x, y, and z, and coordinate operations only combine compatible coordinate spaces.

Bases

No base classes.

Constructors

No constructors.

Members

x

πŸ‡» Variable –> integer

y

πŸ‡» Variable –> integer

z

πŸ‡» Variable –> integer

origin

πŸ‡² Method –> ( ) -> string

project_combine

πŸ‡² Method –> ( fine: any ) -> nil | PointCoord | TripointCoord

Combines this coarse tripoint with a remainder from project_remain. Returns TripointCoord, or nil if the pair is incompatible.

project_remain

πŸ‡² Method –> ( scale: string ) -> (TripointCoord?, PointCoord?)

Splits this tripoint into a coarse TripointCoord at the requested scale and a PointCoord remainder at this tripoint’s original scale. The z value stays on the coarse tripoint. Returns nil, nil if the split is not valid.

project_remain_mmr

πŸ‡² Method –> ( ) -> (TripointCoord?, PointCoord?)

Shortcut for project_remain("mmr").

project_remain_om

πŸ‡² Method –> ( ) -> (TripointCoord?, PointCoord?)

Shortcut for project_remain("om").

project_remain_omt

πŸ‡² Method –> ( ) -> (TripointCoord?, PointCoord?)

Shortcut for project_remain("omt").

project_remain_seg

πŸ‡² Method –> ( ) -> (TripointCoord?, PointCoord?)

Shortcut for project_remain("seg").

project_remain_sm

πŸ‡² Method –> ( ) -> (TripointCoord?, PointCoord?)

Shortcut for project_remain("sm").

raw

πŸ‡² Method –> ( ) -> Tripoint

reinterpret_as

πŸ‡² Method –> ( origin: string, scale: string ) -> TripointCoord

Reinterpret this coordinate as another tripoint coordinate kind without changing x, y, or z.

rl_dist

πŸ‡² Method –> ( other: TripointCoord ) -> integer?

Rectilinear distance to another TripointCoord with matching origin and scale. Returns nil if the argument is incompatible.

rotate_2d

πŸ‡² Method –> ( integer, Point ) -> TripointCoord

scale

πŸ‡² Method –> ( ) -> string

square_dist

πŸ‡² Method –> ( other: TripointCoord ) -> integer?

Chebyshev distance to another TripointCoord with matching origin and scale. Returns nil if the argument is incompatible.

to

πŸ‡² Method –> ( scale: string ) -> TripointCoord?

Projects this coordinate to another scale, preserving its origin and tripoint dimension. Returns nil if the conversion is not valid.

to_mmr

πŸ‡² Method –> ( ) -> TripointCoord?

Shortcut for to("mmr").

to_ms

πŸ‡² Method –> ( ) -> TripointCoord?

Shortcut for to("ms").

to_om

πŸ‡² Method –> ( ) -> TripointCoord?

Shortcut for to("om").

to_omt

πŸ‡² Method –> ( ) -> TripointCoord?

Shortcut for to("omt").

to_seg

πŸ‡² Method –> ( ) -> TripointCoord?

Shortcut for to("seg").

to_sm

πŸ‡² Method –> ( ) -> TripointCoord?

Shortcut for to("sm").

to_veh

πŸ‡² Method –> ( ) -> TripointCoord?

Shortcut for to("veh").

trig_dist

πŸ‡² Method –> ( other: TripointCoord ) -> number?

Euclidean distance to another TripointCoord with matching origin and scale. Returns nil if the argument is incompatible.

type

πŸ‡² Method –> ( ) -> string

xy

πŸ‡² Method –> ( ) -> PointCoord

UiList

Bases

No base classes.

Constructors

  • UiList.new( )

Members

entries

πŸ‡» Variable –> UiListEntry[]

Entries from uilist. Remember, in lua, the first element of vector is entries[1], not entries[0].

add

πŸ‡² Method –> ( integer, string )

Adds an entry. string is its name, and int is what it returns. If int is -1, the number is decided orderly.

add_w_col

πŸ‡² Method –> ( integer, string, string, string )

Adds an entry with desc and col(third string). col is additional text on the right of the entry name.

add_w_desc

πŸ‡² Method –> ( integer, string, string )

Adds an entry with desc(second string). desc_enabled(true) is required for showing desc.

border_color

πŸ‡² Method –> ( Color )

Changes the color. Default color is c_magenta.

desc_enabled

πŸ‡² Method –> ( boolean )

Puts a lower box. Footer or entry desc appears on it.

footer

πŸ‡² Method –> ( string )

Sets footer text which is in lower box. It overwrites descs of entries unless is empty.

hilight_color

πŸ‡² Method –> ( Color )

Changes the color. Default color is h_white.

hotkey_color

πŸ‡² Method –> ( Color )

Changes the color. Default color is c_light_green.

query

πŸ‡² Method –> ( ) -> integer

Returns retval for selected entry, or a negative number on fail/cancel

text

πŸ‡² Method –> ( string )

Sets text which is in upper box.

text_color

πŸ‡² Method –> ( Color )

Changes the color. Default color is c_light_gray.

title

πŸ‡² Method –> ( string )

Sets title which is on the top line.

title_color

πŸ‡² Method –> ( Color )

Changes the color. Default color is c_green.

UiListEntry

This type came from UiList.

Bases

No base classes.

Constructors

No constructors.

Members

ctxt

πŸ‡» Variable –> string

Entry text of column.

desc

πŸ‡» Variable –> string

Entry description

enable

πŸ‡» Variable –> boolean

Entry whether it’s enabled or not. Default is true.

txt

πŸ‡» Variable –> string

Entry text

txt_color

πŸ‡² Method –> ( Color )

Entry text color. Its default color is c_red_red, which makes color of the entry same as what uilist decides. So if you want to make color different, choose one except c_red_red.

VitaminId

Bases

No base classes.

Constructors

  • VitaminId.new( )
  • VitaminId.new( VitaminId )
  • VitaminId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> VitaminId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> VitaminRaw

str

πŸ‡² Method –> ( ) -> string

VitaminRaw

Bases

No base classes.

Constructors

No constructors.

Members

deficiency

πŸ‡² Method –> ( ) -> EffectTypeId

excess

πŸ‡² Method –> ( ) -> EffectTypeId

has_flag

πŸ‡² Method –> ( string ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

max

πŸ‡² Method –> ( ) -> integer

min

πŸ‡² Method –> ( ) -> integer

name

πŸ‡² Method –> ( ) -> string

rate

πŸ‡² Method –> ( ) -> TimeDuration

severity

πŸ‡² Method –> ( integer ) -> integer

vitamin_id

πŸ‡« Function –> ( )

vitamin_type

πŸ‡² Method –> ( ) -> VitaminType

Volume

Bases

No base classes.

Constructors

No constructors.

Members

from_liter

πŸ‡« Function –> ( integer ) -> Volume

from_milliliter

πŸ‡« Function –> ( integer ) -> Volume

to_liter

πŸ‡² Method –> ( ) -> number

to_milliliter

πŸ‡² Method –> ( ) -> integer

WeaponCategoryId

Bases

No base classes.

Constructors

  • WeaponCategoryId.new( )
  • WeaponCategoryId.new( WeaponCategoryId )
  • WeaponCategoryId.new( string )

Members

NULL_ID

πŸ‡« Function –> ( ) -> WeaponCategoryId

implements_int_id

πŸ‡« Function –> ( ) -> boolean

is_null

πŸ‡² Method –> ( ) -> boolean

is_valid

πŸ‡² Method –> ( ) -> boolean

obj

πŸ‡² Method –> ( ) -> WeaponCategoryRaw

str

πŸ‡² Method –> ( ) -> string

WrappedVehicle

Bases

No base classes.

Constructors

No constructors.

Members

charge_batteries

πŸ‡² Method –> ( integer ) -> integer

Charges the onboard batteries by up to amount. Returns the charges actually added.

drain_batteries

πŸ‡² Method –> ( integer ) -> integer

Drains up to amount charges from the onboard batteries. Returns the charges actually drained.

drain_fuel

πŸ‡² Method –> ( ItypeId, integer ) -> integer

Drains up to amount charges of the given fuel type from the vehicle. Returns the charges actually drained.

facing

πŸ‡² Method –> ( ) -> number

Returns the vehicle’s facing in degrees (0 = east, 90 = north), or 0 if the handle is invalid.

fuel_left

πŸ‡² Method –> ( ItypeId ) -> integer

Returns the charges of the given fuel type left in the vehicle (e.g. ItypeId.new(β€œbattery”)), or 0 if the handle is invalid.

is_locked

πŸ‡² Method –> ( ) -> boolean

Returns true if the vehicle is locked, false otherwise (also false if the handle is invalid).

is_valid

πŸ‡² Method –> ( ) -> boolean

Returns true if the wrapped vehicle still exists, false if the handle is invalid (e.g. the vehicle was destroyed).

name

πŸ‡² Method –> ( ) -> string

Returns the vehicle’s display name, or an empty string if the handle is invalid.

pos

πŸ‡² Method –> ( ) -> TripointBubMs

Returns the vehicle origin tile in local map-square coordinates.

set_locked

πŸ‡² Method –> ( boolean )

Locks or unlocks the vehicle. Does nothing if the handle is invalid.

type

πŸ‡² Method –> ( ) -> string

Returns the vehicle prototype id string.

Enums

ActionId

Entries

  • ACTION_NULL = 0
  • ACTION_SELECT = 1
  • ACTION_SEC_SELECT = 2
  • ACTION_PAUSE = 3
  • ACTION_TIMEOUT = 4
  • ACTION_MOVE_FORTH = 5
  • ACTION_MOVE_FORTH_RIGHT = 6
  • ACTION_MOVE_RIGHT = 7
  • ACTION_MOVE_BACK_RIGHT = 8
  • ACTION_MOVE_BACK = 9
  • ACTION_MOVE_BACK_LEFT = 10
  • ACTION_MOVE_LEFT = 11
  • ACTION_MOVE_FORTH_LEFT = 12
  • ACTION_MOVE_DOWN = 13
  • ACTION_MOVE_UP = 14
  • ACTION_CYCLE_MOVE = 15
  • ACTION_RESET_MOVE = 16
  • ACTION_TOGGLE_RUN = 17
  • ACTION_TOGGLE_CROUCH = 18
  • ACTION_TOGGLE_PRONE = 19
  • ACTION_OPEN_MOVEMENT = 20
  • ACTION_TOGGLE_MAP_MEMORY = 21
  • ACTION_CENTER = 22
  • ACTION_SHIFT_N = 23
  • ACTION_SHIFT_NE = 24
  • ACTION_SHIFT_E = 25
  • ACTION_SHIFT_SE = 26
  • ACTION_SHIFT_S = 27
  • ACTION_SHIFT_SW = 28
  • ACTION_SHIFT_W = 29
  • ACTION_SHIFT_NW = 30
  • ACTION_OPEN = 31
  • ACTION_CLOSE = 32
  • ACTION_SMASH = 33
  • ACTION_EXAMINE = 34
  • ACTION_JUMP = 35
  • ACTION_PICKUP = 36
  • ACTION_PICKUP_ALL = 37
  • ACTION_PICKUP_FEET = 38
  • ACTION_GRAB = 39
  • ACTION_HAUL = 40
  • ACTION_BUTCHER = 41
  • ACTION_CHAT = 42
  • ACTION_LOOK = 43
  • ACTION_PEEK = 44
  • ACTION_LIST_ITEMS = 45
  • ACTION_ZONES = 46
  • ACTION_LOOT = 47
  • ACTION_INVENTORY = 48
  • ACTION_ADVANCEDINV = 49
  • ACTION_COMPARE = 50
  • ACTION_ORGANIZE = 51
  • ACTION_USE = 52
  • ACTION_USE_WIELDED = 53
  • ACTION_WEAR = 54
  • ACTION_TAKE_OFF = 55
  • ACTION_EAT = 56
  • ACTION_OPEN_CONSUME = 57
  • ACTION_READ = 58
  • ACTION_WIELD = 59
  • ACTION_PICK_STYLE = 60
  • ACTION_RELOAD_ITEM = 61
  • ACTION_RELOAD_WEAPON = 62
  • ACTION_RELOAD_WIELDED = 63
  • ACTION_UNLOAD = 64
  • ACTION_UNLOAD_ALL = 65
  • ACTION_MEND = 66
  • ACTION_THROW = 67
  • ACTION_FIRE = 68
  • ACTION_FIRE_BURST = 69
  • ACTION_SELECT_FIRE_MODE = 70
  • ACTION_SELECT_DEFAULT_AMMO = 71
  • ACTION_CAST_SPELL = 72
  • ACTION_CAST_LAST_SPELL = 73
  • ACTION_DROP = 74
  • ACTION_DIR_DROP = 75
  • ACTION_BIONICS = 76
  • ACTION_MUTATIONS = 77
  • ACTION_PERKS = 78
  • ACTION_SORT_ARMOR = 79
  • ACTION_AUTOATTACK = 80
  • ACTION_TOGGLE_MANUAL_COMBAT_MODE = 81
  • ACTION_WAIT = 82
  • ACTION_CRAFT = 83
  • ACTION_RECRAFT = 84
  • ACTION_LONGCRAFT = 85
  • ACTION_CONSTRUCT = 86
  • ACTION_DISASSEMBLE = 87
  • ACTION_SALVAGE = 88
  • ACTION_SLEEP = 89
  • ACTION_CONTROL_VEHICLE = 90
  • ACTION_TOGGLE_AUTO_TRAVEL_MODE = 91
  • ACTION_TOGGLE_SAFEMODE = 92
  • ACTION_TOGGLE_AUTOSAFE = 93
  • ACTION_TOGGLE_THIEF_MODE = 94
  • ACTION_IGNORE_ENEMY = 95
  • ACTION_WHITELIST_ENEMY = 96
  • ACTION_SAVE = 97
  • ACTION_QUICKSAVE = 98
  • ACTION_QUICKLOAD = 99
  • ACTION_SUICIDE = 100
  • ACTION_PL_INFO = 101
  • ACTION_MAP = 102
  • ACTION_SKY = 103
  • ACTION_MISSIONS = 104
  • ACTION_SCORES = 105
  • ACTION_FACTIONS = 106
  • ACTION_MORALE = 107
  • ACTION_MESSAGES = 108
  • ACTION_OPEN_WIKI = 109
  • ACTION_OPEN_HHG = 110
  • ACTION_HELP = 111
  • ACTION_MAIN_MENU = 112
  • ACTION_DIARY = 113
  • ACTION_KEYBINDINGS = 114
  • ACTION_OPTIONS = 115
  • ACTION_AUTOPICKUP = 116
  • ACTION_AUTONOTES = 117
  • ACTION_SAFEMODE = 118
  • ACTION_COLOR = 119
  • ACTION_WORLD_MODS = 120
  • ACTION_DISTRACTION_MANAGER = 121
  • ACTION_TOGGLE_CHARACTER_PREVIEW_CLOTHES = 122
  • ACTION_TOGGLE_FULLSCREEN = 123
  • ACTION_DEBUG = 124
  • ACTION_LUA_CONSOLE = 125
  • ACTION_LUA_RELOAD = 126
  • ACTION_DISPLAY_SCENT = 127
  • ACTION_DISPLAY_SCENT_TYPE = 128
  • ACTION_TOGGLE_DEBUG_MODE = 129
  • ACTION_ZOOM_OUT = 130
  • ACTION_ZOOM_IN = 131
  • ACTION_ACTIONMENU = 132
  • ACTION_ITEMACTION = 133
  • ACTION_TOGGLE_PIXEL_MINIMAP = 134
  • ACTION_TOGGLE_PANEL_ADM = 135
  • ACTION_PANEL_MGMT = 136
  • ACTION_RELOAD_TILESET = 137
  • ACTION_TOGGLE_AUTO_FEATURES = 138
  • ACTION_TOGGLE_AUTO_PULP_BUTCHER = 139
  • ACTION_TOGGLE_AUTO_MINING = 140
  • ACTION_TOGGLE_AUTO_FORAGING = 141
  • ACTION_TOGGLE_AUTO_PICKUP = 142
  • ACTION_DISPLAY_TEMPERATURE = 143
  • ACTION_DISPLAY_VEHICLE_AI = 144
  • ACTION_DISPLAY_VISIBILITY = 145
  • ACTION_DISPLAY_LIGHTING = 146
  • ACTION_DISPLAY_RADIATION = 147
  • ACTION_DISPLAY_TRANSPARENCY = 148
  • ACTION_DISPLAY_OUTSIDE = 149
  • ACTION_DISPLAY_SUBMAP_GRID = 150
  • ACTION_DISPLAY_SOUND_ABSORPTION = 151
  • ACTION_DISPLAY_SOUND_WALLS = 152
  • ACTION_TOGGLE_ZONE_OVERLAY = 153
  • ACTION_DISPLAY_TILES_NO_VFX = 154
  • ACTION_TOGGLE_HOUR_TIMER = 155
  • ACTION_SWAP_TO_NPC = 156

AddictionType

Entries

  • NONE = 0
  • CAFFEINE = 1
  • ALCOHOL = 2
  • SLEEP = 3
  • PKILLER = 4
  • SPEED = 5
  • CIG = 6
  • COKE = 7
  • CRACK = 8
  • MUTAGEN = 9
  • DIAZEPAM = 10
  • MARLOSS_R = 11
  • MARLOSS_B = 12
  • MARLOSS_Y = 13

ArtifactCharge

Entries

  • ARTC_NULL = 0
  • ARTC_TIME = 1
  • ARTC_SOLAR = 2
  • ARTC_PAIN = 3
  • ARTC_HP = 4
  • ARTC_FATIGUE = 5
  • ARTC_PORTAL = 6

ArtifactChargeReq

Entries

  • ACR_NULL = 0
  • ACR_EQUIP = 1
  • ACR_SKIN = 2
  • ACR_SLEEP = 3
  • ACR_RAD = 4
  • ACR_WET = 5
  • ACR_SKY = 6

ArtifactEffectActive

Entries

  • AEP_NULL = 0
  • AEP_STR_UP = 1
  • AEP_DEX_UP = 2
  • AEP_PER_UP = 3
  • AEP_INT_UP = 4
  • AEP_ALL_UP = 5
  • AEP_SPEED_UP = 6
  • AEP_PBLUE = 7
  • AEP_SNAKES = 8
  • AEP_INVISIBLE = 9
  • AEP_CLAIRVOYANCE = 10
  • AEP_SUPER_CLAIRVOYANCE = 11
  • AEP_STEALTH = 12
  • AEP_EXTINGUISH = 13
  • AEP_GLOW = 14
  • AEP_PSYSHIELD = 15
  • AEP_RESIST_ELECTRICITY = 16
  • AEP_CARRY_MORE = 17
  • AEP_SAP_LIFE = 18
  • AEP_FUN = 19
  • AEP_SPLIT = 20
  • AEP_HUNGER = 21
  • AEP_THIRST = 22
  • AEP_SMOKE = 23
  • AEP_EVIL = 24
  • AEP_SCHIZO = 25
  • AEP_RADIOACTIVE = 26
  • AEP_MUTAGENIC = 27
  • AEP_ATTENTION = 28
  • AEP_STR_DOWN = 29
  • AEP_DEX_DOWN = 30
  • AEP_PER_DOWN = 31
  • AEP_INT_DOWN = 32
  • AEP_ALL_DOWN = 33
  • AEP_SPEED_DOWN = 34
  • AEP_FORCE_TELEPORT = 35
  • AEP_MOVEMENT_NOISE = 36
  • AEP_BAD_WEATHER = 37
  • AEP_SICK = 38
  • AEP_CLAIRVOYANCE_PLUS = 39

ArtifactEffectPassive

Entries

  • AEA_NULL = 0
  • AEA_STORM = 1
  • AEA_FIREBALL = 2
  • AEA_ADRENALINE = 3
  • AEA_MAP = 4
  • AEA_BLOOD = 5
  • AEA_FATIGUE = 6
  • AEA_ACIDBALL = 7
  • AEA_PULSE = 8
  • AEA_HEAL = 9
  • AEA_CONFUSED = 10
  • AEA_ENTRANCE = 11
  • AEA_BUGS = 12
  • AEA_TELEPORT = 13
  • AEA_LIGHT = 14
  • AEA_GROWTH = 15
  • AEA_HURTALL = 16
  • AEA_FUN = 17
  • AEA_SPLIT = 18
  • AEA_RADIATION = 19
  • AEA_PAIN = 20
  • AEA_MUTATE = 21
  • AEA_PARALYZE = 22
  • AEA_FIRESTORM = 23
  • AEA_ATTENTION = 24
  • AEA_TELEGLOW = 25
  • AEA_NOISE = 26
  • AEA_SCREAM = 27
  • AEA_DIM = 28
  • AEA_FLASH = 29
  • AEA_VOMIT = 30
  • AEA_SHADOWS = 31
  • AEA_STAMINA_EMPTY = 32

Attitude

Entries

  • Hostile = 0
  • Neutral = 1
  • Friendly = 2
  • Any = 3

BodyPart

Entries

  • TORSO = 0
  • HEAD = 1
  • EYES = 2
  • MOUTH = 3
  • ARM_L = 4
  • ARM_R = 5
  • HAND_L = 6
  • HAND_R = 7
  • LEG_L = 8
  • LEG_R = 9
  • FOOT_L = 10
  • FOOT_R = 11

CharacterMoveMode

Entries

  • walk = 0
  • run = 1
  • crouch = 2
  • prone = 3

Color

Entries

  • c_black = 0
  • c_white = 1
  • c_light_gray = 2
  • c_dark_gray = 3
  • c_red = 4
  • c_green = 5
  • c_blue = 6
  • c_cyan = 7
  • c_magenta = 8
  • c_brown = 9
  • c_light_red = 10
  • c_light_green = 11
  • c_light_blue = 12
  • c_light_cyan = 13
  • c_pink = 14
  • c_yellow = 15
  • h_black = 16
  • h_white = 17
  • h_light_gray = 18
  • h_dark_gray = 19
  • h_red = 20
  • h_green = 21
  • h_blue = 22
  • h_cyan = 23
  • h_magenta = 24
  • h_brown = 25
  • h_light_red = 26
  • h_light_green = 27
  • h_light_blue = 28
  • h_light_cyan = 29
  • h_pink = 30
  • h_yellow = 31
  • i_black = 32
  • i_white = 33
  • i_light_gray = 34
  • i_dark_gray = 35
  • i_red = 36
  • i_green = 37
  • i_blue = 38
  • i_cyan = 39
  • i_magenta = 40
  • i_brown = 41
  • i_light_red = 42
  • i_light_green = 43
  • i_light_blue = 44
  • i_light_cyan = 45
  • i_pink = 46
  • i_yellow = 47
  • c_unset = 48
  • c_black_red = 49
  • c_white_red = 50
  • c_light_gray_red = 51
  • c_dark_gray_red = 52
  • c_red_red = 53
  • c_green_red = 54
  • c_blue_red = 55
  • c_cyan_red = 56
  • c_magenta_red = 57
  • c_brown_red = 58
  • c_light_red_red = 59
  • c_light_green_red = 60
  • c_light_blue_red = 61
  • c_light_cyan_red = 62
  • c_pink_red = 63
  • c_yellow_red = 64
  • c_black_white = 65
  • c_dark_gray_white = 66
  • c_light_gray_white = 67
  • c_white_white = 68
  • c_red_white = 69
  • c_light_red_white = 70
  • c_green_white = 71
  • c_light_green_white = 72
  • c_brown_white = 73
  • c_yellow_white = 74
  • c_blue_white = 75
  • c_light_blue_white = 76
  • c_magenta_white = 77
  • c_pink_white = 78
  • c_cyan_white = 79
  • c_light_cyan_white = 80
  • c_black_green = 81
  • c_dark_gray_green = 82
  • c_light_gray_green = 83
  • c_white_green = 84
  • c_red_green = 85
  • c_light_red_green = 86
  • c_green_green = 87
  • c_light_green_green = 88
  • c_brown_green = 89
  • c_yellow_green = 90
  • c_blue_green = 91
  • c_light_blue_green = 92
  • c_magenta_green = 93
  • c_pink_green = 94
  • c_cyan_green = 95
  • c_light_cyan_green = 96
  • c_black_yellow = 97
  • c_dark_gray_yellow = 98
  • c_light_gray_yellow = 99
  • c_white_yellow = 100
  • c_red_yellow = 101
  • c_light_red_yellow = 102
  • c_green_yellow = 103
  • c_light_green_yellow = 104
  • c_brown_yellow = 105
  • c_yellow_yellow = 106
  • c_blue_yellow = 107
  • c_light_blue_yellow = 108
  • c_magenta_yellow = 109
  • c_pink_yellow = 110
  • c_cyan_yellow = 111
  • c_light_cyan_yellow = 112
  • c_black_magenta = 113
  • c_dark_gray_magenta = 114
  • c_light_gray_magenta = 115
  • c_white_magenta = 116
  • c_red_magenta = 117
  • c_light_red_magenta = 118
  • c_green_magenta = 119
  • c_light_green_magenta = 120
  • c_brown_magenta = 121
  • c_yellow_magenta = 122
  • c_blue_magenta = 123
  • c_light_blue_magenta = 124
  • c_magenta_magenta = 125
  • c_pink_magenta = 126
  • c_cyan_magenta = 127
  • c_light_cyan_magenta = 128
  • c_black_cyan = 129
  • c_dark_gray_cyan = 130
  • c_light_gray_cyan = 131
  • c_white_cyan = 132
  • c_red_cyan = 133
  • c_light_red_cyan = 134
  • c_green_cyan = 135
  • c_light_green_cyan = 136
  • c_brown_cyan = 137
  • c_yellow_cyan = 138
  • c_blue_cyan = 139
  • c_light_blue_cyan = 140
  • c_magenta_cyan = 141
  • c_pink_cyan = 142
  • c_cyan_cyan = 143
  • c_light_cyan_cyan = 144

DamageType

Entries

  • DT_NULL = 0
  • DT_TRUE = 1
  • DT_BIOLOGICAL = 2
  • DT_BASH = 3
  • DT_CUT = 4
  • DT_ACID = 5
  • DT_STAB = 6
  • DT_HEAT = 7
  • DT_COLD = 8
  • DT_DARK = 9
  • DT_LIGHT = 10
  • DT_PSI = 11
  • DT_ELECTRIC = 12
  • DT_BULLET = 13

Direction

Entries

  • center = 0
  • west = 1
  • east = 2
  • north = 3
  • north_west = 4
  • north_east = 5
  • south = 6
  • south_west = 7
  • south_east = 8
  • below = 9
  • below_west = 10
  • below_east = 11
  • below_north = 12
  • below_north_west = 13
  • below_north_east = 14
  • below_south = 15
  • below_south_west = 16
  • below_south_east = 17
  • above = 18
  • above_west = 19
  • above_east = 20
  • above_north = 21
  • above_north_west = 22
  • above_north_east = 23
  • above_south = 24
  • above_south_west = 25
  • above_south_east = 26

MissionGoal

Entries

  • MGOAL_NULL = 0
  • MGOAL_GO_TO = 1
  • MGOAL_GO_TO_TYPE = 2
  • MGOAL_FIND_ITEM = 3
  • MGOAL_FIND_ANY_ITEM = 4
  • MGOAL_FIND_ITEM_GROUP = 5
  • MGOAL_FIND_MONSTER = 6
  • MGOAL_FIND_NPC = 7
  • MGOAL_ASSASSINATE = 8
  • MGOAL_KILL_MONSTER = 9
  • MGOAL_KILL_MONSTER_TYPE = 10
  • MGOAL_KILL_NEMESIS = 11
  • MGOAL_RECRUIT_NPC = 12
  • MGOAL_RECRUIT_NPC_CLASS = 13
  • MGOAL_COMPUTER_TOGGLE = 14
  • MGOAL_KILL_MONSTER_SPEC = 15
  • MGOAL_TALK_TO_NPC = 16
  • MGOAL_CONDITION = 17
  • MGOAL_KILL_MONSTERS = 18

MissionOrigin

Entries

  • ORIGIN_NULL = 0
  • ORIGIN_GAME_START = 1
  • ORIGIN_OPENER_NPC = 2
  • ORIGIN_ANY_NPC = 3
  • ORIGIN_SECONDARY = 4
  • ORIGIN_COMPUTER = 5

MonsterAttitude

Entries

  • MATT_NULL = 0
  • MATT_FRIEND = 1
  • MATT_FPASSIVE = 2
  • MATT_FLEE = 3
  • MATT_IGNORE = 4
  • MATT_FOLLOW = 5
  • MATT_ATTACK = 6
  • MATT_ZLAVE = 7
  • MATT_UNKNOWN = 8

MonsterFactionAttitude

Entries

  • ByMood = 0
  • Neutral = 1
  • Friendly = 2
  • Hate = 3

MonsterFlag

Entries

  • SEES = 0
  • HEARS = 1
  • GOODHEARING = 2
  • SMELLS = 3
  • KEENNOSE = 4
  • STUMBLES = 5
  • WARM = 6
  • NEMESIS = 7
  • NOHEAD = 8
  • HARDTOSHOOT = 9
  • GRABS = 10
  • GRAB_IMMUNE = 11
  • BASHES = 12
  • DESTROYS = 13
  • BORES = 14
  • POISON = 15
  • VENOM = 16
  • BADVENOM = 17
  • PARALYZEVENOM = 18
  • BLEED = 19
  • WEBWALK = 20
  • DIGS = 21
  • CAN_DIG = 22
  • FLIES = 23
  • AQUATIC = 24
  • SWIMS = 25
  • ATTACKMON = 26
  • ANIMAL = 27
  • PLASTIC = 28
  • SUNDEATH = 29
  • ELECTRIC = 30
  • ACIDPROOF = 31
  • ACIDTRAIL = 32
  • SHORTACIDTRAIL = 33
  • FIREPROOF = 34
  • SLUDGEPROOF = 35
  • SLUDGETRAIL = 36
  • COLDPROOF = 37
  • BIOPROOF = 38
  • DARKPROOF = 39
  • LIGHTPROOF = 40
  • PSIPROOF = 41
  • FIREY = 42
  • QUEEN = 43
  • ELECTRONIC = 44
  • FUR = 45
  • LEATHER = 46
  • WOOL = 47
  • FEATHER = 48
  • BONES = 49
  • FAT = 50
  • CONSOLE_DESPAWN = 51
  • IMMOBILE = 52
  • STATIONARY = 53
  • ID_CARD_DESPAWN = 54
  • RIDEABLE_MECH = 55
  • CARD_OVERRIDE = 56
  • MILITARY_MECH = 57
  • MECH_RECON_VISION = 58
  • MECH_DEFENSIVE = 59
  • HIT_AND_RUN = 60
  • GUILT = 61
  • PAY_BOT = 62
  • HUMAN = 63
  • NO_BREATHE = 64
  • FLAMMABLE = 65
  • REVIVES = 66
  • CHITIN = 67
  • VERMIN = 68
  • NOGIB = 69
  • LARVA = 70
  • ARTHROPOD_BLOOD = 71
  • ACID_BLOOD = 72
  • BILE_BLOOD = 73
  • ABSORBS = 74
  • ABSORBS_SPLITS = 75
  • CBM_CIV = 76
  • CBM_POWER = 77
  • CBM_SCI = 78
  • CBM_OP = 79
  • CBM_TECH = 80
  • CBM_SUBS = 81
  • UNUSED_76 = 82
  • FISHABLE = 83
  • GROUP_BASH = 84
  • SWARMS = 85
  • GROUP_MORALE = 86
  • INTERIOR_AMMO = 87
  • CLIMBS = 88
  • PACIFIST = 89
  • KEEP_DISTANCE = 90
  • PUSH_MON = 91
  • PUSH_VEH = 92
  • NIGHT_INVISIBILITY = 93
  • CAMOUFLAGE = 94
  • UNCANNY_DODGE = 95
  • REVIVES_HEALTHY = 96
  • NO_NECRO = 97
  • PATH_AVOID_DANGER_1 = 98
  • PATH_AVOID_DANGER_2 = 99
  • PATH_AVOID_FIRE = 100
  • PATH_AVOID_FALL = 101
  • NO_SLIP = 102
  • PRIORITIZE_TARGETS = 103
  • NOT_HALLUCINATION = 104
  • CANPLAY = 105
  • PET_MOUNTABLE = 106
  • PET_HARNESSABLE = 107
  • CAN_FETCH = 108
  • DOGFOOD = 109
  • DOG_WHISTLE = 110
  • MILKABLE = 111
  • SHEARABLE = 112
  • NO_BREED = 113
  • NO_FUNG_DMG = 114
  • PET_WONT_FOLLOW = 115
  • DRIPS_NAPALM = 116
  • DRIPS_GASOLINE = 117
  • ELECTRIC_FIELD = 118
  • LOUDMOVES = 119
  • CAN_OPEN_DOORS = 120
  • STUN_IMMUNE = 121
  • DROPS_AMMO = 122
  • CAN_BE_ORDERED = 123
  • SMALL_HEAD = 124
  • TINY_HEAD = 125
  • NO_HEAD_BONUS_CRIT = 126
  • HEAD_BONUS_CRIT_1 = 127
  • HEAD_BONUS_CRIT_2 = 128
  • TORSO_BONUS_CRIT_1 = 129
  • TORSO_BONUS_CRIT_2 = 130
  • PROJECTILE_RESISTANT_1 = 131
  • PROJECTILE_RESISTANT_2 = 132
  • PROJECTILE_RESISTANT_3 = 133
  • PROJECTILE_RESISTANT_4 = 134
  • VOLATILE = 135
  • CANT_CLONE = 136
  • MOUNTABLE_STAIRS = 137
  • MOUNTABLE_LADDER = 138
  • MOUNTABLE_OBSTACLES = 139
  • MOUNTABLE_DOORS = 140
  • MOUNTABLE_LEDGE = 141
  • FACTION_MEMORY = 142
  • COMBAT_MOUNT = 143
  • CANT_TRAIN = 144
  • POLICE_EYEBOT = 145
  • IRRADIATED = 146
  • NO_VEHICLE_COLLISION = 147

MonsterSize

Entries

  • TINY = 0
  • SMALL = 1
  • MEDIUM = 2
  • LARGE = 3
  • HUGE = 4

MoonPhase

Entries

  • MOON_NEW = 0
  • MOON_WAXING_CRESCENT = 1
  • MOON_HALF_MOON_WAXING = 2
  • MOON_WAXING_GIBBOUS = 3
  • MOON_FULL = 4
  • MOON_WANING_GIBBOUS = 5
  • MOON_HALF_MOON_WANING = 6
  • MOON_WANING_CRESCENT = 7

MsgType

Entries

  • good = 0
  • bad = 1
  • mixed = 2
  • warning = 3
  • info = 4
  • neutral = 5
  • debug = 6
  • headshot = 7
  • critical = 8
  • grazing = 9

NpcAttitude

Entries

  • NPCATT_NULL = 0
  • NPCATT_TALK = 1
  • NPCATT_LEGACY_1 = 2
  • NPCATT_FOLLOW = 3
  • NPCATT_LEGACY_2 = 4
  • NPCATT_LEAD = 5
  • NPCATT_WAIT = 6
  • NPCATT_LEGACY_6 = 7
  • NPCATT_MUG = 8
  • NPCATT_WAIT_FOR_LEAVE = 9
  • NPCATT_KILL = 10
  • NPCATT_FLEE = 11
  • NPCATT_LEGACY_3 = 12
  • NPCATT_HEAL = 13
  • NPCATT_LEGACY_4 = 14
  • NPCATT_LEGACY_5 = 15
  • NPCATT_ACTIVITY = 16
  • NPCATT_FLEE_TEMP = 17
  • NPCATT_RECOVER_GOODS = 18

NpcNeed

Entries

  • need_none = 0
  • need_ammo = 1
  • need_weapon = 2
  • need_gun = 3
  • need_food = 4
  • need_drink = 5
  • need_safety = 6

OtMatchType

Entries

  • EXACT = 0
  • TYPE = 1
  • PREFIX = 2
  • CONTAINS = 3

SfxChannel

Entries

  • daytime_outdoors_env = 0
  • nighttime_outdoors_env = 1
  • underground_env = 2
  • indoors_env = 3
  • indoors_rain_env = 4
  • outdoors_snow_env = 5
  • outdoors_flurry_env = 6
  • outdoors_thunderstorm_env = 7
  • outdoors_rain_env = 8
  • outdoors_drizzle_env = 9
  • outdoor_blizzard = 10
  • deafness_tone = 11
  • danger_extreme_theme = 12
  • danger_high_theme = 13
  • danger_medium_theme = 14
  • danger_low_theme = 15
  • stamina_75 = 16
  • stamina_50 = 17
  • stamina_35 = 18
  • idle_chainsaw = 19
  • chainsaw_theme = 20
  • player_activities = 21
  • exterior_engine_sound = 22
  • interior_engine_sound = 23
  • radio = 24

VitaminType

Entries

  • vitamin = 0
  • toxin = 1
  • drug = 2
  • counter = 3

Libraries

PointAbsMmr

Members

new

πŸ‡« Function –> ( ) -> PointAbsMmr
πŸ‡« Function –> ( Point ) -> PointAbsMmr
πŸ‡« Function –> ( integer, integer ) -> PointAbsMmr

PointAbsMs

Members

new

πŸ‡« Function –> ( ) -> PointAbsMs
πŸ‡« Function –> ( Point ) -> PointAbsMs
πŸ‡« Function –> ( integer, integer ) -> PointAbsMs

PointAbsOm

Members

new

πŸ‡« Function –> ( ) -> PointAbsOm
πŸ‡« Function –> ( Point ) -> PointAbsOm
πŸ‡« Function –> ( integer, integer ) -> PointAbsOm

PointAbsOmt

Members

new

πŸ‡« Function –> ( ) -> PointAbsOmt
πŸ‡« Function –> ( Point ) -> PointAbsOmt
πŸ‡« Function –> ( integer, integer ) -> PointAbsOmt

PointAbsSeg

Members

new

πŸ‡« Function –> ( ) -> PointAbsSeg
πŸ‡« Function –> ( Point ) -> PointAbsSeg
πŸ‡« Function –> ( integer, integer ) -> PointAbsSeg

PointAbsSm

Members

new

πŸ‡« Function –> ( ) -> PointAbsSm
πŸ‡« Function –> ( Point ) -> PointAbsSm
πŸ‡« Function –> ( integer, integer ) -> PointAbsSm

PointBubMs

Members

new

πŸ‡« Function –> ( ) -> PointBubMs
πŸ‡« Function –> ( Point ) -> PointBubMs
πŸ‡« Function –> ( integer, integer ) -> PointBubMs

PointBubSm

Members

new

πŸ‡« Function –> ( ) -> PointBubSm
πŸ‡« Function –> ( Point ) -> PointBubSm
πŸ‡« Function –> ( integer, integer ) -> PointBubSm

PointMmrMs

Members

new

πŸ‡« Function –> ( ) -> PointMmrMs
πŸ‡« Function –> ( Point ) -> PointMmrMs
πŸ‡« Function –> ( integer, integer ) -> PointMmrMs

PointMmrOmt

Members

new

πŸ‡« Function –> ( ) -> PointMmrOmt
πŸ‡« Function –> ( Point ) -> PointMmrOmt
πŸ‡« Function –> ( integer, integer ) -> PointMmrOmt

PointMmrSm

Members

new

πŸ‡« Function –> ( ) -> PointMmrSm
πŸ‡« Function –> ( Point ) -> PointMmrSm
πŸ‡« Function –> ( integer, integer ) -> PointMmrSm

PointMntVeh

Members

new

πŸ‡« Function –> ( ) -> PointMntVeh
πŸ‡« Function –> ( Point ) -> PointMntVeh
πŸ‡« Function –> ( integer, integer ) -> PointMntVeh

PointOmMmr

Members

new

πŸ‡« Function –> ( ) -> PointOmMmr
πŸ‡« Function –> ( Point ) -> PointOmMmr
πŸ‡« Function –> ( integer, integer ) -> PointOmMmr

PointOmMs

Members

new

πŸ‡« Function –> ( ) -> PointOmMs
πŸ‡« Function –> ( Point ) -> PointOmMs
πŸ‡« Function –> ( integer, integer ) -> PointOmMs

PointOmOmt

Members

new

πŸ‡« Function –> ( ) -> PointOmOmt
πŸ‡« Function –> ( Point ) -> PointOmOmt
πŸ‡« Function –> ( integer, integer ) -> PointOmOmt

PointOmSeg

Members

new

πŸ‡« Function –> ( ) -> PointOmSeg
πŸ‡« Function –> ( Point ) -> PointOmSeg
πŸ‡« Function –> ( integer, integer ) -> PointOmSeg

PointOmSm

Members

new

πŸ‡« Function –> ( ) -> PointOmSm
πŸ‡« Function –> ( Point ) -> PointOmSm
πŸ‡« Function –> ( integer, integer ) -> PointOmSm

PointOmtMs

Members

new

πŸ‡« Function –> ( ) -> PointOmtMs
πŸ‡« Function –> ( Point ) -> PointOmtMs
πŸ‡« Function –> ( integer, integer ) -> PointOmtMs

PointOmtSm

Members

new

πŸ‡« Function –> ( ) -> PointOmtSm
πŸ‡« Function –> ( Point ) -> PointOmtSm
πŸ‡« Function –> ( integer, integer ) -> PointOmtSm

PointRelMmr

Members

new

πŸ‡« Function –> ( ) -> PointRelMmr
πŸ‡« Function –> ( Point ) -> PointRelMmr
πŸ‡« Function –> ( integer, integer ) -> PointRelMmr

PointRelMs

Members

new

πŸ‡« Function –> ( ) -> PointRelMs
πŸ‡« Function –> ( Point ) -> PointRelMs
πŸ‡« Function –> ( integer, integer ) -> PointRelMs

PointRelOm

Members

new

πŸ‡« Function –> ( ) -> PointRelOm
πŸ‡« Function –> ( Point ) -> PointRelOm
πŸ‡« Function –> ( integer, integer ) -> PointRelOm

PointRelOmt

Members

new

πŸ‡« Function –> ( ) -> PointRelOmt
πŸ‡« Function –> ( Point ) -> PointRelOmt
πŸ‡« Function –> ( integer, integer ) -> PointRelOmt

PointRelSeg

Members

new

πŸ‡« Function –> ( ) -> PointRelSeg
πŸ‡« Function –> ( Point ) -> PointRelSeg
πŸ‡« Function –> ( integer, integer ) -> PointRelSeg

PointRelSm

Members

new

πŸ‡« Function –> ( ) -> PointRelSm
πŸ‡« Function –> ( Point ) -> PointRelSm
πŸ‡« Function –> ( integer, integer ) -> PointRelSm

PointRelVeh

Members

new

πŸ‡« Function –> ( ) -> PointRelVeh
πŸ‡« Function –> ( Point ) -> PointRelVeh
πŸ‡« Function –> ( integer, integer ) -> PointRelVeh

PointSegMmr

Members

new

πŸ‡« Function –> ( ) -> PointSegMmr
πŸ‡« Function –> ( Point ) -> PointSegMmr
πŸ‡« Function –> ( integer, integer ) -> PointSegMmr

PointSegMs

Members

new

πŸ‡« Function –> ( ) -> PointSegMs
πŸ‡« Function –> ( Point ) -> PointSegMs
πŸ‡« Function –> ( integer, integer ) -> PointSegMs

PointSegOmt

Members

new

πŸ‡« Function –> ( ) -> PointSegOmt
πŸ‡« Function –> ( Point ) -> PointSegOmt
πŸ‡« Function –> ( integer, integer ) -> PointSegOmt

PointSegSm

Members

new

πŸ‡« Function –> ( ) -> PointSegSm
πŸ‡« Function –> ( Point ) -> PointSegSm
πŸ‡« Function –> ( integer, integer ) -> PointSegSm

PointSmMs

Members

new

πŸ‡« Function –> ( ) -> PointSmMs
πŸ‡« Function –> ( Point ) -> PointSmMs
πŸ‡« Function –> ( integer, integer ) -> PointSmMs

TripointAbsMmr

Members

new

πŸ‡« Function –> ( ) -> TripointAbsMmr
πŸ‡« Function –> ( Tripoint ) -> TripointAbsMmr
πŸ‡« Function –> ( Point, integer ) -> TripointAbsMmr
πŸ‡« Function –> ( PointAbsMmr, integer ) -> TripointAbsMmr
πŸ‡« Function –> ( integer, integer, integer ) -> TripointAbsMmr

TripointAbsMs

Members

new

πŸ‡« Function –> ( ) -> TripointAbsMs
πŸ‡« Function –> ( Tripoint ) -> TripointAbsMs
πŸ‡« Function –> ( Point, integer ) -> TripointAbsMs
πŸ‡« Function –> ( PointAbsMs, integer ) -> TripointAbsMs
πŸ‡« Function –> ( integer, integer, integer ) -> TripointAbsMs

TripointAbsOm

Members

new

πŸ‡« Function –> ( ) -> TripointAbsOm
πŸ‡« Function –> ( Tripoint ) -> TripointAbsOm
πŸ‡« Function –> ( Point, integer ) -> TripointAbsOm
πŸ‡« Function –> ( PointAbsOm, integer ) -> TripointAbsOm
πŸ‡« Function –> ( integer, integer, integer ) -> TripointAbsOm

TripointAbsOmt

Members

new

πŸ‡« Function –> ( ) -> TripointAbsOmt
πŸ‡« Function –> ( Tripoint ) -> TripointAbsOmt
πŸ‡« Function –> ( Point, integer ) -> TripointAbsOmt
πŸ‡« Function –> ( PointAbsOmt, integer ) -> TripointAbsOmt
πŸ‡« Function –> ( integer, integer, integer ) -> TripointAbsOmt

TripointAbsSeg

Members

new

πŸ‡« Function –> ( ) -> TripointAbsSeg
πŸ‡« Function –> ( Tripoint ) -> TripointAbsSeg
πŸ‡« Function –> ( Point, integer ) -> TripointAbsSeg
πŸ‡« Function –> ( PointAbsSeg, integer ) -> TripointAbsSeg
πŸ‡« Function –> ( integer, integer, integer ) -> TripointAbsSeg

TripointAbsSm

Members

new

πŸ‡« Function –> ( ) -> TripointAbsSm
πŸ‡« Function –> ( Tripoint ) -> TripointAbsSm
πŸ‡« Function –> ( Point, integer ) -> TripointAbsSm
πŸ‡« Function –> ( PointAbsSm, integer ) -> TripointAbsSm
πŸ‡« Function –> ( integer, integer, integer ) -> TripointAbsSm

TripointBubMs

Members

new

πŸ‡« Function –> ( ) -> TripointBubMs
πŸ‡« Function –> ( Tripoint ) -> TripointBubMs
πŸ‡« Function –> ( Point, integer ) -> TripointBubMs
πŸ‡« Function –> ( PointBubMs, integer ) -> TripointBubMs
πŸ‡« Function –> ( integer, integer, integer ) -> TripointBubMs

TripointBubSm

Members

new

πŸ‡« Function –> ( ) -> TripointBubSm
πŸ‡« Function –> ( Tripoint ) -> TripointBubSm
πŸ‡« Function –> ( Point, integer ) -> TripointBubSm
πŸ‡« Function –> ( PointBubSm, integer ) -> TripointBubSm
πŸ‡« Function –> ( integer, integer, integer ) -> TripointBubSm

TripointMmrMs

Members

new

πŸ‡« Function –> ( ) -> TripointMmrMs
πŸ‡« Function –> ( Tripoint ) -> TripointMmrMs
πŸ‡« Function –> ( Point, integer ) -> TripointMmrMs
πŸ‡« Function –> ( PointMmrMs, integer ) -> TripointMmrMs
πŸ‡« Function –> ( integer, integer, integer ) -> TripointMmrMs

TripointMmrOmt

Members

new

πŸ‡« Function –> ( ) -> TripointMmrOmt
πŸ‡« Function –> ( Tripoint ) -> TripointMmrOmt
πŸ‡« Function –> ( Point, integer ) -> TripointMmrOmt
πŸ‡« Function –> ( PointMmrOmt, integer ) -> TripointMmrOmt
πŸ‡« Function –> ( integer, integer, integer ) -> TripointMmrOmt

TripointMmrSm

Members

new

πŸ‡« Function –> ( ) -> TripointMmrSm
πŸ‡« Function –> ( Tripoint ) -> TripointMmrSm
πŸ‡« Function –> ( Point, integer ) -> TripointMmrSm
πŸ‡« Function –> ( PointMmrSm, integer ) -> TripointMmrSm
πŸ‡« Function –> ( integer, integer, integer ) -> TripointMmrSm

TripointMntVeh

Members

new

πŸ‡« Function –> ( ) -> TripointMntVeh
πŸ‡« Function –> ( Tripoint ) -> TripointMntVeh
πŸ‡« Function –> ( Point, integer ) -> TripointMntVeh
πŸ‡« Function –> ( PointMntVeh, integer ) -> TripointMntVeh
πŸ‡« Function –> ( integer, integer, integer ) -> TripointMntVeh

TripointOmMmr

Members

new

πŸ‡« Function –> ( ) -> TripointOmMmr
πŸ‡« Function –> ( Tripoint ) -> TripointOmMmr
πŸ‡« Function –> ( Point, integer ) -> TripointOmMmr
πŸ‡« Function –> ( PointOmMmr, integer ) -> TripointOmMmr
πŸ‡« Function –> ( integer, integer, integer ) -> TripointOmMmr

TripointOmMs

Members

new

πŸ‡« Function –> ( ) -> TripointOmMs
πŸ‡« Function –> ( Tripoint ) -> TripointOmMs
πŸ‡« Function –> ( Point, integer ) -> TripointOmMs
πŸ‡« Function –> ( PointOmMs, integer ) -> TripointOmMs
πŸ‡« Function –> ( integer, integer, integer ) -> TripointOmMs

TripointOmOmt

Members

new

πŸ‡« Function –> ( ) -> TripointOmOmt
πŸ‡« Function –> ( Tripoint ) -> TripointOmOmt
πŸ‡« Function –> ( Point, integer ) -> TripointOmOmt
πŸ‡« Function –> ( PointOmOmt, integer ) -> TripointOmOmt
πŸ‡« Function –> ( integer, integer, integer ) -> TripointOmOmt

TripointOmSeg

Members

new

πŸ‡« Function –> ( ) -> TripointOmSeg
πŸ‡« Function –> ( Tripoint ) -> TripointOmSeg
πŸ‡« Function –> ( Point, integer ) -> TripointOmSeg
πŸ‡« Function –> ( PointOmSeg, integer ) -> TripointOmSeg
πŸ‡« Function –> ( integer, integer, integer ) -> TripointOmSeg

TripointOmSm

Members

new

πŸ‡« Function –> ( ) -> TripointOmSm
πŸ‡« Function –> ( Tripoint ) -> TripointOmSm
πŸ‡« Function –> ( Point, integer ) -> TripointOmSm
πŸ‡« Function –> ( PointOmSm, integer ) -> TripointOmSm
πŸ‡« Function –> ( integer, integer, integer ) -> TripointOmSm

TripointOmtMs

Members

new

πŸ‡« Function –> ( ) -> TripointOmtMs
πŸ‡« Function –> ( Tripoint ) -> TripointOmtMs
πŸ‡« Function –> ( Point, integer ) -> TripointOmtMs
πŸ‡« Function –> ( PointOmtMs, integer ) -> TripointOmtMs
πŸ‡« Function –> ( integer, integer, integer ) -> TripointOmtMs

TripointOmtSm

Members

new

πŸ‡« Function –> ( ) -> TripointOmtSm
πŸ‡« Function –> ( Tripoint ) -> TripointOmtSm
πŸ‡« Function –> ( Point, integer ) -> TripointOmtSm
πŸ‡« Function –> ( PointOmtSm, integer ) -> TripointOmtSm
πŸ‡« Function –> ( integer, integer, integer ) -> TripointOmtSm

TripointRelMmr

Members

new

πŸ‡« Function –> ( ) -> TripointRelMmr
πŸ‡« Function –> ( Tripoint ) -> TripointRelMmr
πŸ‡« Function –> ( Point, integer ) -> TripointRelMmr
πŸ‡« Function –> ( PointRelMmr, integer ) -> TripointRelMmr
πŸ‡« Function –> ( integer, integer, integer ) -> TripointRelMmr

TripointRelMs

Members

new

πŸ‡« Function –> ( ) -> TripointRelMs
πŸ‡« Function –> ( Tripoint ) -> TripointRelMs
πŸ‡« Function –> ( Point, integer ) -> TripointRelMs
πŸ‡« Function –> ( PointRelMs, integer ) -> TripointRelMs
πŸ‡« Function –> ( integer, integer, integer ) -> TripointRelMs

TripointRelOm

Members

new

πŸ‡« Function –> ( ) -> TripointRelOm
πŸ‡« Function –> ( Tripoint ) -> TripointRelOm
πŸ‡« Function –> ( Point, integer ) -> TripointRelOm
πŸ‡« Function –> ( PointRelOm, integer ) -> TripointRelOm
πŸ‡« Function –> ( integer, integer, integer ) -> TripointRelOm

TripointRelOmt

Members

new

πŸ‡« Function –> ( ) -> TripointRelOmt
πŸ‡« Function –> ( Tripoint ) -> TripointRelOmt
πŸ‡« Function –> ( Point, integer ) -> TripointRelOmt
πŸ‡« Function –> ( PointRelOmt, integer ) -> TripointRelOmt
πŸ‡« Function –> ( integer, integer, integer ) -> TripointRelOmt

TripointRelSeg

Members

new

πŸ‡« Function –> ( ) -> TripointRelSeg
πŸ‡« Function –> ( Tripoint ) -> TripointRelSeg
πŸ‡« Function –> ( Point, integer ) -> TripointRelSeg
πŸ‡« Function –> ( PointRelSeg, integer ) -> TripointRelSeg
πŸ‡« Function –> ( integer, integer, integer ) -> TripointRelSeg

TripointRelSm

Members

new

πŸ‡« Function –> ( ) -> TripointRelSm
πŸ‡« Function –> ( Tripoint ) -> TripointRelSm
πŸ‡« Function –> ( Point, integer ) -> TripointRelSm
πŸ‡« Function –> ( PointRelSm, integer ) -> TripointRelSm
πŸ‡« Function –> ( integer, integer, integer ) -> TripointRelSm

TripointRelVeh

Members

new

πŸ‡« Function –> ( ) -> TripointRelVeh
πŸ‡« Function –> ( Tripoint ) -> TripointRelVeh
πŸ‡« Function –> ( Point, integer ) -> TripointRelVeh
πŸ‡« Function –> ( PointRelVeh, integer ) -> TripointRelVeh
πŸ‡« Function –> ( integer, integer, integer ) -> TripointRelVeh

TripointSegMmr

Members

new

πŸ‡« Function –> ( ) -> TripointSegMmr
πŸ‡« Function –> ( Tripoint ) -> TripointSegMmr
πŸ‡« Function –> ( Point, integer ) -> TripointSegMmr
πŸ‡« Function –> ( PointSegMmr, integer ) -> TripointSegMmr
πŸ‡« Function –> ( integer, integer, integer ) -> TripointSegMmr

TripointSegMs

Members

new

πŸ‡« Function –> ( ) -> TripointSegMs
πŸ‡« Function –> ( Tripoint ) -> TripointSegMs
πŸ‡« Function –> ( Point, integer ) -> TripointSegMs
πŸ‡« Function –> ( PointSegMs, integer ) -> TripointSegMs
πŸ‡« Function –> ( integer, integer, integer ) -> TripointSegMs

TripointSegOmt

Members

new

πŸ‡« Function –> ( ) -> TripointSegOmt
πŸ‡« Function –> ( Tripoint ) -> TripointSegOmt
πŸ‡« Function –> ( Point, integer ) -> TripointSegOmt
πŸ‡« Function –> ( PointSegOmt, integer ) -> TripointSegOmt
πŸ‡« Function –> ( integer, integer, integer ) -> TripointSegOmt

TripointSegSm

Members

new

πŸ‡« Function –> ( ) -> TripointSegSm
πŸ‡« Function –> ( Tripoint ) -> TripointSegSm
πŸ‡« Function –> ( Point, integer ) -> TripointSegSm
πŸ‡« Function –> ( PointSegSm, integer ) -> TripointSegSm
πŸ‡« Function –> ( integer, integer, integer ) -> TripointSegSm

TripointSmMs

Members

new

πŸ‡« Function –> ( ) -> TripointSmMs
πŸ‡« Function –> ( Tripoint ) -> TripointSmMs
πŸ‡« Function –> ( Point, integer ) -> TripointSmMs
πŸ‡« Function –> ( PointSmMs, integer ) -> TripointSmMs
πŸ‡« Function –> ( integer, integer, integer ) -> TripointSmMs

ch_names

Members

generate

πŸ‡« Function –> ( boolean? ) -> string

Generates a random full name with an optional boolean for gender. The loaded name is one of usage with optional gender. The combinations used in names files are as follows: Backer | (Female|Male|Unisex) Given | (Female|Male) // unisex names are duplicated in each group Family | Unisex Nick City World

pick

πŸ‡« Function –> ( any ) -> string

Generates a single name using any combination of search flags.

const

Various game constants

Members

OMT_MS_SIZE

πŸ‡¨ Constant –> integer = 24

OMT_SM_SIZE

πŸ‡¨ Constant –> integer = 2

OM_MS_SIZE

πŸ‡¨ Constant –> integer = 4320

OM_OMT_SIZE

πŸ‡¨ Constant –> integer = 180

OM_SM_SIZE

πŸ‡¨ Constant –> integer = 360

SM_MS_SIZE

πŸ‡¨ Constant –> integer = 12

coords

Members

overmap_terrain_tiles

πŸ‡« Function –> ( ) -> PointCoord[]

Returns every map-square offset within one overmap terrain tile as PointCoord values.

overmap_tiles

πŸ‡« Function –> ( ) -> PointCoord[]

Returns every map-square offset within one overmap as PointCoord values.

point

πŸ‡« Function –> ( string, string, Point ) -> PointCoord
πŸ‡« Function –> ( string, string, integer, integer ) -> PointCoord

point_abs_mmr

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_abs_ms

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_abs_om

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_abs_omt

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_abs_seg

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_abs_sm

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_bub_ms

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_bub_sm

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_mmr_ms

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_mmr_omt

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_mmr_sm

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_mnt_veh

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_om_mmr

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_om_ms

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_om_omt

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_om_seg

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_om_sm

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_omt_ms

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_omt_sm

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_rel_mmr

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_rel_ms

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_rel_om

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_rel_omt

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_rel_seg

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_rel_sm

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_rel_veh

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_seg_mmr

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_seg_ms

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_seg_omt

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_seg_sm

πŸ‡« Function –> ( integer, integer ) -> PointCoord

point_sm_ms

πŸ‡« Function –> ( integer, integer ) -> PointCoord

project_combine

πŸ‡« Function –> ( coarse: any, fine: any ) -> nil | PointCoord | TripointCoord

Combines a coarse coordinate with a remainder from project_remain. Returns PointCoord or TripointCoord depending on the inputs, or nil if the pair is incompatible.

project_remain

πŸ‡« Function –> ( coord: any, scale: string ) -> (nil | PointCoord | TripointCoord, PointCoord?)

Splits a PointCoord or TripointCoord into a coarser coordinate plus a remainder. Point input returns PointCoord, PointCoord; tripoint input returns TripointCoord, PointCoord. Returns nil, nil if the split is not valid.

project_remain_mmr

πŸ‡« Function –> ( coord: any ) -> (nil | PointCoord | TripointCoord, PointCoord?)

Shortcut for project_remain(coord, "mmr").

project_remain_om

πŸ‡« Function –> ( coord: any ) -> (nil | PointCoord | TripointCoord, PointCoord?)

Shortcut for project_remain(coord, "om").

project_remain_omt

πŸ‡« Function –> ( coord: any ) -> (nil | PointCoord | TripointCoord, PointCoord?)

Shortcut for project_remain(coord, "omt").

project_remain_seg

πŸ‡« Function –> ( coord: any ) -> (nil | PointCoord | TripointCoord, PointCoord?)

Shortcut for project_remain(coord, "seg").

project_remain_sm

πŸ‡« Function –> ( coord: any ) -> (nil | PointCoord | TripointCoord, PointCoord?)

Shortcut for project_remain(coord, "sm").

project_to

πŸ‡« Function –> ( coord: any, scale: string ) -> nil | PointCoord | TripointCoord

Projects a PointCoord or TripointCoord to another scale, preserving its origin and point dimension. Returns nil if the conversion is not valid.

project_to_mmr

πŸ‡« Function –> ( coord: any ) -> nil | PointCoord | TripointCoord

Shortcut for project_to(coord, "mmr").

project_to_ms

πŸ‡« Function –> ( coord: any ) -> nil | PointCoord | TripointCoord

Shortcut for project_to(coord, "ms").

project_to_om

πŸ‡« Function –> ( coord: any ) -> nil | PointCoord | TripointCoord

Shortcut for project_to(coord, "om").

project_to_omt

πŸ‡« Function –> ( coord: any ) -> nil | PointCoord | TripointCoord

Shortcut for project_to(coord, "omt").

project_to_seg

πŸ‡« Function –> ( coord: any ) -> nil | PointCoord | TripointCoord

Shortcut for project_to(coord, "seg").

project_to_sm

πŸ‡« Function –> ( coord: any ) -> nil | PointCoord | TripointCoord

Shortcut for project_to(coord, "sm").

project_to_veh

πŸ‡« Function –> ( coord: any ) -> nil | PointCoord | TripointCoord

Shortcut for project_to(coord, "veh").

rl_dist

πŸ‡« Function –> ( lhs: Point, rhs: Point ) -> integer
πŸ‡« Function –> ( lhs: Tripoint, rhs: Tripoint ) -> integer
πŸ‡« Function –> ( lhs: PointCoord, rhs: PointCoord ) -> integer?
πŸ‡« Function –> ( lhs: TripointCoord, rhs: TripointCoord ) -> integer?

Rectilinear distance between two raw coordinates, or between two typed coordinates with matching origin and scale. Returns nil if the typed coordinates are incompatible.

square_dist

πŸ‡« Function –> ( lhs: Point, rhs: Point ) -> integer
πŸ‡« Function –> ( lhs: Tripoint, rhs: Tripoint ) -> integer
πŸ‡« Function –> ( lhs: PointCoord, rhs: PointCoord ) -> integer?
πŸ‡« Function –> ( lhs: TripointCoord, rhs: TripointCoord ) -> integer?

Chebyshev distance between two raw coordinates, or between two typed coordinates with matching origin and scale. Returns nil if the typed coordinates are incompatible.

submap_tiles

πŸ‡« Function –> ( ) -> PointCoord[]

Returns every map-square offset within one submap as PointCoord values.

trig_dist

πŸ‡« Function –> ( lhs: Point, rhs: Point ) -> number
πŸ‡« Function –> ( lhs: Tripoint, rhs: Tripoint ) -> number
πŸ‡« Function –> ( lhs: PointCoord, rhs: PointCoord ) -> number?
πŸ‡« Function –> ( lhs: TripointCoord, rhs: TripointCoord ) -> number?

Euclidean distance between two raw coordinates, or between two typed coordinates with matching origin and scale. Returns nil if the typed coordinates are incompatible.

tripoint

πŸ‡« Function –> ( string, string, Tripoint ) -> TripointCoord
πŸ‡« Function –> ( string, string, integer, integer, integer ) -> TripointCoord

tripoint_abs_mmr

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_abs_ms

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_abs_om

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_abs_omt

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_abs_seg

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_abs_sm

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_bub_ms

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_bub_sm

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_mmr_ms

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_mmr_omt

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_mmr_sm

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_mnt_veh

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_om_mmr

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_om_ms

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_om_omt

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_om_seg

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_om_sm

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_omt_ms

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_omt_sm

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_rel_mmr

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_rel_ms

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_rel_om

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_rel_omt

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_rel_seg

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_rel_sm

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_rel_veh

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_seg_mmr

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_seg_ms

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_seg_omt

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_seg_sm

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

tripoint_sm_ms

πŸ‡« Function –> ( integer, integer, integer ) -> TripointCoord

date_time

System date and time API.

Members

day

πŸ‡« Function –> ( ) -> integer

hour

πŸ‡« Function –> ( ) -> integer

0 -> 23

millisecond

πŸ‡« Function –> ( ) -> integer

minute

πŸ‡« Function –> ( ) -> integer

month

πŸ‡« Function –> ( ) -> integer

second

πŸ‡« Function –> ( ) -> integer

weekday

πŸ‡« Function –> ( ) -> integer

Days since Saturday.

weekday_str

πŸ‡« Function –> ( ) -> string

year

πŸ‡« Function –> ( ) -> integer

gapi

Global game methods

Members

abs_to_bub

πŸ‡« Function –> ( TripointAbsMs ) -> TripointBubMs
πŸ‡« Function –> ( TripointAbsSm ) -> TripointBubSm

add_msg

πŸ‡« Function –> ( MsgType, any )
πŸ‡« Function –> ( any )

add_npc_follower

πŸ‡« Function –> ( Npc )

add_on_every_x_hook

πŸ‡« Function –> ( TimeDuration, function )

Registers fn to run once every interval of game time.
fn receives no arguments. Return false from it to unregister it; any other return value keeps it registered.

before_time_starts

πŸ‡« Function –> ( ) -> TimePoint

bodytemp_cold

πŸ‡« Function –> ( ) -> integer

bodytemp_hot

πŸ‡« Function –> ( ) -> integer

bodytemp_norm

πŸ‡« Function –> ( ) -> integer

bub_to_abs

πŸ‡« Function –> ( TripointBubMs ) -> TripointAbsMs
πŸ‡« Function –> ( TripointBubSm ) -> TripointAbsSm

call_builtin_examine

πŸ‡« Function –> ( string, Player, TripointBubMs )

Run a built-in examine action at a position.

choose_adjacent

πŸ‡« Function –> ( string, boolean? ) -> TripointBubMs?

choose_adjacent_highlight

πŸ‡« Function –> ( string, string, ActionId, boolean? ) -> TripointBubMs?
πŸ‡« Function –> ( string, string, bool, boolean? ) -> TripointBubMs?

choose_adjacent_uilist

πŸ‡« Function –> ( string, string, function, function ) -> TripointBubMs?

choose_area

πŸ‡« Function –> ( string, TripointBubMs, boolean ) -> (TripointBubMs, TripointBubMs)?

choose_direction

πŸ‡« Function –> ( string, boolean? ) -> TripointRelMs?

clear_all_omt_weather_overrides

πŸ‡« Function –> ( )

Clear every active OMT weather override.

clear_omt_weather_override

πŸ‡« Function –> ( TripointAbsOmt, integer )

Clear weather overrides for all OMTs in a radius around center. Radius is in OMT tiles.

create_item

πŸ‡« Function –> ( ItypeId, integer ) -> Detached<Item>

Spawns a new item. Same as Item::spawn count sets the item’s charges, not the number of items: exactly one item is created. For stackable (count-by-charges) items such as ammo, count is the stack size. For non-stackable items, pass a negative value (e.g. -1), since a positive one is still applied as charges. Tools spawned with a negative value get their default charges.

current_turn

πŸ‡« Function –> ( ) -> TimePoint

delete_dimension

πŸ‡« Function –> ( dim_id: string ) -> boolean

Fully saves the game, then deletes an inactive, non-primary dimension from memory and save storage.

direction_from

πŸ‡« Function –> ( TripointCoord ) -> Direction

Get direction from a relative tripoint coordinate delta.

direction_name

πŸ‡« Function –> ( Direction ) -> string

Get direction name from direction enum

fling_creature

πŸ‡« Function –> ( Creature, Angle, number, boolean )

get_all_creatures

πŸ‡« Function –> ( ) -> table

Returns all active creatures as an array of Creature: the player first, then living NPCs, then living monsters.

get_all_monsters

πŸ‡« Function –> ( ) -> table

Returns all living active monsters as an array of Monster.

get_all_npcs

πŸ‡« Function –> ( ) -> table

Returns all living active NPCs as an array of Npc.

get_avatar

πŸ‡« Function –> ( ) -> Avatar

get_character_at

πŸ‡« Function –> ( TripointBubMs, boolean? ) -> Character
πŸ‡« Function –> ( Tripoint, boolean? ) -> Character

get_creature_at

πŸ‡« Function –> ( TripointBubMs, boolean? ) -> Creature
πŸ‡« Function –> ( Tripoint, boolean? ) -> Creature

get_current_dimension_id

πŸ‡« Function –> ( ) -> string

Returns the current dimension id. Empty string means the overworld.

get_distribution_grid_tracker

πŸ‡« Function –> ( ) -> DistributionGridTracker

get_items_if

πŸ‡« Function –> ( table ) -> table

Returns items on the map within a radius of a point, matching every given filter, as an array of Item.
Items inside containers on the ground are included.
Takes a table where each key is a filter; unknown keys show a debug message and are ignored. Available filters:

  • pos (Tripoint): Center point to search around.
  • radius (integer, optional): Search radius in tiles. Defaults to the pickup range.
  • category (string or string[]): Item category id is one of these, e.g. β€œfood”.
  • type (ItemTypeId or ItemTypeId[]): Item type is one of these.
  • is_food (boolean): Whether the item is food.
  • flags (FlagId or FlagId[]): Item has at least one of these flags.
  • need_charges (boolean): Tool items must have charges left.
  • has_charges (table): { id = ItemTypeId, amount = integer }: item type is id and has at least amount charges.
  • addiction_type (AddictionType, string, or array of those): Comestible’s addiction type is one of these, e.g. <code>[AddictionType](#sol::AddictionType)</code>.ALCOHOL or "alcohol".
  • material (MaterialTypeId, string, or array of those): Item is made of at least one of these materials, e.g. "stone".
    The worn and wielded filters only apply to <code>[Character](#sol::Character)</code>:get_items_if and are ignored here.

get_lua_log

πŸ‡« Function –> ( integer ) -> table

Get recent Lua console log entries. Returns array of { level=string, text=string, from_user=bool }.

get_map

πŸ‡« Function –> ( ) -> Map

get_messages

πŸ‡« Function –> ( integer ) -> table

Get recent player message log entries. Returns array of { time=string, text=string }.

get_monster_at

πŸ‡« Function –> ( TripointBubMs, boolean? ) -> Monster
πŸ‡« Function –> ( Tripoint, boolean? ) -> Monster

get_monsters_if

πŸ‡« Function –> ( table ) -> table

Returns active monsters matching every given filter as an array of Monster.
Takes a table where each key is a filter; unknown keys show a debug message and are ignored. Available filters:

  • type_ids (MonsterTypeId[]): Monster type is one of these.
  • faction_ids (MonsterFactionId[]): Monster faction is one of these.
  • species_ids (SpeciesTypeId[]): Monster has at least one of these species.
  • sees (Monster[]): At least one of these monsters can see it.
  • hostile_to (Monster[]): It is hostile to at least one of these monsters.
  • within_range_of (table): { range = number, monsters = Monster[] }. It is within range tiles of at least one of these monsters.
  • limit (integer): Stop searching once this many monsters have matched.

get_monsters_near_omt

πŸ‡« Function –> ( table ) -> table

Returns active monsters near an absolute overmap terrain tile as an array of Monster.
Takes a table with keys:

  • center (TripointAbsOmt): Overmap terrain tile to search around.
  • radius (integer, optional): Search radius in overmap terrain tiles. Defaults to 0.
  • ignore_z (boolean, optional): If true, matches every z-level. Defaults to false.

get_npc_at

πŸ‡« Function –> ( TripointBubMs, boolean? ) -> Npc
πŸ‡« Function –> ( Tripoint, boolean? ) -> Npc

get_npcs_near_omt

πŸ‡« Function –> ( table ) -> table

Returns active NPCs near an absolute overmap terrain tile as an array of Npc.
Takes a table with keys:

  • center (TripointAbsOmt): Overmap terrain tile to search around.
  • radius (integer, optional): Search radius in overmap terrain tiles. Defaults to 0.
  • ignore_z (boolean, optional): If true, matches every z-level. Defaults to false.

get_omt_weather_override

πŸ‡« Function –> ( TripointAbsOmt ) -> string?

Get the current OMT weather override at a location, or nil if none is set.

get_option

πŸ‡« Function –> ( string ) -> string

get_option_bool

πŸ‡« Function –> ( string ) -> boolean

get_option_float

πŸ‡« Function –> ( string ) -> number

get_option_int

πŸ‡« Function –> ( string ) -> integer

get_overmap_buffer

πŸ‡« Function –> ( ) -> OvermapBuffer

Get the global overmap buffer

get_player_pets

πŸ‡« Function –> ( ) -> table

Returns the player’s living active pet monsters as an array of Monster.

get_scenario

πŸ‡« Function –> ( ) -> ScenarioRaw

Returns the scenario the current game started with, or nil if no game is active.

get_simulated_npcs

πŸ‡« Function –> ( ) -> table

Returns living NPCs in simulated (fully loaded, AI-eligible) submaps as an array of Npc.

has_omt_weather_override

πŸ‡« Function –> ( TripointAbsOmt ) -> boolean

Returns true if an OMT weather override exists at the given location.

inv_map_splice

πŸ‡« Function –> ( table ) -> Item

Opens an item selection menu listing the player’s inventory and nearby items that pass a filter, and returns the chosen item or nil.
Takes a table with keys:

  • title (string): Menu title.
  • failure (string): Message shown when no item passes the filter.
  • check (function): Filter called with a table { item = Item }. Must return a boolean.
  • radius (integer, optional): Search radius for nearby items. Defaults to the pickup range.

inv_map_splice_if

πŸ‡« Function –> ( table ) -> Item

Opens an item selection menu listing the player’s inventory and nearby items that match the given filters, and returns the chosen item or nil.
Takes a table with keys:

  • title (string): Menu title.
  • failure (string): Message shown when no item passes the filter.
  • radius (integer, optional): Search radius for nearby items. Defaults to the pickup range.
  • plus any filter key accepted by gapi.get_items_if (e.g. category, type, is_food, flags, need_charges, has_charges, addiction_type, material).
    Containers whose contents match a filter are listed as well; the returned item is then the container itself.

light_ambient_lit

πŸ‡« Function –> ( ) -> number

look_around

πŸ‡« Function –> ( ) -> TripointBubMs?

map_inv_edit

πŸ‡« Function –> ( table )

Runs a function editing the player’s inventory and nearby items.
Takes a table with keys:

  • func (function): Editing function called with a table { item = Item }. Must return a boolean.
  • radius (integer, optional): Search radius for nearby items. Defaults to the pickup range.

place_monster_around

πŸ‡« Function –> ( MonsterTypeId, TripointBubMs, integer ) -> Monster
πŸ‡« Function –> ( MonsterTypeId, Tripoint, integer ) -> Monster

place_monster_at

πŸ‡« Function –> ( MonsterTypeId, TripointBubMs ) -> Monster
πŸ‡« Function –> ( MonsterTypeId, Tripoint ) -> Monster

place_player_dimension_at

πŸ‡« Function –> ( opts: DimensionTravelOptions ) -> boolean

Moves the player into another dimension and loads the destination around required target_ms or target_omt. Moves the player to a position in another dimension, creating the dimension if needed. Does nothing if the player is already in that dimension.
Returns false if the options are invalid or there is no safe landing spot.
OvermapTerrainLayout is string[][][].
Fields of DimensionTravelOptions:

  • dimension_id (string, optional): Target dimension id. Empty string means the overworld.
  • target_ms (TripointAbsMs, optional): Absolute map-square destination. Required when target_omt is absent.
  • target_omt (TripointAbsOmt, optional): Absolute overmap-terrain destination. Required when target_ms is absent.
  • world_type (string, optional): World type for creating a new non-overworld dimension.
  • bounds_min_omt (TripointAbsOmt, optional): Inclusive pocket dimension minimum overmap-terrain bound.
  • bounds_max_omt (TripointAbsOmt, optional): Inclusive pocket dimension maximum overmap-terrain bound.
  • boundary_terrain (string, optional): Map terrain used outside pocket bounds.
  • boundary_overmap_terrain (string, optional): Overmap terrain used outside pocket bounds.
  • overmap_terrain (OvermapTerrainLayout, optional): Optional z/y/x table anchored at bounds_min_omt.
  • pregen_special_id (string, optional): Overmap special to force before loading the destination.
  • pregen_special_omt (TripointAbsOmt, optional): Overmap-terrain position for pregen_special_id; defaults to target_omt.

place_player_local_at

πŸ‡« Function –> ( TripointBubMs )

Teleports player to local coordinates within active map

place_player_overmap_at

πŸ‡« Function –> ( TripointAbsOmt )

Teleports player to absolute coordinate in overmap

play_ambient_variant_sound

πŸ‡« Function –> ( string, string, integer, SfxChannel, integer, number, integer )

play_variant_sound

πŸ‡« Function –> ( string, string, integer, boolean )
πŸ‡« Function –> ( string, string, integer, Angle, number, number, boolean )

register_action_menu_entry

πŸ‡« Function –> ( table )

Register a Lua-defined action menu entry in the in-game action menu.
Takes a table with keys:

  • id (string): Unique entry id. Registering the same id again replaces the old entry.
  • fn (function): Called with no arguments when the entry is selected.
  • name (string, optional): Displayed text. Defaults to id.
  • category (string, optional): Submenu to show the entry in. Defaults to misc. Built-in categories are look, interact, inventory, combat, craft, info, misc and debug; back places it in the top-level menu, and any other id adds a new submenu.
  • hotkey (string, optional): Key name for the entry’s hotkey.

remove_npc_follower

πŸ‡« Function –> ( Npc )

reset_dimension

πŸ‡« Function –> ( dim_id: string ) -> boolean

Fully saves the game, then deletes generated data for an inactive, non-primary dimension while keeping its loaded metadata.

rng

πŸ‡« Function –> ( integer, integer ) -> integer

send_event

πŸ‡« Function –> ( string )
πŸ‡« Function –> ( string, any )

Sends a game event by name so statistics, achievements and the memorial keep working when the triggering logic is implemented in Lua.
Event names and their fields are the event_type values and event_spec fields listed in src/event.h.
The payload is a table keyed by the event’s field names (e.g. { character = who, itype = "marloss_berry" } for consumes_marloss_item), a bare Character-like object for events whose only field is character, or nil for events without fields.
character fields accept a Character-like object, a character_id, or an integer id; bool fields take a Lua boolean; int fields take an integer; every other field takes a string (an integer is converted to its string form) that must be a valid value for the field, e.g. an existing item id.
Unknown event names, unknown, missing or invalid fields raise Lua errors and send nothing. game_start and game_over are sent only by the game. Events can do more than feed statistics, achievements and the memorial: some subscribers have gameplay effects (for example, player_levels_spell teaches the follow-up spells that leveling a spell grants), so send an event only when the action it describes actually happened.

set_omt_weather_override

πŸ‡« Function –> ( TripointAbsOmt, integer, string, TimePoint? )

Override weather for all OMTs in a radius around center. Radius is in OMT tiles. Optionally expires at a given time_point.

six_cardinal_directions

πŸ‡« Function –> ( ) -> TripointRelOmt[]

Get the six cardinal overmap-terrain direction offsets (N, S, E, W, Up, Down).

spawn_hallucination

πŸ‡« Function –> ( TripointBubMs ) -> boolean
πŸ‡« Function –> ( Tripoint ) -> boolean

trait_generation

πŸ‡« Function –> ( ) -> integer

Returns a counter that changes whenever the traits of a character may change: a mutation is gained or lost, or an enchantment grants or removes one.

turn_zero

πŸ‡« Function –> ( ) -> TimePoint

gdebug

Debugging and logging API.

Members

clear_lua_log

πŸ‡« Function –> ( )

debugmsg

πŸ‡« Function –> ( any )

log_error

πŸ‡« Function –> ( any )

log_info

πŸ‡« Function –> ( any )

log_warn

πŸ‡« Function –> ( any )

reload_lua_code

πŸ‡« Function –> ( )

save_game

πŸ‡« Function –> ( ) -> boolean

set_log_capacity

πŸ‡« Function –> ( integer )

hooks

Documentation for hooks

Members

on_character_death

πŸ‡« Function –> ( params: table )

Called when a character is dead.
The hook receives a table with keys:

on_character_display_skill_action

πŸ‡« Function –> ( params: table )

Called when a skill is confirmed on the character display (@) skill tab.
Set params.results.handled = true to prevent the default training toggle.
The hook receives a table with keys:

on_character_display_skill_info

πŸ‡« Function –> ( params: table )

Called when drawing skill info on the character display (@) skill tab.
Set params.results.text to append text below the regular skill description.
The hook receives a table with keys:

on_character_effect

πŸ‡« Function –> ( params: table )

Called when character is on the effect which has EFFECT_LUA_ON_TICK flag.
The hook receives a table with keys:

on_character_effect_added

πŸ‡« Function –> ( params: table )

Called when character gets the effect which has EFFECT_LUA_ON_ADDED flag.
The hook receives a table with keys:

on_character_effect_removed

πŸ‡« Function –> ( params: table )

Called when character loses the effect which has EFFECT_LUA_ON_REMOVED flag.
The hook receives a table with keys:

on_character_item_takeoff

πŸ‡« Function –> ( params: table )

Called after a character has taken off an item.
The hook receives a table with keys:

on_character_item_wear

πŸ‡« Function –> ( params: table )

Called after a character has put on an item.
The hook receives a table with keys:

on_character_reset_stats

πŸ‡« Function –> ( params: table )

Called when character stat gets reset.
The hook receives a table with keys:

on_character_try_move

πŸ‡« Function –> ( params: table )

Called after on_player_try_move or on_npc_try_move regardless of whether the specific hook vetoed.
All registered callbacks run; if any returns false, movement is blocked.
Return false to block the move.
The hook receives a table with keys:

on_character_try_takeoff

πŸ‡« Function –> ( params: table )

Called when a character tries to take off a worn item.
Return false to block taking off the item.
Set params.results.allowed = false and params.results.message (string), then return params.results to block it with a custom message.
Once a callback blocks, the remaining callbacks registered to this hook are not called.
The hook receives a table with keys:

on_character_try_wear

πŸ‡« Function –> ( params: table )

Called when a character tries to wear an item.
Return false to block wearing the item.
Set params.results.allowed = false and params.results.message (string), then return params.results to block it with a custom message.
Once a callback blocks, the remaining callbacks registered to this hook are not called.
The hook receives a table with keys:

on_character_wake_up

πŸ‡« Function –> ( params: table )

Called when a character wakes up from sleep.
The hook receives a table with keys:

on_control_npc

πŸ‡« Function –> ( params: table )

Called when the player swaps control to an npc.
The hook receives a table with keys:

  • npc (NPC): The NPC being controlled.

on_craft_result

πŸ‡« Function –> ( params: table )

Called when a craft is completed, and when the crafting menu builds a preview of the result.
The hook receives a table with keys:

  • crafter (Character)
  • craft (Item, nil in the crafting menu): The in-progress craft item
  • item (Item): The resulting item, or its contents if the result is a container
  • recipe (RecipeRaw)
  • batch_size (int)
  • hot_result (bool): True if the result is food and the recipe requires a heating tool (e.g. surface_heat)
  • dehydrated_result (bool): True if the result is food and the recipe requires a dehydrator or a charcoal smoker
  • crafting_menu (bool): True if called for the crafting menu preview

on_creature_attacked_by_character

πŸ‡« Function –> ( params: table )

Called after a character has attacked a creature in melee or hit it with a projectile.
The hook receives a table with keys:

on_creature_blocked

πŸ‡« Function –> ( params: table )

Called when a character successfully blocks.
The hook receives a table with keys:

on_creature_do_turn

πŸ‡« Function –> ( params: table )

Called every turn for each active creature, before it acts.
This is the base hook; on_monster_do_turn and on_npc_do_turn also trigger this.
The hook receives a table with keys:

on_creature_dodged

πŸ‡« Function –> ( params: table )

Called when a character or monster successfully dodges.
The hook receives a table with keys:

on_creature_loaded

πŸ‡« Function –> ( params: table )

Called when any creature is loaded onto the active map.
This is the base hook; on_monster_loaded and on_npc_loaded also trigger this.
The hook receives a table with keys:

on_creature_melee_attacked

πŸ‡« Function –> ( params: table )

Called after a character or monster has attacked in melee.
The hook receives a table with keys:

on_creature_performed_technique

πŸ‡« Function –> ( params: table )

Called when a character has performed a technique.
The hook receives a table with keys:

on_creature_spawn

πŸ‡« Function –> ( params: table )

Called when any creature is spawned for the first time.
This is the base hook; on_monster_spawn and on_npc_spawn also trigger this.
The hook receives a table with keys:

on_dialogue_end

πŸ‡« Function –> ( params: table )

Called when the dialogue window closes.
The hook receives a table with keys:

  • npc (NPC): The NPC speaking

on_dialogue_option

πŸ‡« Function –> ( params: table )

Called when a dialogue option is selected.
Return a new talk_topic id to add it as the next topic.
The hook receives a table with keys:

  • npc (NPC): The NPC speaking
  • next_topic (string): The topic that was selected

on_dialogue_start

πŸ‡« Function –> ( params: table )

Called just before the dialogue window opens and the first topic is chosen.
Return a new talk_topic id to add it as the next topic.
The hook receives a table with keys:

  • npc (NPC): The NPC speaking
  • next_topic (string): The topic that will be shown first

on_elevator_try_use

πŸ‡« Function –> ( params: table )

Called before the player uses elevator controls.
All registered callbacks run; if any returns false, elevator use is blocked.
Return false to block elevator use.
The hook receives a table with keys:

  • player (Player)
  • pos (TripointBubMs)
  • om_terrain (string)

on_every_x

πŸ‡« Function –> ( )

Called every in-game period.
Not registered through game.add_hook; use gapi.add_on_every_x_hook( interval, fn ) instead.
The callback receives no arguments. Return false to unregister it.

on_explosion_start

πŸ‡« Function –> ( params: table )

Called when an explosion starts.
The hook receives a table with keys:

  • pos (TripointBubMs)
  • damage (int)
  • radius (int)
  • fire (bool)

on_game_load

πŸ‡« Function –> ( )

Called right after game has loaded.

on_game_save

πŸ‡« Function –> ( )

Called when game is about to save.

on_game_started

πŸ‡« Function –> ( )

Called when the game has first started.

on_make_mapgen_factory_list

πŸ‡« Function –> ( params: table )

Called when checking which mapgen ids are used, during mapgen consistency checks.
Insert mapgen ids that are only used from Lua to suppress the β€œnot used by anything” error.
The hook receives a table with keys:

  • results (set of string): The mapgen ids that are in use

on_mapgen_postprocess

πŸ‡« Function –> ( params: table )

Called right after mapgen has completed.
The hook receives a table with keys:

  • map (MapgenConstructor): The OMT-local mapgen surface.
  • omt (TripointAbsOmt): The absolute overmap terrain position.
  • when (TimePoint): The current time (for time-based effects).

on_mission_end

πŸ‡« Function –> ( params: table )

Called right after mission has ended.
The hook receives a table with keys:

  • mission_type (mission_type): The type of the mission.
  • mission (mission): The mission instance.
  • success (bool): Successful if true else failed.

on_mission_start

πŸ‡« Function –> ( params: table )

Called right after mission has started.
The hook receives a table with keys:

  • mission_type (mission_type): The type of the mission.
  • mission (mission): The mission instance.

on_mon_death

πŸ‡« Function –> ( params: table )

Called when a monster is dead.
The hook receives a table with keys:

on_mon_effect

πŸ‡« Function –> ( params: table )

Called when character is on the effect which has EFFECT_LUA_ON_TICK flag.
The hook receives a table with keys:

on_mon_effect_added

πŸ‡« Function –> ( params: table )

Called when monster gets the effect which has EFFECT_LUA_ON_ADDED flag.
The hook receives a table with keys:

on_mon_effect_removed

πŸ‡« Function –> ( params: table )

Called when monster loses the effect which has EFFECT_LUA_ON_REMOVED flag.
The hook receives a table with keys:

on_monster_do_turn

πŸ‡« Function –> ( params: table )

Called every turn for each active monster, before it acts.
Also triggers on_creature_do_turn.
The hook receives a table with keys:

on_monster_examine_menu_entry

πŸ‡« Function –> ( params: table )

Called when an entry is selected in the examine menu of a pet monster.
The hook receives a table with keys:

  • avatar (Avatar)
  • monster (Monster)
  • entry (string): The selected entry id, either built-in or a menu_id added by on_monster_get_examine_menu_entries

on_monster_get_examine_menu_entries

πŸ‡« Function –> ( params: table )

Called when building the examine menu of a pet monster.
Return an array of tables with menu_id (string) and menu_label (string) to add menu entries.
The hook receives a table with keys:

on_monster_loaded

πŸ‡« Function –> ( params: table )

Called when a monster is loaded onto the active map.
Also triggers on_creature_loaded.
The hook receives a table with keys:

on_monster_spawn

πŸ‡« Function –> ( params: table )

Called when a monster is spawned for the first time.
Also triggers on_creature_spawn.
Note: monsters spawned via mapgen submap spawn points will fire this hook,
but monsters materialized from overmap monster groups may not.
The hook receives a table with keys:

on_monster_tame

πŸ‡« Function –> ( params: table )

Called when a monster is tamed by a character.
The hook receives a table with keys:

on_monster_try_move

πŸ‡« Function –> ( params: table )

Called when a monster attempts to move.
All registered callbacks run; if any returns false, movement is blocked.
Return false to block the move.
The hook receives a table with keys:

  • monster (Monster)
  • from (TripointBubMs)
  • to (TripointBubMs)
  • force (bool): If the monster move call was forced

on_npc_do_turn

πŸ‡« Function –> ( params: table )

Called every turn for each simulated NPC, before it acts.
Also triggers on_creature_do_turn.
The hook receives a table with keys:

on_npc_interaction

πŸ‡« Function –> ( params: table )

Called when the player interacts with an NPC.
The hook receives a table with keys:

  • npc (NPC): The NPC being interacted with

on_npc_loaded

πŸ‡« Function –> ( params: table )

Called when an NPC is loaded onto the active map.
Also triggers on_creature_loaded.
The hook receives a table with keys:

on_npc_spawn

πŸ‡« Function –> ( params: table )

Called when an NPC is spawned for the first time.
Also triggers on_creature_spawn.
The hook receives a table with keys:

on_npc_try_move

πŸ‡« Function –> ( params: table )

Called when an NPC attempts to move.
All registered callbacks run; if any returns false, movement is blocked.
Return false to block the move.
The hook receives a table with keys:

  • npc (Npc)
  • from (TripointBubMs)
  • to (TripointBubMs)
  • movement_mode (CharacterMoveMode)
  • via_ramp (bool)
  • mounted (bool)
  • mount (Creature, if mounted)

on_player_try_move

πŸ‡« Function –> ( params: table )

Called when the player attempts to move.
All registered callbacks run; if any returns false, movement is blocked.
Return false to block the move.
The hook receives a table with keys:

on_shoot

πŸ‡« Function –> ( params: table )

Called when shot(s) is fired from a gun.
The hook receives a table with keys:

  • shooter (Character)
  • target_pos (TripointBubMs)
  • shots (int)
  • gun (item)
  • ammo (item): For RELOAD_AND_SHOOT guns like a bow. On the others, it returns nil value.

on_spell_cast

πŸ‡« Function –> ( params: table )

Called after a spell has been cast.
The hook receives a table with keys:

on_spell_try_cast

πŸ‡« Function –> ( params: table )

Called when the player tries to cast a spell, before the casting activity starts.
Return false to block casting.
The hook receives a table with keys:

on_throw

πŸ‡« Function –> ( params: table )

Called when an item is thrown.
The hook receives a table with keys:

  • thrower (Character)
  • target_pos (TripointBubMs)
  • throw_from_pos (TripointBubMs)
  • thrown (item)

on_try_monster_interaction

πŸ‡« Function –> ( params: table )

Called when the player tries to interact with a monster.
Return false to prevent monster interaction actions from running.
The hook receives a table with keys:

  • monster (Monster): The monster being interacted with

on_try_npc_interaction

πŸ‡« Function –> ( params: table )

Called when the player tries to interact with an NPC.
Return false to prevent the npc interaction menu from appearing.
The hook receives a table with keys:

  • npc (NPC): The NPC being interacted with

on_weather_changed

πŸ‡« Function –> ( params: table )

Called when the weather has changed.
The hook receives a table with keys:

  • weather_id (string): Current weather ID
  • old_weather_id (string): Previous weather ID
  • temperature (float): Current temperature in Celsius
  • temperature_f (float): Current temperature in Fahrenheit
  • windspeed (float): Wind speed
  • winddirection (integer): Wind direction in degrees
  • humidity (float): Humidity percentage
  • pressure (float): Atmospheric pressure
  • is_sheltered (boolean): Whether player is sheltered

on_weather_updated

πŸ‡« Function –> ( params: table )

Called every 5 minutes when weather data is updated.
The hook receives a table with keys:

  • weather_id (string): Current weather ID
  • temperature (float): Current temperature in Celsius
  • temperature_f (float): Current temperature in Fahrenheit
  • windspeed (float): Wind speed
  • winddirection (integer): Wind direction in degrees
  • humidity (float): Humidity percentage
  • pressure (float): Atmospheric pressure
  • is_sheltered (boolean): Whether player is sheltered

locale

Localization API.

Members

gettext

πŸ‡« Function –> ( string ) -> string

Expects english source string, returns translated string.

pgettext

πŸ‡« Function –> ( string, string ) -> string

First is context string. Second is english source string.

vgettext

πŸ‡« Function –> ( string, string, integer ) -> string

First is english singular string, second is english plural string. Number is amount to translate for.

vpgettext

πŸ‡« Function –> ( string, string, string, integer ) -> string

First is context string. Second is english singular string. third is english plural. Number is amount to translate for.

monster_groups

Monster group definitions and helpers

Members

get_all

πŸ‡« Function –> ( ) -> MonsterGroupRaw[]

Get all monster group definitions.

get_all_ids

πŸ‡« Function –> ( ) -> MonsterGroupId[]

List all monster group ids currently loaded.

get_group

πŸ‡« Function –> ( MonsterGroupId ) -> MonsterGroupRaw

Get a monster group definition by id.

get_monsters_from_group

πŸ‡« Function –> ( MonsterGroupId ) -> MonsterTypeId[]

Get the monster ids directly listed in a group (default monster first).

monster_types

Monster type definitions and helpers

Members

get_all_ids

πŸ‡« Function –> ( ) -> MonsterTypeId[]

List all monster type ids currently loaded.

overmapbuffer

Global overmap buffer interface for finding and inspecting overmap terrain.

Members

add_grid_connection

πŸ‡« Function –> ( TripointAbsOmt, TripointAbsOmt ) -> boolean

Add an electric grid connection between two positions. Returns true on success.

check_ot

πŸ‡« Function –> ( string, OtMatchType, TripointAbsOmt ) -> boolean

Check if the terrain at the given position matches the type and match mode. Returns boolean.

create_horde

πŸ‡« Function –> ( table ) -> Mongroup

Create a monster horde at the given absolute OMT position. Returns nil if type or pos is missing.
Takes a table with keys:

  • type (MonsterGroupId or string): Monster group to spawn.
  • pos (TripointAbsOmt): Where to create the horde.
  • radius (integer, optional): Spread radius in submaps. Defaults to 1.
  • population (integer, optional): Number of monsters. Defaults to 100.
  • horde (boolean, optional): Whether the group moves as a horde. Defaults to true.
  • behaviour (string, optional): Horde behaviour: roam, city or nemesis. Defaults to roam.
  • diffuse (boolean, optional): If true, monster density doesn’t depend on distance from pos. Defaults to false.
  • target (TripointAbsOmt, optional): Initial movement target.

drain_fluid_grid_liquid_charges

πŸ‡« Function –> ( TripointAbsOmt, ItypeId, integer ) -> integer

Drain liquid charges from the fluid grid at the given TripointAbsOmt position. Returns the number removed.

electric_grid_at

πŸ‡« Function –> ( TripointAbsOmt ) -> TripointAbsOmt[]

Get all overmap tiles belonging to the electric grid at the given position. Returns TripointAbsOmt values.

electric_grid_connectivity_at

πŸ‡« Function –> ( TripointAbsOmt ) -> TripointRelOmt[]

Get all electric grid connections from the given position. Returns TripointRelOmt offsets.

find_all

πŸ‡« Function –> ( TripointAbsOmt, OmtFindParams ) -> TripointAbsOmt[]

Find all overmap terrain tiles matching the given parameters. Returns TripointAbsOmt values.

find_closest

πŸ‡« Function –> ( TripointAbsOmt, OmtFindParams ) -> TripointAbsOmt?

Find the closest overmap terrain tile matching the given parameters. Returns TripointAbsOmt or nil if not found.

find_random

πŸ‡« Function –> ( TripointAbsOmt, OmtFindParams ) -> TripointAbsOmt?

Find a random overmap terrain tile matching the given parameters. Returns TripointAbsOmt or nil if not found.

fluid_grid_at

πŸ‡« Function –> ( TripointAbsOmt ) -> TripointAbsOmt[]

Get all overmap tiles belonging to the fluid grid at the given TripointAbsOmt position. Returns TripointAbsOmt values.

fluid_grid_connectivity_at

πŸ‡« Function –> ( TripointAbsOmt ) -> TripointRelOmt[]

Get all fluid grid connections from the given TripointAbsOmt position. Returns TripointRelOmt offsets.

fluid_grid_liquid_charges_at

πŸ‡« Function –> ( TripointAbsOmt, ItypeId ) -> integer

Get the available charges of a liquid in the fluid grid at the given TripointAbsOmt position.

fluid_grid_would_contaminate

πŸ‡« Function –> ( TripointAbsOmt, ItypeId ) -> boolean

Check whether adding a liquid would contaminate the fluid grid at the given TripointAbsOmt position.

get_note

πŸ‡« Function –> ( TripointAbsOmt ) -> string?

Get a player note at the given position. Returns string or nil.

has_horde

πŸ‡« Function –> ( TripointAbsOmt ) -> boolean

Check if a horde is present at the given overmap tile.

horde_count

πŸ‡« Function –> ( TripointAbsOmt ) -> integer

Count hordes influencing the given overmap tile (absolute OMT coordinates).

horde_size

πŸ‡« Function –> ( TripointAbsOmt ) -> integer

Get the estimated size of the horde at the given overmap tile.

hordes_at

πŸ‡« Function –> ( TripointAbsOmt ) -> Mongroup[]

List hordes influencing the given overmap tile (absolute OMT coordinates).

is_explored

πŸ‡« Function –> ( TripointAbsOmt ) -> boolean

Check if the terrain at the given position has been explored by the player. Returns boolean.

monster_groups_at

πŸ‡« Function –> ( TripointAbsOmt ) -> Mongroup[]

List monster groups influencing the given overmap tile (absolute OMT coordinates).

move_hordes

πŸ‡« Function –> ( )

Advance horde movement across all loaded overmaps.

remove_grid_connection

πŸ‡« Function –> ( TripointAbsOmt, TripointAbsOmt ) -> boolean

Remove an electric grid connection between two positions. Returns true on success.

reveal

πŸ‡« Function –> ( TripointAbsOmt, integer, function? ) -> boolean

Reveal a square area around a TripointAbsOmt center on the overmap. Returns true if any new tiles were revealed. Optional filter callback receives oter_id and should return true to reveal that tile.

seen

πŸ‡« Function –> ( TripointAbsOmt ) -> boolean

Check if the terrain at the given position has been seen by the player. Returns boolean.

set_note

πŸ‡« Function –> ( TripointAbsOmt, string? )

Set a player note at the given position. Pass nil or empty string to clear.

set_seen

πŸ‡« Function –> ( TripointAbsOmt, boolean? )

Set the seen status of terrain at the given position.

signal_hordes

πŸ‡« Function –> ( TripointAbsSm, integer )

Signal nearby hordes toward an absolute submap position with the given strength.

ter

πŸ‡« Function –> ( TripointAbsOmt ) -> OterIntId

Get the overmap terrain type at the given position. Returns an oter_id.

requirements

Requirement definitions and lookup helpers.

Members

get

πŸ‡« Function –> ( string ) -> RequirementData?

Look up requirement_data by ID string. Returns nil if not found.

rgb_colors

RGB Color Getters.

Members

get_all_named_colors

πŸ‡« Function –> ( ) -> CppVal<std_unordered_map<RGBColor,std_basic_string<char>>>

Get RGBColor -> string mapping

get_random

πŸ‡« Function –> ( string ) -> (RGBColor, string)

Get random RGB Color from fuzzy match string

try_parse

πŸ‡« Function –> ( string ) -> RGBColor?

Get RGB Color from string

sidebar

Sidebar utility functions.

Members

clear_widgets

πŸ‡« Function –> ( )

Clear all registered Lua sidebar widgets.

get_layout_id

πŸ‡« Function –> ( ) -> string

Returns current sidebar layout id (e.g. classic, compact, labels).

register_widget

πŸ‡« Function –> ( table )

Register a Lua sidebar widget.
Takes a table with keys:

  • id (string): Unique widget id.
  • draw (function): draw(width, height) returns an array of lines. Each line is a string or a table { text = string, color = Color|string }. text may include color tags like <color_red>text for multi-color lines.
  • name (string, optional): Name shown in the sidebar options. Defaults to id.
  • height (integer, optional): Height in lines. Use -2 to fill the remaining space. Defaults to 1.
  • order (integer, optional): 1-based position in the sidebar.
  • default_toggle (boolean, optional): Whether the widget is enabled by default. Defaults to true.
  • redraw_every_frame (boolean, optional): Redraw on every frame instead of only on sidebar refresh. Defaults to false.
  • panel_visible (boolean or function, optional): Whether to show the widget. A function is called with no arguments and should return a boolean.
  • render (function, optional): Visibility check used when panel_visible is not a function. Called with no arguments; return false to hide the widget.

tests_lib

Library for testing purposes

Members

my_awesome_lambda_1

πŸ‡« Function –> ( ) -> integer

my_awesome_lambda_2

πŸ‡« Function –> ( ) -> integer