Page 10 of 29

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Posted: Mon Aug 25, 2014 2:22 pm
by Neelix
Thargoid wrote:
The default version shouldn't, as per Dizzy's post above. You may have already tweaked your copy in the past perhaps, as this isn't the first time it's been suggested?
Nope. or at least not before I'd noticed that behaviour. (I've since tweaked it for other reasons)
(entity.isCargo && !entity.isPiloted) catches them because splinters test positive for isCargo.

- Neelix

Edit: also see here: https://bb.oolite.space/viewtopic.php?f= ... 70#p145756

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Posted: Mon Aug 25, 2014 2:33 pm
by Redspear
spara wrote:
This might be of interest to you, if you don't want to use the Random Hits Shipset addon, but would like to occasionally see a Deputy on patrol.
spara, I somehow missed your post, sorry :oops:

That might even be more fun than the way I was imagining it.
Thanks for sharing :-D

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Posted: Sun Sep 07, 2014 10:02 pm
by Vintage
With regards to the persistent constore fix available for 1.77.1, is there a way to make this fix work for the newest version of Your Ad Here? I'm really not very good with tweaking OXPs myself and it seems the scripts are quite a bit different than what's referenced in Spara's post.

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Posted: Mon Sep 08, 2014 9:01 am
by spara
Vintage wrote:
With regards to the persistent constore fix available for 1.77.1, is there a way to make this fix work for the newest version of Your Ad Here? I'm really not very good with tweaking OXPs myself and it seems the scripts are quite a bit different than what's referenced in Spara's post.
The latest version of YAH for 1.80 _should_ have persistent stores. If that's not the case, something's wrong and I need to fix it.

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Posted: Mon Sep 08, 2014 9:14 pm
by Vintage
spara wrote:
Vintage wrote:
With regards to the persistent constore fix available for 1.77.1, is there a way to make this fix work for the newest version of Your Ad Here? I'm really not very good with tweaking OXPs myself and it seems the scripts are quite a bit different than what's referenced in Spara's post.
The latest version of YAH for 1.80 _should_ have persistent stores. If that's not the case, something's wrong and I need to fix it.
It was only something I noticed during gameplay, so maybe I just had a brainfart and got two systems mixed up. I'll do some actual testing when I get to my home desktop and tell you if anything's up.

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Posted: Tue Oct 21, 2014 12:38 am
by CheeseRedux
Alternative versions of the Griff Boa


Shamelessly stolen from here and given the tiniest of tweaks.


To use, insert the following code at the end of the shipdata.plist, immediately before the last } .

What it does:
– Leaves the prototype intact; No changes made
– Defines four different-coloured turrets to be used by v2 and v3. V3 is given turret colours that (sort of) match the running lights of a submarine. Easy enough to snip out if you don't like the results.
– Defines two new versions of the ship, as specified by Cmdr Wyvern and LittleBear (with some very minor tweaks).

Code: Select all

								//different coloured turrets - used in ship versions 2 and 3

"griff_prototype_boa_turret_subent_RED" = 
	{
	like_ship = "griff_prototype_boa_turret_subent";
	laser_color = "redColor";
	};

"griff_prototype_boa_turret_subent_GREEN" = 
	{
	like_ship = "griff_prototype_boa_turret_subent";
	laser_color = "greenColor";
	};

"griff_prototype_boa_turret_subent_WHITE" = 
	{
	like_ship = "griff_prototype_boa_turret_subent";
	laser_color = "whiteColor";
	};

"griff_prototype_boa_turret_subent_AMBER" = 
	{
	like_ship = "griff_prototype_boa_turret_subent";
	laser_color = "orangeColor";
	};

								//ship version 2

"v2-griff_prototype_boa-NPC" = 
	{
	like_ship = "griff_prototype_boa-NPC";
	name = "Griff Boa C"; 
	energy_recharge_rate = 3.2;
	forward_weapon_type = "WEAPON_BEAM_LASER";
	laser_color = "cyanColor";
	max_cargo = 125;
	max_energy = 512; 
	max_flight_pitch = 1.0; 
	max_flight_roll = 2.5; 
	max_flight_speed = 312; 
	max_missiles = 8; 
	thrust = 40;
	auto_ai = yes;
	auto_weapons = yes;
	fuel = 70;
	has_ecm = 1;
	has_escape_pod = 1;
	has_fuel_injection = 0.1;
	has_scoop = 1; 
	likely_cargo = 12;
	roles = "pirate-heavy-fighter(0.01) pirate-medium-freighter(0.01) trader(0.02) trader-courier(0.02)";
	
	subentities = (
					//	STARBOARD Mounted Turret - Facing Y+
						{type="ball_turret";
						subentity_key = "griff_prototype_boa_turret_subent_RED";
						position = "17.5379  6.6338  16.8643";
						orientation = "1 0 -1 0";
						fire_rate = 0.25;
						weapon_range = 7500;
						weapon_energy = 29;
						},
					//	PORT Mounted Turret - Facing Z-
						{type="ball_turret";
						subentity_key = "griff_prototype_boa_turret_subent_RED";
						position = "-17.97   -0.0181   1.2819";
						orientation = "1 0 1 0";
						fire_rate = 0.25;
						weapon_range = 7500;
						weapon_energy = 29;
						},
					// 	TOP Mounted Turret - Facing Right X-
						{type="ball_turret";
						subentity_key = "griff_prototype_boa_turret_subent_WHITE";
						position = "-0.0697   29.0156 -40.815";
						orientation = "0 0 0.7071 0.7071";
						fire_rate = 0.25;
						weapon_range = 7500;
						weapon_energy = 29;
						},
					// 	AFT Mounted Turret - Facing Right X+
						{type="ball_turret";
						subentity_key = "griff_prototype_boa_turret_subent_WHITE";
						position = "-0.0697   19.993  -50.336";
						orientation = "0 0 1 0";
						fire_rate = 0.25;
						weapon_range = 7500;
						weapon_energy = 29;
						}					
				   );
	};

"v2-griff_prototype_boa-PLAYER" = 
	{
	like_ship = "griff_prototype_boa-PLAYER";
	name = "Griff Boa C"; 
	energy_recharge_rate = 3.2;
	forward_weapon_type = "WEAPON_BEAM_LASER";
	laser_color = "cyanColor";
	max_cargo = 125;
	max_energy = 512; 
	max_flight_pitch = 1.0; 
	max_flight_roll = 2.5; 
	max_flight_speed = 312; 
	max_missiles = 8; 
	thrust = 40;
	roles = "player";
	
	subentities = (
					//	STARBOARD Mounted Turret - Facing Y+
						{type="ball_turret";
						subentity_key = "griff_prototype_boa_turret_subent_RED";
						position = "17.5379  6.6338  16.8643";
						orientation = "1 0 -1 0";
						fire_rate = 0.25;
						weapon_range = 7500;
						weapon_energy = 29;
						},
					//	PORT Mounted Turret - Facing Z-
						{type="ball_turret";
						subentity_key = "griff_prototype_boa_turret_subent_RED";
						position = "-17.97   -0.0181   1.2819";
						orientation = "1 0 1 0";
						fire_rate = 0.25;
						weapon_range = 7500;
						weapon_energy = 29;
						},
					// 	TOP Mounted Turret - Facing Right X-
						{type="ball_turret";
						subentity_key = "griff_prototype_boa_turret_subent_WHITE";
						position = "-0.0697   29.0156 -40.815";
						orientation = "0 0 0.7071 0.7071";
						fire_rate = 0.26;
						weapon_range = 7500;
						weapon_energy = 29;
						},
					// 	AFT Mounted Turret - Facing Right X+
						{type="ball_turret";
						subentity_key = "griff_prototype_boa_turret_subent_WHITE";
						position = "-0.0697   19.993  -50.336";
						orientation = "0 0 1 0";
						fire_rate = 0.26;
						weapon_range = 7500;
						weapon_energy = 29;
						}					
				   );
	};

								//ship version 3

"v3-griff_prototype_boa-NPC" = 
	{
	like_ship = "griff_prototype_boa-NPC";
	name = "Griff Boa CE"; 
	energy_recharge_rate = 4.0;
	forward_weapon_type = "WEAPON_BEAM_LASER";
	laser_color = "purpleColor";
	max_cargo = 75;
	max_energy = 608; 
	max_flight_pitch = 1.0; 
	max_flight_roll = 2.0; 
	max_flight_speed = 380; 
	max_missiles = 5; 
	thrust = 45;
	auto_ai = yes;
	auto_weapons = yes;
	fuel = 70;
	has_ecm = 0.99;
	has_escape_pod = 0.95;
	has_fuel_injection = 0.75;
	has_scoop = 1; 
	has_shield_booster = 0.85;
	has_shield_enhancer = 0.55;
	likely_cargo = 12;
	roles = "assassin-heavy(0.01) hunter-heavy(0.01) pirate-heavy-fighter(0.01) pirate-heavy-freighter(0.01) trader-courier(0.02)";
	
	subentities = (
					//	STARBOARD Mounted Turret - Facing Y+
						{type="ball_turret";
						subentity_key = "griff_prototype_boa_turret_subent_GREEN";
						position = "17.5379  6.6338  16.8643";
						orientation = "1 0 -1 0";
						fire_rate = 0.25;
						weapon_range = 7500;
						weapon_energy = 31;
						},
					//	PORT Mounted Turret - Facing Z-
						{type="ball_turret";
						subentity_key = "griff_prototype_boa_turret_subent_RED";
						position = "-17.97   -0.0181   1.2819";
						orientation = "1 0 1 0";
						fire_rate = 0.25;
						weapon_range = 7500;
						weapon_energy = 31;
						},
					// 	TOP Mounted Turret - Facing Right X-
						{type="ball_turret";
						subentity_key = "griff_prototype_boa_turret_subent_AMBER";
						position = "-0.0697   29.0156 -40.815";
						orientation = "0 0 0.7071 0.7071";
						fire_rate = 0.25;
						weapon_range = 7500;
						weapon_energy = 31;
						},
					// 	AFT Mounted Turret - Facing Right X+
						{type="ball_turret";
						subentity_key = "griff_prototype_boa_turret_subent_WHITE";
						position = "-0.0697   19.993  -50.336";
						orientation = "0 0 1 0";
						fire_rate = 0.25;
						weapon_range = 7500;
						weapon_energy = 31;
						}					
				   );
	
};

