X4: Foundations

X4: Foundations

AI Economy Buff 7.0 Re-mastered
166 Comments
Muad'dib 10 Jul @ 11:52am 
I actually assumed it already existed but I can't find it. I'll keep digging. But none the less I just figured I'd mention it because you def seem to have the knowledge and skills to pull it off.
Treybor  [author] 10 Jul @ 11:16am 
@Muad'dib somewhere in the depths, there already exists that exact mod, not sure what its called but I've seen other people comment on using it

The only 2 "sinks" are ship destruction and terraforming, I don't really have any interest in adding more like that
Muad'dib 10 Jul @ 10:49am 
I'm a little annoyed with one aspect of X4: there's no real money sink, so it feels like I'm a dictator running an empire of "unpaid interns," to keep it PG.

So my question is: have you ever considered a mod (even if unpopular) where the player has to pay wages or maintenance? The most efficient method I can think of would be to reduce the profit from AI-run trades. That way, the player doesn't have to run a constant money-deducting script.

For example:
If the player mines and sells ore manually, they get 100% of the sale.
If an AI pilot does it, the player only receives 80%, simulating wages, fuel, and repair costs.

Same goes for stations—when AI-managed stations make sales, only a portion goes to the player.

Ideally, this would be configurable in a file so players could tweak the percentage loss.
Treybor  [author] 8 Jul @ 8:48am 
@Muad'dib This should be up to date, I havent really played ina few months, so I havent balance tested anything that has changed but Ive watched the patch notes and nothing should have broken compatibility with this

This includes a number of other mods that I released as a way to cut down on mod bloat and how much I needed to manage, it doesnt have all of them, just economy related things
Muad'dib 8 Jul @ 8:38am 
I'm just now getting into X4, is this fully up to date with the current version?

Last comment I'm seeing says it was up to date for 7.5 but need to change production method. I'm not sure if that's something I'd need to change, something that did need to change and was done or if that is something that still needs to be changed.

Also, from what I can tell of the description this seems to include all the other mods you have right? So if I install this then I've basically installed a number of your mods in one?
Endministrator 12 May @ 8:24am 
Started a new game with Faction Enhancer and this mod and stations are stacked so that seems to be working. Question remains if everything from both mods work or if they override each other for some features.
Endministrator 12 May @ 7:37am 
Is this compatible with the Faction Enhancer mods by Mysterial?

Also which mods do you mean with "DeadAir Ware/Eco" in the description?
Caver 4 Mar @ 6:12am 
@Treybor

Minor bug: Argon arc connector (from Timelines DLC) still has hull parts in requirements.
Treybor  [author] 23 Feb @ 6:21am 
@Mistwalker it works just need to change production method for hullparts/claytronics modules but otherwise works fine
Mistwalker 23 Feb @ 5:57am 
7.50 work?
Mr Gambler 6 Feb @ 5:09am 
@Steel Dragon, I believe this mod is aimed more at people like myself, who don't wish to babysit the economies of most factions to get them truly going. I would like them to be able to function and reach their true potential without needing my help to do so.

In regards to hull wares, it's known as the hull death spiral, as hulls are required for everything (bar Terrans). So when a new building goes up, it requires hull parts, from a station built from hull parts, that needs to mine needed resources from ships built with hull parts. Which is then needing traded by ships, who need to be built with hull parts. This causes a constant shortage of hull parts, restricting not only new stations going up, but also ship growth and replenishment. By changing the station to claytronics, this frees up the production of ships for factions.
Steel Dragon 4 Jan @ 4:13pm 
The answer to a shortage in either hull parts or claytronics is time in the simulation for the demand to be filled.
Or weight it in the coding to have the ai more likely to build more support production (1st level production). It can then meet it's demand of hull parts and claytronic production.

In my opinion all your removal of hull parts does is remove the hull part issue and magnify the claytronics issue. I have tested this many times under various situations. Even a mod with a empty universe to see how the AI does alone with a blank canvas. That did not end well lol, choked out on the first mega builds.

Hope this feedback helps and please continue your epic work.
Steel Dragon 4 Jan @ 4:11pm 
Again I'm not trying to attack your work. I love it I'm just providing feedback. So anyone else reading this please know I'm only being this critical due to a love of the product and wanting to refine it.

