[MOD] Faction War/Economy Enhancer v5.5

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Post Reply
Mysterial
Posts: 644
Joined: Wed, 6. Nov 02, 20:31
x4

[MOD] Faction War/Economy Enhancer v5.5

Post by Mysterial » Thu, 24. Jan 19, 19:27

I've decided to expand the scope of this mod a bit while also splitting it into modules for compatibility and convenience. This mod improves faction war and economy behavior, making the universe generally proceed at a faster and more interesting pace. Future updates will add additional AI behaviors and economy improvements as needed. Although I'm not limiting it to "fixes" anymore, still the intent is to maintain and expand the general vanilla vision, so in cases where Egosoft directly addresses an issue or topic, I generally won't counter that. As an example, the original version of this mod was hesitant to let the Xenon expand, but in 2.0 Egosoft largely took the limiters off and let them do whatever. So be it. :D

Download Here
Also available on Steam Workshop

There are currently 4 modules. If you don't want one, disable it in the main menu before starting the game.

War Module:
  • Generally improves war behavior
  • Factions will allocate ships to invasions more intelligently based on previous results
  • More efforts are made to protect build material transports
  • Better target selection and event response
  • War intensity increases as the game continues
  • Player can get paid for helping invasions
Economy AI Module:
  • Traders tend to use more of their cargo bay per run
  • Traders won't completely ignore wares that are bought above average price if the selling price is also high
  • Rebuilt faction economy manager for deciding what modules/factories to build
Economy Balance Module:
  • Weapon Components and Advanced Electronics production increased by 20%
  • Fixed Lasertower Mk 1 resource costs (were the same as Mk 2)
  • Hull Parts modules don't require so many Hull Parts to reduce well of despair problem when AI detects a shortage (replaced with Claytronics so overall cost is roughly the same)
  • NPC factions won't order from player shipyard if it is too far away/too expensive unless their own shipyard is blocked for a while
  • Player-built ships can't be directly sold to shipyards (since AI doesn't really use them - set a good price so NPC will order from your shipyard instead)
  • Builder hire cost is 300,000 credits
Catchup Module:
  • Implements "catchup logic"/"rubber banding"
  • Factions that are losing their war(s) gain a bonus to all production
  • For most factions it works like workforce (stacks additively); for the Xenon they get a ship building discount
  • Each Xenon sector group is counted separately
  • If you have enough scan data the map's production module information will display the bonus
  • Current maximum bonus is +40%
  • Factions that are badly losing for a long time can also receive a support convoy from their home planet to give a temporary supply surge for ship building (can be intercepted)


Changes in v5.5
  • Disabled respawn of eliminated factions except for Xenon
    • Added property in parameters.xml to control respawnable faction list
  • Workaround for vanilla bug where Boron bilateral fleet in Argon space will not be rebuilt
  • Added a fallback for NPC ships far away from home to allow them to order new subordinates (vanilla has a max range that some NPC jobs exceed)
  • Workaround for vanilla bug where ships with multiple ammo types do not switch ammo in low attention when the first type runs out
  • (Econ AI) Workaround for vanilla bug with the pirate DLC where the ALI Wharf in Windfall will get stalled with Teladi ships in queue that it cannot build due to some included equipment not having a pirate build method
Changes in v5.49
  • Fixed performance issue related to NPC ships trying to rebuild wingmen
  • Fixed some cases where the Xenon I squad would attack earlier in the game than intended
  • Improved AI scouting to calculate enemy strength using new strength values added in 6.0
Changes in v5.48
  • Fixed some stations being generated without turrets
Changes in v5.47
  • Game version 6.0 compatibility
Changes in v5.46
  • Fixed faction respawning using inaccessible sectors
Changes in v5.45
  • Fixed BUC trying to respawn when they shouldn't
  • Capital ships with non-urgent rearm requests won't use a resupply ship that already has a capital ship in the queue so they aren't disengaging from combat too early
Changes in v5.44
  • Small fixes and improvements related to Tides of Avarice integration
  • Improved destroyer/battleship targeting to be more likely to prioritize enemy capital ships when reacting to attacks
Changes in v5.43
  • Game version 5.0 compatibility
Changes in v5.42
  • FAF and FRF can cause small ships to bail and capture them
  • Fixed respawn potentially triggering on HOP and/or PAR after plot results that should have made them inactive
Changes in v5.41
  • Game version 4.2 compatibility update
Changes in v5.4
  • Slightly reduced surface element damage caused by stations in low attention
  • Fixed a rare issue where CUB could start respawn behavior in between when the game activates it and they actually get stations by the story mission logic
  • (Econ AI) Fixed station traders picking up drops in bad situations
  • (Econ AI) Fixed Yaki not being willing to build at a player shipyard in some situations where they should