"v3-griff_prototype_boa-PLAYER" = 
	{
	like_ship = "griff_prototype_boa-PLAYER";
	name = "Griff Boa CE"; 
	energy_recharge_rate = 4.0;
	forward_weapon_type = "WEAPON_BEAM_LASER";
	laser_color = "purpleColor";
	max_cargo = 75;
	max_energy = 608; 
	max_flight_pitch = 1.0; 
	max_flight_roll = 2.0; 
	max_flight_speed = 380; 
	max_missiles = 5; 
	thrust = 45;
	roles = "player";
	
	subentities = (
					//	STARBOARD Mounted Turret - Facing Y+
						{type="ball_turret";
						subentity_key = "griff_prototype_boa_turret_subent_GREEN";
						position = "17.5379  6.6338  16.8643";
						orientation = "1 0 -1 0";
						fire_rate = 0.25;
						weapon_range = 7500;
						weapon_energy = 31;
						},
					//	PORT Mounted Turret - Facing Z-
						{type="ball_turret";
						subentity_key = "griff_prototype_boa_turret_subent_RED";
						position = "-17.97   -0.0181   1.2819";
						orientation = "1 0 1 0";
						fire_rate = 0.25;
						weapon_range = 7500;
						weapon_energy = 31;
						},
					// 	TOP Mounted Turret - Facing Right X-
						{type="ball_turret";
						subentity_key = "griff_prototype_boa_turret_subent_AMBER";
						position = "-0.0697   29.0156 -40.815";
						orientation = "0 0 0.7071 0.7071";
						fire_rate = 0.25;
						weapon_range = 7500;
						weapon_energy = 31;
						},
					// 	AFT Mounted Turret - Facing Right X+
						{type="ball_turret";
						subentity_key = "griff_prototype_boa_turret_subent_WHITE";
						position = "-0.0697   19.993  -50.336";
						orientation = "0 0 1 0";
						fire_rate = 0.25;
						weapon_range = 7500;
						weapon_energy = 31;
						}					
				   );


	};
	
To keep the prototype reasonably level with v2 and v3, insert somewhere sensible, eg between lines 47 and 48:

Code: Select all

	roles = "pirate-light-freighter(0.01) trader(0.04)";
Replacement shipyard.plist – useful if you want to be able to buy these…
Note that it gives v2 a rear laser, and v3 rear, port and starboard lasers. Depending on your personal Ooniverse, this may be overkill. (And also not in keeping with the original design.) To remove, change lines 66 & 99 to

Code: Select all

		weapon_facings = 1;

Code: Select all

/* Griff Protype Boa */
{
	"griff_prototype_boa-PLAYER" = {
		"chance" = 0.05;
		"optional_equipment" = (
			"EQ_ADVANCED_COMPASS",
			"EQ_CARGO_BAY",
			"EQ_DOCK_COMP",
			"EQ_ECM",
			"EQ_FUEL_INJECTION",
			"EQ_ENERGY_BOMB",
			"EQ_ENERGY_UNIT",
			"EQ_ESCAPE_POD",
			"EQ_GAL_DRIVE",
			"EQ_HEAT_SHIELD",
			"EQ_MULTI_TARGET",
			"EQ_NAVAL_ENERGY_UNIT",
			"EQ_NAVAL_SHIELD_BOOSTER",
			"EQ_SCANNER_SHOW_MISSILE_TARGET",
			"EQ_SHIELD_BOOSTER",
			"EQ_WEAPON_PULSE_LASER",
			"EQ_WEAPON_BEAM_LASER",
		);
		price = 560000;
		standard_equipment = {
			extras = (
			"EQ_FUEL_SCOOPS"			
			);
			forward_weapon_type = "EQ_WEAPON_PULSE_LASER";
			missiles = 4;
		};
		techlevel = 7;
		weapon_facings = 1;
	};

	"v2-griff_prototype_boa-PLAYER" = {
		"chance" = 0.05;
		"optional_equipment" = (
			"EQ_ADVANCED_COMPASS",
			"EQ_CARGO_BAY",
			"EQ_DOCK_COMP",
			"EQ_ECM",
			"EQ_FUEL_INJECTION",
			"EQ_ENERGY_BOMB",
			"EQ_ENERGY_UNIT",
			"EQ_ESCAPE_POD",
			"EQ_GAL_DRIVE",
			"EQ_HEAT_SHIELD",
			"EQ_MULTI_TARGET",
			"EQ_NAVAL_ENERGY_UNIT",
			"EQ_NAVAL_SHIELD_BOOSTER",
			"EQ_SCANNER_SHOW_MISSILE_TARGET",
			"EQ_SHIELD_BOOSTER",
			"EQ_WEAPON_PULSE_LASER",
			"EQ_WEAPON_BEAM_LASER",
		);
		price = 610000;
		standard_equipment = {
			extras = (
			"EQ_FUEL_SCOOPS"			
			);
			forward_weapon_type = "EQ_WEAPON_PULSE_LASER";
			missiles = 4;
		};
		techlevel = 8;
		weapon_facings = 3;
	};

	"v3-griff_prototype_boa-PLAYER" = {
		"chance" = 0.05;
		"optional_equipment" = (
			"EQ_ADVANCED_COMPASS",
			"EQ_CARGO_BAY",
			"EQ_DOCK_COMP",
			"EQ_ECM",
			"EQ_FUEL_INJECTION",
			"EQ_ENERGY_BOMB",
			"EQ_ENERGY_UNIT",
			"EQ_ESCAPE_POD",
			"EQ_GAL_DRIVE",
			"EQ_HEAT_SHIELD",
			"EQ_MULTI_TARGET",
			"EQ_NAVAL_ENERGY_UNIT",
			"EQ_NAVAL_SHIELD_BOOSTER",
			"EQ_SCANNER_SHOW_MISSILE_TARGET",
			"EQ_SHIELD_BOOSTER",
			"EQ_WEAPON_PULSE_LASER",
			"EQ_WEAPON_BEAM_LASER",
		);
		price = 660000;
		standard_equipment = {
			extras = (
			"EQ_FUEL_SCOOPS"			
			);
			forward_weapon_type = "EQ_WEAPON_PULSE_LASER";
			missiles = 4;
		};
		techlevel = 9;
		weapon_facings = 15;
	};
}

Final notes:
The NPC versions do not use any of the new roles. New roles assigned with some hopefully sensible values. They should be reasonably rare, in keeping with the prototype spirit. Suggestions for improvements on this – and any other aspects – are welcome.
– Whether because of the changes in 1.80, because I've been away for too long, or because my personal Ooniverse has always been a particularly nasty place inhabited by all sorts of nasty opponents, I still manage to die often enough in my not-yet-Iron-Assed CE version. Consequently, I don't find these ships overpowered; YMMV.

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Posted: Tue Oct 21, 2014 12:52 am
by Diziet Sma
CheeseRedux wrote:
The NPC versions do not use any of the new roles. Suggestions for improvements on this – and any other aspects – are welcome.
UK_Eliter recently tweaked his Fer-de-Lance 3G and SuperSideWinder OXPs to use the new roles.. you might be able to make use of his work in that regard..
https://bb.oolite.space/viewtopic.php?f=4&t=16945

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Posted: Tue Oct 21, 2014 1:42 am
by CheeseRedux
Yes, I saw that earlier. The main problem is that I know very little about balancing for population. Assigning proper roles isn't especially complicated, it's the weighting that leaves me stumped.

Since these tweaks were originally made years ago, and the ships are not overly frequent in my Ooniverse, I've had very little reason to adjust the old numbers to fit the new roles. Something which may not be at all true for any others who would like to run into one of the souped-up versions at a suitable frequency…

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Posted: Tue Oct 21, 2014 1:51 am
by Diziet Sma
Well, that discussion I linked to did cover weighting as well, so possibly Spara's weighting chart, and/or a chat with Spara, might get you up to speed..

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Posted: Tue Oct 21, 2014 2:31 am
by CheeseRedux
I'm afraid I'm being unclear.
I've a basic grasp of how the weighting works. (If all other ships have a combined weighting of 9 for a specific role, and I give a ship a weight of 1, that ship has a 10% chance of being picked for that role.)
I've previously read the thread and looked at the table, taking note of both the suggestion to balance vs core-ships only and how different roles have wildly varying total weights.

What I lack is a good instinctive feel for what would be suitable numbers to use. There are simply too many unknown variables at work. Obviously it is impossible to account for how many other ships others may install, so that one is best ignored. (Balance for core-only.)
But I've also no clue how often the various roles are called. From the core ships, assassin-medium (Ferdelance) and assassin-heavy (Asp) both have a total weight of one. But without knowing how often a medium is called compared to a heavy, it gets tricky to know what value to give a hypothetical Additional Heavy. If mediums outnumber the heavies ten to one, it makes sense to use a higher value than if they're split fifty-fifty.

