[UPDATED RELEASE 03-07-2014] Superhub V1.6 OXZ
Moderators: winston, another_commander
Re: [UPDATED RELEASE] Superhub V1.4.oxp
As noted when you reported this before - this one can be ignored. The new way of doing docks (to allow multiple ones) needs to have at least one dock defined for a dockable. Hence "proximity docks" like are used here (and in Lave Academy and Planetfall, amongst others) which don't have such a defined dock need one to be added.
The message is just a notification that the trunk code is doing that (adding a virtual dock), but aside from the notification everything else should continue to work fine. It's not too difficult to add real docks, but it needs new sub-entities hidden within the main model.
The message is just a notification that the trunk code is doing that (adding a virtual dock), but aside from the notification everything else should continue to work fine. It's not too difficult to add real docks, but it needs new sub-entities hidden within the main model.
My OXPs via Boxspace or from my Wiki pages
.
Thargoid TV
Dropbox Referral Link

Thargoid TV
Dropbox Referral Link
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
Re: [UPDATED RELEASE] Superhub V1.4.oxp
A question to the script experts.
:
I want to make the Superhub appear NOT random anymore. I want to spawn it via the code used to spawn the Lave Academy.
Lave Academy uses a following script:
The Current spawn script for the Superhub is:
How can the spawn script be adapted so I can handcode the Superhubs per galaxy? I want to do this in such a way that Superhubs appear in Tech 14/14 systems? I made a custom docking tunnel but I can't find super hubs currently because it doesn't spawn very often when visiting a high tech system.

I want to make the Superhub appear NOT random anymore. I want to spawn it via the code used to spawn the Lave Academy.
Lave Academy uses a following script:
Code: Select all
this.setUpArrays = function()
{
this.academyList = [0, 1, 2, 3, 4, 5, 6, 7]; // galaxies 0-7
this.academyList[0] = [7, 173, 168, 133, 4]; // Lave, Esteonbi, Enonla, Esanbe, Xequerin
this.academyList[1] = [24, 92, 210, 55, 194]; // Maesaron, Erenanri, Reveabe, Legeara, Tigebere
this.academyList[2] = [58, 165, 106, 198, 164]; // Radiqu, Edxeri, Ceedleon, Atius,Rerebi
this.academyList[3] = [13, 47, 130, 18, 122]; // Mavelege, Bemate, Cebitiza, Mausra, Ensoor
this.academyList[4] = [16, 193, 231, 92, 9]; // Zaaner, Vebi, Inenares, Azaenbi, Dioris
this.academyList[5] = [151, 6, 85, 146, 240]; // Teesso, Oresmaa, Celaan, Ariqu, Inesbe
this.academyList[6] = [189, 146, 130, 118, 37]; // Isdilaon, Aenbi, Ataer, Orreedon, Qutegequ
this.academyList[7] = [177, 31, 211, 157, 20]; // Ceenza, Aarzari, Biatzate, Inbein, Oredrier
this.singleList = [7, 24, 58, 13, 16, 151, 189, 177]; // array for when 1 academy per galaxy selected
}
Code: Select all
this.name = "PAGroove_superhubPopulator";
this.author = "Thargoid";
this.copyright = "This script is hereby placed in the public domain.";
this.version = "1.1";
this.description = "Script to add a single superhub near the system main station";
this.shipWillLaunchFromStation = function(station)
{
if(station.isMainStation)
{
this.spawnHub();
}
}
this.shipWillExitWitchspace = function()
{
this.spawnHub();
}
this.spawnHub = function()
{
if(Math.random() < 0.5 || system.techLevel < 11 || system.government < 4 || system.countShipsWithRole("pagroove_superhub") > 0 || this.superHubBlock)
{
this.superHubBlock = true;
return;
}
else
{
this.xOffset = (Math.random() * 10000) + 10000; // x offset between 10 and 20km
this.yOffset = (Math.random() * 10000) + 10000; // y offset between 10 and 20km
if(Math.random() > 0.5) // 50:50 chance of offsetting in the other direction
{
this.xOffset = -this.xOffset;
}
if(Math.random() > 0.5) // 50:50 chance of offsetting in the other direction
{
this.yOffset = -this.yOffset;
}
system.legacy_addShipsAtPrecisely("pagroove_superhub", 1, "abs", system.mainStation.position.add([this.xOffset, this.yOffset, 0]));
}
}
this.shipWillEnterWitchspace = function()
{
this.superHubBlock = null;
}
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
Re: [UPDATED RELEASE] Superhub V1.4.oxp
To just add them always to all TL 14/15 systems, and never to any others, replacepagroove wrote:How can the spawn script be adapted so I can handcode the Superhubs per galaxy? I want to do this in such a way that Superhubs appear in Tech 14/14 systems? I made a custom docking tunnel but I can't find super hubs currently because it doesn't spawn very often when visiting a high tech system.
Code: Select all
if(Math.random() < 0.5 || system.techLevel < 11 || system.government < 4 || system.countShipsWithRole("pagroove_superhub") > 0 || this.superHubBlock)
Code: Select all
if(system.techLevel < 13 || system.countShipsWithRole("pagroove_superhub") > 0 || this.superHubBlock)
1) The ability to save at non-main stations. This will cause potential problems with that script unless you change
Code: Select all
if(station.isMainStation)
{
this.spawnHub();
}
Code: Select all
this.spawnHub();
2) A new way of running the system populator. There is no hurry to switch to this, and it wouldn't work with older versions if you did, but certain ways of using it will mean that the SuperHub could become a non-main station you could save at, and it could also make the script simpler.
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
Re: [UPDATED RELEASE] Superhub V1.4.oxp
Thanks CIM. I have changed the script and I will now start testing.


