byond - Modules - TypesVar Details - Proc Details

/datum/character_trait

Character traits. Similar to the traits from Project Zomboid.

Vars

applyableWhether the trait can be applied to mobs Do not forget to override this var for any child types Only set this to TRUE for "abstract" parent types
costThe point cost for the preferences menu
refresh_choicesRefreshes the character creation menu when picked
trait_groupTrait groups determine whether this trait can be applied to a given mob

Procs

apply_traitPut the actual changes made to the human mob in this proc
can_give_traitA function to check if the trait can be applied (prior to getting it)
give_traitGives the target the trait
try_give_traitPerforms the check for whether the trait is valid for target and then gives it to target
unapply_traitRevert character trait changes in this proc

Var Details

applyable

Whether the trait can be applied to mobs Do not forget to override this var for any child types Only set this to TRUE for "abstract" parent types

cost

The point cost for the preferences menu

refresh_choices

Refreshes the character creation menu when picked

trait_group

Trait groups determine whether this trait can be applied to a given mob

This var should always be set to the trait group's typepath

Proc Details

apply_trait

Put the actual changes made to the human mob in this proc

can_give_trait

A function to check if the trait can be applied (prior to getting it)

give_trait

Gives the target the trait

try_give_trait

Performs the check for whether the trait is valid for target and then gives it to target

unapply_trait

Revert character trait changes in this proc