Page 1 of 1

[RELEASE] SecComFinder4GalacticNavy

Posted: Tue Mar 07, 2017 10:06 pm
by Runghold
Hi there,

I would like to present you my first OXP:
The SecComFinder (<- click to download from the wiki) for the [EliteWiki] Galactic Navy OXP.
If both, the Galactic Navy OXP and the SecComFinder are installed, systems with [EliteWiki] Navy SecCom Stations are marked in the ingame galaxy chart.
After uninstalling Galactic Navy OXP, leave SecComFinder installed to let it remove the makers it made. Load and save your game state once after that and you can uninstall SecComFinder too.

Why did i create this OXP:
Many weeks ago i installed "Galactic Navy OXP". Too bad the only way i knew to find out where the next SecCom Station is were [EliteWiki] those maps: Looking in the browser and going back to Oolite made me think "There must be a way to mark the systems where SecCom stations are located. I just got to find out how." So, about one month ago i found out, learning (about) javascript the hard way: Look at other OXP scripts and try similar. With a lots of "try and error". Almost three weeks ago, after 20 to 30 hours, scattered over four to six days, scattered over three weeks i "finished" the oxp. "Finishing" means it works as intended without creating errors in the logfile. The last three weeks i "tested" (more than necessary) the OXP intensely. Today, i finally bestired myself to create the wiki entry and this thread to help you to pull your duty in the Galactiv Navy.

Some things to discuss for possible future versions

Posted: Tue Mar 07, 2017 10:07 pm
by Runghold
Some things to discuss for possible future versions:
  • In the script, this marker is used:
    markerColor: "cyanColor", markerScale: 1.5, markerShape: "MARKER_DIAMOND"
    what marker could be better and why?
  • In manifest.plist, these categories are specified:
    "category" = "Activities";
    "category" = "Misc";
    "category" = "Missions";
    "category" = "Systems";
    The bad thing is:
    If an OXZ has several categories specified, it may be listed in the managed addons list under one or another category - dependant if is installed yet. I discovered this when i installed all on my PC installed managed addons on my notebook.
    Which category is the most appropriate and why?
  • In manifest.plist/requires.plist:
    "required_oolite_version" = "1.79";
    The script shouldn't run in a version less than Oolite 1.79, but does it run from 1.79 up?
  • How could the code be changed to work more efficiently?

Re: [RELEASE] SecComFinder4GalacticNavy

Posted: Wed Mar 08, 2017 3:43 am
by phkb
Runghold wrote:
If an OXZ has several categories specified, it may be listed in the managed addons list under one or another category
I think you can only have one category assigned to an OXP, the others should go in "tags".
Runghold wrote:
Which category is the most appropriate and why?
I'd suggest Misc or Ambience.
Runghold wrote:
How could the code be changed to work more efficiently?
You could have a look at how I accomplished something similar with the [EliteWiki] Galactic Registry OXP

Re: [RELEASE] SecComFinder4GalacticNavy

Posted: Wed Mar 08, 2017 8:00 am
by Runghold
phkb wrote: Wed Mar 08, 2017 3:43 am
You could have a look at how I accomplished something similar with the [EliteWiki] Galactic Registry OXP
Quote from that wiki page:
wrote:
...
This will highlight each system that is home to a GalNavy sector command
...
Well... i guess if i knew about Galactic Registry OXP before i wouldn't have created SecComFinder since its only feature is already included in Galactic Registry. :?

Re: [RELEASE] SecComFinder4GalacticNavy

Posted: Wed Mar 08, 2017 9:02 pm
by phkb
Sorry! But just because I have a similar feature in GalCop Galactic Registry, doesn't mean your version is obsolete. You're putting the markers up permanently, so they will be visible on every chart screen (including any mission screens that use a chart). For users of the GalNavy OXP this might be preferable. That's different to the Gal Registry, which only shows them while you're on the Gal Registry screen.

It's a big Ooniverse out there - variations of OXP implementations is OK.

Re: [RELEASE] SecComFinder4GalacticNavy

Posted: Sat Mar 25, 2017 6:48 pm
by hoqllnq
I use this OXP. It would be nice to add RRS stations to this. [Edit: RRS, not RSS..]

The list of systems with RRS Galactic Headquarters is [EliteWiki] published, but as far as I know, there is no public list/map of Waystations.
So publishing those might be considered a spoiler. But then again, anyone who would think that is free to not install it.. Also, there are way more waystations than SecCom stations, so it might make the map look cluttered.
Anyway, just an idea.



Edit to add:

So no longer just an idea. I looked at your script in your OXP and at the script in the RRS OXP,
and pretty much just replicated what you do, with the help of some functions in the RRS script.
I added the following snippet to your FuncGalaxyCheck() function:

Code: Select all

var rrs = worldScripts["Rescue Stations"];
if (rrs)
{
	for (var s = 0;s < 256;s++)
	{
		if (rrs.systemHasRescueStation(s))
		{
			mission.markSystem(
				{system:  s, name: "RungholdRRS_WS_g" + galaxyNumber + "s" + s, markerColor: "blueColor", markerScale: 1.25, markerShape: "MARKER_DIAMOND"}
							   );
		}
		if (rrs.systemHasRescueHQStation(s))
		{
			mission.markSystem(
				{system:  s, name: "RungholdRRS_HQ_g" + galaxyNumber + "s" + s, markerColor: "blueColor", markerScale: 1.25, markerShape: "MARKER_SQUARE"}
							   );
		}
	}
}
It appears to work as intended, and yes, it does make the map look somewhat cluttered:

Image

The one near the center with the diamond and the square, making an 8 point star, has both a waystation and the galactic HQ.

Re: [RELEASE] SecComFinder4GalacticNavy

Posted: Tue Apr 04, 2017 1:43 pm
by Runghold
I am pleased to read that someone besides me is using my OXP.

At the moment that annoying real life is keeping me from scripting so i will - if at all - just try to optimize the code if i find the time. But i like the idea of including the ability to set markers for other OXPs too. Maybe in the future i will mess with it.


regards

Runghold

Re: [RELEASE] SecComFinder4GalacticNavy

Posted: Wed Jun 07, 2023 2:03 pm
by Cholmondely
Runghold wrote: Tue Mar 07, 2017 10:06 pm
Hi there,
Runghold,

If you see this - I'm planning on posting the Galactic Navy to the in-game Expansions Manager.

I'll be adding the various GN-related OXPs and plan on adding yours and renaming it to Galactic Navy Addition: SecCom Finder (to stop it getting lost in the morass of 750+ oxz's) as well as including it as a download with the new Galactic Navy meta-OXP.

This will involved tweaking the manifest.plist. I don't intend to change any of your programming.

Please let me know if you have any issues with any of this!

Cholmondely


Edited to add (July 2024): alas, my coding inabilities precluded any of this!

Re: [RELEASE] SecComFinder4GalacticNavy

Posted: Sun Jul 07, 2024 6:03 am
by Cholmondely
Runghold wrote: Tue Mar 07, 2017 10:06 pm
The SecComFinder (<- click to download from the wiki) for the [EliteWiki] Galactic Navy OXP.


Wiki page now up: SecComFinder



And, Phkb updated this OXP back in Dec 2023- see here

Re: [RELEASE] SecComFinder4GalacticNavy

Posted: Mon Jul 29, 2024 10:53 am
by Wildeblood
Hey, wait a minute... doesn't GalDrive Programmers have a complete list of all 112 SecCom stations in it?

(A rhetorical question to which the answer is yes.)

It never even occurred to me anyone might be interested in seeing them marked on the current chart. Talk about missing a trick - I think I missed a trick. :roll: