[MOD] FOCW Corporations REVISED V.3.2

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

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

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

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by BlackRain » Thu, 6. May 21, 01:21

Gen.d.Pz.Tr.Seb wrote:
Wed, 5. May 21, 18:07
Really? Would have thought that being in a separate faction would only decrease relationship with that faction. How does the ai get around this? Or does it just not care? Do the corporations build in player owned sectors? Because that is actually something I don't want, trying to keep them nice and orderly.
If a corporation has a good relationship with the player, they can build in sectors you own. The chance of this increases the more sectors you own. I currently own 7 sectors spread out over 4 clusters. Meaning, 4 "gates", 3 of the clusters have 2 sectors in them and 1 cluster has just the 1 sector. My game is 6 and a half days long and so far 4 stations have been built in sectors I own by corporations. I could potentially make this optional, but it would be tedious and time consuming to implement lol. By the way, you can easily limit how many corporations there are by editing a short few lines of code (very easy to do). There are 21 corporations in total but you can remove whichever you want.

Just open mod folder, go to the MD folder and then open the corplogic.xml file with notepad++ or something like that. Right at the top you will see

Code: Select all

<cue name="activate_corps" instantiate="true" version="1">
          <conditions>
			<check_any>
			<event_cue_signalled cue="md.Setup.Start"/>
            <event_game_loaded/>	
			</check_any>
          </conditions>
          <actions>           
           <set_faction_active faction="faction.argonrefined" active="true"/>
			<set_faction_active faction="faction.teladirefined" active="true"/>
			<set_faction_active faction="faction.paranidrefined" active="true"/>
			<set_faction_active faction="faction.holyorderrefined" active="true"/>
			<set_faction_active faction="faction.antigonerefined" active="true"/>
			
			<set_faction_active faction="faction.paranidship" active="true"/>
			<set_faction_active faction="faction.holyordership" active="true"/>
			<set_faction_active faction="faction.paranidagric" active="true"/>
			<set_faction_active faction="faction.holyorderagric" active="true"/>
			<set_faction_active faction="faction.paranidhigh" active="true"/>
			<set_faction_active faction="faction.holyorderhigh" active="true"/>
			<set_faction_active faction="faction.argonenergy" active="true"/>
			<set_faction_active faction="faction.teladienergy" active="true"/>
			<set_faction_active faction="faction.paranidenergy" active="true"/>
			<set_faction_active faction="faction.holyorderenergy" active="true"/>
			<set_faction_active faction="faction.antigoneenergy" active="true"/>
			<set_faction_active faction="faction.argonmining" active="true"/>
			<set_faction_active faction="faction.antigonemining" active="true"/>
			<set_faction_active faction="faction.teladimining" active="true"/>
			<set_faction_active faction="faction.paranidmining" active="true"/>
			<set_faction_active faction="faction.holyordermining" active="true"/>
            
          </actions>         
        </cue>
Just comment out whatever factions you don't want like this <!--<set_faction_active faction="faction.holyordermining" active="true"/>--> and this will remove them from the game. Only do this before you put the mod in for the first time though. Once you activate the mod and the faction is present in your game, it will cause issues if you do this.

As for the other issue:
Depending on the faction, they have law enforcement in sectors, etc. So, attacking a ship from a faction they are not enemies with in their sector may affect relations. I am not entirely sure on this but I think I recall that does happen. The Ai doesn't have this problem because they never attack people who they are friends with (normally). Antigone/Teladi/Paranid/Argon are all friends so no issues here. Split is enemies with Argon but relatively fine with others, etc.

I would have to test this to be sure though.

ThePiercdPrnc
Posts: 18
Joined: Fri, 21. Jun 19, 08:25

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by ThePiercdPrnc » Sat, 8. May 21, 08:24

