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.

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>

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, TrapRaw )

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_known_trap

🇲 Method --> ( TripointBubMs, TrapIntId )

add_morale

🇲 Method --> ( MoraleTypeDataId, integer, integer, TimeDuration, TimeDuration, boolean, ItypeRaw )

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 with opts.type, opts.duration, optional opts.on_finish, optional opts.on_turn, optional opts.data, optional opts.pos, optional opts.name, and optional opts.interruptable.

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>

bodyweight

🇲 Method --> ( ) -> Mass

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_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 and an item with the given id and amount to the player inventory

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_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

Gets the current temperature of a specific body part (in Body Temperature Units).

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>

Gets all bodyparts and their associated temperatures (in Body Temperature Units).

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_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_power

🇲 Method --> ( ) -> boolean

has_trait_flag

🇲 Method --> ( JsonTraitFlagId ) -> 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_recipe

🇲 Method --> ( RecipeId ) -> boolean

knows_trap

🇲 Method --> ( TripointBubMs ) -> boolean

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

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 )

mutate_towards

🇲 Method --> ( MutationBranchId ) -> boolean

mutate_towards

🇲 Method --> ( MutationBranchId[], integer ) -> 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_mutation

🇲 Method --> ( MutationBranchId, boolean )

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 )

Sets a specific body part to a given temperature (in Body Temperature Units).

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 )

Sets ALL body parts on a creature to the given temperature (in Body Temperature Units).

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, bool ) -> Detached<Item>[]

use_charges_if_avail

🇲 Method --> ( ItypeId, 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

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 --> ( TripointAbsMs )

set_pos

🇲 Method --> ( TripointBubMs )

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 Lua table

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

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

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

Look up requirement_data by ID string. Returns nil if not found.
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?

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 --> integer

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

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.

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

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

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_item_with_id

🇲 Method --> ( ItypeId, integer )

Adds an item(s) to contents

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_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

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 )

Sets the ownership of this item to a faction

set_owner

🇲 Method --> ( Character )

Sets the ownership of this item to a character

set_range_bonus

🇲 Method --> ( integer )

set_ranged_damage_bonus

🇲 Method --> ( DamageInstance )

set_recoil_bonus

🇲 Method --> ( integer )

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

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

volume

🇲 Method --> ( boolean? ) -> Volume

Volume of the item. bool is whether it is integral_volume.

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>>

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>

min_str

🇻 Variable --> integer

phase

🇻 Variable --> Phase

properties

🇻 Variable --> table<string, string>

qualities

🇻 Variable --> table<QualityId, integer>

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. MtypeId 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(s) at a position on the map. 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 )

get_field_age_at

🇲 Method --> ( TripointBubMs, FieldTypeIntId ) -> TimeDuration

get_field_int_at

🇲 Method --> ( TripointBubMs, FieldTypeIntId ) -> integer

get_field_name_at

🇲 Method --> ( TripointBubMs, FieldTypeIntId ) -> string

get_furn_at

🇲 Method --> ( TripointBubMs ) -> FurnIntId

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_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_items_at

🇲 Method --> ( TripointBubMs ) -> boolean
🇲 Method --> ( Tripoint ) -> boolean

has_ter_flag_at

🇲 Method --> ( string, TripointBubMs ) -> boolean

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_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, PointBubMs, PointBubMs, boolean )

place_npc

🇲 Method --> ( PointBubMs, string ) -> Npc

Forcibly places an npc using a template at a position on the map. Returns the npc.

place_spawns