Changes in v5.3
  • Slightly improved capital ship effectiveness in low attention when swarmed by many targets
  • Slightly improved capital ship effectiveness against stations
  • Improved faction AI gather and attack point decisions when attempting to reclaim a contested sector
  • Removed pirates that were previously added to attack miners
  • Destroying or scanning Kha'ak ships associated with an outpost will advance progress towards discovering the outpost location
    • Scanning is more effective. For kills, a player owned ship must deal the killing shot.
  • Adjusted Yaki ship orders to improve the odds they get to do something before being crushed
  • (Econ AI) Improved effectiveness of the Yaki fallback resource supply
    • It's still a cheat (as in vanilla) but it will at least get them to build a ship now and then
  • (Econ AI) NPCs will ignore terraforming drone builds when deciding if a player shipyard/wharf is too busy for more orders
  • (Econ Bal) Slightly increased player ship sale price (compensating for this mod making it harder to sell ships at high prices)
Changes in v5.21
  • Fixed freeze after making a certain choice in a Terran expansion story mission
  • Improved faction invasion behavior to wait a little before creating the defence station plot so forces have time to engage
  • Improved force distribution for invasions between target areas
  • Improved defence response when a station is under attack and the victim has low ship availability
  • (Econ AI) Fixed energy cell production analysis and new factory placement not considering sector sunlight
  • (Econ AI) Fixed (vanilla) bug causing Xenon miners near the Terran expansion sector group to mine in very poor locations
Changes in v5.2
  • Ships with 'protect position' orders will now consider responding to direct attacks while en route
  • Fixed Terran long distance attacks not being given enough time to engage
  • (Econ AI) Slightly reduced faction module/factory spam in the early game
  • (Econ AI) NPC factories under construction will request a dedicated build trader if they are taking too long to get resources
  • (Econ AI) Workaround for bug where Terran DLC wharves insist on buying energy cells for min price regardless of need
  • (Catchup) Adjusted catchup production bonus to compensate for changes to base resource production amounts in 4.0
Changes in v5.1
  • Capital ships with attack orders that are completely disarmed and have no fighter cover will attempt to retreat for repairs
  • Fixed faction respawn not working if the mod is added after the faction has already been eliminated
  • (Econ AI) Fixed calculation for how many workforce wares need to be produced
  • (Econ AI) Improved faction response to a ware being in shortage both due to production and lack of transports
  • (Econ AI) Improved faction response when a ware needs more transports but they can't be built because that's what needs the ware
  • (Catchup) Fixed a bug that caused ZYA to receive less catchup bonus than intended when under duress
Changes in v5.0
  • Added a redesigned scouting behavior that actually scouts and reports results to the faction AI
    • Scouts will flee from all enemies
    • After taking fire, they will try to report incomplete results; destroy scouts quickly to reduce enemy intel
    • This behavior is also available to the player (as the Recon default order)
    • After each cycle reports will be sent to the logbook (filter for 'recon')
    • This is not a replacement for Explore - only known POIs or thoroughfares will be checked
    • Can be used to level pilots, but most XP gain is linked to finding enemies so scout hostile areas for better results
  • NPC scouts may drop satellites near enemy formations
  • AI is more likely to target enemy satellites
  • AI factions take into account nearby station strength when attacking (if they have intel)
  • Improved S/M ship subsystem target selection when attacking capital ships or stations while the player is present (depending on skill)
  • Fixed S/M ships not targeting a subsystem at all for the first attack run
  • Capital ships no longer deal main cannon damage to multiple targets at once in low attention if there are multiple ships in the front quadrant
  • Improved AI allocation of ships for defence
  • AI will now leave some ships patrolling for distress response instead of redirecting them all to invasion-related attack or defence
  • When a station comes under attack, invasion defenders that were allocated to defend a different area may now be redirected if they are not under threat
  • Reduced force allocation to sectors that have been orphaned since the ships will probably not survive to reach the defence point
  • Factions planning an invasion will attempt to consider allied forces in the area, including player ships if the player is also hostile to the enemy faction
  • The free agent Xenon I will now consistently be deployed offensively after a certain amount of game time has passed
  • (Split Vendetta) Added guaranteed Xenon I formations to the shipyard sectors of the DLC
  • (Split Vendetta) Fixed a vanilla bug that caused a FRF trading station that could flip factions due to the story to be broken/nonfunctional after doing so (retroactive)
  • (Econ AI) Fixed AI not reacting to economy shortages as quickly as in older game versions
  • (Econ AI) Fixed AI not considering ware shortages on station builds when the station is not yet operational
  • (Econ AI) Fixed AI not properly escalating the priority of wares that are blocking ship builds in some cases
  • (Econ AI) Improved performance of AI decision on where to expand/build a factory
  • (Econ AI) Improved Xenon mining analysis when the Xenon shipbuilders are in a sector that does not have all needed minables
  • (Catchup) Catchup logic will no longer consider drones and lasertowers when evaluating faction strength
  • (Econ Bal) Player ships built at a player shipyard can't be sold (not retroactive)
  • (Econ Bal) NPC factions will now properly reduce the price they're willing to pay for ships based on several factors including distance to job sector, urgency of task, and current build throughput
  • (Econ Bal) NPC factions will now skip building non-essential consumables (satellites, beacons, etc) at a player shipyard if it is too expensive and there is an equipment dock near the ship's job zone that it can supply at instead
