Page 1 of 1

Is it possible to alter, at runtime, values in a hud.plist?

Posted: Sat Oct 28, 2023 9:08 am
by Gwydion
Hi,
I have this idea for a user configurable HUD. For example, it would depend on being able to alter the x and y values of say the drawScanner: selector.

I have seen that some HUD's set reticle_target_sensitive or scanner_non_linear in their plist files. These seem to be transformed when dumping the player.ship object into camel case versions as in reticleTargetSensitive and scannerNonLinear. But I can find nothing about the rest of the hud.plist such as dials =();

I was trying to avoid having to have duplicate hud.plist with different positions of some dials.

BTW. I have found the debugConsole to be an invaluable and insightful.

Re: Is it possible to alter, at runtime, values in a hud.plist?

Posted: Sat Oct 28, 2023 9:45 am
by phkb
I don’t believe you have change the position of an element at runtime. But you can make things visible and invisible, based on whatever criteria you want. So, you could define multiple instances of the one element, and make each one require a piece of invisible equipment.

Re: Is it possible to alter, at runtime, values in a hud.plist?

Posted: Sat Oct 28, 2023 9:57 am
by Gwydion
But you can make things visible and invisible, based on whatever criteria you want.
Ah, so I could use award or remove dummy equipment and use equipment_required = "EQ_something_unique";

DOH! :idea: Now that was a light bulb moment, I saw examples of it when poking about but never put it together.