species datum
Datum that handles different species in the game.
This datum handles species in the game, such as lizardpeople, mothmen, zombies, skeletons, etc. It is used in carbon humans to determine various things about them, like their food preferences, if they have biological genders, their damage resistances, and more.
Vars | |
armor | Percentage modifier for overall defense of the race, or less defense, if it's negative. |
---|---|
ass_image | For custom overrides for species ass images |
bodypart_overrides | The bodyparts this species uses. assoc of bodypart string - bodypart type. Make sure all the fucking entries are in or I'll skin you alive. |
bodytemp_autorecovery_min | Minimum amount of kelvin moved toward normal body temperature per tick. |
bodytemp_normal | The natural body temperature to adjust towards |
bodytype | A bitfield of "bodytypes", updated by /datum/obj/item/bodypart/proc/synchronize_bodytypes() |
breathid | What gas does this species breathe? Used by suffocation screen alerts, most of actual gas breathing is handled by mutantlungs. See [life.dm][code/modules/mob/living/carbon/human/life.dm] |
brutemod | multiplier for brute damage |
burnmod | multiplier for burn damage |
changesource_flags | Bitflag that controls what in game ways something can select this species as a spawnable source, such as magic mirrors. See mob defines for possible sources. |
coldmod | multiplier for damage from cold temperature |
cosmetic_organs | List of cosmetic organs to generate like horns, frills, wings, etc. list(typepath of organ = "Round Beautiful BDSM Snout"). Still WIP |
digitigrade_customization | Never, Optional, or Forced digi legs? |
disliked_food | Bitfield for food types that the species dislikes, giving them disgust. Humans hate raw food, for example. |
dust_anim | What anim to use for dusting |
examine_limb_id | This is used for children, it will determine their default limb ID for use of examine. See [/mob/living/carbon/human/proc/examine]. |
exotic_blood | If your race bleeds something other than bog standard blood, change this to reagent id. For example, ethereals bleed liquid electricity. |
fallback_clothing_path | If this species needs special 'fallback' sprites, what is the path to the file that contains them? |
family_heirlooms | List of family heirlooms this species can get with the family heirloom quirk. List of types. |
fire_overlay | The icon_state of the fire overlay added when sufficently ablaze and standing. see onfire.dmi |
fixed_mut_color | To use MUTCOLOR with a fixed color that's independent of the mcolor feature in DNA. |
fly | The actual flying ability given to flying species |
flying_species | Is this species a flying species? Used as an easy check for some things |
gib_anim | What anim to use for gibbing |
grab_sound | Special sound for grabbing |
hair_alpha | The alpha used by the hair. 255 is completely solid, 0 is invisible. |
hair_color | This allows races to have specific hair colors. If null, it uses the H's hair/facial hair colors. If "mutcolor", it uses the H's mutant_color. If "fixedmutcolor", it uses fixedmutcolor |
has_innate_wings | Used to determine what description to give when using a potion of flight, if false it will describe them as growing new wings |
heatmod | multiplier for damage from hot temperature |
id | If the game needs to manually check your race to do something not included in a proc here, it will use this. |
inert_mutation | Special mutation that can be found in the genepool exclusively in this species. Dont leave empty or changing species will be a headache |
inherent_biotypes | List of biotypes the mob belongs to. Used by diseases. |
inherent_factions | List of factions the mob gain upon gaining this species. |
inherent_traits | Generic traits tied to having the species. |
job_outfit_type | Used for picking outfits in _job.dm |
knife_butcher_results | List of results you get from knife-butchering. null means you cant butcher it. Associated by resulting type - value of amount |
liked_food | Bitfield for food types that the species likes, giving them a mood boost. Lizards like meat, for example. |
max_bodypart_count | The maximum number of bodyparts this species can have. |
meat | What the species drops when gibbed by a gibber machine. |
mutant_bodyparts | DEPRECATED: Now only handles legs. |
mutant_organs | Internal organs that are unique to this race, like a tail. |
mutanthands | Forces an item into this species' hands. Only an honorary mutantthing because this is not an organ and not loaded in the same way, you've been warned to do your research. |
name | This is the fluff name. They are displayed on health analyzers and in the character setup menu. Must be \improper . |
no_equip | Inventory slots the race can't equip stuff to. Golems cannot wear jumpsuits, for example. |
nojumpsuit | Allows the species to equip items that normally require a jumpsuit without having one equipped. Used by golems. |
offset_features | Clothing offsets. If a species has a different body than other species, you can offset clothing so they look less weird. |
organs | A template for what organs this species should have. Assign null to simply exclude spawning with one. |
outfit_important_for_life | A path to an outfit that is important for species life e.g. plasmaman outfit |
pain_emotes | A list of weighted lists to pain emotes. The list with the LOWEST damage requirement needs to be first. |
plural_form | The formatting of the name of the species in plural context. Defaults to "[name]\s" if unset. Ex "[Plasmamen] are weak", "[Mothmen] are strong", "[Lizardpeople] don't like", "[Golems] hate" |
preload | Should we preload this species's organs? |
prevent_perspective_change | Do we try to prevent reset_perspective() from working? Useful for Dullahans to stop perspective changes when they're looking through their head. |
reagent_flags | How are we treated regarding processing reagents, by default we process them as if we're organic |
robotic_bodyparts | Robotic bodyparts for preference selection |
roundstart_changed | Was the species changed from its original type at the start of the round? |
say_mod | Affects the speech message, for example: Motharula flutters, "My speech message is flutters!" |
scream_verb | Affects the species' screams, for example: "Motharula buzzes!" |
sexes | Whether or not the race has sexual characteristics (biological genders). At the moment this is only FALSE for skeletons and shadows |
siemens_coeff | Base electrocution coefficient. Basically a multiplier for damage from electrocutions. |
skinned_type | What skin the species drops when gibbed by a gibber machine. |
special_step_sounds | Sounds to override barefeet walking |
species_cookie | Unique cookie given by admins through prayers |
species_eye_path | Icon file used for eyes, defaults to 'icons/mob/human_face.dmi' if not set |
species_language_holder | What languages this species can understand and say. Use a language holder datum in this var. |
species_mob_size | The [/mob/living/var/mob_size] of members of this species. |
species_traits | Species-only traits. Can be found in code/__DEFINES/DNA.dm |
speedmod | Multiplier for the race's speed. Positive numbers make it move slower, negative numbers make it move faster. |
stunmod | multiplier for stun durations |
toxic_food | Bitfield for food types that the species absolutely hates, giving them even more disgust than disliked food. Meat is "toxic" to moths, for example. |
use_skintones | Does the species use skintones or not? As of now only used by humans. |
Procs | |
body_temperature_alerts | Used to set alerts and debuffs based on body temperature vars: |
body_temperature_core | Used to stabilize the core temperature back to normal on living mobs |
body_temperature_damage | Used to apply wounds and damage based on core/body temp vars: |
body_temperature_skin | Used to normalize the skin temperature on living mobs |
check_roundstart_eligible | Checks if a species is eligible to be picked at roundstart. |
copy_properties_from | Copies some vars and properties over that should be kept when creating a copy of this species. |
create_fresh_body | Creates body parts for the target completely from scratch based on the species |
create_pref_biotypes_perks | Adds adds any perks related to the species' inherent_biotypes flags. |
create_pref_blood_perks | Adds adds any perks related to the species' blood (or lack thereof). |
create_pref_damage_perks | Adds adds any perks related to sustaining damage. For example, brute damage vulnerability, or fire damage resistance. |
create_pref_language_perk | Adds in a language perk based on all the languages the species can speak by default (according to their language holder). |
create_pref_temperature_perks | Adds adds any perks related to how the species deals with temperature. |
create_pref_traits_perks | Adds adds any perks related to the species' inherent_traits list. |
create_pref_unique_perks | Used to add any species specific perks to the perk list. |
get_constant_data | Generates nested lists of constant data for UIs. |
get_features | Returns a list of strings representing features this species has. Used by the preferences UI to know what buttons to show. |
get_innate_languages | Returns a list of each language we know innately. |
get_perk_data | Perks of varying types. (Postives, neutrals, and negatives) in the format of a list of lists. Used in the preference menu. |
get_random_blood_type | Returns a random blood type for this species |
get_scream_sound | Returns the species's scream sound. |
get_species_description | Gets a short description for the specices. Should be relatively succinct. Used in the preference menu. |
get_species_diet | Translate the species liked foods from bitfields into strings and returns it in the form of an associated list. |
get_species_lore | Gets the lore behind the type of species. Can be long. Used in the preference menu. |
give_important_for_life | Equip the outfit required for life. Replaces items currently worn. |
go_bald | Makes the target human bald. |
handle_body | Handles the body of a human |
handle_body_temperature | Body temperature handler for species |
handle_environment | Environment handler for species |
handle_environment_pressure | Handle the air pressure of the environment |
handle_radiation | Species based handling for irradiation |
harm | This proc handles punching damage. |
on_owner_login | Owner login |
on_species_gain | Proc called when a carbon becomes this species. |
on_species_loss | Proc called when a carbon is no longer this species. |
pre_equip_species_outfit | Equips the necessary species-relevant gear before putting on the rest of the uniform. |
prepare_human_for_preview | Given a human, will adjust it before taking a picture for the preferences UI. This should create a CONSISTENT result, so the icons don't randomly change. |
random_name | Generates a random name for a carbon. |
randomize_active_underwear | Proc that will randomise the underwear (i.e. top, pants and socks) of a species' associated mob |
randomize_main_appearance_element | Proc that will randomise the hair, or primary appearance element (i.e. for moths wings) of a species' associated mob |
regenerate_organs | Corrects organs in a carbon, removing ones it doesn't need and adding ones it does. |
replace_body | Handles replacing all of the bodyparts with their species version during set_species() |
Var Details
armor
Percentage modifier for overall defense of the race, or less defense, if it's negative.
ass_image
For custom overrides for species ass images
bodypart_overrides
The bodyparts this species uses. assoc of bodypart string - bodypart type. Make sure all the fucking entries are in or I'll skin you alive.
bodytemp_autorecovery_min
Minimum amount of kelvin moved toward normal body temperature per tick.
bodytemp_normal
The natural body temperature to adjust towards
bodytype
A bitfield of "bodytypes", updated by /datum/obj/item/bodypart/proc/synchronize_bodytypes()
breathid
What gas does this species breathe? Used by suffocation screen alerts, most of actual gas breathing is handled by mutantlungs. See [life.dm][code/modules/mob/living/carbon/human/life.dm]
brutemod
multiplier for brute damage
burnmod
multiplier for burn damage
changesource_flags
Bitflag that controls what in game ways something can select this species as a spawnable source, such as magic mirrors. See mob defines for possible sources.
coldmod
multiplier for damage from cold temperature
cosmetic_organs
List of cosmetic organs to generate like horns, frills, wings, etc. list(typepath of organ = "Round Beautiful BDSM Snout"). Still WIP
digitigrade_customization
Never, Optional, or Forced digi legs?
disliked_food
Bitfield for food types that the species dislikes, giving them disgust. Humans hate raw food, for example.
dust_anim
What anim to use for dusting
examine_limb_id
This is used for children, it will determine their default limb ID for use of examine. See [/mob/living/carbon/human/proc/examine].
exotic_blood
If your race bleeds something other than bog standard blood, change this to reagent id. For example, ethereals bleed liquid electricity.
fallback_clothing_path
If this species needs special 'fallback' sprites, what is the path to the file that contains them?
family_heirlooms
List of family heirlooms this species can get with the family heirloom quirk. List of types.
fire_overlay
The icon_state of the fire overlay added when sufficently ablaze and standing. see onfire.dmi
fixed_mut_color
To use MUTCOLOR with a fixed color that's independent of the mcolor feature in DNA.
fly
The actual flying ability given to flying species
flying_species
Is this species a flying species? Used as an easy check for some things
gib_anim
What anim to use for gibbing
grab_sound
Special sound for grabbing
hair_alpha
The alpha used by the hair. 255 is completely solid, 0 is invisible.
hair_color
This allows races to have specific hair colors. If null, it uses the H's hair/facial hair colors. If "mutcolor", it uses the H's mutant_color. If "fixedmutcolor", it uses fixedmutcolor
has_innate_wings
Used to determine what description to give when using a potion of flight, if false it will describe them as growing new wings
heatmod
multiplier for damage from hot temperature
id
If the game needs to manually check your race to do something not included in a proc here, it will use this.
inert_mutation
Special mutation that can be found in the genepool exclusively in this species. Dont leave empty or changing species will be a headache
inherent_biotypes
List of biotypes the mob belongs to. Used by diseases.
inherent_factions
List of factions the mob gain upon gaining this species.
inherent_traits
Generic traits tied to having the species.
job_outfit_type
Used for picking outfits in _job.dm
knife_butcher_results
List of results you get from knife-butchering. null means you cant butcher it. Associated by resulting type - value of amount
liked_food
Bitfield for food types that the species likes, giving them a mood boost. Lizards like meat, for example.
max_bodypart_count
The maximum number of bodyparts this species can have.
meat
What the species drops when gibbed by a gibber machine.
mutant_bodyparts
DEPRECATED: Now only handles legs.
mutant_organs
Internal organs that are unique to this race, like a tail.
mutanthands
Forces an item into this species' hands. Only an honorary mutantthing because this is not an organ and not loaded in the same way, you've been warned to do your research.
name
This is the fluff name. They are displayed on health analyzers and in the character setup menu. Must be \improper
.
no_equip
Inventory slots the race can't equip stuff to. Golems cannot wear jumpsuits, for example.
nojumpsuit
Allows the species to equip items that normally require a jumpsuit without having one equipped. Used by golems.
offset_features
Clothing offsets. If a species has a different body than other species, you can offset clothing so they look less weird.
organs
A template for what organs this species should have. Assign null to simply exclude spawning with one.
outfit_important_for_life
A path to an outfit that is important for species life e.g. plasmaman outfit
pain_emotes
A list of weighted lists to pain emotes. The list with the LOWEST damage requirement needs to be first.
plural_form
The formatting of the name of the species in plural context. Defaults to "[name]\s" if unset. Ex "[Plasmamen] are weak", "[Mothmen] are strong", "[Lizardpeople] don't like", "[Golems] hate"
preload
Should we preload this species's organs?
prevent_perspective_change
Do we try to prevent reset_perspective() from working? Useful for Dullahans to stop perspective changes when they're looking through their head.
reagent_flags
How are we treated regarding processing reagents, by default we process them as if we're organic
robotic_bodyparts
Robotic bodyparts for preference selection
roundstart_changed
Was the species changed from its original type at the start of the round?
say_mod
Affects the speech message, for example: Motharula flutters, "My speech message is flutters!"
scream_verb
Affects the species' screams, for example: "Motharula buzzes!"
sexes
Whether or not the race has sexual characteristics (biological genders). At the moment this is only FALSE for skeletons and shadows
siemens_coeff
Base electrocution coefficient. Basically a multiplier for damage from electrocutions.
skinned_type
What skin the species drops when gibbed by a gibber machine.
special_step_sounds
Sounds to override barefeet walking
species_cookie
Unique cookie given by admins through prayers
species_eye_path
Icon file used for eyes, defaults to 'icons/mob/human_face.dmi' if not set
species_language_holder
What languages this species can understand and say. Use a language holder datum in this var.
species_mob_size
The [/mob/living/var/mob_size] of members of this species.
species_traits
Species-only traits. Can be found in code/__DEFINES/DNA.dm
speedmod
Multiplier for the race's speed. Positive numbers make it move slower, negative numbers make it move faster.
stunmod
multiplier for stun durations
toxic_food
Bitfield for food types that the species absolutely hates, giving them even more disgust than disliked food. Meat is "toxic" to moths, for example.
use_skintones
Does the species use skintones or not? As of now only used by humans.
Proc Details
body_temperature_alerts
Used to set alerts and debuffs based on body temperature vars:
- humi (required) The mob we will targeting
body_temperature_core
Used to stabilize the core temperature back to normal on living mobs
The metabolisim heats up the core of the mob trying to keep it at the normal body temp vars:
- humi (required) The mob we will stabilize
body_temperature_damage
Used to apply wounds and damage based on core/body temp vars:
- humi (required) The mob we will targeting
body_temperature_skin
Used to normalize the skin temperature on living mobs
The core temp effects the skin, then the enviroment effects the skin, then we refect that back to the core. This happens even when dead so bodies revert to room temp over time. vars:
- humi (required) The mob we will targeting
- delta_time: The amount of time that is considered as elapsing
- times_fired: The number of times SSmobs has fired
check_roundstart_eligible
Checks if a species is eligible to be picked at roundstart.
Checks the config to see if this species is allowed to be picked in the character setup menu. Used by /proc/generate_selectable_species.
copy_properties_from
Copies some vars and properties over that should be kept when creating a copy of this species.
Used by slimepeople to copy themselves, and by the DNA datum to hardset DNA to a species Arguments:
- old_species - The species that the carbon used to be before copying
create_fresh_body
Creates body parts for the target completely from scratch based on the species
create_pref_biotypes_perks
Adds adds any perks related to the species' inherent_biotypes flags.
Returns a list containing perks, or an empty list.
create_pref_blood_perks
Adds adds any perks related to the species' blood (or lack thereof).
Returns a list containing perks, or an empty list.
create_pref_damage_perks
Adds adds any perks related to sustaining damage. For example, brute damage vulnerability, or fire damage resistance.
Returns a list containing perks, or an empty list.
create_pref_language_perk
Adds in a language perk based on all the languages the species can speak by default (according to their language holder).
Returns a list containing perks, or an empty list.
create_pref_temperature_perks
Adds adds any perks related to how the species deals with temperature.
Returns a list containing perks, or an empty list.
create_pref_traits_perks
Adds adds any perks related to the species' inherent_traits list.
Returns a list containing perks, or an empty list.
create_pref_unique_perks
Used to add any species specific perks to the perk list.
Returns null by default. When overriding, return a list of perks.
get_constant_data
Generates nested lists of constant data for UIs.
get_features
Returns a list of strings representing features this species has. Used by the preferences UI to know what buttons to show.
get_innate_languages
Returns a list of each language we know innately.
get_perk_data
Perks of varying types. (Postives, neutrals, and negatives) in the format of a list of lists. Used in the preference menu.
"Perk" format is as followed: list( SPECIES_PERK_TYPE = type of perk (postiive, negative, neutral - use the defines) SPECIES_PERK_ICON = icon used, unused due to no longer being on tgui prefs SPECIES_PERK_NAME = name of the perk on hover SPECIES_PERK_DESC = description of the perk on hover )
Returns a list of lists. The outer list is an assoc list of [perk type]s to a list of perks. The innter list is a list of perks. Can be empty, but won't be null.
get_random_blood_type
Returns a random blood type for this species
get_scream_sound
Returns the species's scream sound.
get_species_description
Gets a short description for the specices. Should be relatively succinct. Used in the preference menu.
Returns a string.
get_species_diet
Translate the species liked foods from bitfields into strings and returns it in the form of an associated list.
Returns a list, or null if they have no diet.
get_species_lore
Gets the lore behind the type of species. Can be long. Used in the preference menu.
Returns a list of strings. Between each entry in the list, a newline will be inserted, for formatting.
give_important_for_life
Equip the outfit required for life. Replaces items currently worn.
go_bald
Makes the target human bald.
Arguments:
- target: The mob to make go bald.
handle_body
Handles the body of a human
Handles lipstick, having no eyes, eye color, undergarnments like underwear, undershirts, and socks, and body layers. Calls [handle_mutant_bodyparts][/datum/species/proc/handle_mutant_bodyparts] Arguments:
- species_human - Human, whoever we're handling the body for
handle_body_temperature
Body temperature handler for species
These procs manage body temp, bamage, and alerts Some of these will still fire when not alive to balance body temp to the room temp. vars:
- humi (required)(type: /mob/living/carbon/human) The mob we will target
handle_environment
Environment handler for species
vars:
- environment (required) The environment gas mix
- humi (required)(type: /mob/living/carbon/human) The mob we will target
handle_environment_pressure
Handle the air pressure of the environment
handle_radiation
Species based handling for irradiation
Arguments:
- source: The mob requesting handling
- time_since_irradiated: The amount of time since the mob was first irradiated
- delta_time: The amount of time that has passed since the last tick
harm
This proc handles punching damage.
on_owner_login
Owner login
A simple proc to be overwritten if something needs to be done when a mob logs in. Does nothing by default.
Arguments:
- owner - The owner of our species.
on_species_gain
Proc called when a carbon becomes this species.
This sets up and adds/changes/removes things, qualities, abilities, and traits so that the transformation is as smooth and bugfree as possible. Produces a COMSIG_SPECIES_GAIN signal. Arguments:
- C - Carbon, this is whoever became the new species.
- old_species - The species that the carbon used to be before becoming this race, used for regenerating organs.
- pref_load - Preferences to be loaded from character setup, loads in preferred mutant things like bodyparts, digilegs, skin color, etc.
on_species_loss
Proc called when a carbon is no longer this species.
This sets up and adds/changes/removes things, qualities, abilities, and traits so that the transformation is as smooth and bugfree as possible. Produces a COMSIG_SPECIES_LOSS signal. Arguments:
- C - Carbon, this is whoever lost this species.
- new_species - The new species that the carbon became, used for genetics mutations.
- pref_load - Preferences to be loaded from character setup, loads in preferred mutant things like bodyparts, digilegs, skin color, etc.
pre_equip_species_outfit
Equips the necessary species-relevant gear before putting on the rest of the uniform.
prepare_human_for_preview
Given a human, will adjust it before taking a picture for the preferences UI. This should create a CONSISTENT result, so the icons don't randomly change.
random_name
Generates a random name for a carbon.
This generates a random unique name based on a human's species and gender. Arguments:
- gender - The gender that the name should adhere to. Use MALE for male names, use anything else for female names.
- unique - If true, ensures that this new name is not a duplicate of anyone else's name currently on the station.
- lastname - Does this species' naming system adhere to the last name system? Set to false if it doesn't.
randomize_active_underwear
Proc that will randomise the underwear (i.e. top, pants and socks) of a species' associated mob
randomize_main_appearance_element
Proc that will randomise the hair, or primary appearance element (i.e. for moths wings) of a species' associated mob
regenerate_organs
Corrects organs in a carbon, removing ones it doesn't need and adding ones it does.
Takes all organ slots, removes organs a species should not have, adds organs a species should have. can use replace_current to refresh all organs, creating an entirely new set.
Arguments:
- C - carbon, the owner of the species datum AKA whoever we're regenerating organs in
- old_species - datum, used when regenerate organs is called in a switching species to remove old mutant organs.
- replace_current - boolean, forces all old organs to get deleted whether or not they pass the species' ability to keep that organ
- excluded_zones - list, add zone defines to block organs inside of the zones from getting handled. see headless mutation for an example
- visual_only - boolean, only load organs that change how the species looks. Do not use for normal gameplay stuff
replace_body
Handles replacing all of the bodyparts with their species version during set_species()