Personal Armor Weapon Systems (PAWS)

by Sudain

Adds a suite of personal defense equipment for your armor grid. Weapons automatically engage most vulnerable nearby enemies, reloads from ammunition your inventory, and sleep when combat is over to minimize server load.

Tweaks
3 days ago
2.0
361
Combat

FAQ

Why isn't the armor shooting when there are foes around?

You haven't been damaged or damaged anything in the past 10 seconds.

Why isn't the armor shooting what I want?

The armor first select targets among the most vulnerable to that damage type. Then, if optional targeting criteria is selected it'll select from among those (like slowest), and finally it'll target the lowest HP targets from the remaining.

Why do ballistic weapons use energy?

It's a back-end kludge I'm leaning on to control firing rate, and ammunition count to make the weapons actually work. It's not actually deducting any energy to fire the ballistic weapons.

What's the deal with the poison and slowdown capsule thrower?

The module will first attempt to slow down any biters moving towards you first. Then, it wait and and gather 'charges' to then spend and throw a barrage of poison capsules at a worm to attempt to kill it. The slowdown works well, the poison capsules are fiddly and I'm tired of trying to tweak them.

Are there diagnostic commands?

Yes. /paws-diag

Can I have my mod cool mod X have it's custom ammunition used by PAWS?

Yes.

On (on_init) and (on_configuration_changed) register the ammunition to PAWS via the below handler.

-- In your control.lua, on_init and on_configuration_changed:
if remote.interfaces["paws"] and remote.interfaces["paws"]["register_ammo"] then
    remote.call("paws", "register_ammo", {
        ammo_name = "your-ammo-item-name",  -- prototype item name
        category  = "bullet",               -- ammo_category: "bullet", "shotgun-shell",
                                            --   "rocket", "grenade", "flamethrower"
        types     = {
            {amount = 5,  type = "physical"},
            {amount = 8,  type = "fire"},   -- add as many damage types as needed
         },
         -- aoe_data is optional; only for AoE weapons (rockets, grenades)
        -- aoe_data = {radius = 6.5, types = {{amount = 50, type = "explosion"}}},
     })
end