Some thoughts on the economy and player impact on it
Moderator: Moderators for English X Forum
-
- Moderator (Script&Mod)
- Posts: 7465
- Joined: Mon, 15. Dec 03, 18:53
Some thoughts on the economy and player impact on it
I was thinking about X4 and the economy and how the player interacts/impacts the economy.
As the game is right now, there are only factions which are basically nations and then there is the player. There are no corporations at all. I think this is one of the biggest flaws of X4. Why is every industry government run? This takes a hugely interesting aspect out of the game. The player's ability to manipulate markets and such. Currently, there really isn't any way to corner a market or much real competition economically. Each faction controls their own economies and run all production/trade on their own. A faction builds all stations and owns all the trade ships. So if I wanted to corner the refined metal industry, I can't. I would have to go to war with every faction basically. This removes something from the game which I think could be fun.
I will look into if this is possible in the future, but my idea is the following. A faction should only control Shipyards and repair docks and trade stations. There should be several corporations in the game which are basically their own factions. Each corporation is involved in a certain industry and there could be a couple in each industry and they can compete with each other (maybe be hostile to each other, etc.) They should buy their own trade ships and military ships. Perhaps each faction (Nation) should only have a few trade ships of their own which buy supplies for their shipyards, etc. Most trading should be done by the corporations. I think this could open up a great strategic/economic aspect to the game. In this way, you could in fact compete with others for trade and even try to control a market. If a "wallet" is possible for these corporations then that could also add something to it, but this isn't a necessity.
I just think this would have added so much more to the game. Thoughts?
As the game is right now, there are only factions which are basically nations and then there is the player. There are no corporations at all. I think this is one of the biggest flaws of X4. Why is every industry government run? This takes a hugely interesting aspect out of the game. The player's ability to manipulate markets and such. Currently, there really isn't any way to corner a market or much real competition economically. Each faction controls their own economies and run all production/trade on their own. A faction builds all stations and owns all the trade ships. So if I wanted to corner the refined metal industry, I can't. I would have to go to war with every faction basically. This removes something from the game which I think could be fun.
I will look into if this is possible in the future, but my idea is the following. A faction should only control Shipyards and repair docks and trade stations. There should be several corporations in the game which are basically their own factions. Each corporation is involved in a certain industry and there could be a couple in each industry and they can compete with each other (maybe be hostile to each other, etc.) They should buy their own trade ships and military ships. Perhaps each faction (Nation) should only have a few trade ships of their own which buy supplies for their shipyards, etc. Most trading should be done by the corporations. I think this could open up a great strategic/economic aspect to the game. In this way, you could in fact compete with others for trade and even try to control a market. If a "wallet" is possible for these corporations then that could also add something to it, but this isn't a necessity.
I just think this would have added so much more to the game. Thoughts?
-
- Posts: 5742
- Joined: Wed, 29. Jul 09, 00:46
Re: Some thoughts on the economy and player impact on it
Absolutely, I've thought this for a while. Factions could control sectors, own shipyards/wharfs and trade stations, but the economy producing stations could be run by corporations. Factions would have unlimited money to be able to purchase ships and resources to build ships, but ideally IMO the corporations should not, they should have a wallet. When you invade a sector, you could be going to war with the faction owner, destroying the defense stations, but the local economy could remain intact, unless you went to war with the corporations as well. Xenon of course would not make such fine distinctions.
Maybe the stations inside space owned by a faction could pay taxes to the faction owner. This could be the basis whereby factions get money, by taxing corporation owned stations in sectors. It would also give incentive to the player to take over sectors, becoming the new owner and thus receiving tax revenue from the stations in the sector.
If you make this mod, I would play it!
Maybe the stations inside space owned by a faction could pay taxes to the faction owner. This could be the basis whereby factions get money, by taxing corporation owned stations in sectors. It would also give incentive to the player to take over sectors, becoming the new owner and thus receiving tax revenue from the stations in the sector.
If you make this mod, I would play it!
-
- Moderator (Script&Mod)
- Posts: 7465
- Joined: Mon, 15. Dec 03, 18:53
Re: Some thoughts on the economy and player impact on it
I can probably do everything as of right now except maybe the wallet for factions. Need to see how feasible this is. I wouldn’t give nations a wallet (meaning like argon) but i could add in a taxing thing for player owned sectors. The wallet is the issue though. Need to see how it works in x4
-
- Moderator (Script&Mod)
- Posts: 7465
- Joined: Mon, 15. Dec 03, 18:53
Re: Some thoughts on the economy and player impact on it
By the way, I am not looking to code any complicated faction logic with this as I am not too familiar with it. If there is a simple way to give a new faction a wallet I could easily enough give the facade of corporations. No fancy stuff though. Things like intelligently buying ships, intelligently building stations or intelligently responding to the player would require faction logic
-
- Posts: 3034
- Joined: Fri, 18. Nov 05, 00:41
Re: Some thoughts on the economy and player impact on it
I like these ideas and the thing that interests me the most about it is simple lore rather than the great gameplay these changes would make. I find it a bit odd that so much effort was put into Rebirth in this regard, Egosoft really asked the question 'what is a faction' and did something so much more indepth and realistic than X3's simplistic (and a bit silly if you think about it) race abbreviations. X4s approach thankfully isnt a full backtrack to the X3 days, at least TEL means "Teladi Company" rather than just "Teladi" but I think adding lots of corporations would really improve X4 (so much depth! Rebirths faction) - notice that the base argon faction is 'Argon Government' rather than Federation.
I think military, government and police should all have their own abbreviations. The XTC mod for X3 did this and I love it, like the Teladi police are called 'Compsec' and their military 'TCDF', the Boron military is the 'RN - Royal Navy' and the split police 'Clanguard'. In my mind this kind of depth would bring a lot to the game.
I think military, government and police should all have their own abbreviations. The XTC mod for X3 did this and I love it, like the Teladi police are called 'Compsec' and their military 'TCDF', the Boron military is the 'RN - Royal Navy' and the split police 'Clanguard'. In my mind this kind of depth would bring a lot to the game.
Gallery of my X ships and fanart eg, Boron Megalodon
My wishlist
Disclaimer: Axeface will ignore 'don't like it don't use it' responses
My wishlist
Disclaimer: Axeface will ignore 'don't like it don't use it' responses