I feel your change is not needed due to the nature of the universe. it is built by design to have economical holes. This is intended so players can get into the market. By increasing the module count on stations (which I love large stations) increases this disparity. Swapping out the hull part requirement will only ever reduce the demand on the hull part chain while increasing the demand on the claytronics. Add in the increase module count on station builds and the situation is magnified.
Henrique Lique 3 Jan @ 7:02pm 
agreed on the too high claytronics demand
Treybor  [author] 31 Dec, 2024 @ 10:31pm 
@Steel Dragon the lack of claytronics for other empires is likely due to me making the AI a little to eager to build new stations when it detects a shortage, in my last play run which lasted 8 days of "play" time, the Argon built over 1000 new Claytronics modules. It got caught in a loop of "I need claytronics, so I should build a claytronics factory, but i dont have enough claytronics, so I should build another claytronics factory... etc" Then the associated goods like microchips went through the roof as well as food/water which pushed claytronics even harder.

I have toned the AI's willingness to initiate station construction on my end and paired with the changes for claytronics modules to advanced composites/plasma conductors in 7.5, this should help the claytronics spiral. I will release a patch when 7.5 gets closer to completion.
Steel Dragon 31 Dec, 2024 @ 4:55pm 
Yes I have played with this mod. Like I said I use your full set as my primary mods list.

I have not gotten to having my own shipyard / warf while using this mod due to how much claytronics is required in early game / mid game. The economies are stalling from claytronic shortages. Especially on there large (20 module) station builds.

I prefer to use closed loop for myself and do a scrap economy. A scrap plant requires insane amounts of claytronics now with the hull parts requirement removed. The commonwealth are struggling with the increased amounts of liquids needed to make the claytronic inputs.

I'm giving myself a solid depot / liquid depot / trade station / basic solid factory / basic liquid factory as a start with a few miners. So not starting from scratch and I can not keep the other empires going long enough for there own production to get established.

Again this is just feedback and to anyone reading this the OP's mods are great and I thank him for them.
Treybor  [author] 30 Dec, 2024 @ 8:28am 
@Steel Dragon have you played with this mod on? bc I have hundreds of hours if not 1000+ hours in testing economic changes with X4 and I can pretty much say closed loop isnt broken with these changes.

You are more then welcome to change anything you desire in here to fit your playstyle, most of everything in here are simple value changes.

for reverting construction material costs back to vanilla, open wares and remove the following from every module. Note that some of this will need to be updated for 7.5 with changes to construction wares in vanilla coming.

<replace sel="/wares/ware[@id='module_arg_prod_wheat_01'][@name='{20104,13701}']/production[@name='{20206,101}']/primary/ware[@ware='claytronics']/@amount">426</replace>
<remove sel="/wares/ware[@id='module_arg_prod_wheat_01'][@name='{20104,13701}']/production[@name='{20206,101}']/primary/ware[@ware='hullparts']"/>
Steel Dragon 30 Dec, 2024 @ 6:28am 
Your forgetting or leaving the closed loop construction method.
As a scrap empire builder closed loop values on hull parts and claytronics is totally broken with this mod running. I love the rest of it like I said.

I believe your not looking at the entire picture. A Hull parts factory will not fill the need if there demand is also not met. Have you looked at the graphine and refined metal levels in these hull part factories to see they are in fact producing?

I also disagree on balancing it around ship building. Stations construction and the time it takes to get those goods are what control galaxy advance. If a station is destroyed resources have to be redirected to build the new station.

I respect what your doing and love your work. Could you make a side version with the claytronics change removed? Or tell me how to remove it. I've not dived into the files in x4 yet so I'm not sure where to find that value. Thank you again for your hard work.
Treybor  [author] 29 Dec, 2024 @ 5:55pm 
@Steel Dragon the reason hullparts are removed from construction is because they are already so critically important for ship building, there will never be enough hullparts in the universe to satisfy the shipbuilding demand alone(I have test runs with 1000's of hull parts modules in the universe and these still would not satisfy ship demand). And on the flip side, outside of closed loop economy, Claytronics slowly become less and less valuable as the game progresses when the AI starts plugging bottlenecks, so the extra cost on Claytronics helps keep them relevant longer and keeping that part of the economy moving.

If hullparts weren't so critical to shipbuilding and a major bottleneck, then I would put the cost back.
Steel Dragon 29 Dec, 2024 @ 4:55pm 
First I love your mods. Your lineup is my must have list.

Having said that I do not use this mod even though I love the huge stations it creates. I would love to use it though if you would remove this one change you made.

"Removes Hullparts from Station Module Construction and moves the cost too Claytronics."

I like having a scrap economy and this breaks it tbh. If the AI builds larger stations it should take more hull parts and claytronics. If it can not for some reason maybe reduce the module cap from 20 to 10 for reduced demand? IDK I don't have the answer other than I whole hardheartedly do not agree with the hullpart removal.

Sorry if that was harsh it was meant as honest feedback. I love your modes and thanx to your added system mods I can make my empire in silent witness and rule the galaxy :)
kaom.sebai 28 Dec, 2024 @ 5:18pm 
( commented on last version by accident) - Would be good to See Trade Volume between Empires... and Trade volume between player and specific empires and vice versa.
Treybor  [author] 22 Dec, 2024 @ 5:45am 
@Crater Raider definitely not from this mod, if you are the one constructing then selling to them, then they will always recycle them. If they order themselves, then they won't recycle unless it is for a temporary job like mine layers/station-traders

