Skip to content

Gene HediffComps

juanosarg edited this page Nov 7, 2022 · 1 revision

HediffCompProperties_CustomBlood is a comp class that copies the custom blood properties of Gene Extension so they can be used through a hediff

    public class HediffCompProperties_CustomBlood : HediffCompProperties
    {
        public ThingDef customBloodThingDef = null;
        public string customBloodIcon = "";
        public EffecterDef customBloodEffect = null;
        public FleshTypeDef customWoundsFromFleshtype = null;

        public HediffCompProperties_CustomBlood()
        {
            this.compClass = typeof(HediffComp_CustomBlood);
        }
    }

How do I use this code?

NOTE: This class uses the VFECore namespace instead of VanillaGenesExpanded, as we feel it is too generic and can be used outside of the scope of the DLC's content

It is a comp class, so you just add it in XML in the <comps> tag of the hediff you want to have this behaviour. For example:

<comps>
	<li Class="VFECore.HediffCompProperties_CustomBlood ">
		<customBloodThingDef>Filth_GreenBlood</customBloodThingDef>
		<customBloodIcon>UI/Icons/Medical/GreenBlood_BleedingIcon</customBloodIcon>
		<customBloodEffect>Damage_HitGreenFlesh</customBloodEffect>
		<customWoundsFromFleshtype>GreenWoundsFlesh</customWoundsFromFleshtype>
	</li>
</comps>

VFE Core

General Comp classes

General DefModExtensions

Item Processor

PipeSystem

Custom Structure Generation

Multi Verb Combat Framework - MVCF

Animal Behaviours

Genes

Apparel

Cuisine

Furniture

Plants

Deprecated

Clone this wiki locally