-
- Moderator (Script&Mod)
- Posts: 7465
- Joined: Mon, 15. Dec 03, 18:53
Re: Some thoughts on the economy and player impact on it
Well it is easy enough to change the name of fleets and ships so that is something I could do. I will look into the files and see what is there
-
- Posts: 5625
- Joined: Sat, 10. Nov 12, 17:55
Re: Some thoughts on the economy and player impact on it
Wish LU was around to port the phanon 
Was thinking about this a couple times, a script "framework" to handle new faction-like entities, and how that could be done.
This needs no decisions or any complex logic, just walking a tree and buy stuff based on ratios and chance modifiers. Most tasks here can be handled by vanilla aiscripts except the exploration and some pirate stuff.
Having a trade log also helps for a few ideas - to track long term shortages, too high competition and more intelligent build target selection.
Without knowing about engine limitations i thought about these:
Asset management
Actions
on top of asset evaluation and maintenance, stations, freetrade and asset defence
Trade
The bare minimum imo is tracking faction independent relation to player, expansion, and having a few ships that free trade and attack stuff.
They can rely on the parent faction's, and all friendly shipyards. Granting them one from start is a bit too much imo. A shipyard should be the most visible result of their evolution.
Without the corp expanding, and more detailed rep logic it will not feel like a real corp, just another same old job with a slightly different name on it. Having much more trade ships can overthrow balance without the stations that need them so careful with that as well (unless you plan on pure aesthetic jobs).
I can try to help with scripting later, or coming up with a more techie and detailed specs if needed.

