HeroTurrets_Redux


Turrets are built using salvaged self-learning AI tech from your ship allowing them to get deadlier with practice. Extends turrets via ranking system based on kills. Turrets are generated and are not limited to vanilla turrets, identifiable by overlaid rank insignia. Rank buffs individual turrets.

Content
3 days ago
2.0
2.22K
Combat

g [Answered] Rate of fire / cooldown

a month ago

It was driving me crazy why with 60% bonus the turrets get 250% fire rate, and i discovered the formula uses :"entity.attack_parameters.cooldown = entity.attack_parameters.cooldown * (1-(mod-1))".
Not sure what happens if you exceed and go negative, however replacing the formula with: "entity.attack_parameters.cooldown = entity.attack_parameters.cooldown * (1/mod)" should make it less confusing and fail-safe for higher numbers.
Though of course it would be best if we could adjust damage, rate of fire and range separately.

a month ago
(updated a month ago)

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.

a month ago
(updated a month ago)

Hello Fortheking55, thank you for your reply (and a very good one at that).

I understand how it it working, i was just suggesting that replacing the bonus reduction in fire delay with a bonus to fire rate might be better:

As an example, for 60%, your turrets will get 60% bonus damage and 150% bonus rate of fire (from 10 to 25, as you mentioned with a 2.4 frame delay), for a total DPS bonus of 300% (2.5 x 1.6-1).
With 100% you get 100% bonus damage and 600% fire rate (maximum at 1 tick/shot i guess) for a massive total damage bonus of 1100% (2*6-1). This also makes the original fire rate of the turret irrelevant since it will always be 1 tick regardless of original value (meaning laser turrets will get a massive DPS boost, and rail gun even more so .... ).

If you replaced the above formula, for a 60% bonus you wild get: 60% bonus damage and 60% bonus fire rate (16 rof, or 6/1.6=3.75 ticks /shot) for a total of 156% bonus dps (1.6 x 1.6-1).
Again with the above revised formula, a 100% bonus would wield 100% bonus damage and 100% bonus fire rate (20 rof) for a total bonus of 300% dps.
This would allow a bit more fine tuning for players with minimal effort (i.e. adding new settings would take a lot more time) and also prevent negative values. This bonus will be constant and not change with the fire rate of the turret unless you go some crazy value that will set the rof to the cap of 60.

Once again, just a suggestion, it is up to you how you envision the mod.

a month ago
(updated a month ago)

Ah okay, sorry my bad. I see what you are saying. Apologies

Im not entirely sure on how to balance this thing by default as some people want OP 160 range turrets and some want to suffer. I think the correct answer for all of this is to have more parameters to tune to allow users to do what they want.

In regards to fire rate, I was thinking of calculating out the fire rate and then do some math to then take the bonus based off of that. So a 10 / s would turn into a 16/s fire rate at 60 %. Thoughts? EDIT : I’m an idiot, I see that’s what you suggested. END EDIT: I don’t know if I can make EVERY one happy.. but this would make more sense… I’ve just never thought about it too hard as that was how it performed in 1.1.

a month ago
(updated a month ago)

I went ahead and changed the formula and added settings for max health, range and cooldown. Will add more at a later date when I have more time.

Edit : Had more time. Went ahead and did attack speed and rotation

Thank you again for the input and well constructed feedback!

a month ago

Greetings Fortheking55, good job on updating, it's better than i was hoping for.
Now everyone can customize it as they like.
(Personally for me range was more important than damage DPS, but now everyone can set it as they like).
Once again, good job!

New response