Some thoughts on the economy and player impact on it

This forum is the ideal place for all discussion relating to X4. You will also find additional information from developers here.

Moderator: Moderators for English X Forum

pref
Posts: 5625
Joined: Sat, 10. Nov 12, 17:55
x4

Re: Some thoughts on the economy and player impact on it

Post by pref »

BlackRain wrote: Sun, 9. Feb 20, 14:52 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.
I think companies should be able to go bankrupt and restart under a different name, otherwise it's a bit static. Maybe allow 2 per big races? Declare them extinct if they have nothing else but s ships.

Also warship count can be kept low if there was a way to make them react quicker within reasonable bounds. Without warships and new stations they will just use up player trade opportunities and can be harassed without too much challenge.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: Some thoughts on the economy and player impact on it

Post by BlackRain »

pref wrote: Sun, 9. Feb 20, 16:00
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.
Oh thanks. This sounds more and more convenient.
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.
The Station boarding scripts were created mostly by Rubino, but Marvin did help improve much of the work Rubino and I did. It's not a problem to share, once I have something done I will put up a preliminary mod for people to check out but it isn't very complex. Like I said, mostly cosmetic, but might be fun for immersion purposes.

In order to really have something that works it would need the following:

1) Original economy would need to be somewhat static. At game creation, stations and ships need to be all in place. So, what is the best way to do this?
2) Wallets for new corporation factions so they can buy and sell and grow.
3) Logic for corporations to expand intelligently, but also need to consider game performance. How many corporations should there be? How big should they grow?
4) Logic for corporations to interact with player and each other. Will corporations in the same industry fight each other? Will they fight with the player? How will this be handled? Will there be faction representatives and what role will they play? We had some diplomatic options in CWIR from rebirth done through NPC dialogue, this is a possibility in X4 too.
5) Logic for asset defense, How will corporations defend themselves? Will they buy military ships and protect assets? How will this impact performance?
6) Pirates, in order for this to work pirates are necessary. They need enough enemies to kill them so that change happens. It shouldn't only be the player who attacks or doesn't attack them.

Unfortunately, all of this will affect performance and how much can really be added? Right now I am keeping it very simple for immersion purposes only but once you start adding more and more ships it could be an issue.

I just thought of something which could help. I could add in some mercenary ships. These ships could be grabbed from jobs by any corporation at any time (pick ones nearby). Of course, this would have to be coded. So there could be several groups of mercenaries which get built at shipyards and these could be grabbed by any corporation that needs them and then returned when done with them I suppose. I am not too good with the factionlogic stuff though, so it would need some work.

Technically, you could even set it up so that the mercenaries have wallets and are companies. Whenever a corporation commissions the mercenary unit, they pay a fee and the mercenaries use this money to replace ships. There is a lot that could be done i suppose. You could probably even create a mission that a corporation might put out to protect its ships/stations and the player could take the contract so to speak and be paid a certain amount of money. The only thing here is that the player would have to police themselves on whether they do the job or not. I can't think of any way for the game to know whether the player is fulfilling this type of a mission. Not sure if that is a good idea or not.
pref
Posts: 5625
Joined: Sat, 10. Nov 12, 17:55
x4

Re: Some thoughts on the economy and player impact on it

Post by pref »

BlackRain wrote: Sun, 9. Feb 20, 16:42
The Station boarding scripts were created mostly by Rubino, but Marvin did help improve much of the work Rubino and I did.
Yeah we worked on the same thing with rubini and then mine never went into the released mod. Pity, it worked real nice - XR had no coordinated attacks with several capships at that time.
I had them group up in safe distance, then they attacked with precise timing, 3 ships boosted to the station near where the boarder would stop later, started hitting surface elements, distracting turrets and the boarder arrived about 30 secs later.
Was a bit disappointed about that miscommunication regarding who works on what and all the work in vain.

Anyway,

1) Original economy would need to be somewhat static. At game creation, stations and ships need to be all in place. So, what is the best way to do this?
Don't think they need to be in place. I'd just call the buildscripts and not define corp stations ahead. Would be real nice to know what number of them can be acceptable.
I'm optimistic because i had no fps loss in sector with a 500+module plex unless i got within 50km or so (attention change i guess). Game showed no performance change before/after that build. Think it handles low attention station logic fast and smooth, a couple 10 extra stations shouldn't hurt.
Distance from sector centre can also help, as long as each faction corp builds just a handful of stations tops i don't think performance would suffer much. Asset defence would also be easier that way.