First gotta say, love the mod. It's bringing a ton of new life to my game. I started fresh, HEAVILY modded. Some corps are at war with each other, or various factions. The thing that I need to point out that I noticed is that on the Corporate Report where it tells you how much they are worth. The budget report the first number seems to be correct. But the second number is just the first number but if its more than 8 digits it cuts off the last one. Like for example Mighty Monitors Corp is worth 165524318 now and the previous budget says they were worth 16552431. So either every single corp is increasing their budget EXACTLY 10x but a random last digit, or it's cutting off the last digit for some reason. And this is every single corp that is worth 9 figures. And I even found another example looking through right now, it's a 10 figure budget but the previous budget is 9 digits. So it's most definitely cutting off the last one for some unknown reason. Also, another HUGE QoL question in the same vein, is it anyway possible to add commas between the 3 sets of digits to make it more human readable. I find I have to use the mouse and count the groups to see how big the number is if I'm curious. Otherwise so far it's awesome, I'm also running pretty much all of Dead Air's stuff as well.

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

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by BlackRain » Sat, 8. May 21, 16:55

ThePiercdPrnc wrote:
Sat, 8. May 21, 08:24
First gotta say, love the mod. It's bringing a ton of new life to my game. I started fresh, HEAVILY modded. Some corps are at war with each other, or various factions. The thing that I need to point out that I noticed is that on the Corporate Report where it tells you how much they are worth. The budget report the first number seems to be correct. But the second number is just the first number but if its more than 8 digits it cuts off the last one. Like for example Mighty Monitors Corp is worth 165524318 now and the previous budget says they were worth 16552431. So either every single corp is increasing their budget EXACTLY 10x but a random last digit, or it's cutting off the last digit for some reason. And this is every single corp that is worth 9 figures. And I even found another example looking through right now, it's a 10 figure budget but the previous budget is 9 digits. So it's most definitely cutting off the last one for some unknown reason. Also, another HUGE QoL question in the same vein, is it anyway possible to add commas between the 3 sets of digits to make it more human readable. I find I have to use the mouse and count the groups to see how big the number is if I'm curious. Otherwise so far it's awesome, I'm also running pretty much all of Dead Air's stuff as well.
Hey, there are two numbers which are shown. One is the worth of the corporation and the other is their budget. Their budget is a percentage of their worth. The budget only goes up if their net worth goes up. So in your example above, Mighty Monitors Corp is worth 165,524,318 and their budget is 16,552,431. This is a way to balance all the different corporations and it is also how I determine what ships and such they will order, etc. I am not sure if that answers your question. Ultimately what this means is, the more stations they have (which is how I determine their net worth) the more powerful they are and the converse is also true.

As for your second point, I am not sure how to add in the commas honestly since I get the numbers through calculating the worth of their stations. Maybe there is a way to do it, but I just don't know.

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

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by user1679 » Mon, 17. May 21, 04:34

On the first page you mention that you use one of DeaAir's scripts. Does this mean we can ignore this error:
Skipping MD file extensions\DeadAirDynamicWars\md\dynamicwarconversations.xml: Script name 'DynamicWarConversations' already found in file extensions\FOCWCorporationsRevised\md\dynamicwarconversations.xml

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

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by DeadAirRT » Mon, 17. May 21, 14:57

user1679 wrote:
Mon, 17. May 21, 04:34
On the first page you mention that you use one of DeaAir's scripts. Does this mean we can ignore this error:
Skipping MD file extensions\DeadAirDynamicWars\md\dynamicwarconversations.xml: Script name 'DynamicWarConversations' already found in file extensions\FOCWCorporationsRevised\md\dynamicwarconversations.xml
You can ignore it. If you are using the non steam version of mine you can delete that file from dynamic wars if you want.

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

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by user1679 » Mon, 17. May 21, 17:57

DeadAirRT wrote:
Mon, 17. May 21, 14:57
user1679 wrote:
Mon, 17. May 21, 04:34
On the first page you mention that you use one of DeaAir's scripts. Does this mean we can ignore this error:
Skipping MD file extensions\DeadAirDynamicWars\md\dynamicwarconversations.xml: Script name 'DynamicWarConversations' already found in file extensions\FOCWCorporationsRevised\md\dynamicwarconversations.xml
You can ignore it. If you are using the non steam version of mine you can delete that file from dynamic wars if you want.
Thanks, I am using the non steam version.

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

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by user1679 » Sat, 22. May 21, 10:08

