[Release] HUD Selector v1.17

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

Moderators: another_commander, winston

Post Reply
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

[Release] HUD Selector v1.17

Post by Norby »

[EliteWiki] HUD Selector should solve the problem of multiple installed HUDs discussed here.
Useful also to save your MFD setup.

You can switch around the supported ones during flight by priming and activating the HUD Selector equipment (try it):
* Default HUD (the actual hud.plist, for example AAD HUD or Compact HUD)
* ExtraLarge HUD with 10 MFDs and custom dials
* Large HUD with 10 MFDs and custom dials
* Numeric HUD (an example of handling scripted HUDs)
* Small HUD with 10 MFDs and custom dials

You can set your scanner to NonLinear and UltraZoom by pressing mode key (b) as many times as needed when HUD Selector primed. Your settings are stored in your savegame.

In the Interfaces (F4) screen you can select from the installed HUDs and set the default of your MFDs.
From Oolite v1.81 the in-flight MFD changes are saved and custom dials from CombatMFD are used.

ExtraLarge HUD with 8 MFDs and custom dials on 4:3 screen (10 MFD need 16:9 or 16:10 screen):
Image

Large HUD with 10 MFDs, custom dials like speed value and a large alert sensitive scanner:
Image

Small HUD with 10 MFDs:
Image


Other HUDs can join by the following steps:
* must be the plist differently named than hud.plist
* must define a worldScript (for example in Config/script.js) with similar this.name than the plist
* set your HUD in startUp and add your HUD and plist name into HUDSelector:

Code: Select all

  this.name = "yourhud";
  this.startUp = function () {
    player.ship.hud =  this.name + ".plist";
    var w = worldScripts.hudselector;
    if( w ) w.$HUDSelectorAddHUD("Your HUD", this.name);
  }
* if your HUD define different plists for 4:3, 16:10 and 16:9 screens named to "yourhud.plist", "yourhud10.plist" and "yourhud9.plist" then give all of them to AddHUD:

Code: Select all

   if( h ) h.$HUDSelectorAddHUD("Your HUD", this.name, this.name+"10", this.name+"9" );
HUDSelector will set the proper plist for the current screen but will not follow the window resizes, for example if you switch to fullscreen during flight. In this case you can set your HUD again by activating the HUDSelector equipment.

* You can define a callback function in your worldScript to start/stop some parts of your scripted HUD:

Code: Select all

  this.$HUDSelectorCallBack = function ( off ) {
    var w = worldScripts["yourhud"];
    if( off ) { //do things to disable your HUD like rename functions
      if( w.shipWillLaunchFromStation ) {
        w.$save_shipWillLaunchFromStation = w.shipWillLaunchFromStation;
        delete w.shipWillLaunchFromStation;
      }
    } else { //do things to activate your HUD like restore disabled functions
      if( !w.shipWillLaunchFromStation )
        eval("w.shipWillLaunchFromStation = "+w.$save_shipWillLaunchFromStation);
    }
  }
There are a built-in support for some existing Multi-Function Display (MFD) OXPs, these will be set as default MFDs.
New MFDs can register in startUp:

Code: Select all

 var h = worldScripts.hudselector;
 if( h && h.$HUDSelectorAddMFD ) h.$HUDSelectorAddMFD(this.name);
If the name of the MFD defined in setMultiFunctionText() call is different from the worldscript name then must give the name in the second parameter:

Code: Select all

 var h = worldScripts.hudselector;
 if( h && h.$HUDSelectorAddMFD ) h.$HUDSelectorAddMFD(this.name, "nameOfTheMFD");
Last edited by Norby on Mon Aug 15, 2016 5:07 pm, edited 22 times in total.
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [RELEASE] HUD Selector v1.0

Post by spara »

Have not checked the oxp yet, but according to the wiki you change the HUD in-flight. How about making an f4-interface instead that lists all installed HUDs and allows the change there? That way the oxp would better fit in to the game world being part of your ships interfaces.
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: [RELEASE] HUD Selector v1.0

Post by Zireael »

Seconding the F4 idea.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [RELEASE] HUD Selector v1.0

Post by Diziet Sma »

Thirding the F4 idea.


Ok Norby.. I have the CompactHUD working correctly now, but can't seem to get it working with the HUD Selector. I'm probably just doing something stupid, but can you let me know if I have this right?

oolite.oxp.Norby.HUDSelector.oxz has been set as a dependency.

The hud.plist has been named CompactHUD.plist

This is the script.js file:

Code: Select all

this.name = "CompactHUD";
  this.startUp() = function () {
    player.ship.hud =  this.name + ".plist";
    var w = worldScripts.hudselector;
    if( w ) w.$HUDSelectorAddHUD("CompactHUD", this.name);
  }
However, the CompactHUD does not appear in the list of HUD choices, and I get this error in the Latest.log

Code: Select all

