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

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

Moderators: winston, another_commander

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 » Tue Oct 21, 2014 3:33 pm

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 » Wed Oct 22, 2014 12:13 am

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

Post Reply