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

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
Gwydion
Average
Average
Posts: 10
Joined: Wed Oct 18, 2023 4:41 pm

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

Post 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.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

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

Post 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.
Gwydion
Average
Average
Posts: 10
Joined: Wed Oct 18, 2023 4:41 pm

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

Post 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.
Post Reply