[WIP] NPC Equipment Damage

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

Moderators: winston, another_commander

User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [WIP] NPC Equipment Damage

Post by Cholmondely »

AppleMac Latest Log:

[plist.parse.failed]: Failed to parse /Users/accountname/Library/Application Support/Oolite/AddOns/NPC_Equipment_Damage.oxp/manifest.plist as a property list.
Unexpected character { at line 1
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: [WIP] NPC Equipment Damage

Post by hiran »

Cholmondely wrote: Tue Aug 10, 2021 4:40 pm
AppleMac Latest Log:

[plist.parse.failed]: Failed to parse /Users/accountname/Library/Application Support/Oolite/AddOns/NPC_Equipment_Damage.oxp/manifest.plist as a property list.
Unexpected character { at line 1
That is a bad state. But is this OXP on the expansion manager?
Maybe it is worth fixing such stuff on those OXPs that are more likely to be activated? e.g.

org.antlr.v4.runtime.misc.ParseCancellationException: line 517:58 [@2263,22974:22975='.0',<14>,517:58] extraneous input '.0' expecting {')', ','} at http://wiki.alioth.net/img_auth.php/5/5 ... data.plist
Sunshine - Moonlight - Good Times - Oolite
User avatar
tsoj
Deadly
Deadly
Posts: 199
Joined: Wed May 18, 2016 8:19 pm
Location: Berlin
Contact:

Re: [WIP] NPC Equipment Damage

Post by tsoj »

I think the fix was simple, just add a ',' at the end of line 16.
Or if that doesn't fix the issue, this manifest seems to work, at least for me, but I can't image that there would be something OS specific such that it wouldn't work on your Mac.

Code: Select all

{
	identifier = "oolite.oxp.Ngalo.NPC_Equipment_Damage";
	required_oolite_version = "1.82";
	title = "NPC Equipment Damage";
	version = "0.2.1";
	category = "Mechanics";
	description = "Randomly damages NPC equipment, imitating what Oolite does for player-ship internal damage as far as possible";
	author = "Ngalo";
	license = "CC-BY-NC-SA";
	tags = ("Equal Rights for NPCs", "fairness", "equipment", "damage");
	optional_oxps = (
		{
			identifier = "oolite.oxp.Ngalo.N-Shields";
			version = "0.6";
			description = "This OXP is designed to work with N-Shields, if installed."
		},
		{
			identifier = "oolite.oxp.phkb.ShipConfiguration";
			version = "0.2.0";
			description = "This OXP can interact with ShipConfiguration to correctly damage most of the extra equipment that OXP provides";
		}
	)
	
	/*
	CustomShields, NPC Shields
	conflict_oxps = (
		{
			
		}
	)
	*/
}
I think it would make sense to update it on the wiki. As it is (CC-BY-NC-SA) it would probably okay if I upload a new version, right?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [WIP] NPC Equipment Damage

Post by phkb »

Cholmondely wrote: Tue Aug 10, 2021 4:40 pm
AppleMac Latest Log:
Here's a link to a "fixed" version: NPC_Equipment_Damage.oxz.
Can you try this and let me know if the issue is resolved? If so, I'll upload it to the wiki.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [WIP] NPC Equipment Damage

Post by Cholmondely »

phkb wrote: Wed Aug 11, 2021 12:24 am
Cholmondely wrote: Tue Aug 10, 2021 4:40 pm
AppleMac Latest Log:
Here's a link to a "fixed" version: NPC_Equipment_Damage.oxz.
Can you try this and let me know if the issue is resolved? If so, I'll upload it to the wiki.
With your new version I get this:
08:41:34.236 [plist.parse.failed]: Failed to parse /Users/accountname/Library/Application Support/Oolite/AddOns/NPC_Equipment_Damage.oxz/manifest.plist as a property list.
Unexpected character { at line 1
08:41:34.236 [oxp.noManifest]: OXZ /Users/accountname/Library/Application Support/Oolite/AddOns/NPC_Equipment_Damage.oxz has no manifest.plist


And the second flagged up on (what might be called) the "Game Loading screen".

I also note that I am getting these with the GalNavy Light Destroyer oxp & with Stranger's PlanetLand:

08:41:36.725 [plist.parse.failed]: Failed to parse /Users/accountname/Library/Application Support/Oolite/AddOns/galactic_navy_light_destroyer_1.0.oxp/Config/shipdata.plist as a property list.
Unexpected character { at line 1

08:42:00.994 [plist.parse.failed]: Failed to parse /Users/accountname/Library/Application Support/Oolite/AddOns/PlanetLand 2.6.1.oxp/Config/world-scripts.plist as a property list.
Unexpected character ( at line 1


When I first downloaded it, PlanetLand worked. But not now. I tweaked it adding in the XenonUI exception. But there seems to be nothing wrong...
Maybe my AppleMac has picked up some nasty bug...

Reference:
(
"planetFall_worldScript.js",
"planet_makeup.js",
)

var w = worldScripts.XenonUI;
if (w) w.$addMissionScreenException("mymissionscreenid");


Might these all be some issue with "invisible codes" from such as the Windows text editor?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [WIP] NPC Equipment Damage

Post by Cholmondely »

tsoj wrote: Wed Aug 11, 2021 12:18 am
I think the fix was simple, just add a ',' at the end of line 16.
Is there any chance you could explain this to me?

My understanding is that I'm being told that the initial { is unbalanced, superfluous to requirements, and doing horrendous things to the digestive capabilities of my silicon chips, giving them a severe dose of tummy-ache.

Why would adding a , rather than another } help matters?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
tsoj
Deadly
Deadly
Posts: 199
Joined: Wed May 18, 2016 8:19 pm
Location: Berlin
Contact:

Re: [WIP] NPC Equipment Damage

Post by tsoj »

Cholmondely wrote: Wed Aug 11, 2021 8:14 am
Is there any chance you could explain this to me?
No, because I was wrong :oops: (generally, my though was that error messages aren't always exactly where the error happens, but where the error gets detected. And with a missing comma, that could be very well at the end/beginning of a file).
If I were right, then phkb's fixed version should work.

In case this issue didn't happen until recently and you neither updated these OXPs nor Oolite itself, it seems likely that it is indeed something with the Mac itself.
If it is something with Windows-only codes or similar, maybe it helps to manually copy-paste the regarding text from the plists into a Mac-native editor, save them as new files and replace the original plists with them. But that is pretty much only a shot in the dark.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [WIP] NPC Equipment Damage

Post by Cholmondely »

tsoj wrote: Wed Aug 11, 2021 8:51 am
Cholmondely wrote: Wed Aug 11, 2021 8:14 am
Is there any chance you could explain this to me?
In case this issue didn't happen until recently
Not quite, the only recent change where something stopped working was with Stranger's PlanetLand when I tried to nobble it to be compatible with XenonUI.

I'm not sure that NPC Equipment Damage ever worked for me. Spara's GalNavy Light Destroyer oxp certainly didn't.

Again, it is quite something how Galactic Navy really changes the feel of the game for me. Going from a Universe with chaos on the rise and thargoids and pirates marauding here, there and everywhere... all of a sudden GalCop has got these massive navy presences, and things feel a heck of a lot safer. Very interesting, just looking at the emotions generated! A shame that HIMSN is non-functional and that I can't compare.
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [WIP] NPC Equipment Damage

Post by phkb »

Cholmondely wrote: Wed Aug 11, 2021 8:05 am
With your new version I get this:
OK, using the same link as above, can you try downloading the OXZ again, and replacing the previous one? Just testing a possibility.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [WIP] NPC Equipment Damage

Post by Cholmondely »

phkb wrote: Thu Aug 12, 2021 2:47 am
OK, using the same link as above, can you try downloading the OXZ again, and replacing the previous one? Just testing a possibility.
Test of possibility reveals... ta-da!

09:40:43.245 [plist.parse.failed]: Failed to parse /Users/accountname/Library/Application Support/Oolite/AddOns/NPC_Equipment_Damage.oxz/manifest.plist as a property list.
Unexpected character { at line 1
09:40:43.245 [oxp.noManifest]: OXZ /Users/accountname/Library/Application Support/Oolite/AddOns/NPC_Equipment_Damage.oxz has no manifest.plist


The suspension mounts... !
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [WIP] NPC Equipment Damage

Post by phkb »

Cholmondely wrote: Thu Aug 12, 2021 8:54 am
The suspension mounts... !
OK, try this version: NPC_Equipment_Damage.oxz
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [WIP] NPC Equipment Damage

Post by Cholmondely »

phkb wrote: Thu Aug 26, 2021 6:49 am
Cholmondely wrote: Thu Aug 12, 2021 8:54 am
The suspension mounts... !
OK, try this version: NPC_Equipment_Damage.oxz
So I'm currently trying out Elite Trader - so no combat yet. But the latest.log indicates no problems! (all sorts of problems with SIRF, etc, but not with NPC Equipment Damage!)

Congratulations, Sir!

What was it?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: [WIP] NPC Equipment Damage

Post by phkb »

Cholmondely wrote: Thu Aug 26, 2021 7:02 pm
What was it?
In this case, I got around the issue by converting the Openstep format to XML. Not a solution for every instance, but a bit of a workaround.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: [WIP] NPC Equipment Damage

Post by Cholmondely »

I believe that this belongs here...
arquebus wrote: Tue Dec 07, 2021 4:02 pm
tsoj wrote: Tue Dec 07, 2021 1:41 pm
If you have customshields or n-shields installed, I suggest to also install NPC equipment damage OXP to make it fair again. Otherwise NPC ships have an unfair advantage over you.
Unfortunately I'm getting a "doesn't have a valid manifest" error when I try to load that one.
I may have solved it by taking the quotation marks out of the manifest line...? (At least I saw that other OXPs didn't have that, and when I took them out after unzipping the oxz, I didn't get the error again. Remains to be seen whether it actually loaded or not.)
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
tsoj
Deadly
Deadly
Posts: 199
Joined: Wed May 18, 2016 8:19 pm
Location: Berlin
Contact:

Re: [WIP] NPC Equipment Damage

Post by tsoj »

I found a few bugs (damage probability calculation was way too low compared to what Oolite does for the player, and a typo made the OXP incompatible with N-Shields), that I fixed.

Here is the new version: NPC Equipment Damage OXP 0.3.0. This includes the manifest fix by phkb.
Post Reply