FAForever / fa

Lua code for FAF
225 stars 231 forks source link

Weapon energy consumption indication #4619

Open Spikey84 opened 1 year ago

Spikey84 commented 1 year ago

Describe the feature Some indicator that a t3 artillery is not firing due to E stall.

Expected behavior According to @Garanas "this can be achieved using effects, that emit according to ratio satisfied that tick"

Additional context This goes along with #4441. By adding more reload time and e required the issue is made more noticeable.

Garanas commented 1 year ago

I've done some digging and this is the part where the weapon waits for the economy event to be complete:

That means whatever we add should start and end with that economy event. We don't have to poll for it, we know exactly when that happens. The only question now is what the visual indicator would be: an effect is very unit specific, for example. And we may as well apply this to every weapon that consumes energy.

Any thoughts or suggestions for those reading this?

scarress commented 1 year ago

I think it would make sense to have some effect at the muzzle of the artillery while it charges, which as scales with ratio satisfied tick( something else) either in size or intensity, etc.? I think it could indicate the state fairly clear for both the owner and other players, and fairly easy to make. (At least for artillery shooting energy/plasma, etc, not sure for the UEF) Screenshot from 2023-03-26 11-52-16

Unless we are looking for something more sophisticated?

We could also add an icon in the UI too? Maybe something like the EMP icon? Then one would be able to see it when zoomed out too. Screenshot from 2023-03-26 11-07-01 Then maybe just changing the color so that it is clear your artillery is not being EMP'ed :)

Also what exactly is it the "progress bar" actually showing for arty? If it is not showing when the artillery has accumulated enough energy? arty

MrRowey commented 1 year ago

@scarress the progress bar is showing the shell reload time but maybe that could be altered to show the energy build up to shoot instead

Garanas commented 1 year ago

I'm not sure if we can sample the progress of the economy effect. I like the suggested ideas. It is probably best to choose something that is faction-independant so that it is easier to recognize