2) Wallets for new corporation factions so they can buy and sell and grow.
There need to be a way to balance budgets easily, i'm not sure just a shared account would be flexible enough.
A shared account would be nice for traders and stations, but asset acquisition should not depend on amount of free cash entirely. Maybe a quick scan for wares and budget with a global modifier so it will be possible to time station and ship build frequency according to how it feels good and natural during gameplay.

3) Logic for corporations to expand intelligently, but also need to consider game performance. How many corporations should there be? How big should they grow?
Generally i'd just
a, Check if any existing stations are stopped due to missing resource, and build one of those (go for highest sell price per unit maybe if there is more).
b, Else sweep through the wares according to the prod chain starting from ship prod wares, build a parent for the first ware i already have production for. I'd add or calc if possible a trade vs military value for each prod module so diff factions build diff infrastructure.
Wares that have plenty trade offers on low price from parent faction could be excluded.
Their single starting prod stations should be 1 level up from raw resource refining and food, then they will work their way up on the prod chain like this.
c, If i find no build target like this then start a SY
d, If they do not build enough stations like this it's then possible to walk the whole tree, but that's for later.

Then build, will have to check if expanding existing plots is easy (hope it's possible to access the randomise functionality on the designer when expanding).
Only get a new plot if prod module/plot is too high or module destruction has occured.
Then pick a random low pop sector and build somewhere out of the way, otherwise expand an existing.

4) Logic for corporations to interact with player and each other. Will corporations in the same industry fight each other? Will they fight with the player? How will this be handled? Will there be faction representatives and what role will they play?
We had some diplomatic options in CWIR from rebirth done through NPC dialogue, this is a possibility in X4 too.

I'd run a queue here on a longer timer that does easy checks and rolls for a predefined action, at start just exec different vanilla scripts perhaps.
Each action would be an aiscript and a condition set (required free assets for the action, valid target for the action) plus a timeout value.
They could then be picked by chance based on faction attribute scores, and could relatively easily be expanded later.

5) Logic for asset defense, How will corporations defend themselves? Will they buy military ships and protect assets? How will this impact performance?
I'd really go for some RRF feature i mentioned above to have a force that does not need to be huge but still can have a large area of operation.
I'd try to keep asset count as low as possible while still having a visible response to player actions.
With vanilla AI travel methods securing just a couple sectors would need lots of ships.
They could spawn an anomaly near their dock or SY which would take them far out in target sector? Then would have to dock at dock/SY again. Maybe some extra min cooldown.

6) Pirates, in order for this to work pirates are necessary. They need enough enemies to kill them so that change happens. It shouldn't only be the player who attacks or doesn't attack them.
Yes, it will be easier since these factions aren't needed for the game eco or anything. They can be even eradicated by a bigger pirate fleet. Then they just restart later under a diff name and race perhaps.

It would be really nice to have a way that allows for doing actions that are visible to the player and seem meaningful. And have the lowest possible ship quota for this.
Probably highest requirements for ships would be sector takeover but that could be done using 5 capships + limited escorts.
Assuming they only pick one action at a time that isn't too much. Then have 2 traders per station and some more free traders based on attributes.
Last edited by pref on Sun, 9. Feb 20, 19:23, edited 1 time in total.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: Some thoughts on the economy and player impact on it

Post by BlackRain »

The economy would not be able to function without stations already built at the beginning of the game.

I don't think corporations should be building shipyards, but this is something to consider.

The encounter system could be potentially used for ship response, but this would mean ships would "warp" to location. Ships would still be built, but when needed they would warp right to the action, this is how the encounter system works and it is already in the game so it is a potential way to do it.

As for other thoughts, well these are things which need to be coded and tested.
pref
Posts: 5625
Joined: Sat, 10. Nov 12, 17:55
x4

Re: Some thoughts on the economy and player impact on it

Post by pref »

BlackRain wrote: Sun, 9. Feb 20, 19:20 The economy would not be able to function without stations already built at the beginning of the game.
I would leave vanilla stations and generally stay as vanilla as possible.

I imagined corps to just expand what vanilla already has.
Chris0132
Posts: 1463
Joined: Sun, 22. Jun 08, 01:25
xr

