Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: Making faction patrols stronger  (Read 4989 times)

Escapeware

  • Ensign
  • *
  • Posts: 5
    • View Profile
Making faction patrols stronger
« on: August 26, 2019, 12:11:51 PM »

I was wondering if there was a way to increase the strength and size of faction patrol fleets so they're not quite so easy to wreck with a mid to late game fleet as they are right now. Ideally, crippling a system's patrols should be closer to fighting expeditions in terms of challenge. I have no experience modding Starsector beyond text file editing, and I know "averagePatrolSpawnInterval" doesn't do it since that's based on market conditions. I've also tried to increase AI fleet size caps but it doesn't seem to affect patrols so far.

Any help would be greatly appreciated.
Logged

Salv

  • Lieutenant
  • **
  • Posts: 56
    • View Profile
Re: Making faction patrols stronger
« Reply #1 on: August 26, 2019, 12:42:40 PM »

As far as I'am aware, colonies have a cap on the number of patrols. Changing the AI feet size cap does not directly affect the actual number of ships in each patrol, the planet's Fleet Size does that. You can increase it by changing the fleet doctrine modifier for the number of ships in settings.json, although factions with ship number doctrine of 1, such as hegemony, will not see any change due to way it is calculated. You may change the indivdual doctrines in data/world/factions folder.

edit: I think this affects other things too, such as mercantile fleets. Just so you know. If you want to make the change just for the patrols alone, I reckon it will require changing the actual classes.
« Last Edit: August 26, 2019, 12:54:10 PM by Salv »
Logged

Escapeware

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Making faction patrols stronger
« Reply #2 on: August 26, 2019, 12:54:21 PM »

You can increase it by changing the fleet doctrine modifier for the number of ships in settings.json, although factions with ship number doctrine of 1, such as hegemony, will not see any change due to way it is calculated.
Would increasing "numShips" from 1 to 2 in hegemony.faction result in the number of ships doubling for all Hegemony patrol fleets?
Logged

Salv

  • Lieutenant
  • **
  • Posts: 56
    • View Profile
Re: Making faction patrols stronger
« Reply #3 on: August 26, 2019, 12:59:11 PM »

If i remember correctly, it would increase it by 0.25.
Logged

Salv

  • Lieutenant
  • **
  • Posts: 56
    • View Profile
Re: Making faction patrols stronger
« Reply #4 on: August 26, 2019, 01:01:41 PM »

There are also other things that come into play, such as ship size. So if you increase the fleet size by say 50%, they may not get that many ships. Maybe they would get one more battlecruiser, maybe 4 frigates. Differs from faction to faction.
Logged

Escapeware

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Making faction patrols stronger
« Reply #5 on: August 26, 2019, 01:05:31 PM »

Thanks for the help! I didn't even think of looking into doctrines. A lot of settings aren't commented so I'll do some trial and error until I figure out a sweet spot. At least now I know where to look :).
Logged

Salv

  • Lieutenant
  • **
  • Posts: 56
    • View Profile
Re: Making faction patrols stronger
« Reply #6 on: August 26, 2019, 01:13:03 PM »

No problem. As for the patrol interval setting, don't set it too high if you want to, for example, make bigger patrols but fewer of them. I observed it may have a tendency to desync systems that are far away. What I mean is that if you leave a system you spent a long time in, i.e. enough for max number of patrols to spawn, and come back some time later, the patrols will be fewer. I guess the number of patrols for systems far away is simulated based on the interval so it doesn't wiegh the game down.
« Last Edit: August 26, 2019, 01:15:25 PM by Salv »
Logged

Escapeware

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Making faction patrols stronger
« Reply #7 on: August 26, 2019, 01:17:32 PM »

Noted, yeah, I doubled it since I noticed having multiple small patrols doesn't have the desired effect as they will run away from your big fleet even if their combined force is significantly stronger than yours.
Logged

Escapeware

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Making faction patrols stronger
« Reply #8 on: August 26, 2019, 01:33:01 PM »

One more question, would tweaking doctrines affect expedition fleet sizes?
Logged

Salv

  • Lieutenant
  • **
  • Posts: 56
    • View Profile
Re: Making faction patrols stronger
« Reply #9 on: August 26, 2019, 02:14:07 PM »

Like I said, mercantile fleets appear to be affected. If the expedition fleet size is based on the Fleet Size of the planet it starts off, I guess it would.

edit: I did some fiddling with this and when the fleet size of a planet was at 20% the mercantile fleet was miniscule compared to a regular one. Maybe it was because of the size of the colony, I'm not sure. I play with Nexerelin and I didn't see any expedition fleets when i was testing. Could be because of the invasion mechanics.
« Last Edit: August 26, 2019, 02:24:33 PM by Salv »
Logged

NoFoodAfterMidnight

  • Ensign
  • *
  • Posts: 39
    • View Profile
Re: Making faction patrols stronger
« Reply #10 on: August 28, 2019, 10:36:55 AM »

I've actually done this for my difficulty increase mod, it requires altering the patrol structure in the mod API.

You'll need to make a mod that has an altered MilitaryBase.java script, and an industries.csv that points to it instead of the base file.

getPatrolCombatFP() is the method in MilitaryBase.java that you want to edit, just make the numbers bigger

Logged