🇲 Method --> ( string, integer, PointBubMs, PointBubMs, 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, preserving origin tile by default. Pass an optional table with orientation (Angle or degrees), status, and locks to override spawn settings.

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_temperature

🇲 Method --> ( TripointBubMs, integer )

set_ter_at

🇲 Method --> ( TripointBubMs, TerIntId ) -> boolean

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

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

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.

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

unique_name

🇻 Variable --> string

add_detached_item

🇲 Method --> ( Detached<Item> )

add_faction_anger

🇲 Method --> ( string, integer )

add_item

🇲 Method --> ( Item )

attitude

🇲 Method --> ( Character ) -> MonsterAttitude

bash_at

🇲 Method --> ( TripointBubMs ) -> boolean
🇲 Method --> ( Tripoint ) -> boolean

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 --> ( )

climbs

🇲 Method --> ( ) -> boolean

digs

🇲 Method --> ( ) -> boolean

drop_items

🇲 Method --> ( TripointBubMs )

drop_items_here

🇲 Method --> ( )

flies

🇲 Method --> ( ) -> boolean

get_faction_anger

🇲 Method --> ( string ) -> integer

get_items

🇲 Method --> ( ) -> Item[]

get_type

🇲 Method --> ( ) -> MonsterTypeId

get_upgrade_time

🇲 Method --> ( ) -> integer

hasten_upgrade

🇲 Method --> ( )

heal

🇲 Method --> ( integer, boolean ) -> integer

is_wandering

🇲 Method --> ( ) -> 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

name

🇲 Method --> ( integer ) -> string

name_with_armor

🇲 Method --> ( ) -> string

refill_udders

🇲 Method --> ( )

remove_item

🇲 Method --> ( Item ) -> Detached<Item>

run_normal_ai_turn

🇲 Method --> ( )

set_attitude

🇲 Method --> ( MonsterAttitude )

set_hp

🇲 Method --> ( integer )

set_move_target

🇲 Method --> ( TripointBubMs )
🇲 Method --> ( Tripoint )

set_target

🇲 Method --> ( Creature )

spawn

🇲 Method --> ( TripointBubMs )

swims

🇲 Method --> ( ) -> boolean

try_reproduce

🇲 Method --> ( )

try_upgrade

🇲 Method --> ( boolean )

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

id

🇻 Variable --> MonsterTypeId

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 --> integer

bodytemp_min_btu

🇻 Variable --> integer

bodytemp_sleep_btu

🇻 Variable --> integer

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

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

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.

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

speed

🇻 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>

category

🇻 Variable --> string

difficulty

🇻 Variable --> integer

learn_by_disassembly

🇻 Variable --> table<SkillId, integer>

required_skills

🇻 Variable --> table<SkillId, integer>

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 --> ( ) -> CppVal<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>

get_effective_resist

🇲 Method --> ( DamageUnit ) -> number

get_resist

🇲 Method --> ( DamageType ) -> number

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 )

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.

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

Tinymap

Bases

  • Map

Constructors

No constructors.

Members

No members.

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

🇲 Method --> ( ) -> VitaminId

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

pos

🇲 Method --> ( ) -> TripointBubMs

