Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

Tutorial: Add EVA compatibility

Taelyn edited this page Mar 17, 2024 · 3 revisions

EVA compatibility allows other mods to make their armor, apparel, races, etc. survivable in space.

Generally 0.75 DecompressionResistance is added to armors and 0.25 and to helmets which also have HypoxiaResistance set to 1 for immunity. Full space suits and jetpack capable armors have a VacuumSpeedMultiplier of 4 giving them the same move speed as on land. The comp will display "EVA Capable" in apparel description.

Apparels:

<ThingDef>
  <!-- Rest of the xml -->
  <equippedStatOffsets>
    <HypoxiaResistance MayRequire="kentington.saveourship2">1</HypoxiaResistance>
    <DecompressionResistance MayRequire="kentington.saveourship2">0.25</DecompressionResistance>
    <VacuumSpeedMultiplier MayRequire="kentington.saveourship2">4</VacuumSpeedMultiplier>
  </equippedStatOffsets>
  <comps>
    <li MayRequire="kentington.saveourship2">
      <compClass>SaveOurShip2.Comp_EVA</compClass>
    </li>
  </comps>
</ThingDef>

Pawns:

<ThingDef>
  <!-- Rest of the xml -->
  <statBases>
    <HypoxiaResistance MayRequire="kentington.saveourship2">1</HypoxiaResistance>
    <DecompressionResistance MayRequire="kentington.saveourship2">1</DecompressionResistance>
    <VacuumSpeedMultiplier MayRequire="kentington.saveourship2">4</VacuumSpeedMultiplier>
  </statBases>
</ThingDef>

Buildings (that contain pawns):

<ThingDef>
  <!-- Rest of the xml -->
  <statBases>
    <HypoxiaResistanceOffset MayRequire="kentington.saveourship2">1</HypoxiaResistanceOffset>
    <DecompressionResistanceOffset MayRequire="kentington.saveourship2">1</DecompressionResistanceOffset>
  </statBases>
</ThingDef>

Clone this wiki locally