[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

Warnoise
Posts: 674
Joined: Mon, 7. Mar 16, 23:47

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

Post by Warnoise » Wed, 5. Aug 20, 08:12

Mysterial wrote:
Wed, 5. Aug 20, 00:55
The AI will get confused by the outer destroyed modules. It knows they're in the way so it won't fire the main cannon but it doesn't know how to position to get a clear shot. It's broken in vanilla too.
strange the station i am targeting oes appear to have any destroyed modules. If you have the time, kindly check the save that i posted. The Solar power plant is heiwa twin 1,


Also I have another question, is there a chance that a mod alters the main game file? like for example a mod altered the Capital ships attack script causing them break even after removing the mod?

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

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

Post by Mysterial » Wed, 5. Aug 20, 15:10

Warnoise wrote:
Wed, 5. Aug 20, 08:12
Also I have another question, is there a chance that a mod alters the main game file? like for example a mod altered the Capital ships attack script causing them break even after removing the mod?
No. At worst a mod could mess up the saved variables, but that would go away if you gave it a new order.

sanctific
Posts: 40
Joined: Fri, 7. Dec 18, 11:44

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

Post by sanctific » Sat, 8. Aug 20, 10:50

Hi Mysterial,

A quick query - would your mod be compatible with DeadAir's Dynamic Wars scripts ? I've just started a new playthrough and plan to unite the Paranids & side with Patriarchy yet i dont want those 2 to be idle (especially Paranid mega-empire) e.g. DeadAir's war scripts would fit in really well, yet I'm not sure if those won't mess up with your mod's stuff.

Thanks in advance!

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

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

Post by Mysterial » Sat, 8. Aug 20, 15:09

I don't know of any reason why it wouldn't, but I don't use it.

Scoob
Posts: 9921
Joined: Thu, 27. Feb 03, 22:28
x4

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

Post by Scoob » Sun, 9. Aug 20, 22:49

Hi,

Is there any way to nerf the HOP Faction a bit? They've got a bit nuts in my game. I do use other mods - VRO, RoR and XR Ship Mod - so things are a bit tougher in general. However, for some reason, HOP appear to be building all the super high-end ships for themselves, whereas other Factions are building a better spread of ships, with the really tough stuff being really quite a rare encounter.

HOP, who are currently invading PAR space, already fielded several L-Class Destroyers, far out-classing the PAR Defenders, and now they've just added several more L-Class and even XL-Class ships to the invasion fleet. For whatever reason HOP, despite having enemies on all sides, seem to be able to out-build TWO other major Factions (ARG and HOP, not to mention ANT) which is a little silly.

I know HOP tend to be a bit OP in vanilla also, it's just that other mods have given them steroids. As FWEE sits atop other mods, guiding various elements of the larger picture, I wonder if it's here things need to be adjusted?

I'd even settle for a quick-fix hack so HOP Paranid don't become the dominant life form lol.

Sometimes I wish we had the scripting engine of prior games, sometimes a quick script to "fix" in-game oddities could prolong a playthrough and keep it fun.

Scoob.

Buzz2005
Posts: 2184
Joined: Sat, 26. Feb 05, 01:47
x4

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

Post by Buzz2005 » Sun, 9. Aug 20, 23:56

kind of weird to ask this mod author for changes to his mod bc of effects of other mods, ror, vro and xr ship packs make the game harder, didn't you want that?

HOP are somewhat self sufficient and have bigger fleet numbers then the rest bc everyone hates them and when they start building xr ship pack massive battleships you better step up and stop looking for outside help :D
Fixed ships getting spawned away from ship configuration menu at resupply ships from automatically getting deployables.

Scoob
Posts: 9921
Joined: Thu, 27. Feb 03, 22:28
x4

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

Post by Scoob » Mon, 10. Aug 20, 00:21

Buzz2005 wrote:
Sun, 9. Aug 20, 23:56
kind of weird to ask this mod author for changes to his mod bc of effects of other mods, ror, vro and xr ship packs make the game harder, didn't you want that?

HOP are somewhat self sufficient and have bigger fleet numbers then the rest bc everyone hates them and when they start building xr ship pack massive battleships you better step up and stop looking for outside help :D
Yes and no, this Mod appears to have an influence on how Factions use their resources / respond to attacks. HOP are over-powered even in a vanilla game and I was wondering if this mod would be able to influence that balance. Also, the type of ships (from other mods) isn't really the point here, the better ships are a LOT more expensive resource-wise, yet HOP appear to be able to afford them with ease. They have massive fleets guarding their border sectors, and those in between, plus they are able to field large strike fleets vs. other sectors.

All that said, I did underestimate this mods ability to rally PAR forces vs. what looked to be a totally overwhelming invasion - really, it was silly. However, I returned to the sector just now and PAR have pushed back HOP which I did not expect, let alone so soon. It looks like the response to aggression is much improved. Note: my prior long-term game was using FWEE 4.8 and responses to such invasions was sometimes underwhelming - as appeared to be the case initially with this one. I'm glad I was wrong in my assumption of a lack-lustre response.

I will say though that HOP being strong enough to have a war on THREE fronts (ARG, PAR and XEN) and manage to invade, hold and take over Sectors from each is a little excessive. With ALL factions fielding better ships due to the mods I use, it does still amaze my how HOP so very often come out on top. I often ally with all Factions that it's possible to, but this game I'm role-playing siding with ARG/PAR so I WANT more of a challenge, but they're already dominating barely a day into the game.

I would be interested to hear Mysterial's thoughts on the HOP balance and why they're so resource rich...is it simply the resource yields in the sectors they own, giving them an advantage? In my prior game, I had to go a bit nuts supporting the ARG economy so they could push HOP back...but they never went on the offensive.

Scoob.

Scoob
Posts: 9921
Joined: Thu, 27. Feb 03, 22:28
x4

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

Post by Scoob » Tue, 11. Aug 20, 00:36

Another bit of randomness... I'm not sure what controls the makeup of fleets when FWEE is installed alongside VRO, XR Ship Mod and RoR however, I just had a large ZYA Fleet enter Hatikvah's Choice I from Silent Witness I. Not a common occurrence, sure, but what's really odd is the entire Fleet is made up of Argon ships. The leader is a Battleship Eos MKI (RoR) with subordinates made up of a Behemoth with Minotaurs subs, a Centaur (VRO) with Elite subs and various other fighters such as Nova, Elite and Quasars.

Most odd to see a Fleet like this, but I'm not totally sure which mod adjusts the Fleet makeup in this way. I've used VRO for the longest time, with FWEE added soon after, then XR Ship mod and mots recently (new game) I added Rise of the Ossian Raider. I think this is a fairly common mod combination.

Just wondering what might be going on, though with several mods installed its tricky to know where to ask.

Scoob.

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

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

Post by Mysterial » Tue, 11. Aug 20, 00:44

The HOP has a better starting economy and its AI is tuned to build up a bit more than the others because it can't rely on trade with other factions. Every faction sadly has functionality infinite raw resources in whatever their main resource area is, but the HOP's being right next to their shipyard certainly doesn't hurt. If they really need to be slowed down there are some defence platforms I added to game start that the AI would otherwise build from scratch right after the game begins, but HOP's advance has been inconsistent in my experience (with mostly vanilla balance)

I don't mess with any existing ship groups so if factions are using the wrong ships you need to look at one of the other mods.

Scoob
Posts: 9921
Joined: Thu, 27. Feb 03, 22:28
x4

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

Post by Scoob » Tue, 11. Aug 20, 01:25

Thanks for the info. I suspect RoR is the most likely culprit here, purely because it's the most recent mod I've added and I've not seen the issue before. Might pop onto the thread for that mod.

Scoob.

user1679
Posts: 761
Joined: Fri, 20. Jul 18, 23:20

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

Post by user1679 » Fri, 14. Aug 20, 00:24

What effect would using all modules except the Economy AI have? Does using the economy balance module without it make a difference?

I assume it's script heavy and my i5 7600 gets bogged down with that module alongside ROR and FOCW. I lose about 10 fps when I enable the Economy AI but with it disabled, the other 3 modules from your mod don't cause any issues.

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

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

Post by Mysterial » Fri, 14. Aug 20, 15:31

Weaker economy handling probably makes it much more likely that the Xenon take over the universe. But I haven't really tried it myself in a long time.

AtilaElari
Posts: 60
Joined: Tue, 28. Jul 20, 08:59

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

Post by AtilaElari » Sat, 22. Aug 20, 07:37

Mysterial, would you consider making a modification of your CatchUp module that would provide faction bonuses (or penalties), but on a random basis? So it would be the same script but instead of a complex war state checks it would run a random chance check every few hours.
A way to create more temporary imbalance and insite chaos, as well as give the player a chance to exploit market instability for profit.

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

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

Post by Mysterial » Sun, 23. Aug 20, 20:22

If you're looking for some randomized mixup, I think DeadAir did a mod along those lines. I don't have any plans to do anything like that.

abYsss
Posts: 10
Joined: Sun, 14. Oct 12, 13:43
x3tc

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

Post by abYsss » 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 instantly.

Without the mod ARG/ANT called support from other sectors and were able to beat 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.
Last edited by abYsss on Sun, 30. Aug 20, 14:12, edited 1 time in total.

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.

Post Reply

Return to “X4: Foundations - Scripts and Modding”