Changes in v4.8
  • Changed low attention surface element targeting so S/M ships will not "stick" to surface elements that are actually the ship's main shields
  • Fixed capital ships in low attention losing track of what module on a station they were hitting if there are other enemies
  • Fixed capital ship movement in low attention (no more spinning ships)
  • Fixed station defences in low attention targeting previous attackers that are still alive but are no longer in range (or possibly even in the same sector!)
  • Player-owned ships that resupply will no longer delete items previously placed by the player
  • Fixed an edge case that could still cause ships to get stuck in the vicinity of the invincible Kha'ak Installation
  • Workaround for the (vanilla) bug that sometimes prevented subordinates set to "defend" from actually doing so in low attention
  • (Split Vendetta) Fixed a (vanilla) bug that prevented FRF pirate ships from doing anything
  • Pirate ships in general will now switch sectors if they fail to find any marks in their job zone for a long time (but they will still sell their loot to their home zone if possible)
  • Fixed some more cases that resulted in dumb turret selection on stations
  • Fixed a (vanilla) bug that prevented modules that area result of factory expansion from being equipped with turrets at all
  • Improved invasion selection for factions that gained a new Wharf in the DLC
  • Increased the probability that Xenon will build capital ships for military actions, especially later in the game
  • Fixed (vanilla) bug that caused Xenon defence stations built after game start to usually have nearly empty turret loadouts
  • Improved decision for whether ships built for invasion attack/defence should try to build wingmen first
  • Fixed a bug where ships restocking subordinates could get stuck waiting for an inordinate amount of time
  • Improved ability of higher skill fighter pilots to chase enemies that engage boost or travel mode
  • Boost used to flee will use shields in low attention
    • For technical reasons, the shield will be consumed at the end of the movement, not while it is moving
  • Stations will resend their distress call after a while even if no new enemies appear, in case local security was unable to respond the first time
  • Workaround for a rare (vanilla) bug when the player is present for capital ship combat where an AI ship fails to fire because it points slightly off the target
  • Fixed a (vanilla) bug causing lower than original loadout for rebuilt wharf/shipyard
  • Invasion defense groups will no longer select a defence point near stations of another faction that are not hostile to the enemy
  • Pirates that are trying to flee but cannot shake pursuit will eventually give up and engage unless the enemy is bigger than them
  • Removed notification and log message about drone destruction
  • Added notification and log message about station destruction
  • (Econ AI) Workaround for a (vanilla) bug where pirates may fail to steal crates from a station they hacked if SETA is running
  • (Econ AI) Factions will no longer buy from a player shipyard in the following conditions:
    • It is in a hostile sector that the player is not also hostile to
    • There are nearby enemy combat ships that the player is not hostile to
    • A hostile faction is already building there
  • (Econ AI) Trade ships will now pick up nearby dropped unowned ware crates before starting a trade search if the drops are part of their ware basket
    • This means that if you get hacked and your trade ships return they will try to pick up the wares and put them back
  • (Econ AI) Tweaked calculation of resource usage for faction shipyards that are stalled so the faction's economy AI will react a little more urgently
  • (Econ AI) (Split Vendetta) While FRF is a colony, ZYA will deploy a few trade ships to harvest any useful resource surplus from FRF territory
  • (Econ AI) (Split Vendetta) Fixed a (vanilla) bug that prevented Split factions from building starter factories in sectors they control/contest
  • (Catchup) Factions without a military (i.e. FRF) are now ignored for catchup logic
  • (Catchup) Improved catchup calculation for and against Xenon when a Xenon sector group has multiple adjacent enemies
Spoiler
Show
[*](Split Vendetta) Some time after the Hall of Judgement is captured, it will be decommissioned, partially because it makes more sense and partially to eliminate some inconvenient game state possibilities
[*](Econ AI) (Split Vendetta) Added a shipyard/wharf trader job for CUB
[*](Econ AI) (Split Vendetta) CUB will request FRF trader jobs to fill economic holes since CUB does not currently have any
Changes in v4.72
  • (Econ AI) Fixed some Xenon ship builders not having a dedicated miner when the DLC is installed
  • (Econ AI) Fixed Xenon miners in the Tharka's Cascade/Matrix #79B group not working correctly
  • (Econ AI) Fixed AutoTrade rarely taking an excessive amount of time to find a trade
  • (Econ AI) Fixed AI sometimes failing to add production for a needed ware because it tried to attach the module to a station that was in the process of being expanded already
