Perhaps somebody wants to do a Stargate SG1 OXP?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).
Globestations2
Moderators: winston, another_commander
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.
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.
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Most of these are not necessary, though.Switeck wrote:A couple possible additions to Globe Station's shipdata.plist to give them more defined features
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:beacon = "G - Globe Station";
// to show up as "G" on advanced compass.
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:has_npc_traffic = yes;
hasShipyard = yes;
// to make it act more like a regular station
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: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, for a main station not necessary. The correct scan class is assigned by the code when spawning the station.Switeck wrote:scanClass = "CLASS_STATION";
// so if added via a script, it shows up as the correct color on radar.
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.
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.I think I'll add the standard keys (shipdata) to make your life a bit easier (but not the beacon).
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
}
How would you change the number of police ships an add-on station gets?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.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.
Good enough, it'll make testing it easier.Svengali wrote:I think I'll add the standard keys (shipdata) to make your life a bit easier (but not the beacon).
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
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.Switeck wrote:How would you change the number of police ships an add-on station gets?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.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Oolite does cheat for main Stations. "launchPolice" is called directly, from the main code, bypassing the AI.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?
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)
UPS-Courier & DeepSpacePirates & others at the box and some older versions