Pleb wrote:All other systems:
- 10% chance of having light/heavy patrols, one on each route.
- 5% chance of having a cruiser and escorts on a random route.
- 1% chance of having a recon ship (constrictor) on a random route (only after Constrictor Hunt stock mision has been completed).
So, just thinking about this one a bit: the player will probably be in-system for about 30 minutes, and the patrol might take a couple of hours. This implies that for a 10% chance of the patrol being in system at the same time as the player, HIMSN probably runs one light/heavy patrol per system per day, on average, and one cruiser patrol every other day. Allowing for witchspace transit times, replacement of lost ships, drydock renovations, etc. that implies that HIMSN owns at least a few thousand cruisers and maybe a hundred thousand smaller ships of various descriptions.
On the one hand that's not a large force on the scale of a 7 trillion population 2 thousand system galaxy - though probably big enough to hit every Thargoid raiding pack fairly effectively; on the other hand it's still pretty big: the nine systems could probably support that force relatively easily - if they put a significant fraction of their productivity into military spending - but the logistics of keeping them all supplied when they're weeks of travel away from their regional base would be very complex, and the diplomacy needed to convince the other 2039 systems that free movement of someone else's major military forces through their systems was desirable would be even more so.
Maybe better to start by deciding (roughly) how many ships they have first, and then work out what that means for their strategy and distribution? (Though certainly, higher for testing makes a lot of sense!)
As a programming comment, I would strongly recommend, since it's 1.79-only anyway, using the new [wiki]Oolite_System_Populator[/wiki] to populate and repopulate systems with naval ships:
- lots of options for consistent but random-looking station placement, including being able to save the game at the naval station
- easier handling of interstellar space, nova systems, and systems other OXPs want to temporarily or permanently take over - and conversely, you can use it to partially or totally override normal system population in the naval HQ and regional base systems, which makes populating those a lot easier.
- you can use the repopulator to drop ships into the system in the middle of a trip between systems, launch patrols to witchspace or elsewhere from the naval base, and so on, so it's much less static: it'll be very rare, but the player may see a cruiser patrol arrive in-system ... and perhaps jump straight out again on their way to their destination.
- doesn't reroll the dice for patrol addition or replace destroyed naval bases every time the player launches from a station...
So, for example, the naval bases and patrols could be added (using the standard populator) with:
Code: Select all
this.systemWillPopulate = function()
{
var patrolchance = 0.1;
if ((system.ID == 150 && galaxyNumber == 0) ||
(system.ID == 65 && galaxyNumber == 1) ||
/* you get the idea */
(system.ID == 104 && galaxyNumber == 7))
{
system.setPopulator("himsn-regional-base",
{
priority: 200,
location: "PLANET_ORBIT",
locationSeed: 89131914,
groupCount: 1,
callback: this._addRegionalBase,
deterministic: true
});
patrolchance = 0.2;
}
if (Math.random() < patrolchance)
{
system.setPopulator("himsn-patrol",
{
priority: 210,
location: "LANE_WPS",
groupCount: 1,
callback: this._addNavyPatrol
});
}
// and so on for other groups to be added
}
this._addNavyPatrol = function (pos)
{
// 50% chance patrol is heavy or light:
var patrol;
if (Math.random() < 0.5)
{
patrol = "himsn_heavy_patrol_leader";
}
else
{
patrol = "himsn_light_patrol_leader";
}
// Add a Navy Patrol to random location on one of the main routes:
system.addGroup(patrol, 1, pos, 0);
}
this._addRegionalBase = function(pos)
{
navyStation = system.addShips("himsn_station_regional",1,pos,0)[0];
var targetVector = system.mainPlanet.position.subtract(navyStation.position).direction();
// simpler way to point it at the planet
navyStation.orientation = targetVector.rotationTo([0,0,1]);
var navyStationGroup = system.addGroup("himsn_defender",3,pos, 2000);
navyStationGroup.leader = navyStation;
// you probably want to do this for consistency
navyStationGroup.addShip(navyStation);
}
So the naval station will always be placed at planetary orbit position 89131914 when you enter the regional system, but that position's meaning will vary between regional systems: it will vary where it is relative to the sun, planet, witchpoint and main station. You could also put it at other more obscure named locations.
The patrols, meanwhile, just get dropped onto some part of the main routes: with their chance of being on each bit of the route, because of how
LANE_WPS
works, being proportional to the length of that route out of the total.