Some more errors in the debug log, I think this is preventing new corps. from spawning:
[=ERROR=] 0.00 Unknown node 'character' in XML patch file 'extensions\FOCWCorporationsRevised\libraries\characters'. Skipping node.
[=ERROR=] 0.00 Unknown node 'character' in XML patch file 'extensions\FOCWCorporationsRevised\libraries\characters'. Skipping node.
[=ERROR=] 0.00 CharacterDB::Import(): Duplicate definition of 'pilot_argon_random_rookie' in file 'libraries\characters'
[=ERROR=] 0.00 CharacterDB::Import(): Duplicate definition of 'pilot_teladi_random_rookie' in file 'libraries\characters'
[=ERROR=] 0.00 CharacterDB::Import(): Duplicate definition of 'pilot_paranid_random_rookie' in file 'libraries\characters'
[=ERROR=] 0.00 CharacterDB::Import(): Duplicate definition of 'pilot_split_random_rookie' in file 'libraries\characters'
[=ERROR=] 0.00 CharacterDB::Import(): Duplicate definition of 'manager_argon_random_rookie' in file 'libraries\characters'
[=ERROR=] 0.00 CharacterDB::Import(): Duplicate definition of 'manager_teladi_random_rookie' in file 'libraries\characters'
[=ERROR=] 0.00 CharacterDB::Import(): Duplicate definition of 'manager_paranid_random_rookie' in file 'libraries\characters'
[=ERROR=] 0.00 CharacterDB::Import(): Duplicate definition of 'manager_split_random_rookie' in file 'libraries\characters'
I don't know why it says "unknown node" because the original 'characters.xml' has a node called 'character'.

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

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by BlackRain » Sat, 22. May 21, 15:09

user1679 wrote:
Sat, 22. May 21, 10:08
Some more errors in the debug log, I think this is preventing new corps. from spawning:
[=ERROR=] 0.00 Unknown node 'character' in XML patch file 'extensions\FOCWCorporationsRevised\libraries\characters'. Skipping node.
[=ERROR=] 0.00 Unknown node 'character' in XML patch file 'extensions\FOCWCorporationsRevised\libraries\characters'. Skipping node.
[=ERROR=] 0.00 CharacterDB::Import(): Duplicate definition of 'pilot_argon_random_rookie' in file 'libraries\characters'
[=ERROR=] 0.00 CharacterDB::Import(): Duplicate definition of 'pilot_teladi_random_rookie' in file 'libraries\characters'
[=ERROR=] 0.00 CharacterDB::Import(): Duplicate definition of 'pilot_paranid_random_rookie' in file 'libraries\characters'
[=ERROR=] 0.00 CharacterDB::Import(): Duplicate definition of 'pilot_split_random_rookie' in file 'libraries\characters'
[=ERROR=] 0.00 CharacterDB::Import(): Duplicate definition of 'manager_argon_random_rookie' in file 'libraries\characters'
[=ERROR=] 0.00 CharacterDB::Import(): Duplicate definition of 'manager_teladi_random_rookie' in file 'libraries\characters'
[=ERROR=] 0.00 CharacterDB::Import(): Duplicate definition of 'manager_paranid_random_rookie' in file 'libraries\characters'
[=ERROR=] 0.00 CharacterDB::Import(): Duplicate definition of 'manager_split_random_rookie' in file 'libraries\characters'
I don't know why it says "unknown node" because the original 'characters.xml' has a node called 'character'.
I am not sure what you did or what other mods you are using but something is either conflicting with the mod or you messed something up. It is hard for me to say which it is. The mod works fine for me.

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

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by user1679 » Sat, 22. May 21, 23:48

BlackRain wrote:
Sat, 22. May 21, 15:09
I am not sure what you did or what other mods you are using but something is either conflicting with the mod or you messed something up. It is hard for me to say which it is. The mod works fine for me.
I think there's a typo in your 'characters.xml' file, the definitions for pilot_terran_random_rookie and manager_terran_random_rookie are outside the ADD block. I just downloaded the 1.60 version
from the OP in this thread and this is what it has (same as mine):

** NOTE: Moving those inside the ADD block removes the error

Code: Select all