Changes in v4.7
  • Fixed a case where faction logic ships responding to a distress call might chase the assailant across sectors
  • Improved turret variation on NPC factories
    • In an existing save, will only apply to newly created or upgraded factories
  • (Econ AI) Fixed a rare crash on game load
  • (Catchup) Adjusted detection of nearby enemies to account for cases where a faction does not own or contest a sector but has a substantial economic presence
  • (Catchup) Adjusted bonus to be higher in cases where a faction has more economy than enemies but substantially lower military
Changes in v4.6
  • Capital ships participating in boarding will fire on the target (if ordered) even with turrets set to Defend if the ship is not being attacked
  • Fixed a (vanilla) bug causing a resupply loop when a ship is full on one type of missile or drone but needs others
  • Improved capital ship movement when the previous action was to fly directly away from the target
  • Fixed a case where if a capital ship is rotating to fire and the enemy ship moves out of the view arc during that, the firing ship would give up and reposition instead of adjusting its aim direction
  • Fixed some (vanilla) bugs in player autopilot causing it to cut out unnecessarily or get stuck on highways
  • Fixed a (vanilla) bug where pirates that attack a ship because it didn't drop cargo and destroy it wouln't reliably pick up the resulting loot
  • Factions will now prioritize ownerless sectors for invasion when low on resources
  • The pirate group behavior added in mod v4.5 can no longer target Xenon power plants
  • Fixed a (vanilla) bug where the ownerless mines for certain missions would count as a kill for every single kill mission you have
  • (Econ AI) NPC traders will now avoid travelling through Xenon sectors if possible
  • (Econ AI) Fixed a (vanilla) bug causing factions to lose track of what factory expansions are currently pending
  • (Econ AI) Fixed a bug where factions could get stuck in a loop of building new Claytronics production to supply their unfinished Claytronics production
  • (Econ AI) Worked around a (vanilla?) bug where the Split factions are unable to expand factories, only create new ones
  • (Catchup) Updated the detection of enemies for catchup comparison to match the change to invasion logic in 3.0