For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
Re: [UPDATED RELEASE] Superhub V1.4.oxp
Mmm it doesn't spawn. Flew a few times into Maraus and nothing:
This is the current script. Any faults?
This is the current script. Any faults?
Code: Select all
this.name = "PAGroove_superhubPopulator";
this.author = "Thargoid";
this.copyright = "This script is hereby placed in the public domain.";
this.version = "1.1";
this.description = "Script to add a single superhub near the system main station";
this.shipWillLaunchFromStation = function(station)
{
this.spawnHub();
}
this.shipWillExitWitchspace = function()
{
this.spawnHub();
}
this.spawnHub = function()
{
if(system.techLevel < 13 || system.countShipsWithRole("pagroove_superhub") > 0 || this.superHubBlock)
{
this.superHubBlock = true;
return;
}
else
{
this.xOffset = (Math.random() * 10000) + 10000; // x offset between 10 and 20km
this.yOffset = (Math.random() * 10000) + 10000; // y offset between 10 and 20km
if(Math.random() > 0.5) // 50:50 chance of offsetting in the other direction
{
this.xOffset = -this.xOffset;
}
if(Math.random() > 0.5) // 50:50 chance of offsetting in the other direction
{
this.yOffset = -this.yOffset;
}
system.legacy_addShipsAtPrecisely("pagroove_superhub", 1, "abs", system.mainStation.position.add([this.xOffset, this.yOffset, 0]));
}
}
this.shipWillEnterWitchspace = function()
{
this.superHubBlock = null;
}
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
Re: [UPDATED RELEASE] Superhub V1.4.oxp
The log says this a syntax error on line 25
What goes wrong here?
Code: Select all
~/Games/Oolite Trunk 1.79-10jan2014/AddOns/Superhubv1.5t.oxp
~/Games/Oolite Trunk 1.79-10jan2014/AddOns/superico.oxp
20:24:18.881 [plist.parse.failed]: Failed to parse /Users/pagroove/Games/Oolite Trunk 1.79-10jan2014/AddOns/Superhubv1.5t.oxp/Config/shipdata.plist as a property list.
20:24:36.623 [script.javaScript.exception.syntaxError]: ***** JavaScript exception (Superhubv1.5t.anon-script): SyntaxError: syntax error
20:24:36.623 [script.javaScript.exception.syntaxError]: /Users/pagroove/Games/Oolite Trunk 1.79-10jan2014/AddOns/Superhubv1.5t.oxp/Config/script.js, line 25: else
20:24:36.623 [script.javaScript.load.failed]: ***** Error loading JavaScript script /Users/pagroove/Games/Oolite Trunk 1.79-10jan2014/AddOns/Superhubv1.5t.oxp/Config/script.js -- compilation failed
CargoTypeExtension-Station-SuperHub 1.2.3
20:25:36.050 [script.javaScript.exception.syntaxError]: ***** JavaScript exception (Superhubv1.5t.anon-script): SyntaxError: syntax error
20:25:36.050 [script.javaScript.exception.syntaxError]: /Users/pagroove/Games/Oolite Trunk 1.79-10jan2014/AddOns/Superhubv1.5t.oxp/Config/script.js, line 25: else
20:25:36.051 [script.javaScript.load.failed]: ***** Error loading JavaScript script /Users/pagroove/Games/Oolite Trunk 1.79-10jan2014/AddOns/Superhubv1.5t.oxp/Config/script.js -- compilation failed
CargoTypeExtension-Station-SuperHub 1.2.3
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
Re: [UPDATED RELEASE] Superhub V1.4.oxp
Code: Select all
20:24:18.881 [plist.parse.failed]: Failed to parse /Users/pagroove/Games/Oolite Trunk 1.79-10jan2014/AddOns/Superhubv1.5t.oxp/Config/shipdata.plist as a property list.
Code: Select all
20:24:36.623 [script.javaScript.exception.syntaxError]: ***** JavaScript exception (Superhubv1.5t.anon-script): SyntaxError: syntax error
I've thought of another change that might be useful, though it won't fix the error.
Code: Select all
if(system.techLevel < 13 || system.countShipsWithRole("pagroove_superhub") > 0 || this.superHubBlock)
Code: Select all
if(this.superHubBlock || system.techLevel < 13 || system.countShipsWithRole("pagroove_superhub") > 0)
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
Re: [UPDATED RELEASE] Superhub V1.4.oxp
I solved it. It was a problem in the .plist. I tried to add a docking tunnel but introduced new errors. I now have it working and have beautiful tunnel now too. Screenshots soon.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
Re: [UPDATED RELEASE] Superhub V1.4.oxp
Here it is (The new SuperHub launch tunnel)
Coming soon in the new version.

