[release] Newt's Mining IFF Scanner Upgrade
Moderators: winston, another_commander
[release] Newt's Mining IFF Scanner Upgrade
Hi there,
This is my first OXZ. I started this afternoon after getting annoyed at losing splinters on the scanner so I got bored and decided to jump into my first mod.
Basically It's a purchasable ( and saleable ) upgrade to the IFF scanner. Once installed it colours the lollipops for asteroids in white/brown, boulders in white/orange and splinters in white/green colours for easier tracking.
I use Ore processor and so I wanted it to work alongside but be independent of it.
This is a direct download link for the OXP. It is also available in the in game OXP Manager
Mining IFF Scanner Upgrade
this is temporary for people to have a go with until I've got around to releasing it properly.
BTW it is heavily influenced by Capt. Murphy's Police IFF Scanner Upgrade. This has been a great learning experience and first foray into a bit of Oolite Coding.
Current Version 1.1.1
****************************************
NewtSoup Mining IFF Scanner Upgrade Changelog
06/09/2017 - 1.1.1
Minor bug fix - Metal fragments now show correctly in the same colour as splinters.
05/09/2017 -1.1.0
Added Scavenger Hack - identifies cargo containers and escape pods.
02/09/2017 -1.0.2
Minor bug fixes
Included "Metal fragment" to be compatible with Staer9's Icesteroids
01/09/2017 -1.0.1
Tech level increased to 11 to match that of the mining laser
Price increased to 800 credits to match that of the mining laser
Asteroid colour changed to white/gray to better distinguish from boulders
01/09/2017 -1.0.0
Released
This is my first OXZ. I started this afternoon after getting annoyed at losing splinters on the scanner so I got bored and decided to jump into my first mod.
Basically It's a purchasable ( and saleable ) upgrade to the IFF scanner. Once installed it colours the lollipops for asteroids in white/brown, boulders in white/orange and splinters in white/green colours for easier tracking.
I use Ore processor and so I wanted it to work alongside but be independent of it.
This is a direct download link for the OXP. It is also available in the in game OXP Manager
Mining IFF Scanner Upgrade
this is temporary for people to have a go with until I've got around to releasing it properly.
BTW it is heavily influenced by Capt. Murphy's Police IFF Scanner Upgrade. This has been a great learning experience and first foray into a bit of Oolite Coding.
Current Version 1.1.1
****************************************
NewtSoup Mining IFF Scanner Upgrade Changelog
06/09/2017 - 1.1.1
Minor bug fix - Metal fragments now show correctly in the same colour as splinters.
05/09/2017 -1.1.0
Added Scavenger Hack - identifies cargo containers and escape pods.
02/09/2017 -1.0.2
Minor bug fixes
Included "Metal fragment" to be compatible with Staer9's Icesteroids
01/09/2017 -1.0.1
Tech level increased to 11 to match that of the mining laser
Price increased to 800 credits to match that of the mining laser
Asteroid colour changed to white/gray to better distinguish from boulders
01/09/2017 -1.0.0
Released
Last edited by NewtSoup on Wed Sep 06, 2017 11:38 am, edited 9 times in total.
Re: [release?] (tentative) Newts Mining Scanner Upgrade
Congrats on your first publishing! Now comes the fun part: user feedback
I like to mine too and think this is a great idea. But...
- you've got at line 113which JSHint reports "'i' is not defined." Luckily, if fails to execute, rather than loop infinitely!
- you need to also test for in your
One last thing, it's an agreed convention that oxp function and variable names start with either a '$' or '_'. You've only got one function,
Good work - keep chipping away at it! (sorry, couldn't resist)
I like to mine too and think this is a great idea. But...
- you've got at line 113
Code: Select all
for ( idx = 0; i<numRocks; idx++){
- you need to also test for
Code: Select all
else if (rocks[idx].name === "Splinter" || rocks[idx].name === 'Metal fragment'){
'identifyRocks'
& 'equipmentDamaged'
functions, if you want to be compatible w/ Staer9's "icesteroids" oxp. Its boulders spawn more boulders which then spawn metal fragments, which are harder to spot than splinters!One last thing, it's an agreed convention that oxp function and variable names start with either a '$' or '_'. You've only got one function,
'identifyRocks'
and one variable, 'MiningScannerTimer'
to worry about. So they can be renamed '_identifyRocks'
or '$identifyRocks'
, '_MiningScannerTimer'
or '$MiningScannerTimer'
. It's up to you - pick a 'style' and be consistent. The reason for this (however unlikely it may seem), is if oolite ever produces a 'MiningScannerTimer'
or 'identifyRocks'
in the future, your oxp may stop working or behave strangely.Good work - keep chipping away at it! (sorry, couldn't resist)
"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.
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.
Re: [release?] (tentative) Newts Mining Scanner Upgrade
That's one of those ideas that seem obvious once done. Thanks for implementing it!
Re: [release?] (tentative) Newts Mining Scanner Upgrade
That's very weird because it works. I will fix the bad loop. And amend the name checking promptly. As soon as I've had my coffee. I've literally just woke. ( And yes the first thing I did was check the forums ).cag wrote: ↑Sat Sep 02, 2017 4:13 amCongrats on your first publishing! Now comes the fun part: user feedback
I like to mine too and think this is a great idea. But...
- you've got at line 113which JSHint reports "'i' is not defined." Luckily, if fails to execute, rather than loop infinitely!Code: Select all
for ( idx = 0; i<numRocks; idx++){
- you need to also test forin yourCode: Select all
else if (rocks[idx].name === "Splinter" || rocks[idx].name === 'Metal fragment'){
'identifyRocks'
&'equipmentDamaged'
functions, if you want to be compatible w/ Staer9's "icesteroids" oxp. Its boulders spawn more boulders which then spawn metal fragments, which are harder to spot than splinters!
One last thing, it's an agreed convention that oxp function and variable names start with either a '$' or '_'. You've only got one function,'identifyRocks'
and one variable,'MiningScannerTimer'
to worry about. So they can be renamed'_identifyRocks'
or'$identifyRocks'
,'_MiningScannerTimer'
or'$MiningScannerTimer'
. It's up to you - pick a 'style' and be consistent. The reason for this (however unlikely it may seem), is if oolite ever produces a'MiningScannerTimer'
or'identifyRocks'
in the future, your oxp may stop working or behave strangely.
Good work - keep chipping away at it! (sorry, couldn't resist)
I tried using the oolite checker but I get a really annoying message about "extra data after parsed string, line 1 character 13" or similar which is odd because line one is "use strict;"
I've also not worked out how to get the debugger working yet so my debugging is constantly restarting oolite
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: [release?] (tentative) Newts Mining Scanner Upgrade
<sniggers> You've got it bad. <sips coffee>
Should that be
"use strict";
?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!
And any survivors, their debts I will certainly pay. There's always a way!
Re: [release?] (tentative) Newts Mining Scanner Upgrade
You're quite correct. And the code is "use strict"; my bad
this is the output from the oxp verifier
Code: Select all
13:55:13.349 Running OXP verifier for ./AddOns/NewtSoup_Mining_Scanner_Upgrade.oxp
13:55:13.349 Scanning files
13:55:13.350 Checking plist well-formedness
13:55:13.350 Checking equipment.plist
13:55:13.350 Checking script.js
13:55:13.350 Could not interpret property list Config/script.js.
13:55:13.350 Parse failed at line 3 (char 237) - extra data after parsed string
13:55:13.351 Checking equipment.plist
13:55:13.351 Checking for unused files
13:55:13.351 TODO: implement unused files check.
13:55:13.351 OXP verification complete.
Code: Select all
//This oxp was created mainly as a learning experience. But also to give me better tracking on splinters when mining. Works Great with OreProcessor
//It was heavily influenced by Capt. Murphy's IFF Police Scanner Upgrade
"use strict";
this.name ="Mining_Scanner_Upgrade";
Re: [release?] (tentative) Newts Mining Scanner Upgrade
OXP Updated to 1.0.2
Re: [release?] (tentative) Newts Mining Scanner Upgrade
It will make life so much easier; I usually only restart 2-3 times a session.
The first thing is to decide if you want a completely seperate folder for dev, so it won't keep you grounded when you break things (recommended).
On the oolite download page, http://www.oolite.org/download/, under 'OXP Developer releases', you'll see 3 links in the first list item. You can ignore the link for
Debug.oxp
(it's broken), as it's now included in the development releases. You only need to download 2 things: OoDebugConsole1.5.zip
and a 'development' version, your best bet being the latest 'Nightly builds' athttps://github.com/OoliteProject/nightlies/releases
If you're on Windows, OoDebugConsole1.5.zip has a .exe file which you run before running oolite. If you're on Linux or Mac OS, it has the python source (I'm on Windows, so I can't help you there.)
"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.
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.
Re: [release?] (tentative) Newt's Mining Scanner Upgrade
I was thinking, since you're almost there, why not add cargo, with a special colour (w/ maybe an alert sound) for escape pods/black boxes.
Then you could prioritize what you go after when other ships are around, scooping up stuff too.
Then you could prioritize what you go after when other ships are around, scooping up stuff too.
"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.
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.
Re: [release?] (tentative) Newt's Mining Scanner Upgrade
Hi Cag, thanks for the info on getting the debugger working. Most appreciated. I will do that in a bit, just got home from work and winding down with a couple of beers and some pizza.
I suppose I could add cargo and escape pods etc. It wouldn't really be a mining upgrade then , perhaps more of a Scavenger upgrade. I could also add some flavour by making it only purchasable from rock hermits. Does the tech level still count on stuff bought from hermits?
- Cody
- 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
Excellent idea!
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!
And any survivors, their debts I will certainly pay. There's always a way!
Re: [release?] (tentative) Newt's Mining Scanner Upgrade
This post is just a link test to see if I can get a direct download from microsoft one drive.
Also if someone's feeling kind can they tell me if they get a direct download from the google link in the first post or if they get taken to the google drive page first and then presented with a link?
I'm trying to sort out an acceptable direct download for the OXP page on oolite.org
https://1drv.ms/u/s!AuH_cIWCRVRphDZjMR_V4yMJLQiF
*** Never mind I've just noticed that expansion packs are uploaded to the wiki. I will wait on my wiki UN/PW ***
Also if someone's feeling kind can they tell me if they get a direct download from the google link in the first post or if they get taken to the google drive page first and then presented with a link?
I'm trying to sort out an acceptable direct download for the OXP page on oolite.org
https://1drv.ms/u/s!AuH_cIWCRVRphDZjMR_V4yMJLQiF
*** Never mind I've just noticed that expansion packs are uploaded to the wiki. I will wait on my wiki UN/PW ***
Re: [release?] (tentative) Newt's Mining Scanner Upgrade
Is it possible, using the debug console, to make an OXP reload while the game is running?
If I change some of the script for instance. Can I get the game to use the new script without restarting or does it pick it up automatically?
If I change some of the script for instance. Can I get the game to use the new script without restarting or does it pick it up automatically?
- Norby
- ---- 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
The whole oxp is not, nor anything in .plist files, just the content of js variables and function codes.