Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

[Release] RandomHits 1.7.1

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

Moderators: winston, another_commander

Post Reply
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Re: [Release] RandomHits 1.5.3

Post by pagroove »

Is this the error?
I'm on Mac.

Code: Select all

20:05:39.706 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (Random_Hits 1.5.4): TypeError: system.addShips(barRole, 1, barPosition, 10) is null
20:05:39.706 [script.javaScript.exception.unexpectedType]:       /Users/pagroove/Games/Oolite 1.77.1/AddOns/RandomHits1.5.4.oxp/Scripts/oolite-randomHits.js, line 797.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: [Release] RandomHits 1.5.3

Post by Commander McLane »

Yes. It seems that either the local variable "barRole" or the local variable "barPosition" is not defined, more probably the former. It should contain a string corresponding to the roles key of one of the space bar entries in shipdata.
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [Release] RandomHits 1.5.3

Post by spara »

Thanks guys, much appreciated. I'm fairly sure I know where the problem is. Give me a couple of days and I'll fix it. I'm a bit occupied at the moment.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: [Release] RandomHits 1.5.3

Post by Eric Walch »

Unrelated, but I see also the following error in the log:

Code: Select all

20:01:03.170 [script.javaScript.exception.notDefined]: ***** JavaScript exception (buoyRepair): ReferenceError: Vector is not defined
20:01:03.170 [script.javaScript.exception.notDefined]:       /Users/pagroove/Games/Oolite 1.77.1/AddOns/buoyRepair1.02.oxp/Scripts/buoyRepair.js, line 191.
But version 1.02 must be one of the first releases and is not compatible with current OOlite. The current version is 1.3.2

Same with:

Code: Select all

20:05:39.710 [script.javaScript.exception.notFunction]: ***** JavaScript exception (rockHermit_Locator 1.3): TypeError: player.ship.hasEquipment is not a function
20:05:39.710 [script.javaScript.exception.notFunction]:       /Users/pagroove/Games/Oolite 1.77.1/AddOns/Rock_Hermit_Locator1.3.oxp/Config/script.js, line 27.
Version 1.3 was written for Oolite 1.72. There hare several functions deprecated since that release.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: [Release] RandomHits 1.5.3

Post by Eric Walch »

Commander McLane wrote:
... It should contain a string corresponding to the roles key of one of the space bar entries in shipdata.
That is why I wrote that shipdata.plist contains a syntax error. An error in the script would affect all OS and would have been reported by everyone. And as Mac got company from Windows 8, that now also does the same strict syntax check, I am more convinced that this is the error.

I am use to see these errors at the start of the log, but that is because I glued a stone brick on my shift-key during startup. In this case the error was only written to the log during cache rebuild. Now, because of the syntax error, all shipdata entries are missing in the cache and the syntax error is not visible anymore in the log.
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [Release] RandomHits 1.5.3

Post by spara »

It seems I had already corrected the error I was thinking about. I just flew around the eight, jumped to an anarchy system in every galaxy and did not encounter any errors from RH. I've compared the 1.4.18 js to 1.5.4 js and I'm fairly sure the error is not there. So it must be in shipdata. That's 7000 lines long and since I'm not getting any errors, it's like looking for a needle in a haystack :( .

I'm on Linux, if that matters anything.

Just to make sure... Did you shift-start after updating RH, PAGroove?
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: [Release] RandomHits 1.5.4

Post by Eric Walch »

So it must be in shipdata. That's 7000 lines long and since I'm not getting any errors, it's like looking for a needle in a haystack .
I just downloaded this version of RH and can confirm that the shipdata.plist is corrupt. On the mac, you already see it by its icon that it contains a syntax error. (the word 'plist' is missing in the icon).
On opening with a plist editor I get the usual error in line 0, so that means manually looking for the error. That is the reason, I often edit files with a plist editor. And when doing it with a text editor, I open it in between with the plist editor for a syntax check of my just edited part.
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Re: [Release] RandomHits 1.5.3

Post by pagroove »

spara wrote:
It seems I had already corrected the error I was thinking about. I just flew around the eight, jumped to an anarchy system in every galaxy and did not encounter any errors from RH. I've compared the 1.4.18 js to 1.5.4 js and I'm fairly sure the error is not there. So it must be in shipdata. That's 7000 lines long and since I'm not getting any errors, it's like looking for a needle in a haystack :( .

I'm on Linux, if that matters anything.

Just to make sure... Did you shift-start after updating RH, PAGroove?
Yes I did. Sorry to come with this error so late. But it only came to light after visiting multiple Anarchies.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [Release] RandomHits 1.5.4

Post by spara »

So be it then. Better get to work. Can someone recommend a plist validator for linux?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6574
Joined: Wed Feb 28, 2007 7:54 am

Re: [Release] RandomHits 1.5.4

Post by another_commander »

