Equipment damage in combat - random or preference.

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Equipment damage in combat - random or preference.

Post by Capt. Murphy »

Hi,

I've trying really hard to get an piece of OXP equipment damaged in combat for testing purposes.

In my tests I've fitted a new Jameson with the equipment, launched, fired on the coriolis and then let the vipers batter me....i'm about 15 attempts in and still it has not broken.

On the other hand if I fit docking computers, ecm and witchspace injectors and do the same, on most attempts one or more of these are damaged before I die.

So it there a preference in the code for certain items to be damaged first? Or is there a bug somewhere stopping OXP equipment being damaged?

Ta,

edit to add - I'm testing this on a 1.75.2 installation and the equipment.plist is below....

Code: Select all

(
	(
		0, 15000, "Standard HUD/IFF Scanner",
		"EQ_HUD_IFF_SCANNER",
		"HUD Display & IFF Scanner unit. Essential equipment for all space-worthy vessels.",
		{
			"available_to_all" = 1;
		}
	)
)
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Equipment damage in combat - random or preference.

Post by Smivs »

maybe it's because the HUD/scanner can't get/doesn't get damaged?
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Equipment damage in combat - random or preference.

Post by Capt. Murphy »

But it should not stop this OXP equipment being damaged. Once it is a script takes over to simulate a damaged HUD/scanner until the OXP equipment is repaired.

I know it works when I damage it via script - for testing it breaks when I switch to aft view.

Code: Select all

this.viewDirectionChanged = function(view)
{
	if (view == "VIEW_AFT")
	{player.ship.setEquipmentStatus("EQ_HUD_IFF_SCANNER","EQUIPMENT_DAMAGED");}
}
Also another question - looking at the source I think that equipment can only be destroyed in Strict Mode.....why do we have a this.equipmentDestroyed handler then? Is it for the native mission scripts?
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Equipment damage in combat - random or preference.

Post by Thargoid »

Smivs wrote:
maybe it's because the HUD/scanner can't get/doesn't get damaged?
The above is a standard piece of equipment, at least as far as the game is concerned. It's not the HUD or scanner, it's just a piece of equipment that happens to make use of it.

In my experience OXP equipment can also get damaged as readily as trunk stuff can.

The destroyed question is interesting - it was my understanding too that equipment can only be destroyed in strict mode. I guess it's there for modifying trunk equipment or making new equipment that is strict-mode compatible (although quite how you'd do that given OXPs aren't loaded is a further interesting question).
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Equipment damage in combat - random or preference.

Post by Capt. Murphy »

Mmm.

I've been trying to decipher the source for this bit (not knowing Obj C) and it looks like the choice is random, but the chance of damaged equipment is more likely the more items of equipment you have got fitted. Makes sense I guess to help new Jamesons...
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: Equipment damage in combat - random or preference.

Post by another_commander »

Capt. Murphy, why don't you just use the Debug Console for this? Run the game with the Debug Console, then when you want to damage the equipment, just execute:

Code: Select all

player.ship.setEquipmentStatus("EQ_HUD_IFF_SCANNER","EQUIPMENT_DAMAGED");
The result is exactly the same as if the equipment had been selected for damage by the code.
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Equipment damage in combat - random or preference.

Post by Capt. Murphy »

Thanks a_c,

I just like to double check in game play that the equipment can be selected by the code for damage (I've made wrong assumptions before!) , and was a bit surprised by what seemed to be a predilection for certain items if installed to be damaged in preference to others.

edit - OK - it's been successfully damaged in game combat - although only after on a hunch I changed the name to "EQ_BREAKABLE_HUD_IFF_SCANNER". Probably coincidence, but the hunch was that the internal list of installed equipment is alphabetical and that things earlier in the list may be more likely to be damaged. It did break first time out though after this change (and with about 1/2 dozen other equipment items installed).
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Equipment damage in combat - random or preference.

Post by Switeck »

I've heard the last items to be installed are more likely to be damaged.
Thargoid wrote:
The destroyed question is interesting - it was my understanding too that equipment can only be destroyed in strict mode.
It's worthy of considering a game change so that already-damaged equipment could be destroyed in regular mode...but giving undamaged equipment a chance to get damaged before destroying something. And any single hit could only damage/destroy 1 thing.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2453
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia
Contact:

Re: Equipment damage in combat - random or preference.

Post by Wildeblood »

Capt. Murphy wrote:
I've trying really hard to get an piece of OXP equipment damaged in combat for testing purposes.

In my tests I've fitted a new Jameson with the equipment, launched, fired on the coriolis and then let the vipers batter me....i'm about 15 attempts in and still it has not broken.

On the other hand if I fit docking computers, ecm and witchspace injectors and do the same, on most attempts one or more of these are damaged before I die.
I wish I'd read this thread 2 days ago... this is exactly the same experience I've had today. It doesn't matter how many equipment items I have, the game seems to have a definite preference for destroying the docking computers, rather than OXP equipment.

ADDENDUM: I've just been experimenting some more. It seems the Witchdrive Fuel Injectors cannot be damaged while in use? I.e. I provoked a group of ships to shoot at me, then flew straight at them on fuel injectors, a console message said fuel injectors damaged. But when I tried it a second time, expecting not to have fuel injectors available, they still worked. Upon docking, other equipment was listed as damaged but not the fuel injectors? Did I just mis-read the message in the rush? (This was with no OXP equipment items at all.)
Post Reply