Re: Some thoughts on the economy and player impact on it

Post by Chris0132 »

I wonder if it would be possible to have factions buy ships from corporate shipyards though?

Particularly if some of the corps operated across faction lines, such as teladi selling to the argon and the paranid?

The HOP obviously would have to have a degree of autarky but it'd be interesting if some of the other factions had trans-factional entities which supplied their economy, interesting diplomatic repercussions for messing with them, or if war broke out.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: Some thoughts on the economy and player impact on it

Post by BlackRain »

pref wrote: Sun, 9. Feb 20, 19:24
BlackRain wrote: Sun, 9. Feb 20, 19:20 The economy would not be able to function without stations already built at the beginning of the game.
I would leave vanilla stations and generally stay as vanilla as possible.

I imagined corps to just expand what vanilla already has.
That could be extra, but I want to have all trade ships and stations to not be related to the governments. Which is why I think it is fine to make up a bunch of generic companies which will own those instead of the governments. At least it is what I am playing around with right now to see how things go.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: Some thoughts on the economy and player impact on it

Post by BlackRain »

Chris0132 wrote: Sun, 9. Feb 20, 19:26 I wonder if it would be possible to have factions buy ships from corporate shipyards though?

Particularly if some of the corps operated across faction lines, such as teladi selling to the argon and the paranid?

The HOP obviously would have to have a degree of autarky but it'd be interesting if some of the other factions had trans-factional entities which supplied their economy, interesting diplomatic repercussions for messing with them, or if war broke out.
The code is already in the game for factions to buy ships from whatever you define in the code. This isn't hard to do. However, any other added on features would need to be created
pref
Posts: 5625
Joined: Sat, 10. Nov 12, 17:55
x4

Re: Some thoughts on the economy and player impact on it

Post by pref »

BlackRain wrote: Sun, 9. Feb 20, 19:28 That could be extra, but I want to have all trade ships and stations to not be related to the governments. Which is why I think it is fine to make up a bunch of generic companies which will own those instead of the governments. At least it is what I am playing around with right now to see how things go.
If they are a separate faction then you can have any relation with all the factions. Though attacking the main race govt they belong to might seem like suicide.

Think it would also cost much less effort to leave vanilla eco as is, and add the corps on top of that in a dynamic way so they can appear and also vanish.
Otherwise they are just another faction, without lore, without own characteristics (models etc). Nothing gained except numbers.
Chris0132
Posts: 1463
Joined: Sun, 22. Jun 08, 01:25
xr

Re: Some thoughts on the economy and player impact on it

Post by Chris0132 »

BlackRain wrote: Sun, 9. Feb 20, 19:29
Chris0132 wrote: Sun, 9. Feb 20, 19:26 I wonder if it would be possible to have factions buy ships from corporate shipyards though?

Particularly if some of the corps operated across faction lines, such as teladi selling to the argon and the paranid?

The HOP obviously would have to have a degree of autarky but it'd be interesting if some of the other factions had trans-factional entities which supplied their economy, interesting diplomatic repercussions for messing with them, or if war broke out.
The code is already in the game for factions to buy ships from whatever you define in the code. This isn't hard to do. However, any other added on features would need to be created
I guess I'm sort of wondering about simulating an actual state/private split, possibly varying between factions. So the teladi would obviously have lots of private corps and be very into other people's economies, albeit potentially risk averse if they have poor relations. The HOP would probably be far more state oriented out of necessity, argons being a bit of a mix.

So you could conceivably end up with the argon buying warships from the teladi with the materials supplied by the godrealm to go to war against the HOP.

With the player fitting in exactly like one of those corps. The interesting thing potentially being, if you start muscling in on their turf, do they start taking actions against you militarily, especially in neutral space?
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: Some thoughts on the economy and player impact on it

Post by BlackRain »

pref wrote: Sun, 9. Feb 20, 19:35
BlackRain wrote: Sun, 9. Feb 20, 19:28 That could be extra, but I want to have all trade ships and stations to not be related to the governments. Which is why I think it is fine to make up a bunch of generic companies which will own those instead of the governments. At least it is what I am playing around with right now to see how things go.
If they are a separate faction then you can have any relation with all the factions. Though attacking the main race govt they belong to might seem like suicide.