Changes in v4.5
  • 3.0 compatibility
  • Improved fighters chasing targets in low attention
  • Improved M ship behavior in low attention to better match their usage when the player is present
  • Improved capital ship combat movement
  • High skill station managers will eventually detect storage hackers and mark them hostile
  • Fixed (vanilla) bug of pirates collecting hacked/dropped wares not always going for all the crates that are valuable to them
  • Fixed (vaniila) bug of contracted pirates not consistently turning in their loot after acquiring it
  • Fixed (vanilla) bug of pirates repeatedly going back to the same station for more in certain situations
  • Added a pirate M ship variant that has universal cargo space and will try to steal from miners
  • Improved the behavior of the roaming Xenon raiding parties so that they end up spread out through more of the galaxy
  • The Explore order now periodically uses the long range scanner to check for stations based on crew skill (long range scanner tier equipped also matters)
  • Factions that use multiple attack squads in contested sectors are more likely to try to attack two enemy stations simultaneously instead of sending two attack squads to the same station
  • Improved early game war balancing
  • Added a new war AI behavior
  • Added a new pirate group behavior (prioritizes large/wealthy stations, beware!)
  • Shipyard/wharf rebuilding will give up and pick a different site if an enemy completely owns the sector and no friendly ships can get in
  • Reduced "[Faction] mounting defence in [Sector]" news item spam
  • Fixed (vanilla) issue of Xenon miners not reliably supplying defence stations on the front lines
  • (Econ AI) Station traders never consider supply wares or habitation wares as critical (i.e. don't ignore primary resources because they are empty)
  • (Econ AI) Station traders will temporarily give up on shortage wares if there are no viable offers
  • (Econ AI) Fixed a rare bug where factions in a hull parts shortage could end up with a lot of half-finished factories
  • (Econ Bal) Increased production speed of Advanced Electronics
  • (Catchup) Factions that are badly losing their war(s) for a long time (many game hours) can now receive a support convoy from the planet in their home sector
    • Ships fly in from very far away to supply critical resources to shipyard/wharf, then are disassembled
    • Nav beacons are placed along the expected path, so friends/enemies can follow back and protect/intercept
    • A new convoy can be deployed many hours later if the situation does not change
Changes in v4.31
  • Fixed ships sometimes not resupplying properly from stations when they only need consumables
  • Added a War Update notification/log message when sectors change hands
  • (Econ AI) Fixed (vanilla) CV build drone issues introduced by 2.6 HF1
  • (Econ AI) Fixed CVs not checking if they need to resupply while idling looking for work
  • (Econ AI) Fixed Xenon Wharf having excessively low build drones
Changes in v4.2
  • Updated for 2.6 compatibility
  • In combination with game version 2.6 enhancements, significantly improved the allocation of faction forces for attack and defense
  • Surface element restore time from wrecked state is now affected by crew skill
  • Fixed an issue where capital ships and stations in 1v1 combat would still hit enemy surface elements with excessive accuracy
  • Capital ships that detect enemies hiding in their gravity well will now attempt to call for help
  • Fixed a case where some faction attack forces could get distracted and end up engaging the enemy early when they were supposed to be gathering
  • Additional improvements to wing leaders ordering their subordinates
  • Added some AI detection of player invasion tactics
  • Fixed a rare issue where an invasion that failed because the defence station was destroyed could stall endlessly in an incomplete state
  • Fixed cases where war update messages involving defence stations were not sent
  • Added a war update message when factions deploy a notable attack force to engage an enemy position in a sector they already contest or control
  • (Econ AI) Removed some early game behavior that is no longer needed because the factions start in a better state
  • (Econ AI) Implemented a partial workaround to the issue where faction shipyards' building drones mysteriously vanish
  • (Econ Bal) Removed production rate changes for Engine Parts, Hull Parts, and Smart Chips as Egosoft addressed these items in 2.6
  • (Econ Bal) Removed the limit on AI using high tier engines since that should no longer be necessary
  • (Catchup) Adjusted catchup logic calculations to make it easier for factions with many nearby enemies (HOP) to obtain a bonus
Changes in v4.11
  • Improved CPU performance of the economic analysis
Changes in v4.1
  • Added war scaling that starts out with much weaker attack forces and increases as the game progresses
    • Aside from using fewer forces at lower intensity, factions will also tend to use more fighters, making it easier for players with limited assets early on to participate without running into giant fleets
    • Currently the war intensity increases over time, but in the future this may change to account for certain player milestones
  • The 15 most recent war update messages are now displayed on the right hand side of the logbook screen
    • You must have actually received the update when it happened for it to appear (i.e. you must be at least +10 rating with one of the involved parties)
    • The data will remain even if the logbook is cleared
  • Improved factions' response to distress calls in sectors with no police or sectors that they are currently invading
  • Fixed (vanilla) bug preventing non-player ships in a fleet with a resupply ship from using it for repair or resupply
  • Somewhat improved the odds of wing leaders getting their subordinates built
    • Subordinates of subordinates still tend to not work; this functionality seems to resist fixing and may not be further fixable by mods
  • In a new game in the default universe, added a second defense station to: Hatikvah's Choice I, Holy Vision, True Sight, Pontifex's Claim, and Pious Mists
    • Since these sectors are invasion targets at start, the AI immediately starts building the second defence station if it isn't there, so this is just preserving valuable starting resources
  • Fixed a bug that prevented the HAT Trading Station, MIN Wharf, and ALI Wharf from being rebuilt if they were destroyed
  • Improved factions allocating resources in sectors they control or contest
  • Reduced the number of ship build requests that factions may make for invasion attempts
  • Increased the delay between invasion attempts, especially early game
  • Fixed the invasion delay being ignored if the most recent attempt reached the stage of contesting the enemy's sector
  • In the late game, increased the range for the amount of force used for invasion attempts (i.e. more or less forces could be deployed than previously, depending on various factors and randomness)
  • Factions will no longer use L or XL size ships as "scouts" for recon data gathering
  • The "War station was destroyed" message and logbook entry now works reliably
  • The "War station under construction" message will now wait until the construction vessel arrives (if required)
  • (Econ AI) Fixed a rare issue that could cause factions to start too many new factories at once
  • (Catchup) Adjusted the detection of active wars so that the Argon are eligible for a catchup bonus while the Xenon contest Hatikvah's Choice I or the Holy Order contests Second Contact II even if those sectors are still under friendly control
  • (Catchup) Adjusted the military strength evaluation to count ships that are in the process of building (not queued and not stalled but not finished)
Changes in v4.0
  • Factions will rebuild wharfs that are destroyed (note that shipyard rebuilding - but not wharfs - was implemented by Egosoft in 2.5)
  • Factions that are completely eliminated may eventually respawn in an unowned sector
  • Slightly improved Kha'ak fighter AI
  • Kha'ak will sometimes warp in to take part in major battles
    • Kha'ak ships are still terrible so they aren't going to win anything but they can mix things up a little and provide variety
  • Ships that are fleeing and do not have lasertowers to drop may drop a mine instead
    • This behavior works even out of sector, but mines created in this way will self-destruct after a while to avoid pollution
  • Fixed a case where invasion defenders might never stand down if the sector became completely empty of enemies
  • Slightly improved ability of pirates to actually hit the ship that refused to drop any cargo when out of sector
  • Factions that successfully take a sector have a high chance to build refineries for any raw resources in the sector regardless of economy state
  • Improved decision for when factions will invade the next adjacent sector to the one they took over
  • Slightly increased the chance that HOP and ANT will request pirates to steal from each other
  • Fixed a (vanilla) bug that allowed Xenon to build XL shield generators for free
  • Fixed a (vanilla) bug that prevented stations that only have drones from attempting to damage attackers OOS
    • i.e. the Teladi Trading Station
  • Workaround for Xenon defence stations not building any drones
  • Xenon I will not be deployed to Hatikvah's Choice I during early game since it tends to annihilate everything
  • Xenon will use slightly less force for their initial attacks
  • (Econ AI) Added a workaround for vanilla bug introduced in 2.21 that prevents the AI from properly reacting to shipbuilding shortages
  • (Econ AI) Ships that are set to recycle (from job no longer being needed) will now actually recycle at their faction's shipyard to reclaim some resources
  • (Econ AI) AI traders that are unable to do anything for a long time due to no offers for their ware basket will eventually send themselves to the recycler
  • (Econ AI) Fixed a rare issue where factions might try to expand a station with too many production modules
  • (Econ AI) Fixed a vanilla bug introduced in 2.5 where in rare cases factions might try to expand their shipyard with a production module
  • (Catchup) Adjusted the war power evaluation of the Xenon I to more accurately represent its strength
  • (Econ Bal) Reduced Engine Part production speed from 150% of vanilla to 140%
Changes in v3.2
  • Turrets will attack the ship's current target if set to "defend" and no other targets are available
  • Fixed ally support in hostile territory not working reliably
  • Fixed AI ignoring enemy satellites (vanilla issue)
  • Capital ships in combat never use boost unless some mod makes it actually useful (checks potential speed difference)
    • This does not currently fix the "Withdraw from Battle" order, most commonly seen on pirate plunderers trying to make off with stolen goods. For the time being that behavior is still dumb.
  • Invading factions will not deploy a builder to the defence station if the invasion fleet has already been annihilated
  • Ships with 'Escort', 'Protect Position', and 'Protect Station' orders will not spam "Awaiting Orders" to the player after every enemy kill (vanilla issue)
  • Fixed various issues with AI faction commanders ordering new subordinates
  • Xenon miners will sometimes be deployed with fighter escort
  • Newly built defense ships are more likely to wait for their wingmates to build before deploying
  • Factions will rebuild equipment docks and trading stations
    • If the station has already been completely destroyed before this update is applied, it's too late
    • If the sector is taken by a different faction but the new faction has a station of the same type, it will be built in the sector instead
    • The location within the sector is random and not necessarily where it was before
    • This feature does not fix the vanilla bug where the Teladi Trading Station does not get repaired, but it will rebuild the station if it is completely destroyed
  • Significantly improved the defensive response to invasions that are initially successful
  • The AI has a better strength assessment of the Xenon I
    • This feature can also account for modded XL class ships
  • Fixed certain defend or attack station goals not getting removed after the attack is over
  • Fixed invaders not attacking enemy stations in certain situations
  • Fixed Xenon creating too many Solar Power Plants in sectors they have stolen in certain cases
  • Allow factions to claim adjacent ownerless sectors if some of their stations are already there (fixes sectors not getting reclaimed if the defense stations of an inner sector are sniped)
  • Newly built defence stations will stock more missiles and drones
  • Factions will now properly use ships given to it by the Assemble Fleet mission (vanilla issue)
    • This fix is retroactive
  • (Econ AI) Partial fix for a trader bug that caused traders of a certain type to all try to trade in the same ware even when it isn't the best deal (vanilla issue)
  • (Econ AI) Factions looking to build new stations will more highly prioritize locations with very few stations
Changes in v3.1
  • Added Catchup Module (see above)
  • Fixed Xenon still sending too many miners to build invasions if they are down to their last cluster in that area
  • Fixed AI not properly removing obsolete defence goals in some cases
  • Reduced Xenon invasion strength in the very early game
Changes in v3.0
  • When attacking ships in territory where the police will not help them, combat ships of the same faction that are in range and not otherwise occupied may now join the fight
  • Slightly tilted invasion forces towards attacking stations and less gate camping
  • Slightly increased duration into a new game before factions will consider building invasion stations
  • (Econ Balance) Increased Hull Parts production by roughly 12.5%
  • (Econ Balance) Increased Weapon Components production by 20%
  • (Econ Balance) When starting a new game, factories that produce resources needed for station construction start with more stock
  • (Econ AI) New Economy Manager AI:
    • Production modules needed is determined by analyzing production vs consumption when a shortage is detected instead of guessing based on shortage duration
    • AI will prefer to build new modules instead of new factories, especially early game
    • Modules that share products or non-energy resources will be matched together
    • AI will avoid building freighters for resources that are out of stock
  • (Econ AI) Miners will consider sectors contested by an enemy as hostile for purposes of mining territory selection
  • (Econ AI) Fixed a (vanilla) bug that caused Antigone to not build new miners based on resource shortfalls
  • (Econ AI) Fixed a (vanilla) bug that sometimes resulted in build storage in shipyard sectors being ignored
  • (Econ AI) Fixed a (vanilla) bug that resulted in the Holy Order starting with 1 ore and 1 silicon refinery module when it should be 4 and 2
    • This fix is retroactive
Changes in v2.3
  • You can now receive rewards for assisting an invasion by destroying ships of the sector owner and their allies
    • If you are a friend to the invading faction, you receive reputation and money; otherwise only reputation
    • The reward amounts are the same as station/sector defence
    • A police license is not required
  • Slightly reduced Xenon aggressiveness/efficiency at game start and slightly increased it later on
  • Don't use S size ships for invasion freighters because they can't transport enough of the critical resources at a time
  • (Econ AI) Improved factions requesting more miners when needed (especially Xenon)
  • (Econ AI) Tweaked NPC autotrader cargo space and purchase price thresholds
Changes in v2.2
  • Improved orders for invasion station supply freighters
  • Defense AI now updates defense points when sector ownership changes
  • Fixed police/recon ships patrolling the wrong sector (vanilla issue)
  • Somewhat improved capital ships chasing other capital ships
  • (Econ AI) Fixed economy logic declaring critical construction wares as "unviable" and not trying to fix them anymore (vanilla issue)
  • (Econ AI) When building a new factory for slow producing resources the AI will build 2 production modules instead of 1
  • (Econ Balance) Reduced builder hire cost from 500,000 credits to 300,000
Changes in v2.1
  • Fixed a rare case where the Xenon would lose all their miners attempting to build an invasion station and thereby be unable to build anymore in their home sectors
  • Invasions will be aborted if the staging area is lost to the enemy
  • Invasions will now commandeer a couple of freighters dedicated to station building resources to improve response time, particularly for the Holy Order
  • Defense points will be added for stations in friendly territory that are under attack in case the police aren't good enough
  • (Econ AI) Station traders sell products more frequently when resources are near full
Last edited by Mysterial on Fri, 25. Aug 23, 22:40, edited 67 times in total.

User avatar
Baconnaise
Posts: 619
Joined: Sat, 23. Nov 13, 15:50
x4

Re: [MOD] Faction Fix Pack

Post by Baconnaise » Thu, 24. Jan 19, 22:06

Nice! Thank you for this fix.

Requiemfang
Posts: 3206
Joined: Thu, 16. Jul 09, 12:24
x4

Re: [MOD] Faction Fix Pack

Post by Requiemfang » Thu, 24. Jan 19, 23:29

So just a question does this fix the issue below where the races would go crazy and spam building defense stations all over the place?
reanor wrote:
Wed, 23. Jan 19, 06:39
The picture below is a result of this patch. Teladi went insane... So did other factions. Looks like I have to revert it all back... *sigh*

Image

Mysterial
Posts: 644
Joined: Wed, 6. Nov 02, 20:31
x4

Re: [MOD] Faction Fix Pack

Post by Mysterial » Thu, 24. Jan 19, 23:33

It should, yes.

Wonsz
Posts: 65
Joined: Mon, 10. Dec 18, 23:51
x4

Re: [MOD] Faction Fix Pack

Post by Wonsz » Thu, 24. Jan 19, 23:53

Another job well done (that devs should have done ;) ), I thank you and guys from Egosoft should thank you too ;)