There are no new scripts or even diffed vanilla scripts which can cause the behavior you are describing in this mod
Crater Raider 22 Dec, 2024 @ 5:31am 
I'm noticing some odd behavior in my game, and this is the only mod I can think that could be the possible cause.

I've setup a wharf in Terran space. They are ordering ships from it, and then immediately giving those ships the "recycle" command after they're constructed. It seems like the Terran are trying to get resources by recycling ships?
Treybor  [author] 17 Dec, 2024 @ 1:25am 
@Gidaka The lines look like this. There are multiple lines for each race denominating how many mass traffic there are per type of module and @sector is a limit on the number of mass traffic in a sector total combined between all stations. <replace sel="/jobs/job[@id='masstraffic_argon_civilian']/quota/@sector">1000</replace>
Treybor  [author] 17 Dec, 2024 @ 1:21am 
@Gidaka I include it too help the people that clamor this mod makes their FPS tank, I wont make a seperate mod for it since I have far too many mods too manage but its an easy value to change if you want, Just unpack this mod with X tools its in your library under tools and open jobs.xml and search for masstraffic, you can either delete the lines which will then revert to vanilla values or increase the numbers to have more. This mod mostly only diffs with no inclusion of new scripts other then the station generation script which was necessary to make AI stations look good which makes it very easy value change and suit your needs.
Gidaka 16 Dec, 2024 @ 11:04am 
It's possible to make this as a separate mini mod, and everyone will enable it at will.
Gidaka 16 Dec, 2024 @ 11:00am 
Reduced Mass Traffic - Is it possible to return the Mass Traffic to what it was or, conversely, increase it? (I have a powerful PC and there are no problems with FPS)
Treybor  [author] 21 Nov, 2024 @ 12:03pm 
@khirsch1187 everything will slowly apply when added, i do recommend a new game though since the economy will still be slow at first. same thing when you remove, all the files are removed but anything still around will slowly die off and not be replaced that was added

They will not use the larger wharfs/shipyards from this mod until the old ones are destroyed and rebuilt.

Granted I have not sat and tested extensively either option since I just start a new game with these on for my long playthroughs
Treybor  [author] 21 Nov, 2024 @ 11:59am 
@PsychoSeeker could be any number of things when your changing stuff
khirsch1187 21 Nov, 2024 @ 1:10am 
Can I turn this on after the game has started (Does it require a new game?) and if it doesn't will it simply start building the missing shipyards and stuff?

