[WIP/MOD]FOCW Corporations! Version 3.3

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

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

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7406
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by BlackRain » Fri, 21. Aug 20, 15:59

AtilaElari wrote:
Fri, 21. Aug 20, 11:47
BlackRain wrote:
Thu, 20. Aug 20, 21:44
I am considering whether to make some government factions enemies with some corporations or not. Any thoughts on that?
I think that would be a good way to flesh out some factions! Make Split and HoP agressive to Argon corporations, Argon outlawing more shady Teladi corps, and have HoP and Godrealm try to undermine each others' economies by raiding the opponent's corporations. And Teladi workig in an open market and welcoming everyone who pays taxes.


Speaking of taxes, unrelated question - do you think it would be possible, code-wise, to make a script that would take a cut of the profits each time a player withdraws cash from station accounts? To create a profit tax on stations operating in a faction's sector. As of now I see pretty much no point in fighting to take control of a sector, but getting rid of a government tax (and the ability to impose taxes on stations in sector) that would be a rather lucrative investment.
Taking over a sector does have some benefits when it comes to corporations. Corporations you are friendly with will build stations in sectors you own so that is a benefit. There is a mod out there already that does taxes including the player receiving taxes for stations in their sector. As for conflicts, Making government factions enemies of some corporations would mean that they would destroy their ships and stations if they come across them which usually would require an invasion of a sector but the problem is trade ships being destroyed when trading with other corporations. This could be a big issue. Would have to think on it a bit

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7406
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by BlackRain » Fri, 21. Aug 20, 16:12

Just to give an example of what could happen, in my universe the xenon had wiped out almost all of split space. Only Ryarth’s dominion and 2 of the free family sectors remained under split control. Every other split sector had been taken over by xenon in the north. In the south, the xenon had control from faulty logic to the void and in the south east, they had pushed the Teladi back quite a bit and taken company regard. The economy of the universe was in shambles with many feeling no hope. Luckily I was there to save the universe after developing my corporation into a behemoth. With a massive fleet i completely conquered the south west sectors taking the void all the way to faulty logic and making them all my own. Now I am developing them with Colonial development stations and lots of factories. I then completely wiped out the Xenon in the north east, clearing out the xenon from the free families regions but they are now dead space with hardly any living. This cost the lives of two thousand of my security personnel sadly. They will be remembered through monuments built on my colonial complexes.

Then I Sent a convoy of ten large freighters to try to help their shipyard get back on track. I have two large fleets now boxing in the xenon, one in the sector next to company regard and one in hatikvah’s choice. Only the north west part of the universe has been abandoned for now. Now I am using my immense resources to help in a revitalization of the universe as many new stations are constantly being built from all friendly corporations to me. I renamed the two sectors which were the xenon’s base in the south west New Hope I and New Hope II. I think they were Atiyah’s something or other.

By the way, this game is 8 days, 17 hours long. So it is a very long time period of play

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

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by AtilaElari » Fri, 21. Aug 20, 16:14

That tax mod only taxes based on the value of the modules, not the profit. But you are right, I should pester the creator of that mod, not you.

If the government would be hostile, won't it be possible to simply add the blacklist to the corporations' civilian ship AI and have them simply avoid hostile space? Just like player can order their ships to not go into sectors owned by specific parties?

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7406
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by BlackRain » Fri, 21. Aug 20, 16:17

AtilaElari wrote:
Fri, 21. Aug 20, 16:14
That tax mod only taxes based on the value of the modules, not the profit. But you are right, I should pester the creator of that mod, not you.

If the government would be hostile, won't it be possible to simply add the blacklist to the corporations' civilian ship AI and have them simply avoid hostile space? Just like player can order their ships to not go into sectors owned by specific parties?
That would mean rewriting some of the trade scripts probably. Not sure how they are written currently. I dont think they are written to avoid enemy sectors, it is just that in vanilla factions at war automatically dont trade because they are enemies.

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

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by AtilaElari » Fri, 21. Aug 20, 16:24

Maybe make a quick mod to make a faction hostile to all other corporations and see if any NPCs would go in.

Falcrack
Posts: 4929
Joined: Wed, 29. Jul 09, 00:46
x4

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by Falcrack » Wed, 16. Sep 20, 00:03

Does this mod require the base FOCW mod? Does it replace it, or could/should both FOCW and FOCW Corporations be installed at the same time?

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7406
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by BlackRain » Wed, 16. Sep 20, 00:42