Was thinking about this a couple times, a script "framework" to handle new faction-like entities, and how that could be done.
This needs no decisions or any complex logic, just walking a tree and buy stuff based on ratios and chance modifiers. Most tasks here can be handled by vanilla aiscripts except the exploration and some pirate stuff.
Having a trade log also helps for a few ideas - to track long term shortages, too high competition and more intelligent build target selection.
Without knowing about engine limitations i thought about these:
Asset management
- Start with
- convenient budget
- a trade dock
- wares in storage to trade with
- a CV,
- handful traders, miners and max M warships
- a random station based on military vs trade score
- Define a production tree with optimal volumes having a shipyard as root node, that could control what they aim to build. Shipyard should only be built at a later stage however, when aimed prod tree is half built or nearly finished so they don't start off as a godlike entity - or have an empty SY without any supplies.
Keep track of sum stock level changes and source (own asset, parent faction, externals), timestamp last change - if any stays below 1 cycle then for long then build missing production (if in tree).
Based on build chance exclude wares available in parent race and friendly spaces.
Build top-down (high tech brings more profit, and to increase low level ware demand, for same reason include habitats), priority modified by tree distance and trade vs military score. - There could be a couple base attribute scores, each one's value could modify related functionality and chance for specific actions (amount of extra free traders, trade vs warship ratio, likeliness of pirate actions):
- trader
- military
- pirate
- builder, chance modifier for build tasks
- explorer/prospector, with reduced/no infrastructure
- Trade ship quota should derive from existing station consumption volume + some extra for free trading
- Sell assets that have seen no use for an extended period
- In case performance needs it, use multiplier on trade volumes when calculating internal budget and manipulating stock so less new ships and stations are needed. Ingame asset count should just represent the state of the corp, not match it exactly.
- Act as limited sink. If any stock is at max for a longer period launch ships towards nearest planet or just deep space and despawn when out of view
- Corp assets could be possible to board without rep loss against any faction if outside a high comm range of any friendly object
- Relation and race should be inherited from parent faction, defined by random start location.
- Temporary relation changes limited to the sector of activity should occur for the acting ship group based on executed actions but never against parent faction
- Relation changes that involve player should be permanent, and rep changes in parent faction core sectors should carry over to parent faction
- Representative where certain actions can be ordered for cash or wares, relations increased by executing actions planned by the corp currently (just the ones where result can be easily checked). Should be accessible even in hostile state.
Actions
on top of asset evaluation and maintenance, stations, freetrade and asset defence
Trade
- Player harassment: Scan player trade offers, find ware with highest demand and stockpile/trade with other consumers within player trade range, find ware with lowest sell price and highest quantity and try to saturate in trade range.
- Coop: prioritise trading with inverse harassment logic, build missing production
- RRF: watch over own and parent faction space, attack highest threat or defend assets under attack. Works exclusively in owned sectors or ones containing owned assets.
Dedicated RRF ships should be artificially moved about to make any sense, maybe teleport to the nearest faction station / gate that is in low attention, preferably in target sector. If they have to queue through several gates they will likely miss the target event and just keep switching targets without ever seeing action.
A possible solution could be that they can do a group jump from their SY to an owned asset or gate, but then they would have to fly back dock at their SY again before being able to be re-deployed to have a cooldown on this.
The game misses RRF big time, no actions have consequences since AI just fails against any target that can use travel drive. Jumping to sector does not solve this, but might make it easier to surprise player.
Lost RRF ships should be replaced with high prio. - Attack asset, target based on available ships, player hostility, parent faction relations, nearby production of wares the corp can only sell at low price and in small amount while having high production capacity
- Boarding ships and maybe stations - always target needed asset types, use them instead buying a new. Boarding player asset should be possible to cancel (dock at any SY or player station?). Eject player in suit if present on successful op.
- Conquer sector:
1. Build and defend own admin module,
2. Reduce enemy presence,
3. Kill enemy admin module
Using 3 dedicated groups, points 2. and 3. should trigger after first simultaneously. On success assets involved should stay hostile with victim faction for a longer period or until next ownership change.
- Use all hack features available to player
- Increased chance for boarding
- Minefield near docking paths if they can work OOS somehow - would need a clear minefield script to counter
- Harass traders
- Activity on player assets: smuggle drugs, loss of functionality, hull damage.
Could be neutralized by convo with spawned npc on affected asset if found, with options- vent to space
- sell back to corp for wares or cash
- interrogate, chance to have a very lucrative trade offer or a rep loss free boarding target with high value items
- prevent entirely using high cost ship upgrade. Just an attempt for more first person todos, there should be a shortcut for people who hate it
- Build real 3D satnet
- Map resources
- Mine and free trade
- Trigger quick response from allied NPC faction(s) if opposing force appears in sat range
- Player could rent resource probe and sat net from representative
The bare minimum imo is tracking faction independent relation to player, expansion, and having a few ships that free trade and attack stuff.
They can rely on the parent faction's, and all friendly shipyards. Granting them one from start is a bit too much imo. A shipyard should be the most visible result of their evolution.
Without the corp expanding, and more detailed rep logic it will not feel like a real corp, just another same old job with a slightly different name on it. Having much more trade ships can overthrow balance without the stations that need them so careful with that as well (unless you plan on pure aesthetic jobs).
I can try to help with scripting later, or coming up with a more techie and detailed specs if needed.
-
- Moderator (Script&Mod)
- Posts: 7465
- Joined: Mon, 15. Dec 03, 18:53
Re: Some thoughts on the economy and player impact on it
I am pretty sure that with the existing Factionlogic scripts already in game, most of this can be done. I am just not familiar enough with the factionlogic to do it. It would require considerable time to study it all, then come up with stuff. It would be an immense project which I definitely do not want to do myself. It would be pretty much on the level of CWIR from Rebirth. If a few people were willing to work on it, then maybe it would be something that could get done in a reasonable time.
Of course, new code would need to be made to handle how the corporation grows, responds to the player, logic for when to buy new ships or build stations, etc.
Of course, new code would need to be made to handle how the corporation grows, responds to the player, logic for when to buy new ships or build stations, etc.
-
- Posts: 5625
- Joined: Sat, 10. Nov 12, 17:55
Re: Some thoughts on the economy and player impact on it
Yep, lot of work, but nothing impossible - and can be done in really small chunks at a time.
Also starting before 3.1 is released would be a bit too brave
Also starting before 3.1 is released would be a bit too brave

