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:
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
}
The Current spawn script for the Superhub is:
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;
}
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.