Falcrack wrote:
Wed, 16. Sep 20, 00:03
Does this mod require the base FOCW mod? Does it replace it, or could/should both FOCW and FOCW Corporations be installed at the same time?
They do different things and can be used together

Sixters
Posts: 22
Joined: Thu, 23. Apr 20, 16:45
x4

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by Sixters » Tue, 6. Oct 20, 14:18

Hi !

Does anyone experienced crazy lag/stuttering/freeze with this mod installed ? My current game is nearly unplayable now. Impossible to use SETA as the game goes into powerpoint mode, lagging so hard it make the camera bug and i can look inside my cockpit when i pilot. Using the map is impossible without pausing the game, freeze like crazy.

I have something like 200 tradeships and 100 miners but they shouldnt be responsible for such lags, it's supposed to be nothing, no ? I mean i run the game on a 3700X with RTX2060 and 32G RAM.


My new playtrough is quite heavily modded, and from a logical POV i dont think Corporation is responsible for the lag i experience. Chance for it to be the guilty mod are very very low.

That's just to be sure and proceed by elimination. Few question to help me :
- Any mod it's not compatible with ?
- It is compatible with custom map mods (Like GateOverhaul from DeadAir) ?
- Can it safely be removed during a playtrough ?

Does anyone know way to troubleshoot this, other than disabling mods one by one ofc ?

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7406
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by BlackRain » Wed, 7. Oct 20, 23:57

Sixters wrote:
Tue, 6. Oct 20, 14:18
Hi !

Does anyone experienced crazy lag/stuttering/freeze with this mod installed ? My current game is nearly unplayable now. Impossible to use SETA as the game goes into powerpoint mode, lagging so hard it make the camera bug and i can look inside my cockpit when i pilot. Using the map is impossible without pausing the game, freeze like crazy.

I have something like 200 tradeships and 100 miners but they shouldnt be responsible for such lags, it's supposed to be nothing, no ? I mean i run the game on a 3700X with RTX2060 and 32G RAM.


My new playtrough is quite heavily modded, and from a logical POV i dont think Corporation is responsible for the lag i experience. Chance for it to be the guilty mod are very very low.

That's just to be sure and proceed by elimination. Few question to help me :
- Any mod it's not compatible with ?
- It is compatible with custom map mods (Like GateOverhaul from DeadAir) ?
- Can it safely be removed during a playtrough ?

Does anyone know way to troubleshoot this, other than disabling mods one by one ofc ?
I never personally experienced any real slowdown/lag myself when using this with FOCW with all max ships options and other mods. Of course, it is possible that this could cause slow down for slower pc's as it could potentially add a lot of ships. It depends on what you are using in your game. As for custom map mods, it should work fine I think? It can't really be removed from a save because the game has many stations being built and ships which belong to the corporate factions. If you did remove it, you would have a lot of stations and ships which no longer have valid owner and it could cause other issues.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7406
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by BlackRain » Mon, 21. Dec 20, 18:25

Hello everyone, been inactive a while. Thinking on working on this (well reimagining it a bit) and want to get some opinions.

I am thinking of creating a version of this where the corporations have to start from scratch. I am not planning to make real wallets or anything, but instead simulate it with rules. So a corporation would grow over time, increase their ships, etc. However, they could also weaken over time and be completely wiped out as well. Thinking of making all these corporations hostile to the player or maybe a combination of hostile and neutral, not sure. So all initial stations would belong to the government factions and the corporations would start out with 1 station or something like that. What do you all think?

XTC0R
Posts: 401
Joined: Sat, 1. Dec 18, 19:58
x4

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by XTC0R » Tue, 22. Dec 20, 00:17

BlackRain wrote:
Mon, 21. Dec 20, 18:25
Hello everyone, been inactive a while. Thinking on working on this (well reimagining it a bit) and want to get some opinions.

I am thinking of creating a version of this where the corporations have to start from scratch. I am not planning to make real wallets or anything, but instead simulate it with rules. So a corporation would grow over time, increase their ships, etc. However, they could also weaken over time and be completely wiped out as well. Thinking of making all these corporations hostile to the player or maybe a combination of hostile and neutral, not sure. So all initial stations would belong to the government factions and the corporations would start out with 1 station or something like that. What do you all think?
Great you are back! I think making all hostile is a bit too much. Corporations want to earn money so they should be open for good business. I would prefer making them neutral and changing reputation based on business made with them.

x4player
Posts: 2
Joined: Tue, 22. Dec 20, 15:47

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by x4player » Tue, 22. Dec 20, 16:00