Returns the vehicle origin tile in local map-square coordinates.

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_OPEN_MOVEMENT = 19
  • ACTION_TOGGLE_MAP_MEMORY = 20
  • ACTION_CENTER = 21
  • ACTION_SHIFT_N = 22
  • ACTION_SHIFT_NE = 23
  • ACTION_SHIFT_E = 24
  • ACTION_SHIFT_SE = 25
  • ACTION_SHIFT_S = 26
  • ACTION_SHIFT_SW = 27
  • ACTION_SHIFT_W = 28
  • ACTION_SHIFT_NW = 29
  • ACTION_OPEN = 30
  • ACTION_CLOSE = 31
  • ACTION_SMASH = 32
  • ACTION_EXAMINE = 33
  • ACTION_PICKUP = 34
  • ACTION_PICKUP_ALL = 35
  • ACTION_PICKUP_FEET = 36
  • ACTION_GRAB = 37
  • ACTION_HAUL = 38
  • ACTION_BUTCHER = 39
  • ACTION_CHAT = 40
  • ACTION_LOOK = 41
  • ACTION_PEEK = 42
  • ACTION_LIST_ITEMS = 43
  • ACTION_ZONES = 44
  • ACTION_LOOT = 45
  • ACTION_INVENTORY = 46
  • ACTION_ADVANCEDINV = 47
  • ACTION_COMPARE = 48
  • ACTION_ORGANIZE = 49
  • ACTION_USE = 50
  • ACTION_USE_WIELDED = 51
  • ACTION_WEAR = 52
  • ACTION_TAKE_OFF = 53
  • ACTION_EAT = 54
  • ACTION_OPEN_CONSUME = 55
  • ACTION_READ = 56
  • ACTION_WIELD = 57
  • ACTION_PICK_STYLE = 58
  • ACTION_RELOAD_ITEM = 59
  • ACTION_RELOAD_WEAPON = 60
  • ACTION_RELOAD_WIELDED = 61
  • ACTION_UNLOAD = 62
  • ACTION_UNLOAD_ALL = 63
  • ACTION_MEND = 64
  • ACTION_THROW = 65
  • ACTION_FIRE = 66
  • ACTION_FIRE_BURST = 67
  • ACTION_SELECT_FIRE_MODE = 68
  • ACTION_SELECT_DEFAULT_AMMO = 69
  • ACTION_CAST_SPELL = 70
  • ACTION_CAST_LAST_SPELL = 71
  • ACTION_DROP = 72
  • ACTION_DIR_DROP = 73
  • ACTION_BIONICS = 74
  • ACTION_MUTATIONS = 75
  • ACTION_SORT_ARMOR = 76
  • ACTION_AUTOATTACK = 77
  • ACTION_WAIT = 78
  • ACTION_CRAFT = 79
  • ACTION_RECRAFT = 80
  • ACTION_LONGCRAFT = 81
  • ACTION_CONSTRUCT = 82
  • ACTION_DISASSEMBLE = 83
  • ACTION_SALVAGE = 84
  • ACTION_SLEEP = 85
  • ACTION_CONTROL_VEHICLE = 86
  • ACTION_TOGGLE_AUTO_TRAVEL_MODE = 87
  • ACTION_TOGGLE_SAFEMODE = 88
  • ACTION_TOGGLE_AUTOSAFE = 89
  • ACTION_TOGGLE_THIEF_MODE = 90
  • ACTION_IGNORE_ENEMY = 91
  • ACTION_WHITELIST_ENEMY = 92
  • ACTION_SAVE = 93
  • ACTION_QUICKSAVE = 94
  • ACTION_QUICKLOAD = 95
  • ACTION_SUICIDE = 96
  • ACTION_PL_INFO = 97
  • ACTION_MAP = 98
  • ACTION_SKY = 99
  • ACTION_MISSIONS = 100
  • ACTION_SCORES = 101
  • ACTION_FACTIONS = 102
  • ACTION_MORALE = 103
  • ACTION_MESSAGES = 104
  • ACTION_OPEN_WIKI = 105
  • ACTION_OPEN_HHG = 106
  • ACTION_HELP = 107
  • ACTION_MAIN_MENU = 108
  • ACTION_DIARY = 109
  • ACTION_KEYBINDINGS = 110
  • ACTION_OPTIONS = 111
  • ACTION_AUTOPICKUP = 112
  • ACTION_AUTONOTES = 113
  • ACTION_SAFEMODE = 114
  • ACTION_COLOR = 115
  • ACTION_WORLD_MODS = 116
  • ACTION_DISTRACTION_MANAGER = 117
  • ACTION_TOGGLE_CHARACTER_PREVIEW_CLOTHES = 118
  • ACTION_TOGGLE_FULLSCREEN = 119
  • ACTION_DEBUG = 120
  • ACTION_LUA_CONSOLE = 121
  • ACTION_LUA_RELOAD = 122
  • ACTION_DISPLAY_SCENT = 123
  • ACTION_DISPLAY_SCENT_TYPE = 124
  • ACTION_TOGGLE_DEBUG_MODE = 125
  • ACTION_ZOOM_OUT = 126
  • ACTION_ZOOM_IN = 127
  • ACTION_ACTIONMENU = 128
  • ACTION_ITEMACTION = 129
  • ACTION_TOGGLE_PIXEL_MINIMAP = 130
  • ACTION_TOGGLE_PANEL_ADM = 131
  • ACTION_PANEL_MGMT = 132
  • ACTION_RELOAD_TILESET = 133
  • ACTION_TOGGLE_AUTO_FEATURES = 134
  • ACTION_TOGGLE_AUTO_PULP_BUTCHER = 135
  • ACTION_TOGGLE_AUTO_MINING = 136
  • ACTION_TOGGLE_AUTO_FORAGING = 137
  • ACTION_TOGGLE_AUTO_PICKUP = 138
  • ACTION_DISPLAY_TEMPERATURE = 139
  • ACTION_DISPLAY_VEHICLE_AI = 140
  • ACTION_DISPLAY_VISIBILITY = 141
  • ACTION_DISPLAY_LIGHTING = 142
  • ACTION_DISPLAY_RADIATION = 143
  • ACTION_DISPLAY_TRANSPARENCY = 144
  • ACTION_DISPLAY_OUTSIDE = 145
  • ACTION_DISPLAY_SUBMAP_GRID = 146
  • ACTION_DISPLAY_SOUND_ABSORPTION = 147
  • ACTION_DISPLAY_SOUND_WALLS = 148
  • ACTION_TOGGLE_ZONE_OVERLAY = 149
  • ACTION_DISPLAY_TILES_NO_VFX = 150
  • ACTION_TOGGLE_HOUR_TIMER = 151
  • ACTION_SWAP_TO_NPC = 152

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

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
  • BASHES = 11
  • DESTROYS = 12
  • BORES = 13
  • POISON = 14
  • VENOM = 15
  • BADVENOM = 16
  • PARALYZEVENOM = 17
  • BLEED = 18
  • WEBWALK = 19
  • DIGS = 20
  • CAN_DIG = 21
  • FLIES = 22
  • AQUATIC = 23
  • SWIMS = 24
  • ATTACKMON = 25
  • ANIMAL = 26
  • PLASTIC = 27
  • SUNDEATH = 28
  • ELECTRIC = 29
  • ACIDPROOF = 30
  • ACIDTRAIL = 31
  • SHORTACIDTRAIL = 32
  • FIREPROOF = 33
  • SLUDGEPROOF = 34
  • SLUDGETRAIL = 35
  • COLDPROOF = 36
  • BIOPROOF = 37
  • DARKPROOF = 38
  • LIGHTPROOF = 39
  • PSIPROOF = 40
  • FIREY = 41
  • QUEEN = 42
  • ELECTRONIC = 43
  • FUR = 44
  • LEATHER = 45
  • WOOL = 46
  • FEATHER = 47
  • BONES = 48
  • FAT = 49
  • CONSOLE_DESPAWN = 50
  • IMMOBILE = 51
  • STATIONARY = 52
  • ID_CARD_DESPAWN = 53
  • RIDEABLE_MECH = 54
  • CARD_OVERRIDE = 55
  • MILITARY_MECH = 56
  • MECH_RECON_VISION = 57
  • MECH_DEFENSIVE = 58
  • HIT_AND_RUN = 59
  • GUILT = 60
  • PAY_BOT = 61
  • HUMAN = 62
  • NO_BREATHE = 63
  • FLAMMABLE = 64
  • REVIVES = 65
  • CHITIN = 66
  • VERMIN = 67
  • NOGIB = 68
  • LARVA = 69
  • ARTHROPOD_BLOOD = 70
  • ACID_BLOOD = 71
  • BILE_BLOOD = 72
  • ABSORBS = 73
  • ABSORBS_SPLITS = 74
  • CBM_CIV = 75
  • CBM_POWER = 76
  • CBM_SCI = 77
  • CBM_OP = 78
  • CBM_TECH = 79
  • CBM_SUBS = 80
  • UNUSED_76 = 81
  • FISHABLE = 82
  • GROUP_BASH = 83
  • SWARMS = 84
  • GROUP_MORALE = 85
  • INTERIOR_AMMO = 86
  • CLIMBS = 87
  • PACIFIST = 88
  • PUSH_MON = 89
  • PUSH_VEH = 90
  • NIGHT_INVISIBILITY = 91
  • REVIVES_HEALTHY = 92
  • NO_NECRO = 93
  • PATH_AVOID_DANGER_1 = 94
  • PATH_AVOID_DANGER_2 = 95
  • PATH_AVOID_FIRE = 96
  • PATH_AVOID_FALL = 97
  • PRIORITIZE_TARGETS = 98
  • NOT_HALLUCINATION = 99
  • CANPLAY = 100
  • PET_MOUNTABLE = 101
  • PET_HARNESSABLE = 102
  • CAN_FETCH = 103
  • DOGFOOD = 104
  • MILKABLE = 105
  • SHEARABLE = 106
  • NO_BREED = 107
  • NO_FUNG_DMG = 108
  • PET_WONT_FOLLOW = 109
  • DRIPS_NAPALM = 110
  • DRIPS_GASOLINE = 111
  • ELECTRIC_FIELD = 112
  • LOUDMOVES = 113
  • CAN_OPEN_DOORS = 114
  • STUN_IMMUNE = 115
  • DROPS_AMMO = 116
  • CAN_BE_ORDERED = 117
  • SMALL_HEAD = 118
  • TINY_HEAD = 119
  • NO_HEAD_BONUS_CRIT = 120
  • HEAD_BONUS_CRIT_1 = 121
  • HEAD_BONUS_CRIT_2 = 122
  • TORSO_BONUS_CRIT_1 = 123
  • TORSO_BONUS_CRIT_2 = 124
  • PROJECTILE_RESISTANT_1 = 125
  • PROJECTILE_RESISTANT_2 = 126
  • PROJECTILE_RESISTANT_3 = 127
  • PROJECTILE_RESISTANT_4 = 128
  • VOLATILE = 129
  • CANT_CLONE = 130
  • MOUNTABLE_STAIRS = 131
  • MOUNTABLE_LADDER = 132
  • MOUNTABLE_OBSTACLES = 133
  • MOUNTABLE_DOORS = 134
  • MOUNTABLE_LEDGE = 135
  • FACTION_MEMORY = 136
  • COMBAT_MOUNT = 137
  • CANT_TRAIN = 138

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.