Meh, perhaps I'm just over-thinking the whole thing.

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Posted: Tue Oct 21, 2014 9:54 am
by spara
CheeseRedux wrote:
What I lack is a good instinctive feel for what would be suitable numbers to use. There are simply too many unknown variables at work. Obviously it is impossible to account for how many other ships others may install, so that one is best ignored. (Balance for core-only.)
But I've also no clue how often the various roles are called. From the core ships, assassin-medium (Ferdelance) and assassin-heavy (Asp) both have a total weight of one. But without knowing how often a medium is called compared to a heavy, it gets tricky to know what value to give a hypothetical Additional Heavy. If mediums outnumber the heavies ten to one, it makes sense to use a higher value than if they're split fifty-fifty.

Meh, perhaps I'm just over-thinking the whole thing.
First you need to decide if your ship is an assassin, escort, hunter, pirate, police or trader. And then the rarity of those. Just like before. The new roles give Oolite a better grasp of the ship, so that it can be spawned more intelligently. And that's what you have to do next. The page [wiki]Oolite Ship Roles[/wiki] tells you how to do the finer tuning. It gives you guidelines and examples how to select the new roles. For example for assassins the text clearly says what type of ship should have the assassin-light role. At this point you should consult the table of weights and make the decicions about the weights.

More work than before, but the new populating system really needs it to work correctly.

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Posted: Mon Dec 08, 2014 3:04 pm
by Venator Dha
Following a request from Diziet Sma Here are my modds to Clear HUD. There are 4 plist files for each alert state & docked. I have basically rearranged most of the parts to my liking. It is designed for wide screen views and I think all the parts should adjust to the screen dimensions. There are some parts (such as extra dials around the sights on red alert) commented out which can be reinstated if desired. I have added 4 MFD windows. Text size is generally small. Works with latest trunk but I have not designed it to be compatible with HUD switchers and other goodies except MFDs.
Image
hud-green.plist

Code: Select all