A lot of starting from scratch microfractions is what should be optional in the game. Corporate relationships should be completely dynamic and not just with the player. If every corporation supplies absolutely every faction, it kills the strategic part of the game. They should have their own relationship and will lean more towards their own major factions. I don't quite understand why the wallet is bad. If I could, I would make real money to absolutely all factions. I think with the advent of 4.0 someone should already think about it. I propose to enable it as an option if you think it is so bad. But having real money in the factions would give me far more immersion than their unnatural unlimited accounts.

This mod can become a must have for all players and will refresh the gameplay.


We have a game with great potential for economic planning. Why not expand on these benefits? I confidently declare that real wallets and small independent fractions with diplomacy are two huge steps towards the ideal. Not just another mod.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7406
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by BlackRain » Tue, 22. Dec 20, 20:58

x4player wrote:
Tue, 22. Dec 20, 16:00
A lot of starting from scratch microfractions is what should be optional in the game. Corporate relationships should be completely dynamic and not just with the player. If every corporation supplies absolutely every faction, it kills the strategic part of the game. They should have their own relationship and will lean more towards their own major factions. I don't quite understand why the wallet is bad. If I could, I would make real money to absolutely all factions. I think with the advent of 4.0 someone should already think about it. I propose to enable it as an option if you think it is so bad. But having real money in the factions would give me far more immersion than their unnatural unlimited accounts.

This mod can become a must have for all players and will refresh the gameplay.


We have a game with great potential for economic planning. Why not expand on these benefits? I confidently declare that real wallets and small independent fractions with diplomacy are two huge steps towards the ideal. Not just another mod.
I would need to look into how to do it, etc. and that takes a lot of time. If I had someone working with me then maybe it would be feasible. I can look into it, but I don't know if I want to devote the time, we will see. It is much easier for me to make the factions do all the things you say (minus the wallets) with what I already know and with existing code I already did. Creating Wallets would be new stuff I haven't done yet and would need to research. Dynamic relations isn't hard, but what would it be based on? Just random drop and rise in relations? Corporations only stay within their race's space? These are all things to consider. Remember, I am doing this by myself. If I had someone skilled to work with me, I could do so much more I am sure. I would love to work in Diplomacy with all Factions through the guy from the Lever to move the world quest line. Would be cool if he could act as an agent to work out diplomacy stuff with every faction (including corporations).

x4player
Posts: 2
Joined: Tue, 22. Dec 20, 15:47

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by x4player » Tue, 22. Dec 20, 22:30

Well, I'll make a small concept and it's up to you to use it or not.
What do we have in diplomacy. She is dead in the base game.
At 4 0 we have the function to declare war. But factions have no way of asking for peace. Solution path - a faction can submit a request to restore relations to 0 if it suffers a lot of losses from the player. (The player can decline this request) This solves the problem of lack of feedback specifically with the player. To start.
The impossibility of ending the war is an important problem.
----
We have 2 diplomacy mods.
1. Reactive factions - factions worsen the attitude towards the player if he works with their enemies.
2. Dead Air dynamic war - Main diplomacy between factions.
---
You can simply include them on the highly recommended list, or use their principle of work.
Reactive factions or a similar version is necessary because I think we want to put the player in a real competitive environment and make them make decisions and not be in a diplomatic vacuum.

