Page 2 of 2

Posted: Fri Oct 23, 2009 1:18 pm
by ovvldc
Thargoid wrote:
So who's going to do the first pyramid station? (I would say cube, but I've already got one in an ongoing WIP).
Perhaps somebody wants to do a Stargate SG1 OXP?

Posted: Fri Oct 23, 2009 1:31 pm
by Sendraks
I think the idea of taking the giant globe station and turning it into Unicron has got legs, but no one got my quote. :(

Posted: Wed Dec 15, 2010 4:17 am
by Switeck
A couple possible additions to Globe Station's shipdata.plist to give them more defined features:

beacon = "G - Globe Station";
// to show up as "G" on advanced compass.

has_npc_traffic = yes;
hasShipyard = yes;
// to make it act more like a regular station

max_defense_ships = 10;
max_scavengers = 3;
// to control the number of special ships stored inside of it, to partially eliminate the 'clown car' effect.

scanClass = "CLASS_STATION";
// so if added via a script, it shows up as the correct color on radar.

Posted: Wed Dec 15, 2010 1:07 pm
by Commander McLane
Switeck wrote:
A couple possible additions to Globe Station's shipdata.plist to give them more defined features
Most of these are not necessary, though.
Switeck wrote:
beacon = "G - Globe Station";
// to show up as "G" on advanced compass.
Globe stations are meant to be system main stations, randomly replacing the usual Icosahedron stations. Main stations usually don't have beacon codes. It's unnecessary, because the station beacon has the "N" code.
Switeck wrote:
has_npc_traffic = yes;
hasShipyard = yes;
// to make it act more like a regular station
Again, as main stations they don't need these keys. Both default to "yes" anyway. (hasShipyard may not default to "yes" for additional stations, but Oolite adds a shipyard to all main stations anyway)
Switeck wrote:
max_defense_ships = 10;
max_scavengers = 3;
// to control the number of special ships stored inside of it, to partially eliminate the 'clown car' effect.
Again, not really necessary. max_scavengers defaults to 3 anyway. max_defense_ships defaults to 3 as well, so here you would produce a considerable increase. However, as main stations they also have 8 police ships by default.
Switeck wrote:
scanClass = "CLASS_STATION";
// so if added via a script, it shows up as the correct color on radar.
Again, for a main station not necessary. The correct scan class is assigned by the code when spawning the station.

If you look at the shipdata-entries for the built-in stations, you will see that they are lacking all of these keys as well. Nevertheless they work. And the Globe station works in exactly the same way.

Posted: Wed Dec 15, 2010 3:36 pm
by Svengali
As CMcL has pointed out, the OXP itself works as intended with the right scanClass,etc. and the only situation when they don't get these settings is if a script spawns them as additional station (as you've seen already), but wouldn't it be the job for the control-script OXP to declare the shipdata things via like_ship and is_external_dependency flag?

But this reminds me to bring up another point. OXPs without worldScripts can't be checked, so a control script wouldn't know if a station (or any other entity) exists at all without trying to spawn them. Sure, a control script could simply state the dependencies in the readme/Wiki or could gather the infos over time, in the game, for a session, but we have learned that users won't read readmes so carefully and the ingame gathering would need long sessions (though this would be a 'reward' for long sessions). And gathering would have to overcome a few other problems too (entities are declared, but other entities have a lot higher probabilities to appear, planetinfo.plist entries can be overriden by other OXPs, etc.).

Time for a feature request, I think, Switeck. This would also help other OXPs (e.g. Big Ships or similiar).

Edit: The other way would be to spawn/remove them.

Code: Select all

var a = system.addShips("globestation",1);
if(a){
  this.allowed = 1; // Set a flag for this stationtype
  a[0].remove(); // And get rid of it again
}
I think I'll add the standard keys (shipdata) to make your life a bit easier (but not the beacon).

Posted: Wed Dec 15, 2010 10:02 pm
by Switeck
Commander McLane wrote:
Switeck wrote:
max_defense_ships = 10;
max_scavengers = 3;
// to control the number of special ships stored inside of it, to partially eliminate the 'clown car' effect.
Again, not really necessary. max_scavengers defaults to 3 anyway. max_defense_ships defaults to 3 as well, so here you would produce a considerable increase. However, as main stations they also have 8 police ships by default.
How would you change the number of police ships an add-on station gets?
Svengali wrote:
I think I'll add the standard keys (shipdata) to make your life a bit easier (but not the beacon).
Good enough, it'll make testing it easier.

Posted: Thu Dec 16, 2010 8:19 am
by Eric Walch
Switeck wrote:
Commander McLane wrote:
Again, not really necessary. max_scavengers defaults to 3 anyway. max_defense_ships defaults to 3 as well, so here you would produce a considerable increase. However, as main stations they also have 8 police ships by default.
How would you change the number of police ships an add-on station gets?
What about max_police? And the default of 8 is not for just main stations, but for all stations. That rock hermits don't launch police is only because their AI never tries to launch police as that seems wrong for hermits. Instead most non-police stations launch defenders.

Posted: Thu Dec 16, 2010 5:25 pm
by Switeck
I'm lost/confused now...both rockHermitAI.plist and stationAI.plist use:
"RED_ALERT" = (launchDefenseShip
...Yet I clearly remember most stations launching Vipers in defense.
Is it because of their scan class differences?

Posted: Thu Dec 16, 2010 8:09 pm
by Eric Walch
Switeck wrote:
I'm lost/confused now...both rockHermitAI.plist and stationAI.plist use:
"RED_ALERT" = (launchDefenseShip
...Yet I clearly remember most stations launching Vipers in defense.
Is it because of their scan class differences?
Oolite does cheat for main Stations. "launchPolice" is called directly, from the main code, bypassing the AI.

launchDefenseShip does not need to be police. Default is it "police" for stations and "hermit-ship" for eh hermits. (or better: any station of scan_class rock)