Skip to content

ProjectileExtension

Matthew Walls edited this page Oct 12, 2018 · 2 revisions

Gist

Allows for ranged weapons to be able to ignore walls or roofs when firing projectiles with this extension.

In Action

Modified gun on the left can shoot through walls.

Example Extension (Use this!)

Here is an XML example (parts have been removed with <...>s) of the Bats I use in the Rim of Madness - Vampire mod.

<?xml version="1.0" encoding="utf-8" ?>
<Defs>
  <ThingDef ParentName="BaseBullet">
    <defName>Test_Bullet</defName>
    <label>magic bullet</label>
    <graphicData>
      <texPath>Things/Projectile/Bullet_Big</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
    <projectile>
      <damageDef>Bullet</damageDef>
      <damageAmountBase>25</damageAmountBase>
      <stoppingPower>1.5</stoppingPower>
      <speed>100</speed>
    </projectile>
	<modExtensions>
	  <li Class="JecsTools.ProjectileExtension">
	    <passesWalls>true</passesWalls>
	  </li>
	</modExtensions>
  </ThingDef>
</Defs>