How would one go about adding drones to TER defensive modules?

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

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

Post Reply
Midnitewolf
Posts: 564
Joined: Tue, 23. Mar 21, 06:18

How would one go about adding drones to TER defensive modules?

Post by Midnitewolf » Thu, 15. Apr 21, 07:14

I just realized none of my TER defensive platforms were using defensive drones or actually repairing hull damage and when I went in to increase my drone count, I found they were all locked at 20 drones max. Upon investigation, apparently unlike all the other factions TER defensive structures don't add additional drone capacity to the the station.

I just reported it as a bug but that doesn't solve the issue of my defensive stations not having enough drones to even repair effectively let alone defend itself right now so I am wondering if this is something that I can actual edit fairly easy with little to no knowledge of any sort of modding?

chip56
Posts: 500
Joined: Mon, 13. Apr 20, 21:52

Re: How would one go about adding drones to TER defensive modules?

Post by chip56 » Thu, 15. Apr 21, 09:07

You can extract the terran dlc cat file with the x editor. if you use steam you can download that under tools.
Then you should have a file defence_ter_disc_01_macro.xml
Add " <storage unit="15" />" there

Midnitewolf
Posts: 564
Joined: Tue, 23. Mar 21, 06:18

Re: How would one go about adding drones to TER defensive modules?

Post by Midnitewolf » Thu, 15. Apr 21, 17:37

chip56 wrote:
Thu, 15. Apr 21, 09:07
You can extract the terran dlc cat file with the x editor. if you use steam you can download that under tools.
Then you should have a file defence_ter_disc_01_macro.xml
Add " <storage unit="15" />" there
You sir rock. I actually think I can do this.

Midnitewolf
Posts: 564
Joined: Tue, 23. Mar 21, 06:18

Re: How would one go about adding drones to TER defensive modules?

Post by Midnitewolf » Thu, 15. Apr 21, 18:07

Ok not so straightforward as I thought hehe. I knew it couldn't be that easy.

I downloaded "X Tools" and I am assuming I want to use the "X Catalog Tool" which appears to allow me to import catalogs and extract them but here is where it gets fuzzy.

I got to the ego_dlc_terran folder in the extensions folder and see 6 cat files that don't really tell me much about what they are. They are labeled:

ext_01.cat
ext_01_sig.cat
ext_02.cat
ext_02_sig.cat
ext_03.cat
ext_03.sig.cat

So not sure which one I should be looking at. Also once I find what I am looking for, I see I can extract the entire catalog or just the file so which do I do. Also, what do I do once I extract the file(s) files, edit them and want to save them? Is it pretty obvious or are there a few steps involved?

By the way, anyone that is assisting, thank you ever so much with your patience. Aside from some Visual Basic goofing off I did back about 25 years ago, I know nothing about modifying anything any more difficult than a simple notepad edit though games like X4 and Bannerlord really make me wish I had the skills to actually create all the "fixes" I could ever want hehe.

Gomboc
Posts: 11
Joined: Tue, 9. Jan 07, 14:43
x4

Re: How would one go about adding drones to TER defensive modules?

Post by Gomboc » Thu, 15. Apr 21, 22:20

Midnitewolf wrote:
Thu, 15. Apr 21, 18:07
Ok not so straightforward as I thought hehe. I knew it couldn't be that easy.

I downloaded "X Tools" and I am assuming I want to use the "X Catalog Tool" which appears to allow me to import catalogs and extract them but here is where it gets fuzzy.

I got to the ego_dlc_terran folder in the extensions folder and see 6 cat files that don't really tell me much about what they are. They are labeled:

ext_01.cat
ext_01_sig.cat
ext_02.cat
ext_02_sig.cat
ext_03.cat
ext_03.sig.cat

So not sure which one I should be looking at. Also once I find what I am looking for, I see I can extract the entire catalog or just the file so which do I do. Also, what do I do once I extract the file(s) files, edit them and want to save them? Is it pretty obvious or are there a few steps involved?

By the way, anyone that is assisting, thank you ever so much with your patience. Aside from some Visual Basic goofing off I did back about 25 years ago, I know nothing about modifying anything any more difficult than a simple notepad edit though games like X4 and Bannerlord really make me wish I had the skills to actually create all the "fixes" I could ever want hehe.
You need to create a mod with a xml patch.
- Create a folder inside the "extensions" (located inside the X4 install directory) folder with a name like "terdefplatfix"
- Inside the "terdefplatfix" folder you need the create the correct directory structure which is:
"extensions\ego_dlc_terran\assets\structures\defence\macros"
- Inside the "macros" folder you need two xmls, one for the disc and one for the tube defense platforms:

defence_ter_disc_01_macro.xml :

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff>
 <add sel="//macros/macro[@name='defence_ter_disc_01_macro']/properties">
  <storage unit="15" />
 </add>
</diff>
defence_ter_tube_01_macro.xml :

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff>
 <add sel="//macros/macro[@name='defence_ter_tube_01_macro']/properties">
  <storage unit="15" />
 </add>
</diff>
- You will also need a content.xml in the "terdefplatfix" folder :

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<content id="terdefplatfix" name="TerDefPlatFix" description="Terran Defense Platform Fix" author="yourname" version="100" date="2021-04-15" save="0" enabled="1">
 <dependency id="ego_dlc_terran" optional="false" name="Cradle of Humanity" />
 <text language="7" name="TerDefPlatFix" description="Terran Defense Platform Fix" author="yourname" />
 <text language="33" name="TerDefPlatFix" description="Terran Defense Platform Fix" author="yourname" />
 <text language="34" name="TerDefPlatFix" description="Terran Defense Platform Fix" author="yourname" />
 <text language="39" name="TerDefPlatFix" description="Terran Defense Platform Fix" author="yourname" />
 <text language="44" name="TerDefPlatFix" description="Terran Defense Platform Fix" author="yourname" />
 <text language="49" name="TerDefPlatFix" description="Terran Defense Platform Fix" author="yourname" />
 <text language="55" name="TerDefPlatFix" description="Terran Defense Platform Fix" author="yourname" />
 <text language="81" name="TerDefPlatFix" description="Terran Defense Platform Fix" author="yourname" />
 <text language="82" name="TerDefPlatFix" description="Terran Defense Platform Fix" author="yourname" />
 <text language="86" name="TerDefPlatFix" description="Terran Defense Platform Fix" author="yourname" />
 <text language="88" name="TerDefPlatFix" description="Terran Defense Platform Fix" author="yourname" />
</content>
- In windows 10 mods work unpacked but if you use windows 7 then the mod needs to be packed (into ext_01.cat/dat) with the X Catalog Tool.

BlackDracis
Posts: 7
Joined: Fri, 26. Feb 16, 20:29
x4

Re: How would one go about adding drones to TER defensive modules?

Post by BlackDracis » Fri, 16. Apr 21, 17:57

You know it be real cool if someone could actually made a drone station module.

Post Reply

Return to “X4: Foundations - Scripts and Modding”