Page 1 of 2
HUD Template?
Posted: Sat Nov 07, 2020 10:46 am
by Reval
Pretty simple question, this. I was wondering if there is a template for the standard Oolite HUD. You know, along the lines of like_ship. I have a couple of enhancements I'd like to add and make it an OXP.
Re: HUD Template?
Posted: Sat Nov 07, 2020 10:53 am
by another_commander
I don't think so, I believe you will have to create a new hud.plist from scratch.
Re: HUD Template?
Posted: Sat Nov 07, 2020 11:05 am
by Reval
Ok, no problem. And I had another question along similar lines, so I might as well ask it here:
Is there something similar for the Market Commodities? I only want to change one property - the average quantity of all items, to bring it in line with the larger cargo capacities of Frontier ships.
Re: HUD Template?
Posted: Sat Nov 07, 2020 11:31 am
by another_commander
Re: HUD Template?
Posted: Sat Nov 07, 2020 11:59 am
by Reval
Thanks. So, essentially, what I'm getting from that is that I'd have to duplicate the entire dictionary in my OXP just to change one field for each item? I'd put that dictionary in my Config folder and it will automatically replace the default Trade-goods.plist, correct?
Re: HUD Template?
Posted: Sat Nov 07, 2020 1:31 pm
by Redspear
Reval wrote: ↑Sat Nov 07, 2020 10:46 am
Pretty simple question, this. I was wondering if there is a template for the standard Oolite HUD. You know, along the lines of like_ship. I have a couple of enhancements I'd like to add and make it an OXP.
Not strictly what you're after (and perhaps unecessarily obvious) but...
If you tweak the standard hud.plist file in the config folder (nested in the 'resources' folder if memory serves...) then all the basics are already there for you to reposition, add to or subtract from as you wish. As you mentioned the "standard Oolite HUD", I thought I'd risk spelling it out.
Re: HUD Template?
Posted: Sat Nov 07, 2020 1:47 pm
by Reval
Thanks, yes I already went into the Resources/Config folder and re-positioned the "Weapons offline" message to the bottom of the screen (so annoyng right in the middle). But on the whole I'd rather not fiddle with the core elements. Hence my query on doing it via a simple little OXP
Re: HUD Template?
Posted: Sat Nov 07, 2020 3:40 pm
by Redspear
Reval wrote: ↑Sat Nov 07, 2020 1:47 pm
But on the whole I'd rather not fiddle with the core elements. Hence my query on doing it via a simple little OXP
Again, at the risk of stating the obvious...
If you copy that file and place it in and oxp folder then you can both use the original as your template whilst avoiding 'fiddling with core elements'. In other words the original would remain untouched and once you remove your hypothetical oxp the original core hud.plist is no longer overwritten and is automatically reinstated.
Re: HUD Template?
Posted: Sun Nov 08, 2020 12:54 am
by Reval
Yes indeed. Thank you, noted.
Following the (generally) Object Oriented model that Oolite seems to espouse, I think it would be really really nice to eventually have templates (classes) for
all the major game entities. Those would ideally also include the Commodities and the HUD, an idea that I was inadequately attempting to express above
Re: HUD Template?
Posted: Sun Nov 08, 2020 1:23 am
by Reval
Returning to topic specifics, I was also wondering how one might - is it even possible? - provide a digital speed-readout. I saw in the Wiki that there was an option to add text (although sadly I've now lost the reference), and ship.speed is of course available for JS, but implementation specifics were fuzzy-to-nonexistent. Could anyone perchance shed light here?
Re: HUD Template?
Posted: Sun Nov 08, 2020 1:28 am
by dybal
Reval wrote: ↑Sun Nov 08, 2020 1:23 am
Returning to topic specifics, I was also wondering how one might - is it even possible? - provide a digital speed-readout. I saw in the Wiki that there was an option to add text (although sadly I've now lost the reference), and ship.speed is of course available for JS, but implementation specifics were fuzzy-to-nonexistent. Could anyone perchance shed light here?
Look at Numeric HUD.
Re: HUD Template?
Posted: Sun Nov 08, 2020 1:40 am
by Reval
Oh great - thank you
I did see it, but on the whole it looked a little too cluttered for my purposes. I just want a straightforward readout of LM. I'll definitely delve into the coding of Numeric HUD a bit. I'm sure I'll learn something new, if nothing else.
Re: HUD Template?
Posted: Sun Nov 08, 2020 1:55 am
by dybal
Reval wrote: ↑Sun Nov 08, 2020 1:40 am
Oh great - thank you
I did see it, but on the whole it looked a little too cluttered for my purposes. I just want a straightforward readout of LM. I'll definitely delve into the coding of Numeric HUD a bit. I'm sure I'll learn something new, if nothing else.
Several HUDs display a numeric value for speed: HUD Selector large HUD, Coluber HUD, Xenon HUD
Re: HUD Template?
Posted: Sun Nov 08, 2020 1:57 am
by Reval
Cool
Looks like I've got my work cut out in choosing a new one (or adapting my own), then.
Re: HUD Template?
Posted: Sun Nov 08, 2020 2:22 am
by dybal
Don't forget to try VimanaHUD too.
The others I mentioned are compatible with HUD Selector: if you install that OXP and buy its equipment (10Cr), you can change HUD on-the-flight - makes very easy to try a bunch of them.
The released version of VimanaHUD doesn't work with HUD Selector, but the next version will...