Weapon Help

Started by Delta_Com, March 04, 2014, 09:55:12 PM

Previous topic - Next topic

Delta_Com

I've Been looking at the T-9, and was wondering what tells the game to make it light things on fire. I cannot seem to find anything in it's code. I'm trying to make a minigun that has incendiary rounds.

SlimeCrusher

This is the code from my Flamethrower mod:

Quote   <ThingDef ParentName="BaseBullet">
      <defName>Bullet_Flame</defName>
      <label>Flamethrower Flame</label>
      <texturePath>Things/Projectile/Flame</texturePath>
      <thingClass>BulletIncendiary</thingClass> <--- This is all you need, just copy-paste the tag bellow the texturePath and it should work
      <damageType>Flame</damageType>
      <projectile>
         <damageAmountBase>1</damageAmountBase>
         <speed>30</speed>
      </projectile>
   </ThingDef>


   <ThingDef ParentName="BaseGun">
      <defName>Flamethrower</defName>
      <label>Flamethrower</label>
      <description>Burn! Buuuurn! The favorite weapon of a pyroman!</description>
      <texturePath>Things/Item/Equipment/Flamethrower</texturePath>
      <interactSound>InteractBoltActionRifle</interactSound>
      <purchasable>True</purchasable>
      <basePrice>500</basePrice>
      <verb>
         <projectileDef>Bullet_Flame</projectileDef>
         <accuracy>2</accuracy>
         <burstShotCount>30</burstShotCount>
         <ticksBetweenBurstShots>2</ticksBetweenBurstShots>
         <warmupTicks>250</warmupTicks>
         <range>10</range>
         <fireSound>FlameBrust</fireSound>
      </verb>
   </ThingDef>

Delta_Com

#2
Thanks a lot
EDIT: That actually didn't seem to work. Any ideas?

SlimeCrusher

Can you please post the whole .xml file to take a look?

Delta_Com

#4
Just figured it out. I forgot to tell the minigun to actually fire the projectile I gave it.

Now the pirates are burning!

SlayR

I know i shouldn't be questioning here, but how can you make new kinds of bullets? (Like explosive) I didn't want to open a new post. ;D

Kilroy232

#6
Quote
I know i shouldn't be questioning here, but how can you make new kinds of bullets? (Like explosive) I didn't want to open a new post. ;D
To make an explosive round you can actually use the grenade projectile and replace the texture of the projectile and even the sound of it if you so wished.

It is possible to modify the blast radius and all those good things this way easily  :)

palandus

@SlayR; I'd suggest taking a look at both Weapons_Guns and Weapons_Grenades, copy the code to a different location and see which lines are used for each weapon type (so in this case, BulletBase and GrenadeBase) and mix and match code lines until is works; this is how I created my bunker wall, by combining Sandbags code with a Wall's code.