-
- Moderator (Script&Mod)
- Posts: 7465
- Joined: Mon, 15. Dec 03, 18:53
Re: Some thoughts on the economy and player impact on it
Right, that is why I was just saying more aesthetic than real. Well, for now I just want to see if I can at least get the facade of corporations flying around for some immersion. As for more complex stuff, that is a maybe for the future.
-
- Posts: 5625
- Joined: Sat, 10. Nov 12, 17:55
Re: Some thoughts on the economy and player impact on it
What would really help is to have them as a real faction.
Otherwise filtering for assets might be too slow (don't think we can filter for just a custom variable).
If there is a way to start it like that...? Don't know if the engine supports that but it should iirc.
Also it shouldn't work based on jobs, as that lacks the flexibility needed here imo and would be a huge change midway.
I'd gladly help if we can select a few basic todos which are separated enough.
Otherwise filtering for assets might be too slow (don't think we can filter for just a custom variable).
If there is a way to start it like that...? Don't know if the engine supports that but it should iirc.
Also it shouldn't work based on jobs, as that lacks the flexibility needed here imo and would be a huge change midway.
I'd gladly help if we can select a few basic todos which are separated enough.
-
- Moderator (Script&Mod)
- Posts: 7465
- Joined: Mon, 15. Dec 03, 18:53
Re: Some thoughts on the economy and player impact on it
The already existing faction logic handles stuff like, buy ships if needed, etc. This is usually for the war part, but some of it is for economy. It would need tweaking and adding to, but I think some of the basics are there.pref wrote: ↑Sun, 9. Feb 20, 02:51 What would really help is to have them as a real faction.
Otherwise filtering for assets might be too slow (don't think we can filter for just a custom variable).
If there is a way to start it like that...? Don't know if the engine supports that but it should iirc.
Also it shouldn't work based on jobs, as that lacks the flexibility needed here imo and would be a huge change midway.
I'd gladly help if we can select a few basic todos which are separated enough.
There are already existing stations/ships spawned with jobs and god, these could be used to spawn the initial universe stuff with existing corporations. You could always code a new (or multiple new) corporations who start from the bottom. This would be different from the already existing economy though.
In New Frontier, Marvin coded a global wallet for each faction by creating a CEO type global. You can check the work he did which should be applicable here I think. If a faction could have a wallet, that could be a good start. I haven't really thought that far ahead because I was only going to play around with the existing stations and ships which spawn at new game and then see how it goes not having the government factions controlling the economy.
-
- Posts: 5625
- Joined: Sat, 10. Nov 12, 17:55
Re: Some thoughts on the economy and player impact on it
Checked NF a bit, seems he created a ceo actor for every existing faction, and all the faction traders shared account with that one.
Whole thing seems hardcoded for XR factions, but the concept to have a budget actor and share all owned traders can be used here.
I try to find out if factions can be added.
Whole thing seems hardcoded for XR factions, but the concept to have a budget actor and share all owned traders can be used here.
I try to find out if factions can be added.
-
- Moderator (Script&Mod)
- Posts: 7465
- Joined: Mon, 15. Dec 03, 18:53
Re: Some thoughts on the economy and player impact on it
I am playing around now and so far I was able to add a few new factions. Only thing is, have to use the icons and such that already exist. This is fine though I think, since the corporations could be registered under specific governments. Going to play around with god and jobs to see how things go when the government factions aren't controlling the economy ships and stations.pref wrote: ↑Sun, 9. Feb 20, 03:38 Checked NF a bit, seems he created a ceo actor for every existing faction, and all the faction traders shared account with that one.
Whole thing seems hardcoded for XR factions, but the concept to have a budget actor and share all owned traders can be used here.
I try to find out if factions can be added.
-
- Posts: 5625
- Joined: Sat, 10. Nov 12, 17:55
Re: Some thoughts on the economy and player impact on it
Wow that is very good news! Them sharing icons with the parent faction is good as well.BlackRain wrote: ↑Sun, 9. Feb 20, 03:51 I am playing around now and so far I was able to add a few new factions. Only thing is, have to use the icons and such that already exist. This is fine though I think, since the corporations could be registered under specific governments. Going to play around with god and jobs to see how things go when the government factions aren't controlling the economy ships and stations.
I was afraid of jobs because i would try to have all ships exec basic tasks: station and free trade, sector patrol etc.
Then when enough ships have accumulated i'd assign surplus ships to extra actions. Otherwise they would have to be built but then reaction time could be too long and the situation might have had changed already.
Other approach i see is spawning but that hurts the eye.
Do you know a solution for this? Relying on job engine would be much more convenient.
-
- Moderator (Script&Mod)
- Posts: 7465
- Joined: Mon, 15. Dec 03, 18:53
Re: Some thoughts on the economy and player impact on it
You don't need to be afraid of jobs. With the new factionlogic scripts, you can actually grab a ship right out of jobs at any time and have it do whatever you want and then even return it. The game already does this for existing military ships and such as long as there are ships to grab that meet the requirements. Take a look at the factionlogic scripts. It also can order job ships, so for example if it wants to order a new ship from the shipyard, it can call jobships to fulfill the roles and such.pref wrote: ↑Sun, 9. Feb 20, 04:03Wow that is very good news! Them sharing icons with the parent faction is good as well.BlackRain wrote: ↑Sun, 9. Feb 20, 03:51 I am playing around now and so far I was able to add a few new factions. Only thing is, have to use the icons and such that already exist. This is fine though I think, since the corporations could be registered under specific governments. Going to play around with god and jobs to see how things go when the government factions aren't controlling the economy ships and stations.
I was afraid of jobs because i would try to have all ships exec basic tasks: station and free trade, sector patrol etc.
Then when enough ships have accumulated i'd assign surplus ships to extra actions. Otherwise they would have to be built but then reaction time could be too long and the situation might have had changed already.
Other approach i see is spawning but that hurts the eye.
Do you know a solution for this? Relying on job engine would be much more convenient.
-
- Moderator (Script&Mod)
- Posts: 7465
- Joined: Mon, 15. Dec 03, 18:53
Re: Some thoughts on the economy and player impact on it
It took me a while, but I finally got it working. I set up the following factions
Argon Energy Corporation
Argon Mining Corporation
Argon Refined Goods Corporation
Argon High Tech Corporation
Argon Ship Tech Corporation
Argon Weapon Tech Corporation
Argon Agricultural Corporation
These are obviously just placeholder names. Anyway, I got them all in game just fine and I gave them all the trade ships and trade stations depending on what type of company it is. They are happily moving along I guess, need to set up companies for all factions now and then see how the game plays out like that.
Argon Energy Corporation
Argon Mining Corporation
Argon Refined Goods Corporation
Argon High Tech Corporation
Argon Ship Tech Corporation
Argon Weapon Tech Corporation
Argon Agricultural Corporation
These are obviously just placeholder names. Anyway, I got them all in game just fine and I gave them all the trade ships and trade stations depending on what type of company it is. They are happily moving along I guess, need to set up companies for all factions now and then see how the game plays out like that.
-
- Posts: 448
- Joined: Thu, 15. May 14, 14:25
Re: Some thoughts on the economy and player impact on it
Wonderful work as always @Blackrain.
Will adding these new corporations vastly increase they already heavy CPU load the game runs under at the moment or can they be intergrated at no real cost to cpu cycles? Also have you ran any economic symulations to see if they have a better or worse effect on the economy? Or are you not at that point yet.
Finally, I can't help wondering if Egosoft have already thought of this and will be dropping it as a surprise in the next DLC?
Keep up the good work.
Will adding these new corporations vastly increase they already heavy CPU load the game runs under at the moment or can they be intergrated at no real cost to cpu cycles? Also have you ran any economic symulations to see if they have a better or worse effect on the economy? Or are you not at that point yet.
Finally, I can't help wondering if Egosoft have already thought of this and will be dropping it as a surprise in the next DLC?
Keep up the good work.
-
- Moderator (Script&Mod)
- Posts: 7465
- Joined: Mon, 15. Dec 03, 18:53
Re: Some thoughts on the economy and player impact on it
Well currently I am just playing around. I haven’t added any extra ships or any extra scripts. All I did was add in the new factions and switch over all stations and trade ships to them. It is the same amount of ships/stations that spawn when creating a new game except now instead of being under argon federation, they belong to these new factions.
It is mostly cosmetic, but there is a huge difference. These ships won’t get attacked by enemies of Argon and will trade with anyone. Well Xenon and pirates will still attack them. They don’t have their own wallets or anything. I haven’t done any testing as i spent a couple hours just seeing if I could do that much. Had some stupid issues with getting it to work and some tedious stuff. I will need to do the same for every other race now so that all trade ships and stations are like this. They should rebuild stations and buy new ships that get destroyed but this will require testing. I think the rebuilding of stations is set up in god.xml, well the quotas I mean.
Also, I am thinking about how many companies there should be. Should they be enemies with other companies in the same industry? Should each race have multiple companies in the same industry? Should I give companies combat ships? If i give companies combat ships those would be extra and will affect performance.
It is mostly cosmetic, but there is a huge difference. These ships won’t get attacked by enemies of Argon and will trade with anyone. Well Xenon and pirates will still attack them. They don’t have their own wallets or anything. I haven’t done any testing as i spent a couple hours just seeing if I could do that much. Had some stupid issues with getting it to work and some tedious stuff. I will need to do the same for every other race now so that all trade ships and stations are like this. They should rebuild stations and buy new ships that get destroyed but this will require testing. I think the rebuilding of stations is set up in god.xml, well the quotas I mean.
Also, I am thinking about how many companies there should be. Should they be enemies with other companies in the same industry? Should each race have multiple companies in the same industry? Should I give companies combat ships? If i give companies combat ships those would be extra and will affect performance.
-
- Posts: 5625
- Joined: Sat, 10. Nov 12, 17:55
Re: Some thoughts on the economy and player impact on it
Oh thanks. This sounds more and more convenient.BlackRain wrote: ↑Sun, 9. Feb 20, 04:41 You don't need to be afraid of jobs. With the new factionlogic scripts, you can actually grab a ship right out of jobs at any time and have it do whatever you want and then even return it. The game already does this for existing military ships and such as long as there are ships to grab that meet the requirements. Take a look at the factionlogic scripts. It also can order job ships, so for example if it wants to order a new ship from the shipyard, it can call jobships to fulfill the roles and such.
I was really afraid of the ship management overhead.
Can you share what you have at some point? Also i could have a go at some items that you don't feel like implementing any time soon.
Think the best times i had in XR were when porting Marvin's station boarding script.