Think it would also cost much less effort to leave vanilla eco as is, and add the corps on top of that in a dynamic way so they can appear and also vanish.
Otherwise they are just another faction, without lore, without own characteristics (models etc). Nothing gained except numbers.
You can get best of both worlds. Removing the faction control over existing ships/stations would not in any way lessen the creation of new corporations that do everything you say.

My original purpose for looking into this is to remove the government from production because as the game currently is, the player can't corner a market at all. This wouldn't change with the way you are proposing. If governments are tied to every aspect of the economy, you would need to go to war with every faction to achieve this.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: Some thoughts on the economy and player impact on it

Post by BlackRain »

Chris0132 wrote: Sun, 9. Feb 20, 19:38
BlackRain wrote: Sun, 9. Feb 20, 19:29
Chris0132 wrote: Sun, 9. Feb 20, 19:26 I wonder if it would be possible to have factions buy ships from corporate shipyards though?

Particularly if some of the corps operated across faction lines, such as teladi selling to the argon and the paranid?

The HOP obviously would have to have a degree of autarky but it'd be interesting if some of the other factions had trans-factional entities which supplied their economy, interesting diplomatic repercussions for messing with them, or if war broke out.
The code is already in the game for factions to buy ships from whatever you define in the code. This isn't hard to do. However, any other added on features would need to be created
I guess I'm sort of wondering about simulating an actual state/private split, possibly varying between factions. So the teladi would obviously have lots of private corps and be very into other people's economies, albeit potentially risk averse if they have poor relations. The HOP would probably be far more state oriented out of necessity, argons being a bit of a mix.

So you could conceivably end up with the argon buying warships from the teladi with the materials supplied by the godrealm to go to war against the HOP.

With the player fitting in exactly like one of those corps. The interesting thing potentially being, if you start muscling in on their turf, do they start taking actions against you militarily, especially in neutral space?
They can only buy from shipyards that produce their type of ship. Teladi shipyards do not, so they won't buy from them.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: Some thoughts on the economy and player impact on it

Post by BlackRain »

By the way, adding in factions randomly or spontaneously won't work. All factions need to be set up in a ton of files beforehand. Unless you set up all the possible factions that could be and somehow have it randomly choose one of the factions all ready set up. There are several files that need to be edited to include all new factions otherwise they won't work.
pref
Posts: 5625
Joined: Sat, 10. Nov 12, 17:55
x4

Re: Some thoughts on the economy and player impact on it

Post by pref »

BlackRain wrote: Sun, 9. Feb 20, 19:51 My original purpose for looking into this is to remove the government from production because as the game currently is, the player can't corner a market at all. This wouldn't change with the way you are proposing. If governments are tied to every aspect of the economy, you would need to go to war with every faction to achieve this.
You could do this against the corps as their budget is limited. I wouldn't consider controlling the universe wide market a good thing at all. That makes it feel even smaller, and will happen way too easily if you introduce faction budgets as the entity count is low so you cant count on self healing as with big numbers. I could just hack a couple stations cargo and prod modules and then they would go bankrupt.

I'd aim to keep current faction mechanics as they are as a safe background that is always present.
That reduces the consequences of any logic failures by a large amount.
And add another layer where player have opponents that play in the same league.

It would need insane amount of balancing and consideration to redo the whole game world, with different economic rules. We would have to do much more detailed and complex faction logic then what ES created with the budget restriction.
Seems out of scope really.

Would have much more freedom as well as any corp can make bad decisions, and they can just go bankrupt while new ones can pop up. Error tolerance regarding logic is much much higher in this context, and it doesn't feel immersion breaking at all if they sometimes just get removed or killed.

Maybe if the new logic works so well then all factions can act like that but that is waaay ahead imo.

BlackRain wrote: Sun, 9. Feb 20, 20:09 By the way, adding in factions randomly or spontaneously won't work. All factions need to be set up in a ton of files beforehand. Unless you set up all the possible factions that could be and somehow have it randomly choose one of the factions all ready set up. There are several files that need to be edited to include all new factions otherwise they won't work.
Set up 5 or whatever max factions ahead. Change their name/race when one dies and a new one appears. Or keep 2 per race if race is fixed as a max and have certain amount of them active at any given time.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: Some thoughts on the economy and player impact on it

Post by BlackRain »

I think you are misunderstanding.