spara wrote:
Can someone recommend a plist validator for linux?
You can always give a go at the built-in OXP verifier, which normally catches things like syntax errors or other inconsistencies in plists. Example usage:

oolite --verify-oxp ../AddOns/Griff_Shipset_Resources_v1.2.24.oxp

The result of the verification will be saved in the Logs folder, with the OXP name as filename, like this:

Code: Select all

07-Nov-13  15:19    <DIR>          .
07-Nov-13  15:19    <DIR>          ..
07-Nov-13  15:19               416 Griff_Shipset_Resources_v1.2.24.oxp.log
07-Nov-13  15:19             1,143 Latest.log
07-Nov-13  15:15             1,143 Previous.log
and looks like this:

Code: Select all

15:19:17.185 Running OXP verifier for ../AddOns/Griff_Shipset_Resources_v1.2.24.oxp
15:19:17.185 Scanning files
15:19:17.307 Checking requires.plist
15:19:17.308 Checking for unused files
  15:19:17.308 TODO: implement unused files check.
15:19:17.308 OXP verification complete.
15:19:17.488 Exiting: OXP verifier run.
15:19:17.504 .GNUstepDefaults synchronized.

Closing log at 2013-11-07 15:19:17 +0100.
It still has a few TODOs, but the main checks are performed.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: [Release] RandomHits 1.5.4

Post by Commander McLane »

Got it! But the shipdata has more than one issue.

1) PlistEdit Pro opens it as a JSON-file, but it should be ASCII. Due to this the file isn't fixable even if all fixes are applied. Because it doesn't have JSON-format, PlistEdit Pro refuses to save or even convert it.

Thus I had to create a new, empty plist in the correct ASCII format, and then copy the code wholesale into it. From there we have a working basis.

2) There's three syntax errors (it's three times the same, so it's likely a c&p-issue). It's in the entries
rh_adck_iteng
random_hits_patrol_impcourier
random_hits_mark_imptrader

To be more precise, in their materials dictionary. Each of them looks like this:

Code: Select all

		materials =
		{
			"itrader.png" =
			{
			diffuse_map = "rh_itrader.png";
			illumination_map = "rh_itrader_i.png";
			shininess = 64;
			specular = (1.0, 0.7, 0.5, 1.0);
			}
		};
and in each case there's the semicolon after the second-to-last bracket missing. It must be

Code: Select all

		materials =
		{
			"itrader.png" =
			{
			diffuse_map = "rh_itrader.png";
			illumination_map = "rh_itrader_i.png";
			shininess = 64;
			specular = (1.0, 0.7, 0.5, 1.0);
			};                            <== insert ';' here
		};
Inserting the three missing semicolons into the pasted new file makes it savable as a valid plist in ASCII format.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: [Release] RandomHits 1.5.4

Post by Eric Walch »

Commander McLane wrote:
1) PlistEdit Pro opens it as a JSON-file, but it should be ASCII. Due to this the file isn't fixable even if all fixes are applied. Because it doesn't have JSON-format, PlistEdit Pro refuses to save or even convert it.
I can confirm that adding a semicolon on the 3 locations fixes the problem. The JSON problem, I don't see. I edited it with Text-edit and after that, the default plist editor could open it. I never use 'PlistEdit Pro' but version 1.3 was still hanging around on my old computer. That also opened the original file after the error report.

I did notice that the newest version of PlistEdit is no longer working on Mavericks OS. It crashes. The older PlistEdit from Tiger does still works on Mavericks and also does my version of PlistEdit Pro. Already starting with Lion OS, Apple forces us to use the plist functionality in XCode. But XCode never gives an error on bad plists, it just does not open them.
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [Release] RandomHits 1.5.4

Post by spara »

Thanks Commander McLane, I owe you one. :D

And thank you all for commenting and reporting.

I'm in the middle of updating Keeper's retouched Staer9 ships into RH. Griff's new Ophidian is also going in. When that's done, I'll post a new version including the plist fix above. This weekend, hopefully. Be expecting a bigger download, Ophidian is ~12MB alone :mrgreen:.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [Release] RandomHits 1.5.4

Post by Diziet Sma »

spara wrote:
Can someone recommend a plist validator for linux?
Ahh.. the perennial problem.. outside of the Apple world, plists get no love at all..

See this thread for where things stand in the Linux/Windows world..
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [Release] RandomHits 1.6

Post by spara »

Random Hits has been updated to 1.6.

* Applied plist fix by Commander McLane.
* Applied AI fix by Eric Walch.
* Updated ships from Staer9's shipset. Updates by Keeper.
* Ophidian updated to Griff's model
* Added four new ships: Gnat and Bug by Griff, Arachnid Mark 1 by Shipbuilder and Monitor Mark II by Staer9/Keeper.

Download size is now ~100 MB.

Enjoy. :D
Post Reply