[MOD] FOCW Corporations REVISED V.3.2

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: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [MOD] FOCW Corporations REVISED V.3.2

Post by BlackRain » Tue, 27. Feb 24, 00:46

user1679 wrote:
Mon, 26. Feb 24, 06:07
Question re: FOCW Corporations Revised and corporation strength: If we decrease the number of stations (from 200 to 100, for example) do we have to reduce the corp strength values so ships are spawned properly?

I was looking at corpstrength.xml and I see a buch of tests to determine the overall strength of a corporation:

Code: Select all

<do_if value="$ThisFactionStrength lt 100000000 and $ThisFactionStrength ge 50000000">
<do_elseif value="$ThisFactionStrength lt 150000000 and $ThisFactionStrength ge 100000000">
<do_elseif value="$ThisFactionStrength lt 750000000 and $ThisFactionStrength ge 700000000">
but if I reduce the overall number of stations built, is it possible that any single corporation will never reach any particular level of strength? WIll this cause a reduced number of ships to spawn?
That would depend on a lot of factors. It is based on the worth of the faction so I think I set the cap at 100 billion, which is something a faction can reach with several stations I guess. It is hard to say, but yeah I mean it would probably result in less ships and such if the stations are spread out among too many factions. Normally, it takes a really long time to reach the cap anyway so I doubt you will ever even see that many stations built (As they also do get destroyed).

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

Re: [MOD] FOCW Corporations REVISED V.3.2

Post by user1679 » Tue, 27. Feb 24, 02:37

BlackRain wrote:
Tue, 27. Feb 24, 00:46
user1679 wrote:
Mon, 26. Feb 24, 06:07
Question re: FOCW Corporations Revised and corporation strength: If we decrease the number of stations (from 200 to 100, for example) do we have to reduce the corp strength values so ships are spawned properly?

I was looking at corpstrength.xml and I see a buch of tests to determine the overall strength of a corporation:

Code: Select all

<do_if value="$ThisFactionStrength lt 100000000 and $ThisFactionStrength ge 50000000">
<do_elseif value="$ThisFactionStrength lt 150000000 and $ThisFactionStrength ge 100000000">
<do_elseif value="$ThisFactionStrength lt 750000000 and $ThisFactionStrength ge 700000000">
but if I reduce the overall number of stations built, is it possible that any single corporation will never reach any particular level of strength? WIll this cause a reduced number of ships to spawn?
That would depend on a lot of factors. It is based on the worth of the faction so I think I set the cap at 100 billion, which is something a faction can reach with several stations I guess. It is hard to say, but yeah I mean it would probably result in less ships and such if the stations are spread out among too many factions. Normally, it takes a really long time to reach the cap anyway so I doubt you will ever even see that many stations built (As they also do get destroyed).
Thanks for that, I think I'll leave it alone to get an idea how "busy" the galaxy gets. I suppose if I end up reducing it, they just won't build new stations when one is destroyed.

Szynszyl
Posts: 276
Joined: Fri, 2. Jan 09, 20:23
x4

Re: [MOD] FOCW Corporations REVISED V.3.2

Post by Szynszyl » Fri, 1. Mar 24, 21:43

Hello BlackRain,
I have a question, how to make one of corporation added with this mod aggresive against player? I want that the start attacking me, i declarete war and destroy one station of corproration from your mod, and i want to know that they start fight with me?

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

Re: [MOD] FOCW Corporations REVISED V.3.2

Post by BlackRain » Sat, 2. Mar 24, 01:53

Szynszyl wrote:
Fri, 1. Mar 24, 21:43
Hello BlackRain,
I have a question, how to make one of corporation added with this mod aggresive against player? I want that the start attacking me, i declarete war and destroy one station of corproration from your mod, and i want to know that they start fight with me?
You can just declare war on the faction. If they have ships, they will attack you sometimes

Szynszyl
Posts: 276
Joined: Fri, 2. Jan 09, 20:23
x4

Re: [MOD] FOCW Corporations REVISED V.3.2

Post by Szynszyl » Sat, 2. Mar 24, 08:22

Hmm OK, but will they attack sometimes or fight me regularly as an enemy? Thx for quick answer btw :)

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

Re: [MOD] FOCW Corporations REVISED V.3.2

Post by BlackRain » Sat, 2. Mar 24, 13:27

Szynszyl wrote:
Sat, 2. Mar 24, 08:22
Hmm OK, but will they attack sometimes or fight me regularly as an enemy? Thx for quick answer btw :)
Well, that depends. It isn't like they were specifically designed to do a lot of fighting as they are corporations. However, they should try to order some fleets to attack you if they are strong enough. If they aren't very profitable then they won't be very strong. You can see corporations some times attacking other corporations, but it isn't something that will happen in earnest. Their fleets aren't specifically large either, usually like a Destroyer and several fighters is the norm for a corporation fleet. I could increase that of course (you could too).

