Page 1 of 1

Your ship's name on your HUD (Oolite 1.81)

Posted: Tue Oct 21, 2014 3:33 pm
by Wildeblood
Not chatty tonight, so this will be terse...

Download "HUDs, Data - Ship Name" I've just added to the OXZ manager. Ignore the description there.

Open your hud.plist file and add this to the dials array:-

Code: Select all

		{
			data_source = "playerShipName"; // Ship's name.
			selector = "drawCustomText:";
			alert_conditions = 2; // Green alert only
			color = "greenColor";
			alpha = 0.5;
			x = 32; y = -40; y_origin = 1; x_origin = -1; height = 20; width = 12;
		},
		{
			data_source = "playerShipClass"; // Ship's type.
			selector = "drawCustomText:";
			alert_conditions = 2; // Green alert only
			color = "greenColor";
			alpha = 0.5;
			x = 32; y = -44; y_origin = 1; x_origin = -1; height = 8; width = 8;
		},
Now your ship's name will be displayed on your in-flight HUD. (Some of us like that)

Unlike in the bad old days, you'll never need to edit hud.plist again if you change your ship's name or use more than one save-game. It'll automatically find the correct name.

If you want to use this in a HUD OXP you publish, just add this to your manifest file:-

Code: Select all

	"requires_oxps" = (
		{
			"identifier" = "oolite.hud.data.Wildeblood.ShipName";
			"description" = "Data - Ship Name (for playerShipName & playerShipClass data sources)";
		}
	);
--
R.I.P. Edward Gough Whitlam, 1916-2014.

Re: Your ship's name on your HUD (Oolite 1.81)

Posted: Wed Oct 22, 2014 12:13 am
by Diziet Sma
Wildeblood wrote:
R.I.P. Edward Gough Whitlam, 1916-2014.
A great loss.. one of the very few politicians I actually respect.

Re: Your ship's name on your HUD (Oolite 1.81)

Posted: Fri May 14, 2021 7:04 pm
by Cholmondely
I say!

I do rather think that the misleading entry in the Expansions Manager might need changing in the light of this!


It currently reads:

HUDs Data - Ship Name Wildeblood 2014-10-21 Download Data - Ship Name 1.0
Do not download this. This is a component for use by HUD expansion packs, it is NOT a stand-alone expansion pack; it will be downloaded automatically by HUDs which need it.




Oh, by the way, New Wiki page: http://wiki.alioth.net/index.php/Data_-_Ship_Name