Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Hub mission fleet sizing has a Problem  (Read 487 times)

Histidine

  • Admiral
  • *****
  • Posts: 4688
    • View Profile
    • GitHub profile
Hub mission fleet sizing has a Problem
« on: July 13, 2022, 08:10:42 PM »

So, fleet sizes in hub missions are controlled by an enum that works off fractions of FactionAPI.getApproximateMaxFPPerFleet(). I'm not sure how the figure is computed beyond the javadoc explanation, but it seems to work okay for "normal" factions in vanilla.
Quote
* Used to figure out how many fleet points raids/expeditions etc divide out for each "large" fleet.
 * When going above 30 ships, fleets replace some smaller ships with larger ones. This FP limit is
 * where that still produces fleets that aren't *too* top-heavy.

There's just one problem with this function: A mod can easily screw with the values without even meaning to, by adding new ships that allow a fleet to "compress" more effectively. Case in point: one mod (The Star Federation) adds an Omega capital for a one-off bounty, and this makes the return value of getApproximateMaxFPPerFleet 5.4 times larger than what it is in vanilla (going from 576.58 to 3,126.49). This in turn led to a completely unrelated Omega fleet from my mod being about five times larger than it should have been under the circumstances it was generated, and about 2.5 times larger than what was ostensibly the maximum size specified in its fleet spawner.

Should hub missions have a more reliable sizing formula? (Why doesn't it let us just specify an arbitrary FP value directly, anyway?)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24125
    • View Profile
Re: Hub mission fleet sizing has a Problem
« Reply #1 on: September 09, 2022, 09:41:41 AM »

Oh ouch, that's a rough one. I don't event to ask how long it took to track down.

The reason for doing it this way - rather than via fleet points - is to be able to say "I want a large/small/whatever fleet for that faction", and since that's going to mean different things depending on the ships the faction has access to, its doctrine, and the 30-ship limit, that's harder to get at with a fleet point value.

A one-off ship like this should not be added to the .faction file, I don't think. Though the bigger problem is that the Omega faction is special - it doesn't have capital ships (which means the calculation changes drastically when one is added), and it's not really set up for being used to spawn campaign fleets...

Regardless, though - added HubMissionWithTriggers.triggerSetFleetCombatFleetPoints() - that seems like it could be helpful at times.
Logged