<character id="manager_argon_random_rookie" group="argon.manager">
    <category tags="[crew, officer, manager, regular, rookie, recruitable]" faction="[argon, antigone, scaleplate, hatikvah, alliance, faction.player, argonenergy, argonmining, argonrefined, antigoneenergy, antigonemining, antigonerefined, buccaneers]" race="argon"/>
    <skills>
	  <skill type="management" min="3" max="12"/>
	  <skill type="morale" min="3" max="12"/>
      <skill type="boarding" min="0" max="6"/>
	  <skill type="engineering" min="0" max="9"/>
      <skill type="piloting" min="0" max="6"/>
    </skills>
	<owner list="[argon, antigone]"/>
  </character>
</add>

<character id="pilot_terran_random_rookie" group="terran.pilot">
      <category tags="[crew, officer, pilot, aipilot, fighterpilot, commander, masstraffic, watchdog, rookie, recruitable]" faction="[terran, faction.player]" race="terran"/>
      <skills>
        <skill type="piloting" min="3" max="12"/>
        <skill type="morale" min="3" max="12"/>

        <skill type="engineering" exact=""/>
        <skill type="management" min="0" max="6"/>
        <skill type="boarding" min="2" max="6"/>
      </skills>
      <owner list="[terran]"/>
    </character>
	
    <character id="manager_terran_random_rookie" group="terran.manager">
      <category tags="[crew, officer, manager, rookie, regular, recruitable]" faction="[terran, faction.player]" race="terran"/>
      <skills>
        <skill type="management" min="3" max="12"/>
        <skill type="morale" min="3" max="12"/>

        <skill type="piloting" max="3"/>
        <skill type="engineering" min="2" max="9"/>
        <skill type="boarding" exact="0"/>
      </skills>
      <owner list="[terran]"/>
    </character>

<!--<replace sel="//characters/character[@id='factionrepresentative_argon']">


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

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by BlackRain » Sun, 23. May 21, 19:45

user1679 wrote:
Sat, 22. May 21, 23:48
BlackRain wrote:
Sat, 22. May 21, 15:09
I am not sure what you did or what other mods you are using but something is either conflicting with the mod or you messed something up. It is hard for me to say which it is. The mod works fine for me.
I think there's a typo in your 'characters.xml' file, the definitions for pilot_terran_random_rookie and manager_terran_random_rookie are outside the ADD block. I just downloaded the 1.60 version
from the OP in this thread and this is what it has (same as mine):

** NOTE: Moving those inside the ADD block removes the error

Code: Select all

<character id="manager_argon_random_rookie" group="argon.manager">
    <category tags="[crew, officer, manager, regular, rookie, recruitable]" faction="[argon, antigone, scaleplate, hatikvah, alliance, faction.player, argonenergy, argonmining, argonrefined, antigoneenergy, antigonemining, antigonerefined, buccaneers]" race="argon"/>
    <skills>
	  <skill type="management" min="3" max="12"/>
	  <skill type="morale" min="3" max="12"/>
      <skill type="boarding" min="0" max="6"/>
	  <skill type="engineering" min="0" max="9"/>
      <skill type="piloting" min="0" max="6"/>
    </skills>
	<owner list="[argon, antigone]"/>
  </character>
</add>

<character id="pilot_terran_random_rookie" group="terran.pilot">
      <category tags="[crew, officer, pilot, aipilot, fighterpilot, commander, masstraffic, watchdog, rookie, recruitable]" faction="[terran, faction.player]" race="terran"/>
      <skills>
        <skill type="piloting" min="3" max="12"/>
        <skill type="morale" min="3" max="12"/>

        <skill type="engineering" exact=""/>
        <skill type="management" min="0" max="6"/>
        <skill type="boarding" min="2" max="6"/>
      </skills>
      <owner list="[terran]"/>
    </character>
	
    <character id="manager_terran_random_rookie" group="terran.manager">
      <category tags="[crew, officer, manager, rookie, regular, recruitable]" faction="[terran, faction.player]" race="terran"/>
      <skills>
        <skill type="management" min="3" max="12"/>
        <skill type="morale" min="3" max="12"/>

        <skill type="piloting" max="3"/>
        <skill type="engineering" min="2" max="9"/>
        <skill type="boarding" exact="0"/>
      </skills>
      <owner list="[terran]"/>
    </character>

<!--<replace sel="//characters/character[@id='factionrepresentative_argon']">

yeah, that is weird. My version doesn't have that mistake in it so I didn't notice. Not sure how that happened. But yes, open up characters.xml and cut and paste those lines before the </add>