Whether a player wants to corner a market or not is up to them and of course they would need to plug in the holes in that case. Each industry has different companies, which I already set up. So if you want to corner the refined market then you can get rid of the competitions stations and ships and you would of course build up all the necessary infrastructure yourself. Those factions don't really disappear though, they will try to build again or buy new ships and you would need to get rid of them as they pop up but you would have significant control of the market. Getting rid of all competition is a very long term goal. You could corner the local market by just eliminating the generic corp that is near a specific government, etc. This is entirely up to the player, it isn't like it is something which would disappear without player involvement so your concerns are completely moot. If anything, the economy may run better because not as many stations and ships will get destroyed (except by xenon or pirate attacks) if the player doesn't wish it. It will take testing of course, but it should be the case. Also, all generic corps will trade with any government which should keep the shipyards stocked well I would think. Again, needs testing. I am going to play around with this for now and see how it goes.

What you are talking about most likely wouldn't have much of an impact on any of this. Again, you can add whatever corporations you want which grow/compete just fine. The existing generic corporations wouldn't grow, just rebuild whatever they lose which is exactly like vanilla anyway. The only thing which would need to be considered here is their military capabilities. Should there be ships which protect these companies and how that will function.
pref
Posts: 5625
Joined: Sat, 10. Nov 12, 17:55
x4

Re: Some thoughts on the economy and player impact on it

Post by pref »

You want to base their spendings on a real budget right?
Current vanilla faction logic does not consider that and that would be quite a big task to do well. Normally with such an entity count a starter faction has there is plenty income for everything.
Just to find a balance where the budget has visible effects from player POV, but it does not become too much of a limit might prove hard. It doesn't even exist necessarily without more fundamental changes to the economy.

I wouldn't shoot that high, try the faction logic in small first, without basing the whole game around it. That way it can be implemented in much smaller steps and be playable sooner then a full faction logic rewrite most likely.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: Some thoughts on the economy and player impact on it

Post by BlackRain »

pref wrote: Sun, 9. Feb 20, 20:53 You want to base their spendings on a real budget right?
Current vanilla faction logic does not consider that and that would be quite a big task to do well. Normally with such an entity count a starter faction has there is plenty income for everything.
Just to find a balance where the budget has visible effects from player POV, but it does not become too much of a limit might prove hard. It doesn't even exist necessarily without more fundamental changes to the economy.

I wouldn't shoot that high, try the faction logic in small first, without basing the whole game around it. That way it can be implemented in much smaller steps and be playable sooner then a full faction logic rewrite most likely.
No, the existing generic corporations don't need to have a real budget. They could just be static factions and act much like vanilla but give it flavor. The only thing to consider would be the military aspect, who will protect them and how will they respond to the player. Only new corporations would have an actual wallet and act somewhat like the player. Or at least that was how I would envision it.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: Some thoughts on the economy and player impact on it

Post by BlackRain »

I am having one issue which I have yet to figure out the reason. For the new factions, every ship has the same paint mod. It is a pink color. Not sure why this is the case or how to change it.
pref
Posts: 5625
Joined: Sat, 10. Nov 12, 17:55
x4

Re: Some thoughts on the economy and player impact on it

Post by pref »

BlackRain wrote: Sun, 9. Feb 20, 20:57 The only thing to consider would be the military aspect, who will protect them and how will they respond to the player. Only new corporations would have an actual wallet and act somewhat like the player. Or at least that was how I would envision it.
If you don't reject that rrf idea, there could be a military type corp per faction that has this feature. With just a handful of capships it could protect parent faction sectors and ones it has presence in. Could be triggered by attacked signals or periodic checks for high dps enemy presence.

I'd copy the parent faction relations for start. But it should be possible that they decide to attack player assets and go hostile on the player. Any ships participating should be made hostile temporarily with a long cooldown, and flagged so killing them should cause no rep loss towards anybody.

Normal factions could just patrol in their sectors (or wherever property is present) according to station density and quota or however it works in vanilla.
BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7465
Joined: Mon, 15. Dec 03, 18:53
x4

Re: Some thoughts on the economy and player impact on it

Post by BlackRain »

I figured out the paint issue.

The game already has a type of RRF in the faction logic. So, it isn't like an RRF type script needs to be made. Tweaks or an addition to the factionlogic would be all that is necessary most likely.

Return to “X4: Foundations”