[MOD] Foundation of Conquest and War V. 7.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

[MOD] Foundation of Conquest and War V. 7.2

Post by BlackRain » Sun, 2. Dec 18, 05:20

Foundations of Conquest and War

This mod allows you to add many more ships/fleets/flotillas to your game for every faction. Complete customization based on what you want! Make sure you follow INSTRUCTIONS in order for it to work. Every ship is built properly at a shipyard, no ships spawn. How many ships are built all depend on the health of your universe/factions. New names for each ship added by this mod.

Changes can be made at any time, start out with lower settings and later change them to add more ships depending on how your universe is going. Want one faction to be stronger than another? Give that faction some extra ships in the config. Want a much more difficult fight against Xenon? Activate all the highest Xenon settings (but be ready for pain if you add in lots of carriers...) Fully save game compatible and can be removed at any time! The only negative effect is that existing ships will remain until destroyed.

Once you download the folder and place it in the extensions folder of your X4 directory, make sure to go to the md folder. Open the md folder, look for a file named focwsetup. Open the file with notepad or notepad++ or similar programs. READ AND FOLLOW THE INSTRUCTIONS IN THE CONFIG FILE FOR THE MOD TO WORK PROPERLY. Everything is defaulted to OFF, so if you do not configure the file, you won't have any changes to your game.


IMPORTANT INFORMATION ABOUT THE XENON OPTIONS (Faction options would be similar to this in many ways)


Let me explain, and look at the following options.

<set_value name="$activateXencapital" exact="1" /> This one has a few options, depending which one you pick this will create a quota for one of the following : 2 Destroyers with just a couple of fighters on light, Medium will give you a quota of 4 destroyers with a few fighter escorts, and Heavy will give you a quota of 6 destroyers with several fighter escorts.

What that means is, the Xenon can build extra destroyers up to the specified choice and they will either have more or less fighters escorting them. Even on heavy, these choices are on the light side of ships so you might not want such sizes. You can leave this off or activate if you like (leaving this off and choosing a more heavy choice below may be better) THESE ARE INDIVIDUAL FLEETS BY THE WAY SO EACH OF THESE WOULD BE 1 XENON K AND A COUPLE TO SEVERAL FIGHTERS DEPENDING ON THE OPTION. YOU MAY NOT WANT THIS OPTION ACTIVE BECAUSE OF THAT. LARGER SIZE FLEETS ARE BELOW


<set_value name="$activateXencardefend" exact="1" /> This activates a quota for 2 Xenon I fleets which should only defend Xenon sectors. Basically what that means is, these would not be commandeerable and the Xenon won't use them in their factionlogic invasion stuff. You may or may not want to activate this, these may be a good choice since they will keep xenon sectors safer assuming they get built. This will allow the Xenon to build up to 2 Xenon I fleets with 1 Xenon I, 2 Xenon K's, 3 Xenon P's and a dozen or more fighters for each of the 2 Xenon I fleets.


<set_value name="$activateXencarattack" exact="1" /> This activates a quota for 1 Xenon I fleet which will attack other sectors. This fleet has no Xenon K's but it has several Xenon P's and a couple dozen fighters. This fleet is not commandeerable and will not be used in factionlogic invasion stuff for Xenon, but it will roam and attack other sectors. You may or may not want this, up to you.


<set_value name="$activateXencarattackpla" exact="1" /> This seems to be not working, seems I made a mistake with this and has to be fixed. However, the idea behind this one was that a Xenon I fleet like one of the ones mentioned above would actively seek out the player's assets. Of course, whether they get to your assets is a different matter because they would also fight everyone else and might not make it. It would depend where your assets were located and which it selected to attack.


<set_value name="$activatemoreXenonCaps" exact="1" /> This activates a quota of 6 Xenon K fleets. These fleets are Commandeerable and can be used by the Xenon factionlogic in invasions or defense, etc. These fleets have around 3 Xenon K's, a few Xenon P's and around 20 or so fighters.


<set_value name="$activateXenonApocalypse" exact="1" /> If you just really want a lot of Xenon k's flying around you probably only need to activate this one. Or if you also want more carriers, also activate the carrier options. If you activate this, you probably don't need to activate any other Xenon option (except the Carrier options). This gives a quota of 30 Xenon K fleets. These Xenon K fleets consist of 3 Xenon K's, 3 Xenon P's and around 20 or so fighters.


A quota is defined in the scripts for each cue to limit how many ships will be built for that particular job. This is a different way of doing things than the original jobs.xml way of doing it. The reason is, Jobs works like this: Ship is ordered, but shipyard can't handle it so cancel job. Even if they have the resources later, the job might not get built since it has already been canceled. Of course, it may get built in the future, but this is a slower build up. The amount of ships will definitely decrease in the long run. Instead, I force the shipyard to build the ship. Even if the shipyard can't handle it, it goes in the queue and remains. Once the shipyard can build it, it will build the ships in the queue. This will ensure that the same or more ships will be present (assuming the faction is doing well of course). In the previous example (vanilla jobs), even if the faction is doing well, ship amounts decrease over time.

The quotas can be edited in the FOCWsetup script if you know what you are doing. Just locate the cue with the job you want to change and then edit the following:

<set_value name="$ExistingDestroyerThreshold" exact="4"/>

The name of this value doesn't matter, the important thing is the number. You can change that number to whatever you want and that becomes the new quota amount. The number of jobs ordered for that job will not go over this quota.

If none of this makes sense to you or it sounds too confusing, just stick to the simple instructions at the top of the script and enable what you want.

What you can do with this script is quite powerful and you can customize each faction any way you want if you know what you are doing



Version 7.2 for X4 6.0 and all dlcs
Last edited by BlackRain on Wed, 5. Dec 18, 01:38, edited 1 time in total.

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

Re: [WIP] Foundation of Conquest and War

Post by BlackRain » Sun, 2. Dec 18, 05:20

FOCW Version 7.2
1)Minor fixes to code

FOCW Version 7.1
1) Added support for Boron DLC

FOCW Version 7.0

1) Minor fix to code.
2) Vigor Fleets and squads will now be known as Vigor Repo Fleets and Vigor Repo Squads

FOCW Version 6.9

1) New options for VIGOR Ships for the Avarice DLC. I put it together quickly so haven't done any testing. All options have been reset so make sure to go through the config file and set it up the way you want. I am also not familiar with the new tags (Iceunion and scrapyard) that I am seeing in the vigor ships and I didn't check the in game names or look at the t file so hopefully the names are okay.

Let me know if there are any issues.

FOCW Version 6.8
1) New options, Large fleets for every faction. These are much larger fleets than you are used to! Over a dozen capital ships, dozens of fighters and frigate/corvette size ships. Recommended to use deadair ware fill mod that automatically tops up shipyards when low on resources!

FOCW Version 6.7

1) Support for Trinity and Yaki with new options.
2) Some minor fixes.

FOCW Version 6.6
1) Fixed a few minor issues and improved some stuff. Need to replace focwsetup.

FOCW Version 6.5
1) Fixed some minor mistakes I made.

FOCW Version 6.4

1) Changed some of the calculations controlling quota. Previously, the quotas weren't working correctly which I had sort of fixed but I realized that it was too limiting on the quotas. Originally you would get too many ships, then my last changes made it so the ships were too few. I found a good way to balance this in the current changes.

The main reason is that I can't find any good way to check for the amount of ships which have been ordered but not yet built. It is easy to find ships which are already built. Anyway, I came up with a work around.

Need to make sure replace the FOCWsetup file as their is new code.

FOCW v6.3
1) Some minor fixes/changes
2) I lowered the time intervals for ordering all ships.
3) I increased the quota for Xenon apocalypse setting to 60 and lowered time to 20 min (each xenon K fleet will be ordered every 20 minutes up to 60)

FOCW Version 6.2

1) Some minor bug fixes. Make sure to replace over the FOCWsetup file as there was a small bug in there and then make sure to edit the settings to whatever you are using.

FOCW Version 6.1
1) Fixed the problem of ships being built over the quotas assigned. Now ships built will not exceed the quotas defined. This will mean less ships in your game (since it wasn't working properly before). However, you can always edit the script with the directions in the OP for more ships.
2) Some other minor fixes/changes.

FOCW Version 6.0
1) Added configuration options for Terrans. Only turn it on if you have the Terran DLC.
2) Hatikvah will now order ships from either Argon/Antigone/Teladi/Ministry/Alliance if you have them turned on
3) Some minor fixes here and there

FOCW Version 5.9
1) Added configuration options for the Faction Court of Curbs. Should only activate when court is an active faction. Free split family ships should no longer get built at that point (hopefully it works)
2) Changed diplomacy options, now diplomacy is a one shot deal instead of a constant check. Just put a 1 next to the configuration option and make sure to edit all the diplomacy options for each faction, then load up the game and voila. You can then turn it off or leave it as is (it will keep resetting the diplomacy back to whatever you set at each game load if you leave it on or will change if you change the settings).
3) Some minor fixes in the code here and there.

