[release] Newt's Mining IFF Scanner Upgrade

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

Moderators: winston, another_commander

cag
Deadly
Deadly
Posts: 202
Joined: Fri Mar 17, 2017 1:49 am

Re: [release?] (tentative) Newt's Mining Scanner Upgrade

Post by cag »

There are a few pre-defined shortcuts you can use in the debug console

Code: Select all

P = player
PS = player.ship
S = system
M = missionVariables
to save you typing these. They are definded near line 770 in oolite-debug-console.js, in ..\AddOns\Basic-debug.oxp\Scripts
This was installed as part of the development release. You can add your own (like W = worldScripts) but make sure you back up this file. Any customizations will get overwritten by the next time you install a dev release.

Or, in your oxp's startUp or startUpComplete functions, you can just add

Code: Select all

console.script.W = worldScripts.Mining_Scanner_Upgrade;
(just make sure you delete it before publishing)

You can paste a new function definition into the debug console, say you added a bunch of log statements to see what's happening. Just replace the 'this' at the start of the function with 'worldScripts.my_oxps_name'. So, given you have 'W' defined that way, you type 'W' into the debug console, paste everything after the 'this' and hit Enter! Clear as mud, huh? Suppose you have:

Code: Select all

this.$identifyRocks = function(){
	//firstly check if the scanner is damaged or simply not there for some reason
	if (player.ship.equipmentStatus("EQ_NS_MINING_SCANNER_UPGRADE") !=="EQUIPMENT_OK"){return;}
	var $rocks; //an variable to hold an array masquerading as a rock grader
	.....
}
You select & Copy all but the 'this' (including the period)

Code: Select all