Few questions about your work:
1. I can see that your mod does everything that Faction War Hotfix and more, correct? If I install it, can I stop using FWH?
2. Is it ok to use it with FOCW or do you suspect a conflict there?

Mysterial
Posts: 644
Joined: Wed, 6. Nov 02, 20:31
x4

Re: [MOD] Faction Fix Pack

Post by Mysterial » Fri, 25. Jan 19, 00:07

Wonsz wrote:
Thu, 24. Jan 19, 23:53
1. I can see that your mod does everything that Faction War Hotfix and more, correct? If I install it, can I stop using FWH?
Correct.
Wonsz wrote:
Thu, 24. Jan 19, 23:53
2. Is it ok to use it with FOCW or do you suspect a conflict there?
Although I have not tested, I took a quick look at it and it seems like it should be compatible. The behavior changes in that mod seem to be based on adding jobs and not modifying the faction logic. The only thing that might be a minor issue is it looks like it reduces the Engine Parts costs of some things, which in combination with my increase to production might be overkill. But one less super profitable ware isn't likely to be a big deal.

arknor1981
Posts: 62
Joined: Sat, 16. Nov 13, 23:05

Re: [MOD] Faction Fix Pack

Post by arknor1981 » Fri, 25. Jan 19, 00:18

can you make an alternative version without the engine parts change please.