FOCW Version 5.8

1) Added diplomacy for Trinity, Court and Buccaneers.
2) Added Xenon Apocalypse configuration options (This will allow Xenon to build an additional 30 destroyer fleets and 60 frigate squadrons) Keep in mind that they still need to build these ships and it takes time for them to build up and also they will send ships out to attack so it may take time to see a noticeable difference.

FOCW Version 5.7

1) Some fixes to the scripts for errors made/missed.

FOCW Version 5.6

1) There was a few issues with the scripts I coded for how patrol ships get subordinates in the last version. I have now fixed these. Everything should be working okay now and I shouldn't need to update anything else unless I add new things (Fingers crossed).

FOCW Version 5.5

1) Diplomacy options in config file, you can make any factions friends, enemies, or whatever with any other faction. Including the player with each faction. Make sure to follow the instructions in the config file! Everything is explained.
2) Work around was made for newly built patrol ships getting subordinates. Patrol leaders will now spend up to 30 minutes near shipyards/wharfs to gather subordinates before going on their patrol route (they will still patrol the sector they are in while waiting for their subordinates).

FOCW Version 5.4

1) Just a minor fix to ministry ships so that they patrol Teladi sectors

Also, check out FOCW Corporations which is brand new (no longer just an immersive mod).

Version 5.3 FOCW

1) I made a small mistake in the code for where Ministry ships would patrol and so they wouldn't patrol properly. This is fixed.

Version 5.2 FOCW

1) Some minor fixes in the code.
2) Changed Ministry to now patrol member sectors (Teladi and Ministry).

As always, don't forget to open the focwsetup.xml file with notepad or some type of editor so that you can configure options.

Version 5.1 FOCW
1) Many minor fixes to incorrect edits/mistakes I made in the code. This should fix all the mistakes and everything should be working properly but let me know if there are any issues.
2) Many new options! Make sure to check out the config as there are now many options to choose from including even more ships if you want! Keep in mind that with Hatikvah, who do not have their own shipyard, they may or may not be able to order ships depending on availability at the shipyards they order from (mainly argon and antigone). Seems to be no issue with them ordering frigates and fighters, but it seems very difficult for them to order destroyers.

Version 5.0 FOCW

1) Almost complete rewrite of the whole mod (UGH!). Took a while to get everything working, but now it should be working well!

2) A lot of work under the hood and now ships will be built and patrol properly. No ships will spawn at all. Every single ship is built and will go on patrol or attack things depending on what you activate.

3) Now, you just need to edit one file for all options. Follow instructions in the file. Open focwsetup.xml to edit the options. Make sure to not touch anything else in there.

4) Just a reminder, be careful what options you select and keep in mind your system. The way things work is there is a threshold for each option and every now and then, new ships will be ordered. So for example, if you select the light version of the destroyers for all factions, each faction will be able to build 2 extra destroyer flotillas. They won't build them immediately, but over time they will order up to the threshold. Once the threshold is met, they won't order more unless one gets destroyed.

5) Keep in mind that it takes time for ships on patrol to order their subordinates, this is a vanilla thing. The difference is that in vanilla, you start a new game and everything is spawned in but later when it builds new ships, they don't necessarily get their subordinates until a while. The ships will order subordinates but not usually for a little while depending on circumstances.

6) You will know which ships are added by this mod because they all have different names (For example, Argon Expeditionary fleet, Argon Privateer fleet, Antigone Republican Guard, etc.)

iforgotmysocks
Posts: 1244
Joined: Fri, 8. Nov 13, 22:35
x4

Re: [WIP] Foundation of Conquest and War

Post by iforgotmysocks » Sun, 2. Dec 18, 05:44

Thanks for all the effort and work you guys put into keeping the idea of a truly hostile universe alive.
U have no idea how glad i am to see that post. :D

Good luck to you guys and let me know if i can help. :)

Warnoise
Posts: 674
Joined: Mon, 7. Mar 16, 23:47

Re: [WIP] Foundation of Conquest and War

Post by Warnoise » Sun, 2. Dec 18, 07:12

Need more pirate factions and make enemies (xenon and khaak) more damgerous because currently the universe is very safe

Raven78
Posts: 34
Joined: Wed, 11. Jul 07, 19:50
x4

Re: [WIP] Foundation of Conquest and War

Post by Raven78 » Sun, 2. Dec 18, 11:29