.$identifyRocks = function(){
	//firstly check if the scanner is damaged or simply not there for some reason
	if (player.ship.equipmentStatus("EQ_NS_MINING_SCANNER_UPGRADE") !=="EQUIPMENT_OK"){return;}
	var $rocks; //an variable to hold an array masquerading as a rock grader
	.....
}
and paste that in the debug console after 'worldScripts.Mining_Scanner_Upgrade' (or 'W' if you've defined the shortcut)

BTW, the '$' or '_' prefix on variable/function names doesn't apply for variables inside your functions - sorry I wasn't clear on that. So var rocks; would be fine.

EDIT: check out this topic, "Hints and tips for using the debug console":
https://bb.oolite.space/viewtopic.php?f=4&t=12030
"Better to be thought a fool, boy, than to open your trap and remove all doubt." - Grandma [over time, just "Shut your trap... fool"]
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.
NewtSoup
Competent
Competent
Posts: 39
Joined: Wed Aug 30, 2017 1:42 am
Location: Leicester UK

Re: [release] (temporary download link) Newt's Mining Scanner Upgrade

Post by NewtSoup »

Newt's Mining Scanner Upgrade 1.1.0 released. See the updated original post.

Still using the google drive link until I have Wiki access.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Re: [release?] (tentative) Newt's Mining Scanner Upgrade

Post by another_commander »

Well done!

Why not get it up on the in-game Epansion Pack Manager too? See this post for details on how to get set up to do it.
NewtSoup
Competent
Competent
Posts: 39
Joined: Wed Aug 30, 2017 1:42 am
Location: Leicester UK

Re: [release?] (tentative) Newt's Mining Scanner Upgrade

Post by NewtSoup »

Still waiting on Wiki username and password.

Tried adding a direct download URL from 2 different sources to the manifest on oolite.org but neither allowed downloading of the OXP in game. Stuck with manual install for the time being
NewtSoup
Competent
Competent
Posts: 39
Joined: Wed Aug 30, 2017 1:42 am
Location: Leicester UK

Re: [release?] (tentative) Newt's Mining Scanner Upgrade

Post by NewtSoup »

this is why it's not working:

latest log says:

[oxz.manager.error]: Downloaded OXZ does not contain a manifest.plist, has been left in /home/ruth/GNUstep/Library/Caches/org.aegidian.oolite/Oolite-download.oxz


However it absolutely does contain a manifest.plist:

Code: Select all

{
	"identifier" = "oolite.oxp.NewtSoup.MiningIFFScannerUpgrade";
	"required_oolite_version" = "1.80";
	"title" = "Mining IFF Scanner Upgrade";
	"version" = "1.1.0";
	"category" = "Equipment";
	"description" = "An upgrade to the IFF Scanner System to show asteroids, boulders and splinters in alternate colours for easier tracking when mining,  Asteroids are white/gray, Boulders white/orange and Splinters white/green.";
	"author" = "NewtSoup";
	"file_size" = "47000";
	"information-url" = "";
	"license" = "CC-BY-NC-SA 3.0";
}
any ideas?
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: [release?] (tentative) Newt's Mining Scanner Upgrade

Post by Cody »

Installed (via manager) and seems to be working fine here - boulders are flashing at me.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: [release?] (tentative) Newt's Mining Scanner Upgrade

Post by Norby »

NewtSoup wrote: Tue Sep 05, 2017 8:54 pm
has been left in /home/ruth/GNUstep/Library/Caches/org.aegidian.oolite/Oolite-download.oxz
I guess if you look into this file with a text editor then it contain some html code instead of your oxz. This means that the direct download prevention of your hosting service is working well, so you must use a browser and look advertisements to download the real file.
NewtSoup
Competent
Competent
Posts: 39
Joined: Wed Aug 30, 2017 1:42 am
Location: Leicester UK

Re: [release?] (tentative) Newt's Mining Scanner Upgrade

Post by NewtSoup »

Norby wrote: Tue Sep 05, 2017 9:25 pm
NewtSoup wrote: Tue Sep 05, 2017 8:54 pm
has been left in /home/ruth/GNUstep/Library/Caches/org.aegidian.oolite/Oolite-download.oxz
I guess if you look into this file with a text editor then it contain some html code instead of your oxz. This means that the direct download prevention of your hosting service is working well, so you must use a browser and probably look the advertisements on the page before you can download a file.
I had a look, the file is 0 bytes and empty. Even more interesting is the OXP is working for Cody. The file is hosted on bitbucket as that gives direct download links.
NewtSoup
Competent
Competent
Posts: 39
Joined: Wed Aug 30, 2017 1:42 am
Location: Leicester UK

Re: [release?] (tentative) Newt's Mining Scanner Upgrade

Post by NewtSoup »

Cody wrote: Tue Sep 05, 2017 9:06 pm
Installed (via manager) and seems to be working fine here - boulders are flashing at me.
Oh good! I'm glad it's working for you. Oh I wonder if it's because although I exited to the main menu I didn't actually restart the whole client and the cache needs flushing.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: [release?] (tentative) Newt's Mining Scanner Upgrade

Post by Norby »

NewtSoup wrote: Tue Sep 05, 2017 8:54 pm
the OXP is working for Cody.
At me also. Maybe a retry of download in the manager can help?
NewtSoup
Competent
Competent
Posts: 39
Joined: Wed Aug 30, 2017 1:42 am
Location: Leicester UK

Re: [release?] (tentative) Newt's Mining Scanner Upgrade

Post by NewtSoup »

Norby wrote: Tue Sep 05, 2017 9:36 pm
NewtSoup wrote: Tue Sep 05, 2017 8:54 pm
the OXP is working for Cody.
At me also. Maybe a retry of download in the manager can help?
I just deleted my entire cache, everything under GNUstep/Library/Caches/org.aegidian.oolite

I still get download failed and

22:37:54.999 [oxz.manager.error]: Downloaded OXZ does not contain a manifest.plist, has been left in /home/ruth/GNUstep/Library/Caches/org.aegidian.oolite/Oolite-download.oxz

which again is a 0 byte file, thinking about it a 0 byte file definitely doesn't contain a manifest.plist but why the download should fail for me and work for others is a mystery.
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: [release?] (tentative) Newt's Mining Scanner Upgrade

Post by phkb »

I just tried via the manager and it installed fine. What I did do was try downloading in a couple of different browsers - Chrome was fine, but Firefox (with No-Script) complained about a cross-site scripting issue and refused to download it. Not sure if that helps, though.
NewtSoup
Competent
Competent
Posts: 39
Joined: Wed Aug 30, 2017 1:42 am
Location: Leicester UK

Re: [release?] (tentative) Newt's Mining Scanner Upgrade

Post by NewtSoup »

phkb wrote: Tue Sep 05, 2017 9:48 pm
I just tried via the manager and it installed fine. What I did do was try downloading in a couple of different browsers - Chrome was fine, but Firefox (with No-Script) complained about a cross-site scripting issue and refused to download it. Not sure if that helps, though.
Downloads from the direct link in the OP just fine in Chrome and Firefox for me. It's just occurred to me that I haven't tried installing any other mods recently. I shall just go and try it.
NewtSoup
Competent
Competent
Posts: 39
Joined: Wed Aug 30, 2017 1:42 am
Location: Leicester UK

Re: [release?] (tentative) Newt's Mining Scanner Upgrade

Post by NewtSoup »

NewtSoup wrote: Tue Sep 05, 2017 10:07 pm
phkb wrote: Tue Sep 05, 2017 9:48 pm
I just tried via the manager and it installed fine. What I did do was try downloading in a couple of different browsers - Chrome was fine, but Firefox (with No-Script) complained about a cross-site scripting issue and refused to download it. Not sure if that helps, though.
Downloads from the direct link in the OP just fine in Chrome and Firefox for me. It's just occurred to me that I haven't tried installing any other mods recently. I shall just go and try it.
Yes, I can install other mods just fine, just not my own mod :(
NewtSoup
Competent
Competent
Posts: 39
Joined: Wed Aug 30, 2017 1:42 am
Location: Leicester UK

Re: [release?] (tentative) Newt's Mining Scanner Upgrade

Post by NewtSoup »

I have just found that there was more to the error message than I realised.

I installed beer cooler. Checked latest log. Then tried to install my mod and checked latest log. The difference was this:

Code: Select all

23:19:03.327 [gnustep]: 2017-09-05 23:19:03.327 oolite[23734] Attempt to use SSL/TLS without support.

23:19:03.328 [gnustep]: 2017-09-05 23:19:03.328 oolite[23734] Please reconfigure gnustep-base with GNU TLS.

23:19:03.717 [oxz.manager.error]: Downloaded OXZ does not contain a manifest.plist, has been left in /home/ruth/GNUstep/Library/Caches/org.aegidian.oolite/Oolite-download.oxz
So was well as the "Downloaded blah blah blah" the two gnustep messages may be significant too. In fact is has to be .. Secure Sockets Layer and TLS? Guess Transport Layer Security?
( yep)

I have no idea how to fix this.
Post Reply