Dead air is random. Of course, it would not hurt to add any patterns based on military strength, the volume of inter-faction trade and the factor of territorial conflict (the desire to own a sector with resources). But it may not be easy. (I don't know how difficult something is to implement)
----
This is enough for the relationship main faction-main faction and player-mainfaction
----

Now let's move on to the corps AI ​​relationship.

To understand how to make them "alive", let's return to the principles of reactive factions. Let's simulate the situation. For example, we have the newly born Paranid corporation somewhere in their possession. She is very young and starts looking for ways to earn money. The Teladi and Paranid sectors are nearby and the corporation begins to trade with them. Unfortunately, the Paranids are at war with the sacred order and the Order-Our new corporation relationship begins to deteriorate in proportion to the number of transactions. Soon, this will lead to the fact that the corporation will never seek deals with the Order, and the Order, in turn, will want to destroy the supplier of its enemies. This is a simple game situation that we get thanks to the reactive factions mechanic.


Let's simulate a more non-standard situation that will allow our game to not be static and boring.
Our new split corporation was born in the decrepit skies sector. At first, she begins to carry goods both for splits and in argon. The relationship of our small corporation dynamically changes based on the number of transactions and here we have as many as 3 options !!
1. Split deals prevail (more profitable) and the corporation completely loses the favor of the Argon federation.
2. Our corporation is very smart and manages to balance the deterioration and improvement of relations on an average level and trades on two sides. Begins to develop production both in argon and in splits. Brilliant! I think she has a great future!
3. Our corporation is in big trouble with splits bcz they trade with argon! The Splits are trying to destroy her stations. It will be good if she has time to build 1-2 stations in argon ... Thus, a unique phenomenon appears. Split refugee on the argon side.
----
Here we have no possibility of making peace by corporations. Solution - the corporation's relationship with the enemy is improved by a small amount when a deal is made with the enemy's ally.
Example - if a corporation is at war with antigone, then it can improve relations if it trades with argon (an ally of antigone)
----
This system of diplomacy can be periodically updated with new input accounted data making it incredibly deep. It all depends on what kind of data you can get from the game. Production volumes, theoretical earnings from transactions, distances between stations, cross-diplomacy, and so on. By adding them little by little, cutting off unsuccessful options over time, you get an amazing live system that will give hundreds of hours of gameplay to all X fans.

It is based on a simple deal-reputation relationship. But it can be infinitely deep with the addition of new inputs. And even in its initial form, it generates non-standard situations.
Here's my little concept. I can think in more detail about a specific balance in numbers, but unfortunately I will hardly help with scripts. This is not my specialty.

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

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by Max Bain » Fri, 25. Dec 20, 14:39

I have got two questions:

1. Will the corporations be added to the normal races? So there will be several additional stations or will the standard factions like Arg, Ant have less stations now? If not, wont this lower performance a lot?

2. Does it support other mods like my Ship Pack? So will the corporations build battleships or destroyers and XL traders?
XR Ship Pack (adds several ships from XR) Link
Weapon Pack (adds several new weapons) Link
Economy Overhaul (expands the X4 economy with many new buildings) Link
X4 Editor (view stats of objects and make your own mod within a few clicks) Link

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7406
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by BlackRain » Fri, 25. Dec 20, 14:57

Max Bain wrote:
Fri, 25. Dec 20, 14:39
I have got two questions:

1. Will the corporations be added to the normal races? So there will be several additional stations or will the standard factions like Arg, Ant have less stations now? If not, wont this lower performance a lot?

2. Does it support other mods like my Ship Pack? So will the corporations build battleships or destroyers and XL traders?
Hello, this is all things which would need to be considered in the planning stages of course. The Corporations would definitely have to be their own entities though, and I suppose the stations would be in addition to the existing stations. I could remove some of the existing stations, but I wonder how much it would in fact affect performance. The game can handle a lot of stations and the calculations for new stations could take into account the stations owned by corporations. I am still considering how it will function,

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7406
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by BlackRain » Fri, 25. Dec 20, 15:00

x4player wrote:
Tue, 22. Dec 20, 22:30
Well, I'll make a small concept and it's up to you to use it or not.
What do we have in diplomacy. She is dead in the base game.
At 4 0 we have the function to declare war. But factions have no way of asking for peace. Solution path - a faction can submit a request to restore relations to 0 if it suffers a lot of losses from the player. (The player can decline this request) This solves the problem of lack of feedback specifically with the player. To start.
The impossibility of ending the war is an important problem.
----
We have 2 diplomacy mods.
1. Reactive factions - factions worsen the attitude towards the player if he works with their enemies.
2. Dead Air dynamic war - Main diplomacy between factions.
---
You can simply include them on the highly recommended list, or use their principle of work.
Reactive factions or a similar version is necessary because I think we want to put the player in a real competitive environment and make them make decisions and not be in a diplomatic vacuum.

Dead air is random. Of course, it would not hurt to add any patterns based on military strength, the volume of inter-faction trade and the factor of territorial conflict (the desire to own a sector with resources). But it may not be easy. (I don't know how difficult something is to implement)
----
This is enough for the relationship main faction-main faction and player-mainfaction
----

Now let's move on to the corps AI ​​relationship.

To understand how to make them "alive", let's return to the principles of reactive factions. Let's simulate the situation. For example, we have the newly born Paranid corporation somewhere in their possession. She is very young and starts looking for ways to earn money. The Teladi and Paranid sectors are nearby and the corporation begins to trade with them. Unfortunately, the Paranids are at war with the sacred order and the Order-Our new corporation relationship begins to deteriorate in proportion to the number of transactions. Soon, this will lead to the fact that the corporation will never seek deals with the Order, and the Order, in turn, will want to destroy the supplier of its enemies. This is a simple game situation that we get thanks to the reactive factions mechanic.


Let's simulate a more non-standard situation that will allow our game to not be static and boring.
Our new split corporation was born in the decrepit skies sector. At first, she begins to carry goods both for splits and in argon. The relationship of our small corporation dynamically changes based on the number of transactions and here we have as many as 3 options !!
1. Split deals prevail (more profitable) and the corporation completely loses the favor of the Argon federation.
2. Our corporation is very smart and manages to balance the deterioration and improvement of relations on an average level and trades on two sides. Begins to develop production both in argon and in splits. Brilliant! I think she has a great future!
3. Our corporation is in big trouble with splits bcz they trade with argon! The Splits are trying to destroy her stations. It will be good if she has time to build 1-2 stations in argon ... Thus, a unique phenomenon appears. Split refugee on the argon side.
----
Here we have no possibility of making peace by corporations. Solution - the corporation's relationship with the enemy is improved by a small amount when a deal is made with the enemy's ally.
Example - if a corporation is at war with antigone, then it can improve relations if it trades with argon (an ally of antigone)
----
This system of diplomacy can be periodically updated with new input accounted data making it incredibly deep. It all depends on what kind of data you can get from the game. Production volumes, theoretical earnings from transactions, distances between stations, cross-diplomacy, and so on. By adding them little by little, cutting off unsuccessful options over time, you get an amazing live system that will give hundreds of hours of gameplay to all X fans.

It is based on a simple deal-reputation relationship. But it can be infinitely deep with the addition of new inputs. And even in its initial form, it generates non-standard situations.
Here's my little concept. I can think in more detail about a specific balance in numbers, but unfortunately I will hardly help with scripts. This is not my specialty.
A lot of great ideas here and I have thought of some of these myself too. However, it is a lot of work to do all of these things. When I have time, I will try to look into it and see what kind of features could be added. I definitely want there to be more diplomacy, even with the existing government factions (only declare war is silly). I would like to be able to have the player able to negotiate peace settlements (through spending a lot of credits) and such. I would also like to add the ability to gift stations and ships to factions.

jah
Posts: 268
Joined: Fri, 12. Mar 04, 15:39
x4

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by jah » Tue, 16. Feb 21, 06:56

so, after some testing (I don't know if it was mentioned here), I like the overall more livliness your mod offers. But there's a major problem right at the beginning of the gamestart. Hatikvahs League is under constant attack of multiple enemies (most of them some of the introduced companies), but Hatikvah itself has no enemies besides the xenons. Thats a problem, because at least in my save a nearby station of one new company whiped out their trading post together with fighters and corvettes of several other companies. And at the beginning no player is able to do something against it. at least the plot would be difficult to play under these circumstances

DeadAirRT
Posts: 1008
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by DeadAirRT » Tue, 16. Feb 21, 16:23

x4player wrote:
Tue, 22. Dec 20, 22:30
Of course, it would not hurt to add any patterns based on military strength, the volume of inter-faction trade and the factor of territorial conflict (the desire to own a sector with resources). But it may not be easy. (I don't know how difficult something is to implement)
Dynamic war already factors in military strength, amount of space, race, current relations, common friends/enemies, and other stuff. It has rng to prevent everything from being deterministic. It gives the option to declare war, ask for peace, and ask factions with greater than 20 rep to do the same.

Iirc, black rain and I discussed using the tag on faction of peaceful to prevent them from being affected by my mod.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7406
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [WIP/MOD]FOCW Corporations! Version 3.3

Post by BlackRain » Tue, 16. Feb 21, 18:43

jah wrote:
Tue, 16. Feb 21, 06:56
so, after some testing (I don't know if it was mentioned here), I like the overall more livliness your mod offers. But there's a major problem right at the beginning of the gamestart. Hatikvahs League is under constant attack of multiple enemies (most of them some of the introduced companies), but Hatikvah itself has no enemies besides the xenons. Thats a problem, because at least in my save a nearby station of one new company whiped out their trading post together with fighters and corvettes of several other companies. And at the beginning no player is able to do something against it. at least the plot would be difficult to play under these circumstances
No corporation should be enemies with Hatikvah. I even have a script which constantly makes them friends if anything were to happen. Seems strange to me.

Post Reply

Return to “X4: Foundations - Scripts and Modding”