What happens if I turn it off later?
PsychoSeeker 21 Nov, 2024 @ 12:30am 
im trying to tweak some of the prices and cant seems to get it work they just go back to the unmodded prices any ideas on whats going wrong?
Treybor  [author] 19 Nov, 2024 @ 11:36pm 
@WeedBurger yeah the game does have lower fps for like the first hour or so but that is only bc EVERYTHING is spawned in and being given orders, all the big fleets are clashing on the borders, traders being issued orders, alot is happening, in general it clears up for me eventually
Osium 1 Nov, 2024 @ 5:16pm 
Is it safe to uninstall this? Sort of want the new game changes, but not keen on some of the bigger changes like hull parts and claytronics.
WeedBurger 16 Oct, 2024 @ 4:46am 
As for the fps hits, I seem to get normal fps except for the obvious mega battles, those annoying af minefields with like a billion mines, and it only drops occasionally when i scan dense areas. It can lag like crazy near the start as you discover new sectors, but im assuming thats just the amount of units getting their initial orders in, rip cpu. Also Paranid M Solid and the Argon Span/Arc buildings still require hullparts. Great set of mods though, seems to make the ai way more capable and stable after losing a few stations, I'm using your other mods in the group except for the gate changes and bail timer.
WeedBurger 16 Oct, 2024 @ 4:46am 
Vigor Syndicate does extremely well in this mod (they really love missles). They took down half of a MIN shipyard and 2 entire stations (rip claytronics and solar) in hativahs space very early, but both factions plus ANT/ARG decided enough of that nonsense and now VIG mostly just hides in its territory or dies from being outright hunted. The only main factions getting seriously slapped atm are ZYA (but thats near mandatory it seems, mod or not) and the Holy Order. Xenon from scale plate are strong af and are spilling out into the highway now, unfortunately before i was ready lol.
DEATHLORD 4 Oct, 2024 @ 5:58pm 
thanks
Treybor  [author] 4 Oct, 2024 @ 6:15am 
@DEATHLORD *Build times not production times
Treybor  [author] 4 Oct, 2024 @ 6:14am 
@DEATHLORD Production times are unchanged in this mod, all changes like that are in wares
DEATHLORD 4 Oct, 2024 @ 3:06am 
How can I change the station build times. I normally run with this
<replace sel="//wares/ware[@id='module_arg_conn_base_01']/production[@method='default']/@time">0</replace>
But no matter what I do I can not override your 5 minute build time.
I have not been able to find where you have it located. I have extracted the cat file.
Any help would be appreciated.
Treybor  [author] 30 Sep, 2024 @ 3:49am 
@Jeffbacca everything should work fine with VRO but I have not tested using VRO, i've only really compared the code and never saw any conflicts other then possibly with the formation of Trinity and any new jobs associated with them since VRO does a hard replace on that batch of code but I haven't looked at VRO's code in a while either
Jeffbacca 30 Sep, 2024 @ 3:41am 
I can say the SVE VRO job tweaks doesn’t influence it, I’ll use your added sectors mod and see if performance is better with them both, this may be the wrong place to ask but are there any mods in your mod playlist that won’t play well with VRO at least that you are aware of?
Treybor  [author] 28 Sep, 2024 @ 11:33am 
@Jeffbacca I do play with my added sectors mod and for me it spreads the ships out just fine and I dont have any issues, I know some people say they take an FPS hit, not sure if its just the vanilla map, but i get about 60 FPS just flying around, balancing the economy as it currently is has taken dozens of hours of tests just to make sure the economy doesnt crumble in on itself, some numbers can get compressed likely but I dont have the dozens of hours to spare at the moment to be running more balancing tests but changing values in the mod isnt too hard if people want to try their hand at balancing
Jeffbacca 28 Sep, 2024 @ 7:13am 
Ah ok, I have a mod called SVE VRO Tweaks installed so maybe they are interfering with each other and making the situation worse with the whole station and battle fps drop.
Treybor  [author] 27 Sep, 2024 @ 8:47pm 
@Jeffbacca it's not the stations, its the added transports that will hit your FPS, vanilla has definitely not enough and I had to increase the amounts to keep the economy from crumbling
Jeffbacca 27 Sep, 2024 @ 1:50pm 
Out of curiosity would it maybe be better to make modules that have increased output for equally increased build cost etc for balance instead of just larger stations?

I'm just asking as this mod gives me the only hit to my fps (from a locked 60 to roughly around 40+ with the lowest I have seen being 37) out of all my other mods and with it being primarily around stations I am wondering if it's due to their size. That said this is a great economy mod and if you don't agree that increased output module's would be better than larger stations (not as cool looking at least) then nevermind and thanks for a great mod.
Treybor  [author] 24 Sep, 2024 @ 2:31pm 
@rudi yeah I'm not sure, I get decent performance with all my mods active, but I know it's not script related since they are only tweaked from vanilla, I can see putting this with something like AI enhancer or something that does interact with scripts can cause lag issues though but I only really play with my own mod sets, most AI/script mods in my opinion generally hit performance harder then anything
rudi 31 Aug, 2024 @ 2:01pm 
something interesting: turning mod off immediately ups performance, and turning on immediately creates stutter. i'd assume with jobs change it would take a while for extra ships to go away so performance would be incremental change
rudi 30 Aug, 2024 @ 9:17pm 
Ah yea that might be it, increase in jobs. I don’t think it’s station sizes.
Kinda ironic that having fleets that properly support economy cause stuttering.
I’ll use your individual mods for now for my main game, and then run another game to tweak jobs to see if there are any changes
Treybor  [author] 29 Aug, 2024 @ 11:44pm 
@rudi In majority of my tests I do use my other mods, the extra sectors mod does spread traffic out, second contact I've always lagged till i changed the second contact -> Void gate to be further back... there are no new scripts here, its all tweaked vanilla, I did outline what causes lag in one of the discussions above, it's possible to slightly scale back some trader jobs but at the same time balancing is a nightmare, the bottom tier goods need plenty of traders to keep the economy afloat

Changing trader numbers in this mod is as simple as changing some numbers in the jobs.xml if you want to take a look at it, I've already dumped 100's of hours at this point looking for a balance and this has been the best I got so far
rudi 29 Aug, 2024 @ 5:55pm 
However FPS drop isn't consistent, it comes across as freezes every second or so, like there are too many scripts running in the background at once (that's how it feels like, not saying this is the cause)