cbtendo
Posts: 12
Joined: Fri, 1. Jun 12, 15:20
x4

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by cbtendo » Wed, 28. Jul 21, 14:38

Hi, I'm interested in trying out this mod. but, nobody have mentioned it yet, does this mod requires the FOCW mod?
I probably don't want to use FOCW due to me not understanding FOCW mod purposes/impact and the need for it in my current/future game

cdeeks
Posts: 89
Joined: Tue, 22. Jan 13, 20:38
x3tc

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by cdeeks » Thu, 29. Jul 21, 13:12

Does this conflict with the other FOCW mod that makes universe more packed? i think that chganges jobs also.

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

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by BlackRain » Thu, 29. Jul 21, 16:10

cbtendo wrote:
Wed, 28. Jul 21, 14:38
Hi, I'm interested in trying out this mod. but, nobody have mentioned it yet, does this mod requires the FOCW mod?
I probably don't want to use FOCW due to me not understanding FOCW mod purposes/impact and the need for it in my current/future game
This does not require the other FOCW mod. Also, the other FOCW mod adds fleets of ships to make the game more active without making it too chaotic. Basically it just adds more ships which are built normally like every other ship and it also makes sure that all of these ships get built eventually. So, essentially, the universe will always seem filled rather than in vanilla where over time it becomes more dead.

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

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by BlackRain » Thu, 29. Jul 21, 16:11

cdeeks wrote:
Thu, 29. Jul 21, 13:12
Does this conflict with the other FOCW mod that makes universe more packed? i think that chganges jobs also.
Nope, they both work perfectly together

shovelmonkey
Posts: 152
Joined: Wed, 29. Feb 12, 17:34
x4

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by shovelmonkey » Sun, 19. Sep 21, 18:22

Is this compatible with 4.10?
“Not even once has life or the weather complained about a human being.”
― Mokokoma Mokhonoana

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

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by BlackRain » Wed, 22. Sep 21, 03:26

shovelmonkey wrote:
Sun, 19. Sep 21, 18:22
Is this compatible with 4.10?
Yes it should be just fine. I don't touch any of the existing scripts from vanilla other than adding in ships.

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

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by BlackRain » Thu, 30. Sep 21, 01:00

Does anyone have any feedback for me with this? Curious if there is anything they feel is missing or some ideas to be implemented, etc.

Gen.d.Pz.Tr.Seb
Posts: 39
Joined: Sun, 9. Jan 05, 18:53
x4

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by Gen.d.Pz.Tr.Seb » Thu, 30. Sep 21, 12:19

In general I am pretty happy with it, but some more/better feedback would be nice.

Those messages where you print the value of the company; could you please either display it as something like e.g. 1,2 billion or 450 million, or maybe just add 1000 separators? The times I bother with it I find myself counting decimal
places just to figure out which companies are the strongest.

Not sure if that is possible, but could you also have messages if stations of companies get destroyed?
Iucundi acti labores

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

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by BlackRain » Thu, 30. Sep 21, 13:42

Gen.d.Pz.Tr.Seb wrote:
Thu, 30. Sep 21, 12:19
In general I am pretty happy with it, but some more/better feedback would be nice.

Those messages where you print the value of the company; could you please either display it as something like e.g. 1,2 billion or 450 million, or maybe just add 1000 separators? The times I bother with it I find myself counting decimal
places just to figure out which companies are the strongest.

Not sure if that is possible, but could you also have messages if stations of companies get destroyed?
Hmm, I can look into it. I am not sure how to do it at this moment but I can try to figure it out when I have some time.

User avatar
scuderica8492
Posts: 12
Joined: Fri, 6. May 16, 00:12
x3ap

Re: [WIP/MOD] FOCW Corporations REVISED V.1.60

Post by scuderica8492 » Thu, 28. Oct 21, 12:08

Hi, I enjoy your mod, thank you for your work.
I got a question. Is there any way to increase factory module number per station for corporations?
I'm using DeadAir's ware, and government's station has much more modules per station.
but Corporation station has only 1 factory module per station, so they can't be a big role in economy.

Post Reply

Return to “X4: Foundations - Scripts and Modding”