Hell yea loved the Mod for Rebirth.
Only Reason i had like 200 Hours in that Game ;)
I´d like to see Patrol Fleets, Sector Defense Fleets, Assault Fleets and as others have said a real Pirate Faction.
Im not far into the Game so i really havent figured out yet how the base Games handles these Things.
Oh and maybe a long term Goal.
Doesnt have to be like a Plot, just something you look forward to work on .
Like an M0 from older Games you can earn or similar.

Perkel
Posts: 170
Joined: Tue, 12. Oct 10, 09:00
x4

Re: [WIP] Foundation of Conquest and War

Post by Perkel » Sun, 2. Dec 18, 12:25

Loved your X-rebirth work and only reason why i scored 200 hours in it after initial 50 that soured me.
Hope you go wild with it.

Iosevus
Posts: 18
Joined: Wed, 20. Nov 13, 09:14
x4

Re: [WIP] Foundation of Conquest and War

Post by Iosevus » Sun, 2. Dec 18, 19:48

Is it possible to have the ship job numbers be dynamic and change according to the faction state/needs?

I imagine after a big loss seeing a faction hunkering down and fortify gates and then increase production ships to pump out more resources. Possibly selling off those ships (If that is even possible) after they reach a point of stability.

User avatar
mr.WHO
Posts: 8534
Joined: Thu, 12. Oct 06, 17:19
x4

Re: [WIP] Foundation of Conquest and War

Post by mr.WHO » Sun, 2. Dec 18, 19:51

I'm looking forward to this mod.
CWIR saved X-Rebirth for me, so I'm curious what will you improve in X4.

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

Re: [WIP] Foundation of Conquest and War

Post by BlackRain » Sun, 2. Dec 18, 21:49

Iosevus wrote:
Sun, 2. Dec 18, 19:48
Is it possible to have the ship job numbers be dynamic and change according to the faction state/needs?

I imagine after a big loss seeing a faction hunkering down and fortify gates and then increase production ships to pump out more resources. Possibly selling off those ships (If that is even possible) after they reach a point of stability.
Not sure because jobs only specifies the quotas, like max number of ships allowed to build, etc. There may be other scripts controlling things also making it more dynamic. Like they may only build when certain criteria is met or it may be related to resources, etc.

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

Re: [WIP] Foundation of Conquest and War

Post by BlackRain » Mon, 3. Dec 18, 02:30

Anyone want to help with testing edited jobs file? I also edited the script which handles how many stars recruits have.

Privata
Posts: 706
Joined: Mon, 19. Dec 11, 22:59
x4

Re: [WIP] Foundation of Conquest and War

Post by Privata » Mon, 3. Dec 18, 16:40

Do you know if Xenon can take over systems? I love that they expand in Xenon space and even send out fleets but they seem a bit conservative with how many ships they build (For a race that only goal in life is to "terraform" everything)
I think if they could be made more aggressive the dynamic would change tenfold.

Its great to see you working on this again, it means I dont need to make that terribly unbalanced crap I did for Rebirth lol

bugkill
Posts: 13
Joined: Fri, 5. Mar 04, 02:08
xr

Re: [WIP] Foundation of Conquest and War

Post by bugkill » Mon, 3. Dec 18, 17:29

I enjoyed your previous work in X:R and will look forward to your contribution to X4. The question I have (or basically a request) is if it is possible to have random armed (or have fighter support) transport ships filled with marines that have the sole purpose of hunting and boarding capital ships? I don't remember ever seeing this happen with the AI and I think it would be awesome to see it in a mod like this.
Last edited by bugkill on Mon, 3. Dec 18, 23:53, edited 1 time in total.

bicheichane
Posts: 2
Joined: Sun, 2. Dec 18, 14:15
x4

Re: [WIP] Foundation of Conquest and War

Post by bicheichane » Mon, 3. Dec 18, 18:42

BlackRain wrote:
Mon, 3. Dec 18, 02:30
Anyone want to help with testing edited jobs file? I also edited the script which handles how many stars recruits have.
How can I help? :)

User avatar
Drewgamer
Posts: 536
Joined: Fri, 27. Aug 10, 08:39
x4

Re: [WIP] Foundation of Conquest and War

Post by Drewgamer » Mon, 3. Dec 18, 19:04

BlackRain wrote:
Sun, 2. Dec 18, 05:20
[...]

