I made a version 2.4, that looks nice. The green bar goes red when your commander goes below 90% HP, then turns back to green when he's fully healed up. The display also vanishes when you are spectating (dead). Would be nice if my rewrite could replace the "official" version in some way. Doesn't seem possible, but I'm no expert. When I tested with multiple commanders, it displayed the HP of my ally *shrug*.
I'm going to be away for a week, but when I get back I want to (or at least try to): Add commander select on click. Add simple configuration options to files (not in-game), including hide commander health panel when he's not damaged, and relocation of the panel. Sort out what happens when you have multiple commanders. Display a commander icon that matches your in game commander (model.players().commander sort of thing possible?.. No game fies on me to check right now, and if its not, then plz Uber ) FLASHING. Something to make it even more obvious when your commander's in trouble.
Loving the look of this version of the health bar. UI is getting better all the time. I've just one point to suggest: having the health bar appear in the center of the screen covers over the mex counter mod - could it perhaps be re positioned in the top right as it was before? Edit: just saw burnt custard's to do list includes relocation of the health bar, my bad.
Nearly! data-bind="click: function() { api.select.commander(); api.camera.track(true); }" This isn't the neatest code ever... Been making a bit of progress. Done the tracking (with a bit of help from Baconiffic) and getting the position of the health bar in the middle or top right depending on what .css is mentioned in the mods .ini file.
Is there an interest from other people in having it only appear when the commander is in trouble? Code: '<div id="commander_info" data-bind="visible: (showResources && model.alertModel.commanderUnderAttack())">'
This is already used to show the "Warning" text, however the implementation of this function is very rudimentary - your commander is considered "under attack" if it's heath goes below 90%, and then no longer considered "under attack" if it is then repaired back to > 99% health.
Yeah, I'll just keep it for myself then. I like this mod, but I'm really only interested in it when I'm not at full health. I think the other benefit of doing it this way is that it would take advantage of any updates they make to the commanderUnderAttack() function.
New version. Strike-throughed out points have been implemented. Also some bug fixes Add commander select AND TRACK on click. Add simple configuration options to files (not in-game), including hide commander health panel when he's not damaged, and relocation of the panel. Sort out what happens when you have multiple commanders. Display a commander icon that matches your in game commander (model.players().commander sort of thing possible?.. No game fies on me to check right now, and if its not, then plz Uber ) FLASHING. Something to make it even more obvious when your commander's in trouble.
Is it sad that I'm excited to watch several different people all chipping away at the same mod, piece by piece, and seeing it assemble in front of us?