/datum/mutantrace

Vars | |
AH | The mutant's own appearanceholder, modified to suit our target appearance |
---|---|
aquatic | ignores suffocation from being underwater + moves at full speed underwater |
can_walk_on_shards | Should they be able to walk on shards barefoot |
clothing_icon_states | list of the icon states for each icon file, put here because for some ungodly reason icon_states() can take 200ms randomly |
clothing_icons | icon definitions for mutantrace clothing variants. one icon file per slot. |
color_channel_names | List of 0 to 3 strings representing the names for the color channels used in the character creator. For vanilla humans (or HAS_HUMAN_HAIR) this is list("Bottom Detail", "Mid Detail", "Top Detail"). |
detail_1_icon | These details will show up layered just in front of the mob's skin The image to be inserted into the mob's appearanceholder's mob_detail_1 |
detail_oversuit_1_icon | These details will show up layered between the backpack and the outer suit The image to be inserted into the mob's appearanceholder's mob_oversuit_1 Will only show up if the mob's appearance flag includes HAS_O |
dna_mutagen_banned | Should stable mutagen not copy from this mutant? |
exclusive_language | if TRUE, only understood by others of this mutantrace |
eye_icon | The icon used to render their eyes |
eye_offset | affects pixel_y of eyes if they're different from normal head-placement. darn anime monkey eyes If 0, it inherits that of the head offset. Otherwise, it applies as normal So, it should typically be something like head_offset +/- a few pixels |
eye_state | The state used to render their eyes |
genetics_removable | Should a genetics terminal be able to remove this mutantrace? |
human_compatible | if TRUE, allows human diseases and dna injectors to affect this mutantrace |
icon | This is used for static icons if the mutant isn't built from pieces For chunked mutantraces this must still point to a valid full-body image to generate a staticky sprite for ghostdrones. |
icon_states | The icon states of the above icon, cached because byond is bad |
ignore_missing_limbs | Replace both arms regardless of mob status (new and dispose). |
jerk | Should robots arrest these by default? |
leg_offset | affects pixel_y of the legs and stump, in case the mutant has a non-human length torsocrotch |
mutant_appearance_flags | |
mutant_folder | The icon of the head, body, and limbs we're using |
mutant_organs | Swaps out the entries in the mob's organ_holder with these (hopefully) organs Format: ("entry_in_organholder's_organlist", /obj/item/organ/path) |
mutant_organs_f | If our mutant has a female variant that has different organs, these will be used instead |
override_eyes | The mutant's original appearanceholder, from before they were a mutant, to restore their old appearance |
override_limb_icons | If true, normal limbs use custom icons for this mutantrace |
race_mutation | The mutation associted with the mutantrace. Saurian genetics for lizards, for instance |
special_hair_1_color | Which preference entry to colorize this from. CUST_1 to use the appearanceholder's custom_first_color, and so on. Make null for just "#FFFFFF" |
special_hair_1_icon | Special Hair is anything additional that's supposed to be stuck to the mob's head Can be anything, honestly. Used for lizard head things and cow horns Will only show up if the mob's appearance flag includes HAS_SPECIAL_HAIR |
special_hair_1_icon_f | The "_f" vars are applied for female variants, if the appearance flags don't have NOT_DIMORPHIC |
special_hair_1_layer | Which layer should this hair appear? Defaults to the normal hair-layer |
special_hair_1_state | State to be used. Human hairstyles must be defined by their icon state, not hairstyle name! |
special_hair_2_icon | The image to be inserted into the mob's appearanceholder's customization_second |
special_hair_3_icon | The image to be inserted into the mob's appearanceholder's customization_third |
special_head | If the mutant uses a non-human head, this'll tell the head builder which head to build |
special_head_f | If our mutant has a female variant, it'll use this head instead |
special_head_state | The icon_state of the head we're using |
special_head_state_f | If our mutant has a female variant, it'll use this head image instead |
typeinfo_type | mutant races: cheap way to add new "types" of mobs |
uses_human_clothes | if FALSE, can only wear clothes if listed in /obj/item/clothing/var/compatible_species |
voice_message | overrides normal voice message if defined (and others don't understand us, ofc) |
Procs | |
MakeMutantDimorphic | Copies over female variants of mutant heads and organs |
MutateMutant | Applies or removes the bioeffect associated with the mutantrace |
load_clothing_icons | Load all the clothing override icons, should call parent AFTER populating clothing_icons |
onDeath | Called when our mob dies. Returning a true value will short circuit the normal death proc right before deathgasp/headspider/etc Rturn values are [MUTRACE_ONDEATH_NOTHING], [MUTRACE_ONDEATH_REVIVED], [MUTRACE_ONDEATH_DEFER_DELETE] etc. |
on_attach | For calling of procs when a mob is given a mutant race, to avoid issues with abstract representation in on_attach() |
organ_mutator | ARMS LEGS HEAD LEGS HEAD |
Var Details
AH

The mutant's own appearanceholder, modified to suit our target appearance
aquatic

ignores suffocation from being underwater + moves at full speed underwater
can_walk_on_shards

Should they be able to walk on shards barefoot
clothing_icon_states

list of the icon states for each icon file, put here because for some ungodly reason icon_states()
can take 200ms randomly
clothing_icons

icon definitions for mutantrace clothing variants. one icon file per slot.
color_channel_names

List of 0 to 3 strings representing the names for the color channels used in the character creator. For vanilla humans (or HAS_HUMAN_HAIR) this is list("Bottom Detail", "Mid Detail", "Top Detail").
detail_1_icon

These details will show up layered just in front of the mob's skin The image to be inserted into the mob's appearanceholder's mob_detail_1
detail_oversuit_1_icon

These details will show up layered between the backpack and the outer suit The image to be inserted into the mob's appearanceholder's mob_oversuit_1 Will only show up if the mob's appearance flag includes HAS_O
dna_mutagen_banned

Should stable mutagen not copy from this mutant?
exclusive_language

if TRUE, only understood by others of this mutantrace
eye_icon

The icon used to render their eyes
eye_offset

affects pixel_y of eyes if they're different from normal head-placement. darn anime monkey eyes If 0, it inherits that of the head offset. Otherwise, it applies as normal So, it should typically be something like head_offset +/- a few pixels
eye_state

The state used to render their eyes
genetics_removable

Should a genetics terminal be able to remove this mutantrace?
human_compatible

if TRUE, allows human diseases and dna injectors to affect this mutantrace
icon

This is used for static icons if the mutant isn't built from pieces For chunked mutantraces this must still point to a valid full-body image to generate a staticky sprite for ghostdrones.
icon_states

The icon states of the above icon, cached because byond is bad
ignore_missing_limbs

Replace both arms regardless of mob status (new and dispose).
jerk

Should robots arrest these by default?
leg_offset

affects pixel_y of the legs and stump, in case the mutant has a non-human length torsocrotch
mutant_appearance_flags

-
Mutant Appearance Flags - used to modify how the mob is drawn
-
For a purely static-icon mutantrace (drawn from a single, non-chunked image), use:
-
(NOT_DIMORPHIC | HAS_NO_SKINTONE | HAS_NO_EYES | HAS_NO_HEAD | USES_STATIC_ICON)
-
NOT_DIMORPHIC tells the sprite builder not to use any female sprites or vars. If you remove this, make sure there's a chest_f and groin_f in the mutant's DMI!
-
HAS_NO_SKINTONE, HAS_NO_EYES, HAS_NO_HEAD each prevent the renderer from trying to colorize the player's body or apply hair / eyes. They tend to be baked in.
-
USES_STATIC_IMAGE tells the renderer to skip most of the body-sprite assembly stuff, since our sprite is already fully assembled
-
To make a dismemberable mutant, here's an example from lizard:
-
(NOT_DIMORPHIC | HAS_HUMAN_EYES | BUILT_FROM_PIECES | HAS_EXTRA_DETAILS | FIX_COLORS | SKINTONE_USES_PREF_COLOR_1 | HAS_SPECIAL_HAIR)
-
SKINTONE_USES_PREF_COLOR_1 tells the renderer that the skintone will come from the appearanceholder's first customization color
-
HAS_HUMAN_EYES tells the head builder to render their eyes
-
HAS_EXTRA_DETAILS tells the sprite builder to apply whatever's defined in their mob_detail_1 vars to their sprite
-
FIX_COLORS clamps the RGB values of the customization colors betwen 50 and 190. Keeps them from getting too dark or oversaturated
-
HAS_SPECIAL_HAIR tells the hair renderer to display the sprites stored iin the head's special hair, which can be defined here (through the appearanceholder)
-
BUILT_FROM_PIECES is important, it tells the renderer to assemble the mutant from a set of separate pieces, like a human
-
this allows them to apppear to be missing limbs when dismembered. Check out lizard.dmi for an example of how it should be set up.
-
SEE: appearance.dm for more flags and details!
-
mutant_folder

The icon of the head, body, and limbs we're using
mutant_organs

Swaps out the entries in the mob's organ_holder with these (hopefully) organs Format: ("entry_in_organholder's_organlist", /obj/item/organ/path)
mutant_organs_f

If our mutant has a female variant that has different organs, these will be used instead
override_eyes

The mutant's original appearanceholder, from before they were a mutant, to restore their old appearance
override_limb_icons

If true, normal limbs use custom icons for this mutantrace
race_mutation

The mutation associted with the mutantrace. Saurian genetics for lizards, for instance
special_hair_1_color

Which preference entry to colorize this from. CUST_1 to use the appearanceholder's custom_first_color, and so on. Make null for just "#FFFFFF"
special_hair_1_icon

Special Hair is anything additional that's supposed to be stuck to the mob's head Can be anything, honestly. Used for lizard head things and cow horns Will only show up if the mob's appearance flag includes HAS_SPECIAL_HAIR
special_hair_1_icon_f

The "_f" vars are applied for female variants, if the appearance flags don't have NOT_DIMORPHIC
special_hair_1_layer

Which layer should this hair appear? Defaults to the normal hair-layer
special_hair_1_state

State to be used. Human hairstyles must be defined by their icon state, not hairstyle name!
special_hair_2_icon

The image to be inserted into the mob's appearanceholder's customization_second
special_hair_3_icon

The image to be inserted into the mob's appearanceholder's customization_third
special_head

If the mutant uses a non-human head, this'll tell the head builder which head to build
special_head_f

If our mutant has a female variant, it'll use this head instead
special_head_state

The icon_state of the head we're using
special_head_state_f

If our mutant has a female variant, it'll use this head image instead
typeinfo_type

mutant races: cheap way to add new "types" of mobs
uses_human_clothes

if FALSE, can only wear clothes if listed in /obj/item/clothing/var/compatible_species
voice_message

overrides normal voice message if defined (and others don't understand us, ofc)
Proc Details
MakeMutantDimorphic
Copies over female variants of mutant heads and organs
MutateMutant
Applies or removes the bioeffect associated with the mutantrace
load_clothing_icons
Load all the clothing override icons, should call parent AFTER populating clothing_icons
onDeath
Called when our mob dies. Returning a true value will short circuit the normal death proc right before deathgasp/headspider/etc Rturn values are [MUTRACE_ONDEATH_NOTHING], [MUTRACE_ONDEATH_REVIVED], [MUTRACE_ONDEATH_DEFER_DELETE] etc.
on_attach
For calling of procs when a mob is given a mutant race, to avoid issues with abstract representation in on_attach()
organ_mutator
ARMS LEGS HEAD LEGS HEAD