2) I looked through the script handling the gaining of experience for staff. Currently, staff gains experience when completing missions (like fighting other ships, trading, fleeing from battle, doing nothing, etc.) This also affects stations (managers). I am going to increase the speed of which staff levels up (there are now a total of 15 levels I am told for skills) Although this is only 5 stars (there are 3 levels per star)

[...]
This one is important for me. I like the idea of buying rookies and training them up, but currently it takes way too long (if it's working at all).
Have you been able to confirm if staff actually does level up? Or perhaps you could point me in the right direction of where these scripts are located so I can do some testing of my own? :D
Check out my mod Crystal Rarities

Firefox4312
Posts: 1
Joined: Mon, 3. Dec 18, 21:44
x4

Re: [WIP] Foundation of Conquest and War

Post by Firefox4312 » Mon, 3. Dec 18, 22:32

BlackRain wrote:
Mon, 3. Dec 18, 02:30
Anyone want to help with testing edited jobs file? I also edited the script which handles how many stars recruits have.
I'm down to help, just send me whatever

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

Re: [WIP] Foundation of Conquest and War

Post by BlackRain » Mon, 3. Dec 18, 22:47

Drewgamer wrote:
Mon, 3. Dec 18, 19:04
BlackRain wrote:
Sun, 2. Dec 18, 05:20
[...]

2) I looked through the script handling the gaining of experience for staff. Currently, staff gains experience when completing missions (like fighting other ships, trading, fleeing from battle, doing nothing, etc.) This also affects stations (managers). I am going to increase the speed of which staff levels up (there are now a total of 15 levels I am told for skills) Although this is only 5 stars (there are 3 levels per star)

[...]
This one is important for me. I like the idea of buying rookies and training them up, but currently it takes way too long (if it's working at all).
Have you been able to confirm if staff actually does level up? Or perhaps you could point me in the right direction of where these scripts are located so I can do some testing of my own? :D
I have confirmed with someone at ego that this is working. It is just so slow I guess you never notice. I am going to play around with the scripts and see what I can do. I will put up some files for download when I do some basic testing and such. This will include faster training of crew and new jobs with lots more enemies.

User avatar
Drewgamer
Posts: 536
Joined: Fri, 27. Aug 10, 08:39
x4

Re: [WIP] Foundation of Conquest and War

Post by Drewgamer » Mon, 3. Dec 18, 23:51

BlackRain wrote:
Mon, 3. Dec 18, 22:47
I have confirmed with someone at ego that this is working. It is just so slow I guess you never notice. I am going to play around with the scripts and see what I can do. I will put up some files for download when I do some basic testing and such. This will include faster training of crew and new jobs with lots more enemies.
Your work is muchly appreciated! I look forward to whatever you're able to come up with :)
Check out my mod Crystal Rarities

VariousArtist
Posts: 27
Joined: Wed, 20. Nov 13, 10:59
xr

Re: [WIP] Foundation of Conquest and War

Post by VariousArtist » Tue, 4. Dec 18, 16:06

BlackRain wrote:
Sun, 2. Dec 18, 05:20
To be clear, this isn't bringing CWIR to Foundations. This is something different and new.
Different and new! Hell, YES! ...Make it like Litcube..... *coughcough*

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

Re: [WIP] Foundation of Conquest and War

Post by BlackRain » Tue, 4. Dec 18, 16:56

VariousArtist wrote:
Tue, 4. Dec 18, 16:06
BlackRain wrote:
Sun, 2. Dec 18, 05:20
To be clear, this isn't bringing CWIR to Foundations. This is something different and new.
Different and new! Hell, YES! ...Make it like Litcube..... *coughcough*
Heh, lol oops. When I said different and new, I actually meant probably not as extensive as CWIR. I don't know yet what the game needs or what I will do but I don't have as much time as I used to. We will see haha

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

Re: [WIP] Foundation of Conquest and War

Post by BlackRain » Tue, 4. Dec 18, 17:17

I tested that my changes to training work so it is just a matter of time of finding the right balance. Anyone have good ideas on how long they feel it should take to train? This will use the games already existing training methods, just change how long it takes for it to happen.

Still testing Jobs but I want to release something soon. How many ships do you guys want to see in the game?

Anyway, soon will have something to download which does the following:

1) Find NPC's on stations with more variety in their skill levels (from 0 to 5 stars). This will not increase how many npcs on stations, it uses the regular games already existing scripts. Just changes their level of experience to random.

2) Edited jobs, more ships all around!

3) Faster training than original but still using the same logic.

Post Reply

Return to “X4: Foundations - Scripts and Modding”