Szynszyl
Posts: 276
Joined: Fri, 2. Jan 09, 20:23
x4

Re: [MOD] FOCW Corporations REVISED V.3.2

Post by Szynszyl » Sat, 2. Mar 24, 14:33

So, to make them more threat i should increase their size of fleet, good i understand? You mean max size or actual size, and how to do that?

I just want do something like Phanon corporation from Litcube Universe mod for X3 AP maybye you know that, it is possible?

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

Re: [MOD] FOCW Corporations REVISED V.3.2

Post by BlackRain » Sun, 3. Mar 24, 04:30

Szynszyl wrote:
Sat, 2. Mar 24, 14:33
So, to make them more threat i should increase their size of fleet, good i understand? You mean max size or actual size, and how to do that?

I just want do something like Phanon corporation from Litcube Universe mod for X3 AP maybye you know that, it is possible?
I know Phanon corporation, but that mod was especially made to be an enemy corporation that really pushes the player. This mod isn't really made that way. I guess you could increase the amount of fleets they can buy, also the number of ships in fleets and if they could build their own shipyard that would probably help too but it wasn't coded that way. There are certain fleets that are designed to specifically hunt down the player's assets. If you look in the jobs.xml you will find them by searching for <encounters id="attack_player"/>

So for example

<job id="paranid_destroyer_corp_player1" name="{40000,64}" startactive="false">
<modifiers commandeerable="true"/>

<category faction="paranidagric" tags="[factionlogic, military, destroyer]" size="ship_l"/>
<quota galaxy="1"/>
<location class="galaxy" macro="xu_ep2_universe_macro" faction="player" relation="self" comparison="exact"/>
<environment buildatshipyard="true"/>
<encounters id="attack_player"/>
<ship>
<select faction="freesplit" tags="[military, destroyer]" size="ship_l"/>
<loadout>
<level exact="0.7"/>
</loadout>
<owner exact="paranidagric" overridenpc="true"/>
</ship>
<subordinates>
<subordinate job="paranid_frigate_escort_corp1"/>
</subordinates>
</job>

You would have to find which corporation it is by looking in the \libraries\ folder and opening the factions.xml file. Then search for the faction id "paranidagric" to see what the id in the \t\ folder 001.xml file is. So if you search the code <faction id="paranidagric" name="{40000,127}" from the factions.xml file in the 001.xml file you would see that the faction is <t id="127">Family Okar</t>. Or if you make them all enemies just edit all of them. If you want to give the above more ships you would focus on this part:

<subordinates>
<subordinate job="paranid_frigate_escort_corp1"/>
</subordinates>

You can edit that specific subordinate job by searching for it or add more subordinates into the subordinate tag to get more ships. If you want more fleets to be built then you would have to open the corpstrengthfleets.xml file in the md folder for fleets. Then search for <set_value name="$ExistingatkplayerThreshold" exact="0"/> for each power level. There are twenty power levels for each corporation. You would just edit the number there to increase how many fleets are ordered for each power level. <set_value name="$ExistingatkplayerThreshold" exact="0"/> this shows 0 so you change the 0 to 1 or 2 or whatever. Power levels are like the following <cue name="P05" instantiate="true"> This is the lowest power level and the highest is <cue name="P100" instantiate="true">

BUT Keep in mind you would have to find the right corporation in there or do it for all corporations. Each corporation has its own code structure.

To figure that out you would need to look at the following top part of each structure"

<cue name="Corp_strength_AFleets" instantiate="true" namespace="this" checktime="player.age + 900s" checkinterval="120min">

<actions>

<set_value name="$ThisFaction" exact="faction.argonrefined" />

so this one here is argonrefined and then you would need to look for it like I mentioned above to find out what corporation.

It is a little complicated but once you know how to do it, it is simple to edit.

Essentially, if you edit the power levels, they will increasingly try to order more fleets (and larger if you set it up right) and they will come after you. If you knew how, you could also add that they build a shipyard. Maybe I will do something if I have time in the future to make them more deadly to player if u go to war.

Szynszyl
Posts: 276
Joined: Fri, 2. Jan 09, 20:23
x4

Re: [MOD] FOCW Corporations REVISED V.3.2

Post by Szynszyl » Mon, 4. Mar 24, 15:41

BlackRain wrote:
Sun, 3. Mar 24, 04:30
Maybe I will do something if I have time in the future to make them more deadly to player if u go to war.
Its to complicated for me. I think ill wait, maybye you do some changes when you will have time 😉

Post Reply

Return to “X4: Foundations - Scripts and Modding”