MilHUD problem
Moderators: winston, another_commander
- maik
- Wiki Wizard
- Posts: 2028
- Joined: Wed Mar 10, 2010 12:30 pm
- Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)
MilHUD problem
I just swapped ships for the first time and was flying around in an Adder. MilHUD seems to get confused by low normal shield levels, it switches to Critical Condition immediately. Is there a chance I can get a warranty replacement? This is on Oolite 1.74.2 with MilHUD 3.4. No relevant messages in the log file.
I believe it's to do with this line in the script.js:
My "Condition Critical" HUD kicks in when I've still got a 1/4 bar of E4 (of 5) left. It didn't bother me especially (it meant I got to see my animated HUD more often ) so I just left it.
I suggest tweaking the 109 value downwards until you find a value which works for you. Don't forget to change the snippets
as well so they are consistent though
Code: Select all
player.ship.energy < 109
I suggest tweaking the 109 value downwards until you find a value which works for you. Don't forget to change the snippets
Code: Select all
player.ship.energy > 108
I was wondering the self same thing actually. However I cannot find any reference on the wiki to the player.ship.energy property let alone anything indicating a maximum value so that you could use a ratio. Even that likely wouldn't help on the face of it as you would need to take into account the number of energy bars a ship displays to work out what the value for 1 bar might be. I don't know if anyone more familiar with the API can comment?
Yes there is, using player.ship.energy and player.ship.maxEnergy.
The references you seek are in the wiki JS page for entities. The player ship is a specific sub-set of the general ship entries, which in turn are a sub-set of the generic ones for entities.
If I remember correctly each energy bar is 64 energy units. The number of bars is determined by the setting for maxEnergy.
The references you seek are in the wiki JS page for entities. The player ship is a specific sub-set of the general ship entries, which in turn are a sub-set of the generic ones for entities.
If I remember correctly each energy bar is 64 energy units. The number of bars is determined by the setting for maxEnergy.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
There was a reason, but I must admit I don't remember offhand. It was certainly set high enough that it didn't get in the way of items like the Emergency Energy Unit or the Auto-Escape Pod, especially as it's more of a visual warning than anything else.
Really just to give the player warning in enough time that they can do something about things rather than just letting them know they're imminently going to die.
Really just to give the player warning in enough time that they can do something about things rather than just letting them know they're imminently going to die.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
The auto eject fires if(player.ship.energy < 22), which is one third of your last energy bank. Obviously the HUD should change before that point is reached.Thargoid wrote:There was a reason, but I must admit I don't remember offhand. It was certainly set high enough that it didn't get in the way of items like the Emergency Energy Unit or the Auto-Escape Pod, especially as it's more of a visual warning than anything else.