tinymap_tiles

🇫 Function --> ( ) -> PointCoord[]

Returns every map-square offset within the tinymap 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 --> ( TripointAbsSm ) -> TripointBubSm

abs_to_bub

🇫 Function --> ( TripointAbsMs ) -> TripointBubMs

add_msg

🇫 Function --> ( MsgType, any )
🇫 Function --> ( any )

add_npc_follower

🇫 Function --> ( Npc )

add_on_every_x_hook

🇫 Function --> ( TimeDuration, function )

before_time_starts

🇫 Function --> ( ) -> TimePoint

bodytemp_cold

🇫 Function --> ( ) -> integer

bodytemp_hot

🇫 Function --> ( ) -> integer

bodytemp_norm

🇫 Function --> ( ) -> integer

bub_to_abs

🇫 Function --> ( TripointBubMs ) -> TripointAbsMs

bub_to_abs

🇫 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?

create_item

🇫 Function --> ( ItypeId, integer ) -> Detached<Item>

Spawns a new item. Same as Item::spawn

current_turn

🇫 Function --> ( ) -> TimePoint

direction_from

🇫 Function --> ( TripointCoord ) -> Direction

Get direction from a relative tripoint coordinate delta.

direction_name

🇫 Function --> ( Direction ) -> string

Get direction name from direction enum

