Hard Light Productions Forums

Modding, Mission Design, and Coding => The Scripting Workshop => Topic started by: Nightstorm on February 06, 2017, 08:07:36 am

Title: Afterburner indicator question
Post by: Nightstorm on February 06, 2017, 08:07:36 am
I really enjoy playing Diaspora and I've been testing it under the latest code releases.

I was toying around with the HUD table yesterday and made some minor tweaks for my personal use and I thought about something that would be really cool but I don't know if it can be implemented without a code change.

So you know how the ammo gauge has the moving count as you fire you weapons and the numbers turn red at a certain point when you're low on ammo?  I'd like to do something similar with Afterburner Energy/Fuel bar.  Have it read out a percent next to or above the bar and turn red when it gets down to say 10%.

Is that possible through tables or would that require code change in the exe?  I don't think I've seen any mod that had that feature so I'm thinking code, which would make it impossible right now with new features freeze.

And on a related question, is it possible to control WHEN the ammo count turns red?

Can any of this be done with scripting?

Thanks!
Title: Re: Afterburner indicator question
Post by: m!m on February 06, 2017, 08:24:13 am
Can any of this be done with scripting?
No, the afterburner HUD gauge is handled by the engine and it has no hooks for Lua to change its behavior. A percent readout should be possible and turning it red if it's below a specified threshold is trivial to add so it would be a definite possibility. The code changes should be relatively limited so it should be easy to implement.
Title: Re: Afterburner indicator question
Post by: Phantom Hoover on February 06, 2017, 01:55:38 pm
Note however that FSO is currently in a code freeze, so even trivial features can't be added for a few months.