Yes, you need to do some coding and dfhack.
The variable that controls the fire rate is <a dwarf>.counters.think_counter
When a dwarf shoots a weapon, think_counter on the dwarf that shot it is set to a value between 100 and 40, depending on the dwarf's skill. It goes down by 1 every tick and when it reaches 0 the dwarf can shoot again.
To make the dwarf shoot faster, you need to check if think_counter is set to a high value, and if it is make it smaller. The smaller the value the faster the dwarf will shoot.
I don't know how the auto musket's code looks, but a script I wrote that does the same thing looks like this:
local eventful = require 'plugins.eventful'
print("rapidfire enabled")
eventful.onProjItemCheckMovement.rapidfire = function(projectile)
if projectile.distance_flown == 1 then
adjustFireRate(projectile)
end
end
function adjustFireRate(projectile)
local fireRate = nil
if projectile.firer == nil then --if the projectile wasn't shot by somebody, like a flying corpse
return
end
if projectile.item.subtype.id == "ITEM_AMMO_BULLET_LIGHT" then
fireRate = 20
elseif projectile.item.subtype.id == "ITEM_AMMO_BULLET_HEAVY" then
fireRate = 100
end
if fireRate ~= nil and projectile.firer.counters.think_counter > fireRate then
projectile.firer.counters.think_counter = fireRate
end
end
This code will make any gun that shoots a custom ammo called "ITEM_AMMO_BULLET_LIGHT" shoot very fast, and any gun that shoots "ITEM_AMMO_BULLET_HEAVY" shoot very slow.