Wonsz
Posts: 65
Joined: Mon, 10. Dec 18, 23:51
x4

Re: [MOD] Faction Fix Pack

Post by Wonsz » Fri, 25. Jan 19, 00:39

I don't know about faction wars yet, but you certainly fixed Xen invasions and autotrade for me ;) I had 5 K's attacking TEL station with grey health bar for over 20 hours. Station was rebuilding, making great trap for autotraders trying to deliver hull and claytronics there. 5 mins after installing your mod station is completly destroyed, K's can proceed further and no more build storage orders from some stubborn idiot ;]
arknor1981 wrote:
Fri, 25. Jan 19, 00:18
can you make an alternative version without the engine parts change please.
Second that. FOCW is pretty popular, and, as you said, your mod with FOCW can throw engine parts market out of balance.

arknor1981
Posts: 62
Joined: Sat, 16. Nov 13, 23:05

Re: [MOD] Faction Fix Pack

Post by arknor1981 » Fri, 25. Jan 19, 01:08

Wonsz wrote:
Fri, 25. Jan 19, 00:39
I don't know about faction wars yet, but you certainly fixed Xen invasions and autotrade for me ;) I had 5 K's attacking TEL station with grey health bar for over 20 hours. Station was rebuilding, making great trap for autotraders trying to deliver hull and claytronics there. 5 mins after installing your mod station is completly destroyed, K's can proceed further and no more build storage orders from some stubborn idiot ;]
arknor1981 wrote:
Fri, 25. Jan 19, 00:18
can you make an alternative version without the engine parts change please.
Second that. FOCW is pretty popular, and, as you said, your mod with FOCW can throw engine parts market out of balance.
same had xenon attacking 3 stations in the same system for about 30hours, finally they are dead after installing this mod

Mysterial
Posts: 644
Joined: Wed, 6. Nov 02, 20:31
x4

Re: [MOD] Faction Fix Pack

Post by Mysterial » Fri, 25. Jan 19, 01:27

Alright, I added a download for a version without the Engine Parts adjustment.

DeadAirRT
Posts: 1007
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [MOD] Faction Fix Pack

Post by DeadAirRT » Fri, 25. Jan 19, 03:29

Great work! Look forward to seeing how it works out. Did you include the build storage ownership fix with this?

Mysterial
Posts: 644
Joined: Wed, 6. Nov 02, 20:31
x4

Re: [MOD] Faction Fix Pack

Post by Mysterial » Fri, 25. Jan 19, 04:54

Oh, good point. I forgot only the beta has Egosoft's fix for now. I uploaded an update that has the workaround for that situation. (The workaround is retroactive and will fix existing build storage)
Last edited by Mysterial on Fri, 25. Jan 19, 04:59, edited 1 time in total.

Requiemfang
Posts: 3206
Joined: Thu, 16. Jul 09, 12:24
x4

Re: [MOD] Faction Fix Pack

Post by Requiemfang » Fri, 25. Jan 19, 04:59

Mysterial wrote:
Fri, 25. Jan 19, 04:54
Oh, good point. I forgot only the beta has Egosoft's fix for now. I uploaded an update that has the workaround for that situation.
Just curious... how will that affect those of us playing with the 1.6 beta?

Mysterial
Posts: 644
Joined: Wed, 6. Nov 02, 20:31
x4

Re: [MOD] Faction Fix Pack

Post by Mysterial » Fri, 25. Jan 19, 05:02

The workaround won't have any effect if you're on 1.6. It's just a script that looks for build storage with an owner different from the station it's building and changes it. In 1.6 no such situation should exist as far as I have seen.

Requiemfang
Posts: 3206
Joined: Thu, 16. Jul 09, 12:24
x4

Re: [MOD] Faction Fix Pack

Post by Requiemfang » Fri, 25. Jan 19, 05:47

Cool, was just concerned a bit that's all glad to see it won't have any effect :wink:

Thecrippler
Posts: 368
Joined: Tue, 8. Jan 19, 15:43

Re: [MOD] Faction Fix Pack

Post by Thecrippler » Fri, 25. Jan 19, 06:47

question do we need to start a new game play or is it ok with save files

Mysterial
Posts: 644
Joined: Wed, 6. Nov 02, 20:31
x4

Re: [MOD] Faction Fix Pack

Post by Mysterial » Fri, 25. Jan 19, 06:57

It works fine with old save files, but it may take a while (1-2 game hours) to clear up old faction goals and get things running more smoothly.

Thecrippler
Posts: 368
Joined: Tue, 8. Jan 19, 15:43

Re: [MOD] Faction Fix Pack

Post by Thecrippler » Fri, 25. Jan 19, 18:55

Hello all need a small help with the NPC not trading with Wharf or shipyards main component engine parts is there a mod out there that fix this

Mysterial
Posts: 644
Joined: Wed, 6. Nov 02, 20:31
x4

Re: [MOD] Faction Fix Pack

Post by Mysterial » Fri, 25. Jan 19, 20:10

Not sure if I understand what you meant but if the issue is that traders aren't supplying the shipyards efficiently enough for you, then I have something else up you could try:
viewtopic.php?f=181&t=412091

Thecrippler
Posts: 368
Joined: Tue, 8. Jan 19, 15:43

Re: [MOD] Faction Fix Pack

Post by Thecrippler » Sat, 26. Jan 19, 02:45

Ty maybe this will help me :thumb_up:

Post Reply

Return to “X4: Foundations - Scripts and Modding”