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

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

Moderators: another_commander, winston

Post Reply
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2161
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

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

Post 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.
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: Your ship's name on your HUD (Oolite 1.81)

Post 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.
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
Cholmondely
Wiki Wizard
Wiki Wizard
Posts: 4350
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (currently plague-ridden)
Contact:

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

Post 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
Denizen of the Dark and Dismal Deserts of Digebiti.

Milo wrote Dancing the Gavotte

Oolite BB Topic icons guide
Post Reply