get_all_creatures

🇫 Function --> ( ) -> table

Returns all active creatures (monsters, NPCs, and the player) as a Lua array.

get_all_monsters

🇫 Function --> ( ) -> table

Returns all active monsters as a Lua array.

get_all_npcs

🇫 Function --> ( ) -> table

Returns all active NPCs as a Lua array.

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_distribution_grid_tracker

🇫 Function --> ( ) -> DistributionGridTracker

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_near_omt

🇫 Function --> ( table ) -> table

Returns active monsters near an absolute overmap terrain tile as a Lua array.
Takes a table with keys: center, radius, and optional ignore_z.

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 a Lua array.
Takes a table with keys: center, radius, and optional ignore_z.

get_overmap_buffer

🇫 Function --> ( ) -> OvermapBuffer

Get the global overmap buffer

get_player_pets

🇫 Function --> ( ) -> table

Get the player's pet monsters

get_simulated_npcs

🇫 Function --> ( ) -> table

Returns NPCs in simulated (fully loaded, AI-eligible) submaps as a Lua array.

light_ambient_lit

🇫 Function --> ( ) -> number

look_around

🇫 Function --> ( ) -> TripointBubMs?

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_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 )
🇫 Function --> ( string, string, integer, Angle, number, number )

register_action_menu_entry

