Open juh9870 opened 3 months ago
Not directly on the fleet improvement, but related to it. It would be good if non-configurable events also considered BuildFaction over ship's own faction, so that other faction's ships could be included on local pirates / base capture if needed.
I propose to make it possible to register the Allied fleet. Additionally, it would be possible to make an option that allows ships from the player's fleet to engage in battle. All this will allow to create massive fights similar to those from EHF
@Kipyatochkov this is outside the scope of this RFC
It would also be nice if LocalPirates and BaseCapture would have their own configure files (unique, like all files in settings folder)
I believe making base capture and local pirates fleets configurable would be easy to make as a follow-up PR after this RFC is implemented
This is a request for comments. I propose my changes and unresolved questions, and once enough feedback is gathered and questions are resolved, I will proceed to make a PR, implementing changes that were discussed. This approach fosters better communication regarding major changes, and allows for fearless PR implementation, knowing that the changes are at least desirable, and we are moving in the right direction.
Summary
Improvements to the Fleet files system, allowing for greater customization akin to Loot files.
Motivation
Current fleets are too limited, It is hard to make proper "boss fights", and impossible to recreate something like base capture fight.
Approach
Database changes
Instead of specific ships, mod maker can optionally specify "fleet nodes" in the fleet file, akin to Loot nodes. They can still continue to use the default fleet format if they don't need the advanced control. This is achieved by transforming Fleet into a switch-type, just like
ObjectPrefab
orTechnology
.Fleet types
Simple
- old fleet formatAdvanced
- new fleet format with nodesLocalPirates
- non-configurable fleet that is used by the game to populate starsBaseCapture
- non-configurable fleet that is used by the game in base capture eventsThe last two varians are here for performance and simplicity reasons. While I do believe they are possible to fully recreate via the new system, it would require a pretty complicated fleet file. Having those options here would be an easy solution for newer mod makers who don't want to deal with the whole complexity.
Fleet Nodes
These are initial batch of nodes that I plan to implement. More nodes may be added in the follow-up PRs.
SpecificShips
:Builds
: ordered list of ship builds to spawnShuffle
: shuffles the list, causing them to spawn in random orderRandomShips
:Requirements
: SeeBuildRequirement
belowAmount
: expression for the amount of shipsUnique
: boolean, indicating that duplicate ship builds are disallowedShuffle
: shuffles all ships produced byNodes
Nodes
: List of Fleet NodesConditional
: only spawns listed ships if the condition is metNodes
: List of Fleet nodesRequirement
: A requirement for those ships to appear. Accepts the same objects as Quest requirement.Fleet
: imports the content of an entire other fleet to use inside this fleetFleet
: ID of the fleetBuildRequirements
These conditions are checked for every build to decide if it should spawn.
All
,None
,Any
: same as in Quest requirements. Can be used to combine other requirements in various waysFaction
: checks that build belongs to one of the factionsFactions
: list of factionsSpecificShips
: checks that build is for one of the specific shipsShips
: list of shipsSizeClass
: checks that ship has one of the specified size classesClasses
: allowed size classesShipType
: checks that ship has one of the specified typesTypes
: allowed ship typesDifficultyLevel
: allowed difficulty levels (aka skulls or veteran levels)Min
: minimal allowed difficulty levelMax
: maximum allowed difficulty levelCustom
: custom expression-based conditionCondition
: custom expression condition. For example,cellCount < distance * 50 OR size == Frigate
size
, andcellsCount
variables in, with more variables to be added later.SpecificBuild
: only allow specific ship buildsBuilds
: list of ship buildsTechnical Info
I can't estimate the performance impact of this PR. I will try my best for it to remain negligible, but even in the worst case, I don't expect any noticable performance impact, since fleets are calculated relatively infrequently. Even in the worst case of player hopping across new nodes, we get "seconds between fleets" and not "fleets per frame"
Breaking Changes
None. Mod makers can continue to use the simple fleet format if they wish to.
Follow-up work
If this RFC is accepted and implemented, it will open the doors for more fleet nodes types and even more in-depth customization, but I will leave that for the future RFCs and PRs.