11:12:57.457 [script.javaScript.exception.notFunction]: ***** JavaScript exception (CompactHUD): TypeError: this.startUp is not a function
11:12:57.457 [script.javaScript.exception.notFunction]:       /home/diziet/GNUstep/Library/ApplicationSupport/Oolite/ManagedAddOns/oolite.oxp.Aegidean.CompactHUD.oxz/Config/script.js, line 2.
11:12:57.457 [script.javaScript.load.failed]: ***** Error loading JavaScript script /home/diziet/GNUstep/Library/ApplicationSupport/Oolite/ManagedAddOns/oolite.oxp.Aegidean.CompactHUD.oxz/Config/script.js -- could not run script
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [RELEASE] HUD Selector v1.0

Post by spara »

Remove the the brackets from this.startUp().
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [RELEASE] HUD Selector v1.0

Post by Diziet Sma »

Thanks! That did the job. Ok.. version 1.2 of the CompactHUD is now online and working with the HUD Selector.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [RELEASE] HUD Selector v1.0

Post by spara »

The problem with Aad-hud is the fact that it includes both hud.plist and hud-small.plist. The idea being that it completely replaces the core ones. Now if I rename both and script them for this oxp, all works as intended as long as this oxp is present, except for the fact that ships which have hud-small defined don't get it. If this oxp is not present, then I would have to do some extra scripting to decide which HUD (normal or small) is to be used. Not impossible, but I don't have the time for it right now.
User avatar
mossfoot
---- E L I T E ----
---- E L I T E ----
Posts: 827
Joined: Fri May 30, 2014 4:07 pm
Contact:

Re: [RELEASE] HUD Selector v1.0

Post by mossfoot »

I like the fact it's buyable as equipment. Might as well give it a token cost, though, like 10 credits or something?
--
Image
Pilot: Mossfoot - Ship ID: Viaticus Rex (Cobra MKII)
Rank: Competent - Status: Clean

http://www.noahchinnbooks.com/
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [RELEASE] HUD Selector v1.0

Post by Diziet Sma »

mossfoot wrote:
I like the fact it's buyable as equipment. Might as well give it a token cost, though, like 10 credits or something?
Having played with it some more, I do kinda like being able to switch it on the fly.. it's not unlike tweaking a highly customisable computer desktop.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
mossfoot
---- E L I T E ----
---- E L I T E ----
Posts: 827
Joined: Fri May 30, 2014 4:07 pm
Contact:

Re: [RELEASE] HUD Selector v1.0

Post by mossfoot »

Diziet Sma wrote:
mossfoot wrote:
I like the fact it's buyable as equipment. Might as well give it a token cost, though, like 10 credits or something?
Having played with it some more, I do kinda like being able to switch it on the fly.. it's not unlike tweaking a highly customisable computer desktop.
Exactly. Not to mention it will let us provide feedback on new HUDs easier to.
--
Image
Pilot: Mossfoot - Ship ID: Viaticus Rex (Cobra MKII)
Rank: Competent - Status: Clean

http://www.noahchinnbooks.com/
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [RELEASE] HUD Selector v1.0

Post by spara »

I can see the benefits of being able to switch it on flight. Nice to test them. Then again, when you're settled with the one you are happy with, it's just a useless primable equipment.

How about a hud shop type of thing? Buy the equipment and launch, test them and select the hud you want to use. The next time you dock the hud is fixed to your selection. Want to change it again? Buy the equipment.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [RELEASE] HUD Selector v1.0

Post by Diziet Sma »

spara wrote:
I can see the benefits of being able to switch it on flight. Nice to test them. Then again, when you're settled with the one you are happy with, it's just a useless primable equipment.

How about a hud shop type of thing? Buy the equipment and launch, test them and select the hud you want to use. The next time you dock the hud is fixed to your selection. Want to change it again? Buy the equipment.
Well, in the readme that you can't read, because it's inside the OXZ, it says:
After you selected your HUD, you can remove HUD Selector equipment due to the selection is saved into your savegame.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
mossfoot
---- E L I T E ----
---- E L I T E ----
Posts: 827
Joined: Fri May 30, 2014 4:07 pm
Contact:

Re: [RELEASE] HUD Selector v1.0

Post by mossfoot »

That sounds unnecessarily complicated, though. Just think of it as buying a custom desktop rotator. Whether you use it for anything after you have what you want is up to you.

Of course, I do worry about having TOO many ship-board objects to break down... there's only so many tea makers and ship's cats to clutter up the screen with ;) (really should have a separate section on the ship's equipment screen for non-essentials.)
--
Image
Pilot: Mossfoot - Ship ID: Viaticus Rex (Cobra MKII)
Rank: Competent - Status: Clean

http://www.noahchinnbooks.com/
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [RELEASE] HUD Selector v1.0

Post by spara »

Diziet Sma wrote:
Well, in the readme that you can't read, because it's inside the OXZ, it says:
After you selected your HUD, you can remove HUD Selector equipment due to the selection is saved into your savegame.
I read that alright :) . I'm just trying to think of ways making this a game element rather than out of the game accessory.
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [RELEASE] HUD Selector v1.0

Post by spara »

I'm not at my prime today :oops: . What I meant in the earlier post was that instead of using the equipment interface for activating and de-activating the equipment, put a small price tag on it and make it an in-game buyable product. And as such, it should have a time limit for using it. From launch to dock feels natural. Test flight kind of thing. Limit the availability by TL perhaps?
Post Reply