Oolite Bulletins

For information and discussion about Oolite.
It is currently Sat Dec 16, 2017 5:23 am

All times are UTC




Post new topic  Reply to topic  [ 45 posts ]  Go to page 1 2 3 Next
Author Message
PostPosted: Fri Sep 01, 2017 3:18 am 
Offline
Competent
Competent

Joined: Wed Aug 30, 2017 1:42 am
Posts: 39
Location: Leicester UK
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 [EliteWiki] 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 [EliteWiki] 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.

Top
   
PostPosted: Sat Sep 02, 2017 4:13 am 
Offline
Competent
Competent

Joined: Fri Mar 17, 2017 1:49 am
Posts: 62
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 113
Code:
for ( idx = 0; i<numRocks; idx++){
which JSHint reports "'i' is not defined." Luckily, if fails to execute, rather than loop infinitely!

- you need to also test for
Code:
else if (rocks[idx].name === "Splinter" || rocks[idx].name === 'Metal fragment'){
 
in your '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.


Top
   
PostPosted: Sat Sep 02, 2017 6:05 am 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Sun Jul 21, 2013 12:26 pm
Posts: 563
That's one of those ideas that seem obvious once done. Thanks for implementing it!


Top
   
PostPosted: Sat Sep 02, 2017 12:03 pm 
Offline
Competent
Competent

Joined: Wed Aug 30, 2017 1:42 am
Posts: 39
Location: Leicester UK
Quote:
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 113
Code:
for ( idx = 0; i<numRocks; idx++){
which JSHint reports "'i' is not defined." Luckily, if fails to execute, rather than loop infinitely!

- you need to also test for
Code:
else if (rocks[idx].name === "Splinter" || rocks[idx].name === 'Metal fragment'){
 
in your '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)
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 ).

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


Top
   
PostPosted: Sat Sep 02, 2017 12:20 pm 
Offline
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
User avatar

Joined: Sat Jul 04, 2009 9:31 pm
Posts: 12967
Location: Corke's Drift
Quote:
As soon as I've had my coffee. I've literally just woke. ( And yes the first thing I did was check the forums ).
<sniggers> You've got it bad. <sips coffee>
Quote:
... "extra data after parsed string, line 1 character 13" or similar which is odd because line one is "use strict;"
Should that be "use strict";?

_________________
The only good fnord is a dead fnord!


Top
   
PostPosted: Sat Sep 02, 2017 12:58 pm 
Offline
Competent
Competent

Joined: Wed Aug 30, 2017 1:42 am
Posts: 39
Location: Leicester UK
Quote:
Quote:
As soon as I've had my coffee. I've literally just woke. ( And yes the first thing I did was check the forums ).
<sniggers> You've got it bad. <sips coffee>
Quote:
... "extra data after parsed string, line 1 character 13" or similar which is odd because line one is "use strict;"
Should that be "use strict";?
You're quite correct. And the code is "use strict"; my bad

this is the output from the oxp verifier
Code:
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.
and this is the first 4 lines of my code ( which works )
Code:
//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";
It seems the verifier can't get past the end of "use strict";


Top
   
PostPosted: Sat Sep 02, 2017 12:58 pm 
Offline
Competent
Competent

Joined: Wed Aug 30, 2017 1:42 am
Posts: 39
Location: Leicester UK
OXP Updated to 1.0.2


Top
   
PostPosted: Sat Sep 02, 2017 7:39 pm 
Offline
Competent
Competent

Joined: Fri Mar 17, 2017 1:49 am
Posts: 62
Quote:
I've also not worked out how to get the debugger working yet so my debugging is constantly restarting oolite
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' at
https://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.


Top
   
PostPosted: Sat Sep 02, 2017 9:04 pm 
Offline
Competent
Competent

Joined: Fri Mar 17, 2017 1:49 am
Posts: 62
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.

_________________
"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.


Top
   
PostPosted: Sat Sep 02, 2017 10:41 pm 
Offline
Competent
Competent

Joined: Wed Aug 30, 2017 1:42 am
Posts: 39
Location: Leicester UK
Quote:
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.
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?


Top
   
PostPosted: Sat Sep 02, 2017 10:57 pm 
Offline
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
User avatar

Joined: Sat Jul 04, 2009 9:31 pm
Posts: 12967
Location: Corke's Drift
Quote:
I could also add some flavour by making it only purchasable from rock hermits.
Excellent idea!

_________________
The only good fnord is a dead fnord!


Top
   
PostPosted: Sun Sep 03, 2017 11:33 am 
Offline
Competent
Competent

Joined: Wed Aug 30, 2017 1:42 am
Posts: 39
Location: Leicester UK
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 ***


Top
   
PostPosted: Sun Sep 03, 2017 2:59 pm 
Offline
Competent
Competent

Joined: Wed Aug 30, 2017 1:42 am
Posts: 39
Location: Leicester UK
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?


Top
   
PostPosted: Sun Sep 03, 2017 7:39 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon May 20, 2013 9:53 pm
Posts: 2434
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Quote:
Is it possible, using the debug console, to make an OXP reload while the game is running?
The whole oxp is not, nor anything in .plist files, just the content of js variables and function codes.

_________________
OXPs by Norby


Top
   
PostPosted: Sun Sep 03, 2017 7:51 pm 
Offline
Competent
Competent

Joined: Wed Aug 30, 2017 1:42 am
Posts: 39
Location: Leicester UK
Quote:
Quote:
Is it possible, using the debug console, to make an OXP reload while the game is running?
The whole oxp is not, nor anything in .plist files, just the content of js variables and function codes.
Thank you Norby.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 45 posts ]  Go to page 1 2 3 Next

All times are UTC


Who is online

Users browsing this forum: Yahoo [Bot] and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited