[MOD] Faction War/Economy Enhancer v5.5

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

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

Revolution Rising
Posts: 57
Joined: Sun, 29. Jul 12, 00:19
x4

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by Revolution Rising » Sun, 30. Aug 20, 12:46

abYsss wrote:
Sun, 30. Aug 20, 08:38
I gave this mod a good try and I want to preface this by saying that I don't want this to sound overly negative.

With the mod turned on HOP overran Second Contact, while most ANT/ARG fleets remain passive in other sectors, making it a cakewalk for HOP. ARG/ANT kept sending in singular fighters and destroyers to have them be destroyed.

Without the mod ARG/ANT called support from other sectors and were able to beta back HOP after losing some stations with a massive counter attack.

I also noticed severe hull part shortages across most of the galaxy (I assume due to the very large number of stations the AI builds at the same time with this mod), while without the mod shipyard and wharfs are producing ships at a much more steady rate. ZYA is still in control of ore and hull production, but no longer builds any ships. I stopped seeing any military ZYA ships after 30ish hours despite the fact that they have yet to lose a sector to the Xenon.

I'm not convinced this mod really makes the AI better, based on what I saw in several runs I find the opposite to be true. A lot of military assets remain unused and ship production grinds to a halt because the AI massively overbuilds stations.

For the record, I am not using any other mods.
This. I found no matter what I did they built stations - sure - but not so much SHIPS.

Mr.Freud
Posts: 301
Joined: Sat, 16. Nov 13, 20:20
x4

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by Mr.Freud » Sun, 30. Aug 20, 22:40

try disabling Economy AI module. It's responsible for station building and trade runs.

computica
Posts: 10
Joined: Mon, 31. Mar 08, 18:34
x4

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by computica » Mon, 7. Sep 20, 05:15

I'm only using the Economy Balance because the other modules make the Xenon too over powered.

purifiedturd
Posts: 6
Joined: Tue, 1. Sep 20, 21:04
x4

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by purifiedturd » Thu, 10. Sep 20, 01:28

I've had trouble getting my figthers to restock with missiles automatically. The situation is detailed in the OP of this thread.

Before I begin, the problem is not with this mod. However, when trying to debug it I found that this mod patches the script that causes this issue. So I thought I would share my findings here to perhaps provoke further investigation/fixing by someone who knows what they're doing. My X4 modding experience spans all of two evenings (just to try to figure out this problem).

The fix for my case, at least, is in `interrupt.restock.xml`. The diff patch I found that works for me is

Code: Select all

  <replace sel="//aiscript[@name='interrupt.restock']/interrupts/library/actions/do_if[2]/do_if[5]/do_if[6]/do_all/do_all/do_elseif[4]/@value">
    $resupply_ammo and (not $resupplystations_interrupt.{$counter_lib_resupplystations}.canbuildequipment.{$evalammotable.keys.0} or not $resupplystations_interrupt.{$counter_lib_resupplystations}.hasresourcesfor.{$evalammotable})
  </replace>
The key (and only) change is `canbuildequipment.{$evalammotable.keys.list}` to `canbuildequipment.{$evalammotable.keys.0}`. I.e. a single element (ware) works, but a list of wares fails.

Before this fix the relevant debug log line in that file printed

Code: Select all

remove 5: IPG-950 Atlas Vanguard 0x5c850. canbuildequipment: 0, hasresources: 1, wanted ammo: [ware.missile_smart_heavy_mk1]
By changing from `list` to `0`, the restocking works!

Of course, that means only a single missile type is considered. That code would seem to imply that multiple possibilities should be considered.

I should mention that other posts I've read (including the thread I linked above) some people report that it works fine for them. So maybe there's something about my setup that is different. I have no idea.

Hope this helps someone.

SMoOoVEeR
Posts: 49
Joined: Thu, 28. Dec 17, 19:41
x4

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by SMoOoVEeR » Thu, 10. Sep 20, 23:01

SO, is it normal behaviour of factions to not react to Xenon attacks? There is a random Xenon V Destroyer in an Antigone Sector killing all ships and attacking a station since quite a time and the 3 Destroyers in the neighouring sectors just happily stay on patrol in their own sector and dont help out. Its weird.

Rastuasi
Posts: 455
Joined: Mon, 1. Oct 18, 16:28
x4

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by Rastuasi » Fri, 11. Sep 20, 00:59

SMoOoVEeR wrote:
Thu, 10. Sep 20, 23:01
SO, is it normal behaviour of factions to not react to Xenon attacks? There is a random Xenon V Destroyer in an Antigone Sector killing all ships and attacking a station since quite a time and the 3 Destroyers in the neighouring sectors just happily stay on patrol in their own sector and dont help out. Its weird.
That's an issue with vanilla, not sure how much mods can do for that.

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

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by Mysterial » Fri, 11. Sep 20, 04:30

SMoOoVEeR wrote:
Thu, 10. Sep 20, 23:01
SO, is it normal behaviour of factions to not react to Xenon attacks? There is a random Xenon V Destroyer in an Antigone Sector killing all ships and attacking a station since quite a time and the 3 Destroyers in the neighouring sectors just happily stay on patrol in their own sector and dont help out. Its weird.
Hard to say, but if they really only have 3 destroyers flying around, then it's probably not a bug. The AI won't empty every last ship in all their sectors trying to fight. There are some left on reserve for local issues. It would be a worse problem if the AI lost its entire military defending one sector or station.

Max Bain
Posts: 1458
Joined: Wed, 27. Jun 18, 19:05
x3ap

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by Max Bain » Sat, 26. Sep 20, 17:05

Hi, I am not 100% sure if this comes from your mod, but I guess so.
My error log is showing more than 100k of error lines and most of them look like this:

Code: Select all

[Economy_Verbose] 11195.20 #FL#;11195.198;Started;FactionGoal_Hold_Space<inst:8d9a7a>;(paranid) FactionSubgoal_Recon<inst:514de65> in: 0xf2e Empty Space (Litany of Fury IX);null;null;Empty Space;paranid;null
 
[Economy_Verbose] 11224.39 #FLS#;11224.389;DefendArea_ShipBuilt;[md.FactionGoal_Hold_Space.Start];XEN Raiding Party P;0x51074aa;EXH-765;Tharka's Cascade XV;xenon;Emperor's Pride VI 

[Economy_Verbose] 11244.26 #FL#;11244.259;Started;FactionGoal_Hold_Space<inst:105c2a>;(teladi) FactionSubgoal_DefendArea<inst:5943506> in: Company Regard 0x114f ;null;null;Company Regard;teladi;null
Is this from your mod? I think after a very long game the log will have more than a million lines and make trouble.
If its not your mod, sorry to bother you.
XR Ship Pack (adds several ships from XR) Link
Weapon Pack (adds several new weapons) Link
Economy Overhaul (expands the X4 economy with many new buildings) Link
X4 Editor (view stats of objects and make your own mod within a few clicks) Link

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

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by Mysterial » Sat, 26. Sep 20, 17:33

That happens in vanilla if logging is enabled. Possible it would be at less frequency in vanilla because the AI reacts less frequently, but they aren't my log lines. The log always grows endlessly anyway and you shouldn't have it enabled if you're just trying to play and concerned about performance. The log size shouldn't be particularly relevant, however, only the frequency. It's not like the game keeps the whole thing in memory.

SMoOoVEeR
Posts: 49
Joined: Thu, 28. Dec 17, 19:41
x4

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by SMoOoVEeR » Thu, 1. Oct 20, 22:35

I dont know if its related to this mod, but I would guess so:
Split factions seem to be incapable of claiming neutral, adjacent sectors, even though their agressivness is high and they have spare builders, lot of battleships and so on, they dont claim neutral sectors somehow. I kept a sector Xenon clean after they almost got overrun for a few days and there are trading ships and fighters patrolling but nothing is built there. ALso, weirdly, there are some L traders in the neutral sectors idling around looking for trades. Maybe there is some issue with them thinking the sector is still theirs somehow? I am cleaning out newly appearing Xenon Def stationons regularly, but they just keep appearing and are built so fast, its incredible.

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

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by Mysterial » Fri, 2. Oct 20, 03:58

I have seen that issue once before but haven't identified any cause as of yet. It's possible the AI just hasn't realized the sector is safe; it doesn't assume so just because ownership changed. If you see any obvious Split scouts it might help to escort them around. If their scouts can stay alive long enough they should update the faction's knowledge of enemy forces. If they are allied with you they should also consider your force strength, so stationing a fleet there may also improve their view. Of course, it's possible there's another reason (bugged or otherwise) but it might help.

Max Bain
Posts: 1458
Joined: Wed, 27. Jun 18, 19:05
x3ap

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by Max Bain » Fri, 2. Oct 20, 09:02

I think you already know this, but just in case:

There are two values that might be related to their expansion. The one is BaseAgressionLevel and the other one is BaseAvariceLevel (both in factionlogic. I think the last one is more important for expansion than the first one but I havent tried them out yet.
XR Ship Pack (adds several ships from XR) Link
Weapon Pack (adds several new weapons) Link
Economy Overhaul (expands the X4 economy with many new buildings) Link
X4 Editor (view stats of objects and make your own mod within a few clicks) Link

SMoOoVEeR
Posts: 49
Joined: Thu, 28. Dec 17, 19:41
x4

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by SMoOoVEeR » Fri, 2. Oct 20, 10:45

I think split have both on a high lvl, avarice and aggression. I have a pretty strong fleet stationed in the neutral sector and there is even FRF police roaming around.
It might actually be due to the gamestart which was the Split on losing side one and FRF actually isnt kind of allowed to expand on itself but only Zy is maybe?
There are oppressorfleets of Zyarth coming in as I am saving the pathway to the FRF sectors atm.
However, even more strangeley, Zy is now building new factories in a Xenon sector next to the neutral sector at FRF, there are 1 neutral, 1 Tel, 1 Xen sector between this sector and Zy main sectors in which Zy started to built.

Another thing: FRF has 2 sectors left, one with Shipyard/Wharf and one with an EquipmentDock. These to are separated by the neutral sector I protect/secure. FRF is now starting to built a new EquipmentDock in their Wharf sector.

Also, I found a built storage in the before mentioned neutral sector beloning to FRF, but without any plot attached, weird.

I will attach a savegame if any of you wants to take a look.
https://drive.google.com/file/d/1RqHANQ ... sp=sharing

SMoOoVEeR
Posts: 49
Joined: Thu, 28. Dec 17, 19:41
x4

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by SMoOoVEeR » Sat, 3. Oct 20, 15:05

Is it also this mod which enables Xenon to replace lost stations immediatly? I destroy one factory/defence station and in less than a minute there is an new one coming up and miners coming in. I think thats too fast, especially meanwhile other factions duly take their time to do similar and/or, like FRF in my case, not being able to claim sectors at all.

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

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by Mysterial » Sat, 3. Oct 20, 15:31

No, that's vanilla. I'm pretty sure the wreck has to go away before it'll get replaced, but that's still not a lot of time. Xenon stations take a long time to build, though.

hufflazon
Posts: 27
Joined: Wed, 5. Dec 18, 19:16

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by hufflazon » Mon, 16. Nov 20, 01:28

I activated the War and Econ AI mods in my current game (~48 hours) because I was hoping to see the AI use its fleets a little more intelligently and I'm really pleased with the results so far.

I did run into a little weirdness. First, I saw a whole fleet of HOP Behemoth Sentinels (5 of them) pop into Second Contact Flashpoint and then through the gate to True Sight. I was afraid something might be going wrong with the mod so I flew over to take a closer look.

ANT has partially occupied True Sight for awhile in my game but I've never seen any ANT capital ships there. Now they had a huge fleet, Nomad, several Behemoths, lots of smaller ships, attacking stations. This is exactly what I hoped to see from the War mod. Awesome!

Flying around a bit I managed to locate one of the HOP Behemoth Sentinels and flew over to it. I wanted to scan it, thinking maybe it was SCA or something, but I'm -30 with HOP so my turrets started firing. As soon as I hit it the ship changed to ANT and a nearby HOP station started firing at it.

I read through the changelog and this forum thread pretty thoroughly and I'm not seeing anything about faction ships being able to disguise themselves. Just one person way back there mentioned a ZYA fleet of Argon ships. Wonder if something similar was going on there.

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

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by Mysterial » Mon, 16. Nov 20, 17:51

hufflazon wrote:
Mon, 16. Nov 20, 01:28
Flying around a bit I managed to locate one of the HOP Behemoth Sentinels and flew over to it. I wanted to scan it, thinking maybe it was SCA or something, but I'm -30 with HOP so my turrets started firing. As soon as I hit it the ship changed to ANT and a nearby HOP station started firing at it.
There is a stealth assault behavior that can be used somewhat rarely. They should break cover on their own once they are about to begin attacking. That they were still disguised while in range of an enemy station is a little concerning, but it's possible they just picked a dumb staging position for a different target.

hufflazon
Posts: 27
Joined: Wed, 5. Dec 18, 19:16

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by hufflazon » Mon, 16. Nov 20, 18:57

Mysterial wrote:
Mon, 16. Nov 20, 17:51
There is a stealth assault behavior that can be used somewhat rarely. They should break cover on their own once they are about to begin attacking. That they were still disguised while in range of an enemy station is a little concerning, but it's possible they just picked a dumb staging position for a different target.
Ah! That's cool. The one I found was cruising along beside the highway so it could have been headed anywhere. Lots of HOP stations still in that area.

Thanks a bunch for this mod. It already seems to be making a huge difference in my game.

Mr.Freud
Posts: 301
Joined: Sat, 16. Nov 13, 20:20
x4

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by Mr.Freud » Tue, 17. Nov 20, 20:09

can FE be used with 4.0 beta?

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

Re: [MOD] Faction War/Economy Enhancer v5.0

Post by Mysterial » Tue, 17. Nov 20, 20:53

I don't have time to investigate right away, but I'd be shocked if it completely worked out of the box.

Post Reply

Return to “X4: Foundations - Scripts and Modding”