🇫 Function --> ( table )

Register a Lua-defined action menu entry in the in-game action menu.

remove_npc_follower

🇫 Function --> ( Npc )

rng

🇫 Function --> ( integer, integer ) -> integer

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

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.
The hook receives a table with keys:

  • character (Character)
  • skill (SkillId)
    Set params.results.handled = true to prevent the default training toggle.

on_character_display_skill_info

🇫 Function --> ( params: table )

Called when drawing skill info on the character display (@) skill tab.
The hook receives a table with keys:

  • character (Character)
  • skill (SkillId)
    Set params.results.text to append text below the regular skill description.

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_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.
The hook receives a table with keys:

  • char (Character)
  • from (TripointBubMs)
  • to (TripointBubMs)
  • movement_mode (CharacterMoveMode)
  • via_ramp (bool)
  • mounted (bool)
  • mount (Creature, if mounted)
    Return false to block the move.

on_creature_blocked

🇫 Function --> ( params: table )

Called when a character successfully blocks.
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.
The hook receives a table with keys:

  • npc (NPC): The NPC speaking
  • next_topic (string): The topic that was selected
    Return a new talk_topic id to add it as the next topic.

on_dialogue_start

🇫 Function --> ( params: table )

Called just before the dialogue window opens and the first topic is chosen.
The hook receives a table with keys:

  • npc (NPC): The NPC speaking
  • next_topic (string): The topic that will be shown first
    Return a new talk_topic id to add it as the next topic.

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.
The hook receives a table with keys:

  • player (Player)
  • pos (TripointBubMs)
  • om_terrain (string)
    Return false to block elevator use.

on_every_x

🇫 Function --> ( table )

Called every in-game period

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_mapgen_postprocess

🇫 Function --> ( params: table )

Called right after mapgen has completed.
The hook receives a table with keys:

  • map (Map): The tinymap that represents 24x24 area (2x2 submaps, or 1x1 omt).
  • 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_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_try_move

🇫 Function --> ( params: table )

Called when a monster attempts to move.
All registered callbacks run; if any returns false, movement is blocked.
The hook receives a table with keys:

  • monster (Monster)
  • from (TripointBubMs)
  • to (TripointBubMs)
  • force (bool): If the monster move call was forced
    Return false to block the move.

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.
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)
    Return false to block the move.

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.
The hook receives a table with keys:

  • player (Player)
  • from (TripointBubMs)
  • to (TripointBubMs)
  • movement_mode (CharacterMoveMode)
  • via_ramp (bool)
  • mounted (bool)
  • mount (Creature, if mounted)
    Return false to block the move.

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_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.
The hook receives a table with keys:

  • monster (Monster): The monster being interacted with
    Return false to prevent monster interaction actions from running.

on_try_npc_interaction

🇫 Function --> ( params: table )

Called when the player tries to interact with an NPC.
The hook receives a table with keys:

  • npc (NPC): The NPC being interacted with
    Return false to prevent the npc interaction menu from appearing.

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. Pass a table with fields: type (mongroup_id, required), pos (TripointAbsOmt, required), radius (int), population (int), horde (bool), behaviour (string), diffuse (bool), target (TripointAbsOmt).

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.

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. Options: id(string), name(string), height(int, use -2 to fill remaining space), order(int, 1-based), draw(function), default_toggle(bool), redraw_every_frame(bool), panel_visible(bool|function), render(function). draw(width, height) returns an array of entries: each entry is string or table { text=string, color=Color|string }. text may include color tags like <color_red>text for multi-color lines.

tests_lib

Library for testing purposes

Members

my_awesome_lambda_1

🇫 Function --> ( ) -> integer

my_awesome_lambda_2

🇫 Function --> ( ) -> integer