Download

Weapon modding challenges

So I’m trying to make a handheld Minigun/Chaingun/Gatling gun/some-other-name-for-a-motor-powered-multi-barreled-machine-gun-of-death. Either way, I got it somewhat working, but when I cooked the mod and loaded it in game it now does 0 dmg, and doesn’t consume durability (I need to check to make sure some settings didn’t get reset anyways)

The idea of this Weapon is to:

  1. Rapidly Fire ammunation
  2. Require no ammo
  3. Use durability as a cooldown
  4. When overheated require a full cooldown to be able to fire again
  5. Repair slowly overtime indicating that it is coolingdown
  6. Require a “spin up” or “charge time” so it can shoot (but not lose that time on fire)

What I have working so far:

  1. Rapdily firing ammo was easy, just made it’s shots per second lower number (done)
  2. Require No Ammo - I somewhat had this working, See [1] below
  3. Use durability as a cooldown - Simple just let the gun consume durability per shot. Altho a better alternative would be better however the “passive durability loss with a neg value does this well” guess this covers point 5 as well
  4. overheated require full cooldown - I haven’t set this up, but I need to set the “min durability to fire” value correctly, however that will just prevent it fomr firing rapidly and just more or less trickle one bullet out slowly (if player can keep clicking to shoot)
  5. Repair slowly overtime - there is a durability loss value on the item, just used
  6. Require a “spin up” or “charge time” - No idea how to implement this

Now step 2 or in this case I’m discussing [1] I remember setting the clipsize to “0” this make the gun shoot, but do no dmg. Ok so I set the clipsize to “10” shoots and does damage, so even if you let something shoot but it has no ammo it does no damage (So I guess I answered my own “why does this happen”)

So better question is, how can I make a weapon do ranged instant attack do damage if the clip is empty? If there is no way, how can I make the weapon be forced to have at least 1 bullet in the chamber no matter what (crafted, found in a crate, spawned in, etc)

Changed some settings around, this is the final test, if it works I’ll post the setup. But I think it’s because I had “Infinite Ammo” enabled, but I shall see if that was the issue.