Is it possible to generate different cargo contracts and carrier markets than the main station on a dockable?
Coming soon in the new version.

Is it possible to generate different cargo contracts and carrier markets than the main station on a dockable?
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: [UPDATED RELEASE] Superhub V1.4.oxp
Oooh... shiny!
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!
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
Re: [UPDATED RELEASE 16-01-2014] Superhub V1.5.oxp
Updated the OXP:
v 1.5
-SuperHubs now appear at all Tech 14 and Tech 15 planets. (no more Random)
-Added a BGS Launch tunnel
-Added a License (See wiki page and in read me for details)
Download Link:
https://app.box.com/s/cd4ontw41gody7ckctu8
v 1.5
-SuperHubs now appear at all Tech 14 and Tech 15 planets. (no more Random)
-Added a BGS Launch tunnel
-Added a License (See wiki page and in read me for details)
Download Link:
https://app.box.com/s/cd4ontw41gody7ckctu8
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: [UPDATED RELEASE 16-01-2014] Superhub V1.5.oxp
Maraus is gonna be a little crowded, what with a Torus Station, a Zieman Habitat, and now a Superhub - cool.
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!
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
Re: [UPDATED RELEASE 16-01-2014] Superhub V1.5.oxp
Well it is a HUB region.Cody wrote:Maraus is gonna be a little crowded, what with a Torus Station, a Zieman Habitat, and now a Superhub - cool.

The Maraus Hub (Should be on the Vector Maps IMO.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: [UPDATED RELEASE 16-01-2014] Superhub V1.5.oxp
I've been operating in and around the Maraus Hub for quite a while now - it's the sweet spot in G7.pagroove wrote:The Maraus Hub (Should be on the Vector Maps IMO.
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!
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
Re: [UPDATED RELEASE 16-01-2014] Superhub V1.5.oxp
Also my current base of operations. And don't forget the RSS Galactic HQ that is also stationed in the Maraus System.Cody wrote:I've been operating in and around the Maraus Hub for quite a while now - it's the sweet spot in G7.pagroove wrote:The Maraus Hub (Should be on the Vector Maps IMO.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709