Well, this is mostly bugfixing, with a few improvements that are quite straightforward. I know is a lot, but please at least consider the important ones.


StarSystemNodeSnapshot.cs


AI will not be blocked trying to colonize lodestone Systems and later rejuvenated systems.


Importance: 2/5


FleetSnapshot.cs


Fixed NextWantedDestination property, previously loading at nodeindex of 0, now triangulates with always known current fleet position and next node position when is not set. This prevents AI sending fleets to the system with the index position 0, as well as many other side effects.


Importance: 5/5


AssignHeroToFleet.cs


AI will not try to assign a hero to the Academy Master Fleet. This blocks the assigment of one hero to fleets.


Importance: 2/5


BehaviorEntityActions.cs


- AI will not try to disband Behemoths into the hangar, will not try to disband without ships able to.

- Fixed an odd issue where AI could get stuck "Playing" when retreating from a battle, landing on another node and trying to move again.


Importance: 3/5


QueueMaxPopulationUpgrade.cs


Now has the correct parent assignation, didn't allocate the costs, halved interest if there are potentially colonizable planets.

Is not important as in current state is completely disabled, and will skip these buildings.


Importance: 1/5


OutpostBuyoutColonization.cs


Fixed an instance where Lumeris could not buyout uncolonized systems under the influence of their systems. Low importance as only affect Lumeris, but could block their expansion completely.


Importance: 2/5


InstanceAllocation_Fleet.cs


Added MinimumFitness = 0.1 as default value on instance creation, to avoid military fleets slipping into specialized missions (explore, colonization, etc).


Importance: 4/5


DestroyFleet.cs


Fixed an error with intercept fleet check. This error completely disables destroy fleet missions.


Importance: 3/5


SearchAllRelics.cs


Now excludes systems with relics not accessible by the empire (hidden node or closed borders with owner). Mid importance, only for Nakalim but they will be likely having explorer fleets doing nothing.


Importance: 3/5


BehaviorConditions.cs


Condition "MaySearch", couldn't validate quest-related curiosities.

Condition "CanInvade" now checks of there are enemy fleets with MP docked, and if there are colonies to check that could end in false positive.

Quite important as fleets could get stuck exploring or invading a empty system.


Importance: 4/5


FleetMission_AssistInvade.cs


Rised the limit to cancel an invasion assist from 50% more manpower in orbit, to 150%.

Is just an improvement to keep the invader fleets going.


Importance: 1/5


EmpireSnapshot.cs


Method CanAttack didn't check properly node under influence, so fleets attacks and invasion couldn't happen if the target is not the system owner.

Method IsEnemy didn't check pirates properly.

The CanAttack fix is absolute priority. If something has to be fixed, this is it.


Importance: 5/5


GameNodeSnapshot.cs


Fixed methods HasColony / HasColonyOf, could give a false positive if there is a lost colony in the system (IE razed, hunting grounds).

This can lead to weird behaviors, so mid importance.


Importance: 3/5


ComputeTaskForceComposition.cs


Now taskforce composition will check for existing ships in fleets, and not only build-able ships (could potentially interrupt/disable all front-related missions if AI lost a resource due to an invasion or something).

Improvements in leecher and invader pattern size progression.

The first one is fairly important, the other is just a minor improvement.


Importance: 3/5


HeroShipSnapshot.cs


Workaround for hero ships obtained through quests/events, that couldn't be upgraded by the AI player (empireIndex is -1 for those ships).


Importance: 2/5


ComputeShipDesignComposition.cs


- AI will not put invisibility/detection modules on carriers, will only use support ships (too expensive to wear in a carrier).

- Colonizers get priority to fill all support slots possible.

- Fixed an oversight that added a second defense module on all ships before other priorities.


Importance: 3/5


CompleteTaskForce.cs


- AI will not try to reinforce (merge) an Academy fleet is they are not the Academy.

- Fixed the chance that would not be valid if the fleet had exactly the CP for the minimum expected for a taskforce, checks if the fleet doesn't have the maximum command points instead.


Importance: 1/5


As always, I provide my edited code, as well as the original disassembled code as reference, you can compare both with a merge/compare tool (IE WinMerge) to see the exact changes, and apply those into the source code.


The code files: last.report.zip


Lastly, a legal disclaimer in the case it is needed: I give Amplitude and their collaborators full permission to use and modify my code if there's any intellectual property held into it, not covered by the game's terms of service.


Thank you.