Skip to content

Acid Attacks and Acid Immunity

juanosarg edited this page Feb 2, 2021 · 1 revision

A new Hediff, Hediff_AcidBuildup, has been added to provide acid attacks that cause extra damage over time. This hediff can be applied to any DamageDef by referring to it by its defName, "VEF_AcidBuildup". This hediff will then create additional acid burns for a while.

        <DamageDef>
		<defName>MM_AcidicBreath</defName>
		<label>acidic breath</label>
		<workerClass>DamageWorker_AddInjury</workerClass>
		<externalViolence>true</externalViolence>
		<hediff>VEF_AcidBurn</hediff>
		<defaultDamage>1</defaultDamage>

		<deathMessage>{0} has been poisoned to death.</deathMessage>
		<additionalHediffs>
			<li>
				<hediff>VEF_AcidBuildup</hediff>
				<severityPerDamageDealt>0.01</severityPerDamageDealt>
				<victimSeverityScaling>ToxicSensitivity</victimSeverityScaling>
			</li>
		</additionalHediffs>

		<harmAllLayersUntilOutside>true</harmAllLayersUntilOutside>

		<armorCategory>Heat</armorCategory>
	</DamageDef>

There is also a very very simple comp class that can be added to a creature to make it immune to this extra damage.

How do I use this code?

You can either use it like shown above, or assign the AnimalBehaviours.Hediff_AcidBuildup to one of your own hediffs. In any case the Hediff_AcidBuildup class will always cause addditional VEF_AcidBurn wounds, since the call to them is hardcoded.

To add the comp to make an animal immune to this just add:

<comps>
	<li Class="AnimalBehaviours.CompProperties_AcidImmunity">		
	</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