Globestations2

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

ovvldc
---- E L I T E ----
---- E L I T E ----
Posts: 344
Joined: Sat Apr 02, 2005 9:32 am
Location: Netherlands

Post 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?
User avatar
Sendraks
---- E L I T E ----
---- E L I T E ----
Posts: 404
Joined: Tue Jun 02, 2009 1:43 pm
Location: Leeds UK

Post 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. :(
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Post 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.
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Post 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.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post 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).
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Post 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.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post 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.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Post 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?
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post 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)
Post Reply