{
	crosshair_scale		= 32.0;
	crosshair_width		= 1.0;
	crosshair_color		= "greenColor";
	overall_alpha	= 0.75;
	reticle_target_sensitive = no;
	cloak_indicator_on_status_light = yes;
	scanner_non_linear = yes;
	scanner_ultra_zoom = yes;

        message_gui =
                {
                width = 150;
                height = 52;
                x = 250;
                y = 40;
                y_origin	= -1;
		x_origin	= 0;
		row_height = 11;
                };
        comm_log_gui =
                {
				alpha = 0.5;
				width = 150;
                height = 140;
                x = 116;
                y = 0;
		y_origin	= 0;
		x_origin	= -1;
                row_height = 7;
		background_rgba = "0.1 0.0 0.0 0.25";
		permanent = yes;
                };
        multi_function_displays = (
				{
			width = 120;
			height = 80;
			x = -80;
			y = -60;
			y_origin = 1;
			x_origin	= 1;
		},
		{
			width = 120;
			height = 80;
			x = -210;
			y = -60;
			y_origin = 1;
			x_origin	= 1;
		},
		{
			width = 120;
			height = 80;
			x = 80;
			y = -60;
			y_origin = 1;
			x_origin	= -1;
		},
		{
			width = 120;
			height = 80;
			x = 210;
			y = -60;
			y_origin = 1;
			x_origin	= -1;
		}
		);
	dials			= //these are drawn, in order, after the legends
	(
		{	// Targeting enhancement
			equipment_required 	= "EQ_SCANNER_SHOW_MISSILE_TARGET";
			selector		= "drawTargetReticle:";
		},
		{	// scanner
			alpha		= 0.5;
			selector	= "drawScanner:";
			x		= 0;
			y		= 34;
			y_origin	= -1;
			height		= 60.0;
			width		= 280.0;
			rgb_color	= (0.0, 1.0, 0.0);
		},
		{	// scanner zoom indicator
			alpha		= 1.0;
			selector	= "drawScannerZoomIndicator:";
			x		= -134;
			y		= 10;
			y_origin	= -1;
			rgb_color	= (0.0, 1.0, 0.0);
		},
		{	// compass
			alpha		= 0.7;
			selector	= "drawCompass:";
			x		= -40;
			y		= 34;
			height		= 50;
			width		= 50;
			y_origin	= -1;
			x_origin	= 1;
			rgb_color	= (0.0, 0.5, 0.0);
		},
		{	// LHS forward shield bar, can draw a surround 2 units out from the dial size specified
			alpha		= 0.5;
			draw_surround	= no;
			height		= 56;
			selector	= "drawForwardShieldBar:";
			width		= 4;
			x		= 14;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// energy gauge, can draw a surround 2 units out from the dial size specified
			alpha		= 0.5;
			draw_surround	= no;
			height		= 58;
			selector	= "drawEnergyGauge:";
			width		= 12;
			x		= 23;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
			labelled	= no;
		},
		{	// aft shield bar, can draw a surround 2 units out from the dial size specified
			alpha		= 0.5;
			draw_surround	= no;
			height		= 56;
			selector	= "drawAftShieldBar:";
			width		= 4;
			x		= 32;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// weapon temperature bar
			alpha		= 0.5;
			height		= 4;
			selector	= "drawWeaponTempBar:";
			width		= 18;
			x		= 26;
			y		= 0;
			y_origin	= 0;
			x_origin	= -1;
		},
//		{	// weapon temperature bar on crosshair
//			height		= 9;
//			selector	= "drawWeaponTempBar:";
//			width		= 1;
//			x		= 0;
//			y		= -19;
//		},
		{	// missile display, x and y give the location, the x-spacing is given by spacing, the size defines the icon size
			alpha		= 0.5;
			height		= 10;
			selector	= "drawMissileDisplay:";
			spacing		= 12;
			width		= 10;
			x 		= 30;
            y 		= 40;
            y_origin	= -1;
			x_origin	= -1;
		},
		{	// RHS speed bar, can draw a surround 2 units out from the dial size specified
			alpha		= 0.5;
			draw_surround	= no;
			height		= 56;
			selector	= "drawSpeedBar:";
			width		= 4;
			x		= 14;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// fuel bar
			alpha		= 0.5;
			height		= 56;
			selector	= "drawFuelBar:";
			width		= 4;
			x		= 20;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// cabin temperature bar
			alpha		= 0.5;
			height		= 56;
			selector	= "drawCabinTempBar:";
			width		= 4;
			x		= 26;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// altitude bar
			alpha		= 0.5;
			height		= 56;
			selector	= "drawAltitudeBar:";
			width		= 4;
			x		= 32;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// ship's clock, x and y give the location, the size defines the character size
			alpha		= 0.5;
			height		= 12;
			selector	= "drawClock:";
			width		= 12;
			x		= 20;
			y		= 6;
			y_origin	= -1;
			x_origin	= -1;
		},
		{	// status indicator light, x and y give the location, the size defines the icon size
			alpha		= 0.8;
			height		= 8;
			selector	= "drawStatusLight:";
			width		= 8;
			x		= -150;
			y		= 10;
			y_origin	= -1;
			height		= 10;
			width		= 10;
		},
		{	// station aegis
			alpha		= 0.8;
			selector	= "drawAegis:";
			x		= 150;
			y		= 10;
			y_origin	= -1;
			height		= 10;
			width		= 10;
		},
		{	// fuel scoop status
			alpha		= 0.8;
			selector	= "drawScoopStatus:";
			x		= 140;
			y		= 10;
			y_origin	= -1;
			height		= 10;
			width		= 10;
		},
		{	// weapons systems offline text, x and y give the location, the size defines the character size
			height		= 8;
			selector	= "drawWeaponsOfflineText:";
			width		= 8;
			x		= -43;
			y		= -45;
			y_origin	= -1;
		},
		{	// fps counter, x and y give the location, the size defines the character size
			height		= 8;
			selector	= "drawFPSInfoCounter:";
			width		= 8;
			x		= 20;
			y		= 100;
			y_origin	= -1;
			x_origin	= -1;
		}
	);
	
	legends		= // these are drawn, in order, before the dials, add any other images you want here
	(

		{	// Contrast HUD global
			image		= "background.png";
			height		= 68.0;
			width		= 1000.0;
			x		= 0.0;
			y		= 34;
			y_origin	= -1;
			alpha		= 0.20;
		},
		{	// Contrast HUD scanner
			image		= "circle.png";
			height		= 60;
			width		= 280;
			x		= 0;
			y		= 34;
			y_origin	= -1;
			alpha		= 0.20;
		},
		{	// Contrast HUD compass
			image		= "circle.png";
			x		= -40;
			y		= 34;
			height		= 50;
			width		= 50;
			y_origin	= -1;
			x_origin	= 1;
			alpha		= 0.20;
		},
		{	// RHS Contrast HUD speed
			image		= "background 4x4.png";
			height		= 56;
			width		= 23;
			x		= 23;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.20;
		},
		{	// Contrast HUD fuel
			image		= "background 4x4.png";
			height		= 140;
			width		= 80;
			x		= 0;
			y		= 0;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.20;
		},
	/*
		{	// Contrast HUD cabin temp
			image		= "background 4x4.png";
			height		= 56;
			width		= 5;
			x		= 26;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.50;
		},
		{	// Contrast HUD altitude
			image		= "background 4x4.png";
			height		= 56;
			width		= 5;
			x		= 33;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.50;
		},
	*/
		{
		    	text		= "SP";
			x		= 12;
			y		= -12;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "FU";
			x		= 18;
			y		= -12;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "CT";
			x		= 24;
			y		= -12;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "AL";
			x		= 30;
			y		= -12;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{	// LHS Contrast HUD fwd shield
			image		= "background 4x4.png";
			height		= 56;
			width		= 22;
			x		= 24;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.20;
		},
	/*
		{	// Contrast HUD energy
			image		= "background.png";
			height		= 54;
			width		= 18;
			x		= 29;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.50;
		},
		{	// Contrast HUD aft shield
			image		= "background.png";
			height		= 54;
			width		= 6;
			x		= 44;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.50;
		},
	*/
		{	// Contrast HUD weapon temp
			image		= "background.png";
			height		= 4;
			width		= 17;
			x		= 26;
			y		= 0;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.20;
		},
		{
			text		= "FS";
			x		= 12;
			y		= 4;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "EN";
			x		= 21;
			y		= 4;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "AS";
			x		= 30;
			y		= 4;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "LT";
			x		= 12;
			y		= -4;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		}
	);
	
}
hud-yellow.plist

Code: Select all

{
	crosshair_scale		= 32.0;
	crosshair_width		= 1.0;
	crosshair_color		= "yellowColor";
	overall_alpha	= 0.75;
	reticle_target_sensitive = yes;
	cloak_indicator_on_status_light = yes;
	scanner_non_linear = yes;
	scanner_ultra_zoom = yes;

        message_gui =
                {
                width = 150;
                height = 52;
                x = 250;
                y = 40;
                y_origin	= -1;
		x_origin	= 0;
		row_height = 11;
                };
        comm_log_gui =
                {
				alpha = 0.5;
				width = 150;
                height = 140;
                x = 116;
                y = 0;
		y_origin	= 0;
		x_origin	= -1;
                row_height = 7;
		background_rgba = "0.1 0.0 0.0 0.25";
		permanent = yes;
                };
        multi_function_displays = (
				{
			width = 120;
			height = 80;
			x = -80;
			y = -60;
			y_origin = 1;
			x_origin	= 1;
		},
		{
			width = 120;
			height = 80;
			x = -210;
			y = -60;
			y_origin = 1;
			x_origin	= 1;
		},
		{
			width = 120;
			height = 80;
			x = 80;
			y = -60;
			y_origin = 1;
			x_origin	= -1;
		},
		{
			width = 120;
			height = 80;
			x = 210;
			y = -60;
			y_origin = 1;
			x_origin	= -1;
		}
		);
	dials			= //these are drawn, in order, after the legends
	(
		{	// Targeting enhancement
			equipment_required 	= "EQ_SCANNER_SHOW_MISSILE_TARGET";
			selector		= "drawTargetReticle:";
		},
		{	// scanner
			alpha		= 0.7;
			selector	= "drawScanner:";
			x		= 0;
			y		= 34;
			y_origin	= -1;
			height		= 60.0;
			width		= 280.0;
			rgb_color	= (1.0, 0.5, 0.0);
		},
		{	// scanner zoom indicator
			alpha		= 1.0;
			selector	= "drawScannerZoomIndicator:";
			x		= -134;
			y		= 10;
			y_origin	= -1;
			rgb_color	= (1.0, 0.5, 0.0);
		},
		{	// compass
			alpha		= 0.7;
			selector	= "drawCompass:";
			x		= -40;
			y		= 34;
			height		= 50;
			width		= 50;
			y_origin	= -1;
			x_origin	= 1;
			rgb_color	= (0.0, 0.5, 0.0);
		},
		{	// LHS forward shield bar, can draw a surround 2 units out from the dial size specified
			alpha		= 0.75;
			draw_surround	= no;
			height		= 56;
			selector	= "drawForwardShieldBar:";
			width		= 4;
			x		= 14;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// energy gauge, can draw a surround 2 units out from the dial size specified
			alpha		= 0.75;
			draw_surround	= no;
			height		= 58;
			selector	= "drawEnergyGauge:";
			width		= 12;
			x		= 23;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
			labelled	= no;
		},
		{	// aft shield bar, can draw a surround 2 units out from the dial size specified
			alpha		= 0.75;
			draw_surround	= no;
			height		= 56;
			selector	= "drawAftShieldBar:";
			width		= 4;
			x		= 32;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// weapon temperature bar
			alpha		= 0.75;
			height		= 4;
			selector	= "drawWeaponTempBar:";
			width		= 18;
			x		= 26;
			y		= 0;
			y_origin	= 0;
			x_origin	= -1;
		},
//		{	// weapon temperature bar on crosshair
//			height		= 9;
//			selector	= "drawWeaponTempBar:";
//			width		= 1;
//			x		= 0;
//			y		= -19;
//		},
		{	// missile display, x and y give the location, the x-spacing is given by spacing, the size defines the icon size
			alpha		= 0.75;
			height		= 10;
			selector	= "drawMissileDisplay:";
			spacing		= 12;
			width		= 10;
			x 		= 30;
            y 		= 40;
            y_origin	= -1;
			x_origin	= -1;
		},
		{	// RHS speed bar, can draw a surround 2 units out from the dial size specified
			alpha		= 0.75;
			draw_surround	= no;
			height		= 56;
			selector	= "drawSpeedBar:";
			width		= 4;
			x		= 14;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// fuel bar
			alpha		= 0.75;
			height		= 56;
			selector	= "drawFuelBar:";
			width		= 4;
			x		= 20;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// cabin temperature bar
			alpha		= 0.75;
			height		= 56;
			selector	= "drawCabinTempBar:";
			width		= 4;
			x		= 26;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// altitude bar
			alpha		= 0.75;
			height		= 56;
			selector	= "drawAltitudeBar:";
			width		= 4;
			x		= 32;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// ship's clock, x and y give the location, the size defines the character size
			alpha		= 0.5;
			height		= 12;
			selector	= "drawClock:";
			width		= 12;
			x		= 20;
			y		= 6;
			y_origin	= -1;
			x_origin	= -1;
		},
		{	// status indicator light, x and y give the location, the size defines the icon size
			alpha		= 0.8;
			height		= 8;
			selector	= "drawStatusLight:";
			width		= 8;
			x		= -150;
			y		= 10;
			y_origin	= -1;
			height		= 10;
			width		= 10;
		},
		{	// station aegis
			alpha		= 1.0;
			selector	= "drawAegis:";
			x		= 150;
			y		= 10;
			y_origin	= -1;
			height		= 10;
			width		= 10;
		},
		{	// fuel scoop status
			alpha		= 0.75;
			selector	= "drawScoopStatus:";
			x		= 140;
			y		= 10;
			y_origin	= -1;
			height		= 10;
			width		= 10;
		},
		{	// weapons systems offline text, x and y give the location, the size defines the character size
			height		= 8;
			selector	= "drawWeaponsOfflineText:";
			width		= 8;
			x		= -43;
			y		= -45;
			y_origin	= 0;
		},
		{	// fps counter, x and y give the location, the size defines the character size
			height		= 8;
			selector	= "drawFPSInfoCounter:";
			width		= 8;
			x		= 20;
			y		= 100;
			y_origin	= -1;
			x_origin	= -1;
		}
	);
	
	legends		= // these are drawn, in order, before the dials, add any other images you want here
	(

		{	// Contrast HUD global
			image		= "background.png";
			height		= 68.0;
			width		= 1000.0;
			x		= 0.0;
			y		= 34;
			y_origin	= -1;
			alpha		= 0.20;
		},
		{	// Contrast HUD scanner
			image		= "circle.png";
			height		= 60;
			width		= 280;
			x		= 0;
			y		= 34;
			y_origin	= -1;
			alpha		= 0.20;
		},
		{	// Contrast HUD compass
			image		= "circle.png";
			x		= -40;
			y		= 34;
			height		= 50;
			width		= 50;
			y_origin	= -1;
			x_origin	= 1;
			alpha		= 0.20;
		},
		{	// RHS Contrast HUD speed
			image		= "background 4x4.png";
			height		= 56;
			width		= 23;
			x		= 23;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.20;
		},
		{	// Contrast HUD fuel
			image		= "background 4x4.png";
			height		= 140;
			width		= 80;
			x		= 0;
			y		= 0;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.20;
		},
	/*
		{	// Contrast HUD cabin temp
			image		= "background 4x4.png";
			height		= 56;
			width		= 5;
			x		= 26;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.50;
		},
		{	// Contrast HUD altitude
			image		= "background 4x4.png";
			height		= 56;
			width		= 5;
			x		= 33;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.50;
		},
	*/
		{
		    	text		= "SP";
			x		= 12;
			y		= -12;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "FU";
			x		= 18;
			y		= -12;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "CT";
			x		= 24;
			y		= -12;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "AL";
			x		= 30;
			y		= -12;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{	// LHS Contrast HUD fwd shield
			image		= "background 4x4.png";
			height		= 56;
			width		= 22;
			x		= 24;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.20;
		},
	/*
		{	// Contrast HUD energy
			image		= "background.png";
			height		= 54;
			width		= 18;
			x		= 29;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.50;
		},
		{	// Contrast HUD aft shield
			image		= "background.png";
			height		= 54;
			width		= 6;
			x		= 44;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.50;
		},
	*/
		{	// Contrast HUD weapon temp
			image		= "background.png";
			height		= 4;
			width		= 17;
			x		= 26;
			y		= 0;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.20;
		},
		{
			text		= "FS";
			x		= 12;
			y		= 4;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "EN";
			x		= 21;
			y		= 4;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "AS";
			x		= 30;
			y		= 4;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "LT";
			x		= 12;
			y		= -4;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		}
	);
	
}
hud-red.plist

Code: Select all

{
	crosshair_scale		= 32.0;
	crosshair_width		= 1.0;
	crosshair_color		= "redColor";
	overall_alpha	= 0.75;
	reticle_target_sensitive = yes;
	cloak_indicator_on_status_light = yes;
	scanner_non_linear = yes;
	scanner_ultra_zoom = yes;

        message_gui =
                {
                width = 150;
                height = 80;
                x = 0;
                y = 100;
                y_origin	= 0;
		x_origin	= 0;
		row_height = 11;
                };
        comm_log_gui =
                {
                alpha = 0.5;
				width = 150;
                height = 140;
                x = 116;
                y = 0;
		y_origin	= 0;
		x_origin	= -1;
                row_height = 7;
		background_rgba = "0.1 0.0 0.0 0.25";
		permanent = yes;
                };
        multi_function_displays = (
				{
			width = 120;
			height = 80;
			x = -80;
			y = -60;
			y_origin = 1;
			x_origin	= 1;
		},
		{
			width = 120;
			height = 80;
			x = -210;
			y = -60;
			y_origin = 1;
			x_origin	= 1;
		},
		{
			width = 120;
			height = 80;
			x = 80;
			y = -60;
			y_origin = 1;
			x_origin	= -1;
		},
		{
			width = 120;
			height = 80;
			x = 210;
			y = -60;
			y_origin = 1;
			x_origin	= -1;
		}
		);
	dials			= //these are drawn, in order, after the legends
	(
		{	// Targeting enhancement
			equipment_required 	= "EQ_SCANNER_SHOW_MISSILE_TARGET";
			selector		= "drawTargetReticle:";
		},
//		{	// Additional forward shield bar
//			draw_surround	= no;
//			height		= 1;
//			selector	= "drawForwardShieldBar:";
//			width		= 20;
//			x		= 0;
//			y		= -36;
//		},
//		{	// Additional energy gauge
//			draw_surround	= no;
//			n_bars		= 1;
//			height		= 1;
//			selector	= "drawEnergyGauge:";
//			width		= 20;
//			x		= 0;
//			y		= -38;
//			labelled	= no;
//		},
//		{	// Additional aft shield bar
//			draw_surround	= no;
//			height		= 1;
//			selector	= "drawAftShieldBar:";
//			width		= 20;
//			x		= 0;
//			y		= -40;
//		},
		{	// scanner
			alpha		= 1.0;
			selector	= "drawScanner:";
			x		= 0;
			y		= 34;
			y_origin	= -1;
			height		= 60.0;
			width		= 280.0;
			rgb_color	= (0.7, 0.0, 0.4);
		},
		{	// scanner zoom indicator
			alpha		= 1.0;
			selector	= "drawScannerZoomIndicator:";
			x		= -134;
			y		= 10;
			y_origin	= -1;
			rgb_color	= (0.7, 0.0, 0.4);
		},
		{	// compass
			alpha		= 0.7;
			selector	= "drawCompass:";
			x		= -40;
			y		= 34;
			height		= 50;
			width		= 50;
			y_origin	= -1;
			x_origin	= 1;
			rgb_color	= (0.0, 0.5, 0.0);
		},
		{	// LHS forward shield bar, can draw a surround 2 units out from the dial size specified
			draw_surround	= no;
			height		= 56;
			selector	= "drawForwardShieldBar:";
			width		= 4;
			x		= 14;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// energy gauge, can draw a surround 2 units out from the dial size specified
			draw_surround	= no;
			height		= 58;
			selector	= "drawEnergyGauge:";
			width		= 12;
			x		= 23;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
			labelled	= no;
		},
		{	// aft shield bar, can draw a surround 2 units out from the dial size specified
			draw_surround	= no;
			height		= 56;
			selector	= "drawAftShieldBar:";
			width		= 4;
			x		= 32;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// weapon temperature bar
			height		= 4;
			selector	= "drawWeaponTempBar:";
			width		= 18;
			x		= 26;
			y		= 0;
			y_origin	= 0;
			x_origin	= -1;
		},
//		{	// weapon temperature bar on crosshair
//			height		= 9;
//			selector	= "drawWeaponTempBar:";
//			width		= 1;
//			x		= 0;
//			y		= -19;
//		},
		{	// missile display, x and y give the location, the x-spacing is given by spacing, the size defines the icon size
			height		= 10;
			selector	= "drawMissileDisplay:";
			spacing		= 12;
			width		= 10;
			x 		= 30;
            y 		= 40;
            y_origin	= -1;
			x_origin	= -1;
		},
		{	// RHS speed bar, can draw a surround 2 units out from the dial size specified
			draw_surround	= no;
			height		= 56;
			selector	= "drawSpeedBar:";
			width		= 4;
			x		= 14;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// fuel bar
			height		= 56;
			selector	= "drawFuelBar:";
			width		= 4;
			x		= 20;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// cabin temperature bar
			height		= 56;
			selector	= "drawCabinTempBar:";
			width		= 4;
			x		= 26;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// altitude bar
			height		= 56;
			selector	= "drawAltitudeBar:";
			width		= 4;
			x		= 32;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
		},
		{	// ship's clock, x and y give the location, the size defines the character size
			alpha		= 0.5;
			height		= 12;
			selector	= "drawClock:";
			width		= 12;
			x		= 20;
			y		= 6;
			y_origin	= -1;
			x_origin	= -1;
		},
		{	// status indicator light, x and y give the location, the size defines the icon size
			alpha		= 0.8;
			height		= 8;
			selector	= "drawStatusLight:";
			width		= 8;
			x		= -150;
			y		= 10;
			y_origin	= -1;
			height		= 10;
			width		= 10;
		},
		{	// station aegis
			alpha		= 1.0;
			selector	= "drawAegis:";
			x		= 150;
			y		= 10;
			y_origin	= -1;
			height		= 10;
			width		= 10;
		},
		{	// fuel scoop status
			alpha		= 0.75;
			selector	= "drawScoopStatus:";
			x		= 140;
			y		= 10;
			y_origin	= -1;
			height		= 10;
			width		= 10;
		},
		{	// weapons systems offline text, x and y give the location, the size defines the character size
			height		= 8;
			selector	= "drawWeaponsOfflineText:";
			width		= 8;
			x		= -43;
			y		= -45;
			y_origin	= -1;
		},
		{	// fps counter, x and y give the location, the size defines the character size
			height		= 8;
			selector	= "drawFPSInfoCounter:";
			width		= 8;
			x		= 20;
			y		= 100;
			y_origin	= -1;
			x_origin	= -1;
		}
	);
	
	legends		= // these are drawn, in order, before the dials, add any other images you want here
	(

		{	// Contrast HUD global
			image		= "background.png";
			height		= 68.0;
			width		= 1000.0;
			x		= 0.0;
			y		= 34;
			y_origin	= -1;
			alpha		= 0.20;
		},
		{	// Contrast HUD scanner
			image		= "circle.png";
			height		= 60;
			width		= 280;
			x		= 0;
			y		= 34;
			y_origin	= -1;
			alpha		= 0.20;
		},
		{	// Contrast HUD compass
			image		= "circle.png";
			x		= -40;
			y		= 34;
			height		= 50;
			width		= 50;
			y_origin	= -1;
			x_origin	= 1;
			alpha		= 0.20;
		},
//		{	// Contrast HUD additional fwd shield
//			image		= "background-red.png";
//			height		= 1;
//			width		= 20;
//			x		= 0;
//			y		= -36;
//			alpha		= 0.50;
//		},
//		{	// Contrast HUD additional energy
//			image		= "background-red.png";
//			height		= 1;
//			width		= 20;
//			x		= 0;
//			y		= -38;
//			alpha		= 0.50;
//		},
//		{	// Contrast HUD additional aft shield
//			image		= "background-red.png";
//			height		= 1;
//			width		= 20;
//			x		= 0;
//			y		= -40;
//			alpha		= 0.50;
//		},
		{	// RHS Contrast HUD speed
			image		= "background 4x4.png";
			height		= 56;
			width		= 23;
			x		= 23;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.20;
		},
		{	// Contrast HUD fuel
			image		= "background 4x4.png";
			height		= 140;
			width		= 80;
			x		= 0;
			y		= 0;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.20;
		},
	/*
		{	// Contrast HUD cabin temp
			image		= "background 4x4.png";
			height		= 56;
			width		= 5;
			x		= 26;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.50;
		},
		{	// Contrast HUD altitude
			image		= "background 4x4.png";
			height		= 56;
			width		= 5;
			x		= 33;
			y		= -39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.50;
		},
	*/
		{
		    	text		= "SP";
			x		= 12;
			y		= -12;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "FU";
			x		= 18;
			y		= -12;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "CT";
			x		= 24;
			y		= -12;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "AL";
			x		= 30;
			y		= -12;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{	// LHS Contrast HUD fwd shield
			image		= "background 4x4.png";
			height		= 56;
			width		= 22;
			x		= 24;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.20;
		},
	/*
		{	// Contrast HUD energy
			image		= "background.png";
			height		= 54;
			width		= 18;
			x		= 29;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.50;
		},
		{	// Contrast HUD aft shield
			image		= "background.png";
			height		= 54;
			width		= 6;
			x		= 44;
			y		= 39;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.50;
		},
	*/
		{	// Contrast HUD weapon temp
			image		= "background.png";
			height		= 4;
			width		= 17;
			x		= 26;
			y		= 0;
			y_origin	= 0;
			x_origin	= -1;
			alpha		= 0.20;
		},
		{
			text		= "FS";
			x		= 12;
			y		= 4;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "EN";
			x		= 21;
			y		= 4;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "AS";
			x		= 30;
			y		= 4;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		},
		{
			text		= "LT";
			x		= 12;
			y		= -4;
			y_origin	= 0;
			x_origin	= -1;
			height		= 6;
			width		= 4;
		}
	);
	
}
hud.plist // removing comments here could lead to strange placements of things

Code: Select all

{
	crosshair_scale		= 32.0;
	crosshair_width		= 1.0;
	crosshair_color		= "darkGrayColor";
	overall_alpha	= 0.75;
	reticle_target_sensitive = no;
	cloak_indicator_on_status_light = yes;

        message_gui =
                {
                width = 280;
                height = 60;
                x = 0;
		y = -204;
                row_height = 11;
                };
        comm_log_gui =
                {
                width = 130;
                height = 200;
                x = 70;
                y = -55;
		y_origin	= 1;
		x_origin	= -1;
                row_height = 7;
		background_rgba = "0.0 0.0 0.0 0.0";
		permanent = yes;
                };
	dials			= //these are drawn, in order, after the legends
	(
	/*
		{	// Targeting enhancement
			equipment_required 	= "EQ_SCANNER_SHOW_MISSILE_TARGET";
			selector		= "drawTargetReticle:";
		},
		{	// LHS forward shield bar, can draw a surround 2 units out from the dial size specified
			draw_surround	= no;
			height		= 54;
			selector	= "drawForwardShieldBar:";
			width		= 6;
			x		= -370;
			y		= 39;
			y_origin	= -1;
		},
		{	// energy gauge, can draw a surround 2 units out from the dial size specified
			draw_surround	= no;
			height		= 54;
			selector	= "drawEnergyGauge:";
			width		= 6;
			x		= -360;
			y		= 39;
			y_origin	= -1;
			labelled	= no;
		},
		{	// aft shield bar, can draw a surround 2 units out from the dial size specified
			draw_surround	= no;
			height		= 54;
			selector	= "drawAftShieldBar:";
			width		= 6;
			x		= -350;
			y		= 39;
			y_origin	= -1;
		},
		{	// weapon temperature bar
			height		= 54;
			selector	= "drawWeaponTempBar:";
			width		= 6;
			x		= -338;
			y		= 39;
			y_origin	= -1;
		},
		{	// missile display, x and y give the location, the x-spacing is given by spacing, the size defines the icon size
			height		= 8;
			selector	= "drawMissileDisplay:";
			spacing		= 12;
			width		= 8;
			x		= -320;
			y		= 10;
			y_origin	= -1;
		},
		{	// RHS speed bar, can draw a surround 2 units out from the dial size specified
			draw_surround	= no;
			height		= 54;
			selector	= "drawSpeedBar:";
			width		= 6;
			x		= 340;
			y		= 39;
			y_origin	= -1;
		},
		{	// fuel bar
			height		= 54;
			selector	= "drawFuelBar:";
			width		= 6;
			x		= 350;
			y		= 39;
			y_origin	= -1;
		},
		{	// cabin temperature bar
			height		= 54;
			selector	= "drawCabinTempBar:";
			width		= 6;
			x		= 360;
			y		= 39;
			y_origin	= -1;
		},
		{	// altitude bar
			height		= 54;
			selector	= "drawAltitudeBar:";
			width		= 6;
			x		= 370;
			y		= 39;
			y_origin	= -1;
		},
	*/
		{	// ship's clock, x and y give the location, the size defines the character size
			height		= 12;
			selector	= "drawClock:";
			width		= 12;
			x		= 20;
			y		= 6;
			y_origin	= -1;
			x_origin	= -1;
		},
	/*
		{	// status indicator light, x and y give the location, the size defines the icon size
			alpha		= 0.8;
			height		= 8;
			selector	= "drawStatusLight:";
			width		= 8;
			x		= -150;
			y		= 10;
			y_origin	= -1;
			height		= 10;
			width		= 10;
		},
		{	// station aegis
			alpha		= 1.0;
			selector	= "drawAegis:";
			x		= 150;
			y		= 10;
			y_origin	= -1;
			height		= 10;
			width		= 10;
		},
		{	// fuel scoop status
			alpha		= 0.75;
			selector	= "drawScoopStatus:";
			x		= 140;
			y		= 10;
			y_origin	= -1;
			height		= 10;
			width		= 10;
		},
		{	// weapons systems offline text, x and y give the location, the size defines the character size
			height		= 8;
			selector	= "drawWeaponsOfflineText:";
			width		= 8;
			x		= -275;
			y		= 2;
			y_origin	= -1;
		},
		{	// fps counter, x and y give the location, the size defines the character size
			height		= 10;
			selector	= "drawFPSInfoCounter:";
			width		= 10;
			x		= 50;
			y		= 200;
			y_origin	= -1;
			x_origin	= -1;
		}
	*/
	);
	
	legends		= // these are drawn, in order, before the dials, add any other images you want here
	(
	/*
		{	// Contrast HUD global
			image		= "background.png";
			height		= 68.0;
			width		= 800.0;
			x		= 0.0;
			y		= 34;
			y_origin	= -1;
			alpha		= 0.20;
		},
		{	// RHS Contrast HUD speed
			image		= "background.png";
			height		= 54;
			width		= 6;
			x		= 340;
			y		= 39;
			y_origin	= -1;
			alpha		= 0.50;
		},
		{	// Contrast HUD fuel
			image		= "background.png";
			height		= 54;
			width		= 6;
			x		= 350;
			y		= 39;
			y_origin	= -1;
			alpha		= 0.50;
		},
		{	// Contrast HUD cabin temp
			image		= "background.png";
			height		= 54;
			width		= 6;
			x		= 360;
			y		= 39;
			y_origin	= -1;
			alpha		= 0.50;
		},
		{	// Contrast HUD altitude
			image		= "background.png";
			height		= 54;
			width		= 6;
			x		= 370;
			y		= 39;
			y_origin	= -1;
			alpha		= 0.50;
		},
		{
		    	text		= "SP";
			x		= 336;
			y		= 2;
			y_origin	= -1;
			height		= 8;
			width		= 6;
		},
		{
			text		= "FU";
			x		= 346;
			y		= 2;
			y_origin	= -1;
			height		= 8;
			width		= 6;
		},
		{
			text		= "CT";
			x		= 356;
			y		= 2;
			y_origin	= -1;
			height		= 8;
			width		= 6;
		},
		{
			text		= "AL";
			x		= 366;
			y		= 2;
			y_origin	= -1;
			height		= 8;
			width		= 6;
		},
		{	// LHS Contrast HUD fwd shield
			image		= "background-red.png";
			height		= 54;
			width		= 6;
			x		= -370;
			y		= 39;
			y_origin	= -1;
			alpha		= 0.50;
		},
		{	// Contrast HUD energy
			image		= "background-red.png";
			height		= 54;
			width		= 6;
			x		= -360;
			y		= 39;
			y_origin	= -1;
			alpha		= 0.50;
		},
		{	// Contrast HUD aft shield
			image		= "background-red.png";
			height		= 54;
			width		= 6;
			x		= -350;
			y		= 39;
			y_origin	= -1;
			alpha		= 0.50;
		},
		{	// Contrast HUD weapon temp
			image		= "background.png";
			height		= 54;
			width		= 6;
			x		= -338;
			y		= 39;
			y_origin	= -1;
			alpha		= 0.50;
		},
		{
			text		= "FS";
			x		= -374;
			y		= 2;
			y_origin	= -1;
			height		= 8;
			width		= 6;
		},
		{
			text		= "EN";
			x		= -364;
			y		= 2;
			y_origin	= -1;
			height		= 8;
			width		= 6;
		},
		{
			text		= "AS";
			x		= -354;
			y		= 2;
			y_origin	= -1;
			height		= 8;
			width		= 6;
		},
		{
			text		= "LT";
			x		= -342;
			y		= 2;
			y_origin	= -1;
			height		= 8;
			width		= 6;
		}
*/
	);
	
}

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Posted: Sat Dec 27, 2014 9:25 am
by spara
As per a subtle hit by Dizzie, here are the instructions for changing the Rock Hermit tunnel effect when using BGS.

1. Create a Config folder into the AddOns folder.
2. Create a shipdata-overrides.plist file into the Config folder.
3a. To use the the same texture that's been used for the system stations, insert

Code: Select all

{
   "oolite_template_rock-hermit" = {
      script_info = {bgs_tunnel_shape = "2.0";};
   };
}
into the shipdata-overrides.plist file.
3b. To use a custom texture for the tunnel, insert

Code: Select all

{
   "oolite_template_rock-hermit" = {
      "script_info" = {
         bgs_tunnel_texture = "your_custom_hermit_texture.png";
         bgs_tunnel_shape = 2;
      };
   };
}
into the shipdata-overrides.plist file.
4. Start the game by holding the shift key, until you see the spinning Cobra.

Note 1. If you want to use your own custom tunnel texture, you need to create a Textures folder into the AddOns and put your png file there. Resolution should be in powers of two. For example 1024x1024. I have created a couple of custom textures that can be found here: https://bb.oolite.space/viewtopic.php?f=4&t=16028.

Note 2. If you're using Griff's Station Bundle and you're not seeing any change in the tunnel texture, you need to use griff_normalmapped_hermit key instead of oolite_template_rock-hermit key.

Note 3. If you're using some old style hermit models and you're not seeing any change in the tunnel texture, you might have better luck by using rock-hermit key instead of oolite_template_rock-hermit key.

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Posted: Thu May 28, 2015 12:26 pm
by mohawk
Hello to everyone! :D
This is my first post, so I would like to apologise for any mistakes that I might do since I am not a native speaker.
Since I discovered Oolite I have done some tinkering myself and I have even gone so far as to make a couple of oxps for my personal use.
However I have absolutely no knowledge of programming so what I have done is study other oxps and copy and modify parts that I need, through a painful proses of trial and error, until it works.
If anyone that has any knowledge of programming would like to see them and maybe get interested in adopting and or improving or commenting on them I would be very happy to post them here.
However I am concerned about the copyright issues since everybody that has ever written an oxp might recognise a piece of his code in there and I think I have lost track of who I need to ask for permission from.

Now for the tweaking part of the topic,
**Warning some code that I post might look very stupid or ugly or pointless, but it is what I managed to make work. I have no programming knowlege**

Inspired by far planets from Norby, I tinkered the additional planets oxp to increase the distance of all planets and moons to give a feeling of a larger system, but the planets are still quite reachable with the torus to sun oxp.
the only problem is that the planetary compass for some reason that I can not understand does not display any planet or moon any more :(
although the naming seams to work the beacon doesn't

In script.js file line 146 I changed the value from 2.5 to 12
In line 211 changed value from 5 to 25
In line 212 changed value from 2.5 to 18

I think it looks quite good but you must have your stars moved further away like with sensible sun, otherwise it is a little weird that the sun is so close but the planets are so far.
To me is the middle ground between realism, and oolitism for my system.
I only wish I could solve the planetary compass think, and maybe find some way for some of the planets to be behind the sun to simulate orbits.
I tried to understand how the positioning works in this oxp but it is waaay beyond my reach :cry:

An other major tinkering that I made is in the ironhide oxp, so that:
a) when you get hit by lasers while your energy is low for some other reason, the energy doesn't automagically become full.
if it is below 1/3 of the max energy, it becomes 1/3 otherwise just adds the damage back to your energy. (I did this 1/3 thing because for very low energy sometimes you could die by a hit even though your ironhide was full!)
b) you get no equipment damage as long as the armour is still there. (I know many will disagree but I hate it when every nick gets my advanced targeting or my injectors out. it spoils my fan! :evil: )
so my script.js file is :

Code: Select all

this.startUp = function()
	{
	if(!missionVariables.ironHide_percentage) { missionVariables.ironHide_percentage = 0;}
	if(!missionVariables.ironHide_milFlag) { missionVariables.ironHide_milFlag = 0; }
	if(!missionVariables.ironHide_strength) {
		if(missionVariables.ironHide_milFlag == 0) { missionVariables.ironHide_strength = 200; }
		else { missionVariables.ironHide_strength = 400; }
	}
		if(missionVariables.ironHide_percentage > 0 && player.ship.equipmentStatus("EQ_ARMOUR_PLATE") !== "EQUIPMENT_OK")
		{
			player.ship.removeEquipment("EQ_ARMOUR_PLATE");
			player.ship.awardEquipment("EQ_ARMOUR_PLATE");
		}
	
	
	// below are how much to charge per percentage of armour to be repaired, depending on cost price of full new set	
	this.ironHideFactor = EquipmentInfo.infoForKey("EQ_IRONHIDE").price / 1000;	
	}
	
this.shipDockedWithStation = function(station)
	{
	this.ironHideFactor = EquipmentInfo.infoForKey("EQ_IRONHIDE").price / 1000;	
	}	
	
this.shipTakingDamage = function(amount, fromEntity, damageType)	
	{		
	if(amount && amount > 0 && player.ship.equipmentStatus("EQ_IRONHIDE") === "EQUIPMENT_OK" && missionVariables.ironHide_percentage <= 0) 
		{ // if the armour is destroyed by damage
		player.ship.removeEquipment("EQ_IRONHIDE");
		player.ship.removeEquipment("EQ_ARMOUR_PLATE");
		missionVariables.ironHide_percentage = 0;
		missionVariables.ironHide_milFlag = 0;
		player.consoleMessage("IronHide armour has been destroyed!", 6);
		mission.setInstructionsKey(null);
		}
		
	if(amount && amount > 0 && player.ship.energy < player.ship.maxEnergy)
		{ // if we have energy damage
		this.shield = missionVariables.ironHide_strength * (missionVariables.ironHide_percentage / 100);
		if(amount < this.shield)
			{
			if(player.ship.energy < (player.ship.maxEnergy / 3))
			  {player.ship.energy = (player.ship.maxEnergy / 3);}
			else
			  {
			  player.ship.energy += (amount);
			  }
			missionVariables.ironHide_percentage -= Math.floor(100 * (amount / missionVariables.ironHide_strength));
			}
		else	
			{
			player.ship.energy += this.shield;
			missionVariables.ironHide_percentage = 0;
			}
		}
	
	}
	

this.guiScreenWillChange = function(to, from)
	{
	if(to === "GUI_SCREEN_MANIFEST")
		{		
		if(player.ship.equipmentStatus("EQ_IRONHIDE") === "EQUIPMENT_OK")
			{ mission.setInstructionsKey("ironHide_short"); }
		else
			{ mission.setInstructionsKey(null); }
		}	
	}
	
this.playerBoughtEquipment = function(equipment)
	{
	switch(equipment)
		{
		case("EQ_IRONHIDE"):
			{
			missionVariables.ironHide_percentage = 100;
			missionVariables.ironHide_strength = EquipmentInfo.infoForKey(equipment).scriptInfo.ironHideStrength;		
			player.ship.awardEquipment("EQ_ARMOUR_PLATE");
			return;
			break;
			}
			
		case("EQ_IRONHIDE_MIL"):
			{
			missionVariables.ironHide_milFlag = 1;
			missionVariables.ironHide_strength = EquipmentInfo.infoForKey(equipment).scriptInfo.ironHideStrength;
			player.ship.removeEquipment("EQ_IRONHIDE_MIL");		
			return;
			break;
			}	

		
		case("EQ_IRONHIDE_REPAIR"):
			{
			missionVariables.ironHide_cost = (100 - missionVariables.ironHide_percentage) * this.ironHideFactor;
			if(missionVariables.ironHide_mil == 1)
				{
				missionVariables.ironHide_cost *= 1.5;
				}
			player.ship.removeEquipment("EQ_IRONHIDE_REPAIR");
			player.ship.removeEquipment("EQ_ARMOUR_PLATE");
			player.ship.awardEquipment("EQ_ARMOUR_PLATE");
			if(player.credits < missionVariables.ironHide_cost)
				{
				mission.runScreen({title: "Too Expensive", messageKey:"ironHide_tooExpensive"});
				}
			else
				{
				mission.runScreen({title: "Armour Repair", messageKey:"ironHide_repair", choicesKey:"ironHide_choices"}, this.choice);
				}
			return;
			break;
			}

	
		case("EQ_RENOVATION"):
			{
			if(player.ship.equipmentStatus("EQ_IRONHIDE") === "EQUIPMENT_UNAVAILABLE" || missionVariables.ironHide_percentage == 100)
				{ //  if we don't have armour or it's full-strength, no repair needed during renovations
				return;
				break;
				}
				
			if(player.ship.equipmentStatus("EQ_IRONHIDE") === "EQUIPMENT_OK" && missionVariables.ironHide_percentage <100)
				{
				missionVariables.ironHide_cost = (100 - missionVariables.ironHide_percentage) * this.ironHideFactor;
				if(missionVariables.ironHide_milFlag == 1)
					{
					missionVariables.ironHide_cost *= 1.5;
					}
				}

			if(missionVariables.ironHide_cost > 0 && missionVariables.ironHide_cost < player.credits)
				{
				mission.runScreen({title: "Armour Repair", messageKey:"ironHide_renovationRepair", choicesKey:"ironHide_renovationChoices"}, this.choice);
				}
			break;	
			}
		}
	}

this.choice = function(choice)
	{
	switch(choice)
		{
		case "IRONHIDE_1_ACCEPT":
			{
			player.credits -= missionVariables.ironHide_cost;
			missionVariables.ironHide_percentage = 100;
			break;
			}

		case "IRONHIDE_1_RENOVATION_ACCEPT":
			{
			player.credits -= missionVariables.ironHide_cost;
			missionVariables.ironHide_percentage = 100;
			break;
			}	
		case "IRONHIDE_2_REJECT":
			{
			break;
			}
		}
	}	
	
this.playerBoughtNewShip = this.shipLaunchedEscapePod = function()
	{ // reset everything for a new ship, as armour isn't transferrable or covered by insurance
	player.ship.removeEquipment("EQ_IRONHIDE");
	player.ship.removeEquipment("EQ_ARMOUR_PLATE");
	missionVariables.ironHide_percentage = 0;
	missionVariables.ironHide_milFlag = 0;
	mission.setInstructionsKey(null);
	}
	
this.equipmentDamaged = function(equipment)
	{// as it doesn't make sense for the armour to be inoperable-damaged
	if(equipment === "EQ_IRONHIDE")
		{
		player.ship.setEquipmentStatus("EQ_IRONHIDE","EQUIPMENT_OK"); 
		}
	}	


this.equipmentDamaged = function(equipment)
	{// as there are more plates left
		if(equipment === "EQ_ARMOUR_PLATE")
		{
				player.ship.setEquipmentStatus("EQ_ARMOUR_PLATE","EQUIPMENT_OK");
				player.consoleMessage("Armour plating at " + missionVariables.ironHide_percentage + "%",2);
		}
	}
	


The equipment.plist is

Code: Select all

(
	(
	4, 
	7500, 
	"IronHide Armour", 
	"EQ_IRONHIDE", 
	"Civilian-grade armour.", 
		{
		"available_to_all" = true;
		"incompatible_with_equipment" = "EQ_DUMMY";
		script_info = { ironHideStrength = 200; };
		}
	),
	
	(
	9, 
	7500, 
	"IronHide Armour Military Upgrade", 
	"EQ_IRONHIDE_MIL", 
	"Upgrade your IronHide to military specifications - doubles the damage resistance.", 
		{
		"available_to_all" = true;
		"requires_equipment" = "EQ_IRONHIDE";
		script_info = { ironHideStrength = 400; };
		"conditions" = 
			(
			"mission_ironHide_percentage equal 100",
			"mission_ironHide_milFlag equal 0"
			);
		}
	),

	(
	4, 
	0, 
	"Quotation for repair of IronHide armour", 
	"EQ_IRONHIDE_REPAIR", 
	"Inspection and price quotation for repair to your armour.", 
		{
		"available_to_all" = true;
		"requires_equipment" = "EQ_IRONHIDE";
		"conditions" = 
			(
			"mission_ironHide_percentage lessthan 100"
			);
		}
	),

	(
	99,
	0,
	"Armour Plate",
	"EQ_ARMOUR_PLATE",
	"Armour plating of the IronHide armour",
	{
	"available_to_all" = true;
	"requires_equipment" = "EQ_IRONHIDE";
	"is_visible" = "true";
	"damage_probability" = "800.0";
	}

	)	
)
I hope Thargoid will not mind that I posted this. :oops: If anyone objects please tell me to delete this the post.

I have also tinkered the battledamage oxp to be more compatible (in my point of view,) with the ironhide
so that as long as the armour is still strong you get no plate damage.

so the battle_damage_script.js is as follows:

Code: Select all

this.startUp = function ()
{
if (missionVariables.BattleDamage_status !== "DAMAGED")
 {
 player.ship.awardEquipment ("EQ_HULL_REPAIR"); //Ensures that repair does not appear on F3 screen
 missionVariables.BattleDamage_status = "OK";
 if(!missionVariables.platingStatus){missionVariables.platingStatus = 0;}
 }

if (player.ship.equipmentStatus("EQ_ARMOUR_PLATE") !== "EQUIPMENT_OK") 
	{	
	if(missionVariables.platingStatus > 0)
		{
		player.ship.removeEquipment("EQ_HULL_PLATING");
		player.ship.awardEquipment("EQ_HULL_PLATING");
		}
	else
		{
		player.ship.removeEquipment("EQ_HULL_PLATING");
		}
	}
}
this.playerBoughtNewShip = function ()
{
 player.ship.awardEquipment ("EQ_HULL_REPAIR"); //Ensures that repair does not appear on F3 screen
 missionVariables.BattleDamage_status = "OK";
 missionVariables.platingStatus = 5;
 player.ship.removeEquipment("EQ_HULL_PLATING");
 if (player.ship.equipmentStatus("EQ_ARMOUR_PLATE") !== "EQUIPMENT_OK") 
	{	
	if(missionVariables.platingStatus > 0)
		{
		player.ship.awardEquipment("EQ_HULL_PLATING");
		}
	}
} 
this.shipWillDockWithStation = function (station)
{
 if (missionVariables.BattleDamage_status == "DAMAGED")
 {
  player.addMessageToArrivalReport(expandDescription("[HULL_DAMAGE_MESSAGE]"));
 }
 else if (missionVariables.BattleDamage_status == "DAMAGED1")
 {
  missionVariables.BattleDamage_status = "DAMAGED"; // set to damaged
  player.addMessageToArrivalReport(expandDescription("[HULL_DAMAGE_MESSAGE_TWO]"));
  player.credits -= 25;
 }
}
this.shipWillLaunchFromStation = function(station)
{
 if (missionVariables.BattleDamage_status == "OK") //Ensures that there are no issues when player launches after un-repaired launch/re-dock/repair/re-launch
 {
  player.ship.fuelLeakRate = 0;
  player.ship.scriptedMisjump = false;
 }
 if (player.ship.equipmentStatus("EQ_ARMOUR_PLATE") !== "EQUIPMENT_OK") 
	{	
	if(missionVariables.platingStatus > 0)
		{
		player.ship.removeEquipment("EQ_HULL_PLATING");
		player.ship.awardEquipment("EQ_HULL_PLATING");
		}
	else
		{
		player.ship.removeEquipment("EQ_HULL_PLATING");
		}
	}
	

}
this.shipLaunchedFromStation = function(station) // to handle ship launching with damage un-repaired
{
 if (missionVariables.BattleDamage_status == "DAMAGED" && (Math.random() <= 0.50)) 
 {
  this.station = station;
  this.station.commsMessage("Commander, your ship appears to be badly damaged. Take care!"),player.ship;
  missionVariables.BattleDamage_status = "DAMAGED"; // set to damaged
 }
 else if (missionVariables.BattleDamage_status == "DAMAGED" && (Math.random() > 0.50))
 {
  player.ship.fuelLeakRate = 0.5;
  player.consoleMessage("WARNING! FUEL LEAK.",5);
  this.station = station;
  this.station.commsMessage("Commander, your ship is venting fuel due to a hull breach. You must dock for repairs immediately."),player.ship;
  player.ship.scriptedMisjump = true;
  missionVariables.BattleDamage_status = "DAMAGED1"; // set to damaged1
 }

 
}
this.shipTakingDamage = function(amount)
{ 
	
	if(amount && amount > 0 && player.ship.equipmentStatus("EQ_ARMOUR_PLATE") !== "EQUIPMENT_OK")
		{
		if(missionVariables.platingStatus > 0 && player.ship.equipmentStatus("EQ_HULL_PLATING") !== "EQUIPMENT_OK")
			{
			player.ship.awardEquipment("EQ_HULL_PLATING");
			}
		}
 if(amount === 0 || player.ship.equipmentStatus("EQ_ARMOUR_PLATE") === "EQUIPMENT_OK") return;
 else if (missionVariables.BattleDamage_status == "DAMAGED")
  {
  player.consoleMessage("Hull taking further damage.",5);
  }
 else 
  {
  player.ship.removeEquipment("EQ_HULL_REPAIR"); //remove 'repair' to allow 'repair' to be applied again. This should happen before any risk of damage to 'repair'
  missionVariables.BattleDamage_status = "DAMAGED"; // set to damaged
  player.consoleMessage("WARNING! HULL DAMAGE",10);
  }
}
	this.playerBoughtEquipment = function(equipment)
{
 if (equipment == "EQ_HULL_REPAIR")
  {
  clock.addSeconds ("35000");
  missionVariables.BattleDamage_status = "OK"; // set to OK
 missionVariables.platingStatus = 5;
 player.ship.removeEquipment("EQ_HULL_PLATING");
 if (player.ship.equipmentStatus("EQ_ARMOUR_PLATE") !== "EQUIPMENT_OK") 
	{	
	if(missionVariables.platingStatus > 0)
		{
		player.ship.awardEquipment("EQ_HULL_PLATING");
		}
	}

  }
 if (equipment == "EQ_RENOVATION")
  {
  player.ship.awardEquipment("EQ_HULL_REPAIR");
  missionVariables.BattleDamage_status = "OK"; // set to OK
 missionVariables.platingStatus = 5;
 player.ship.removeEquipment("EQ_HULL_PLATING");
 if (player.ship.equipmentStatus("EQ_ARMOUR_PLATE") !== "EQUIPMENT_OK") 
	{	
	if(missionVariables.platingStatus > 0)
		{
		player.ship.awardEquipment("EQ_HULL_PLATING");
		}
	}

  }
}
this.shipLaunchedEscapePod = function(escapepod) // resets everything after ejecting so new ship is undamaged
{
 missionVariables.BattleDamage_status = "OK"; //set to OK
 player.ship.awardEquipment ("EQ_HULL_REPAIR"); //Ensures that repair does not appear on F3 screen
 missionVariables.platingStatus = 5;
 player.ship.removeEquipment("EQ_HULL_PLATING");
 if (player.ship.equipmentStatus("EQ_ARMOUR_PLATE") !== "EQUIPMENT_OK") 
	{	
	if(missionVariables.platingStatus > 0)
		{
		player.ship.awardEquipment("EQ_HULL_PLATING");
		}
	}
}
this.equipmentDamaged = function(equipment)
{
	if(equipment === "EQ_HULL_PLATING")
		{
		if(missionVariables.platingStatus > 0)
			{
			player.ship.setEquipmentStatus("EQ_HULL_PLATING","EQUIPMENT_OK");
			missionVariables.platingStatus -=1;
			}
		else
			{
			player.ship.removeEquipment("EQ_HULL_PLATING");
			}
		}
}
and the equipment.plist is as follows:

Code: Select all

(
	/* adapted from core plist for Battle Damage OXP */
	(
		6, 1000, "Maintenance Overhaul",
		"EQ_RENOVATION",
		"Covers dry docking fees, shield and scoop system de-ionization, systems tune-up, new oil and filters, check and refurbishment of entire hull including replating of damaged hull sections, repainting and detailed valeting.",
		{
			available_to_all = true;
		}
	),
	(
		0, 750, "Emergency Hull Repairs",
		"EQ_HULL_REPAIR",
		"Basic emergency replating of damaged hull sections to maintain structural integrity and airtightness.",
		{
                "incompatible_with_equipment" = "EQ_HULL_REPAIR";
		available_to_all = true;
                "visible" = no; // not listed on the F5F5 screen.
		}
	),
	(
		99, 0, "Hull Plating", 
		"EQ_HULL_PLATING",
		"Hull plating good",
		{
		"incompatible_with_equipment" = "EQ_ARMOUR_PLATE";
		"available_to_all" = "true";
		"visible" = "yes";
		"damage_probability" = "800.0";
		}
	)
)
now when your ship gets a beating first you get armour damage, then you get plating damage with all the consequences and lastly your equipment and cargo start getting blasted. missiles and collisions should do damage as before (I think)

my dream would be to make an oxp that separates the energy from the survival of the ship, and when the armour and plating gets breached multiple equipment get damaged , fires start resulting in cabin temp rising, and various bad things randomly start to happen until your ship goes boom or maybe an ecm blast ignites your leaking tank and you become a spectacle system wide :shock:
But as I said enough times already I am not a coder :(
thank you for your time! :)

Re: Tinkerer's Workshop - OXP tweaking for fun and profit!

Posted: Thu May 28, 2015 2:34 pm
by Layne
mohawk wrote:
Hello to everyone! :D
my dream would be to make an oxp that separates the energy from the survival of the ship, and when the armour and plating gets breached multiple equipment get damaged , fires start resulting in cabin temp rising, and various bad things randomly start to happen until your ship goes boom or maybe an ecm blast ignites your leaking tank and you become a spectacle system wide :shock:
But as I said enough times already I am not a coder :(
thank you for your time! :)
Hello, hullo, hallo, mohawk, and welcome to the forum. Pick up your complimentary fun and profit from that box by the door, the dusty one.

Some interesting ideas you've got with these tweaks! I always like seeing existing OXP's customized.