Hey Daishi! Thank you for downloading the mod. A lot of the logic I left the same as what was ported over.
So for this formula in particular, entity.attack_parameters.cooldown * (1-(mod-1)) Is actually the correct way to do it if you are wanting to DECREASE the cooldown by 60%.
The modifier includes the base 100%, so it's actually 1.6 and not 0.6.
The gun turret has a Cooldown of "6" so... 6 * ( 1-(1.6 -1) is equal to 2.4 or, 40% of 6 resulting in a 60% buff.
Fire rate is calculated based off of the ticks so the cooldown parameter says, every 6 ticks I can shoot or.. fire rate of 10 /s (60 ticks per second, can shoot every 6 ticks).
So the reason it ends up being 25/s (I'm assuming this is what you meant instead of 250%) fire rate is because you now have a cooldown value of 2.4 OR I can shoot every 2.4 ticks. (60/2.4) = 25. I believe it is calculating just fine.
The issue with cooldown is that it is actually a smaller number you are wanting and not a larger percentage. It does go negative (I've done 9999% buffs no problem), and all it does is just make it zero so there is no cooldown anymore and the gun practically turns into a laser with no cooldown. That happens anyway even if you have a buff of 100%, because as soon as Cooldown goes below 1 (saying I can shoot every 1 tick), it is pretty much the same as being able to shoot whenever.
Hopefully this all makes sense.
Thank you for reporting the potential of negative numbers though. I just saw that having it negative removes the shooting speed tooltip which isn't ideal. I'll try to get an update on that.
On the note of being able to set the modifiers yourselves, I do agree that would be better if we could set those values separately. I just have a lot of IRL stuff going on the next couple of weeks so won't be able to dedicate a lot of free time outside minor bug fixes.