[HELP] Space Tow Truck

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

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

BigGreenThugs
Posts: 94
Joined: Thu, 26. Mar 20, 16:50
x4

[HELP] Space Tow Truck

Post by BigGreenThugs »

I have not published any mods, I have tried a few small things that worked and some that haven't. I have edited a few mods to better suit my specific needs so I have a basic understanding of modding.
What I would like to do is to give specific ships in the game the "carrier" or the "resupplier" ability.

I'd like the Osprey Frigates (or frigates in general) to be like space tow trucks and be able to repair fighters. The scope would be severely limited due to cargo hold size.

My other thought on this was the Behemoth Destroyers. They were not good when compared to the Odysseus. They are woefully outgunned compared to the Rattlesnake, however, they are the only Destroyer with 4x small docks. If they were considered a light carrier (repair/resupply), engaging targets at max range, with a compliment of 20-30 fighters, the Behemoth would be a different animal.

What I have tried for this has failed, I do not get the option to repair. This is what I have tried.
In extensions\repair\assets\units\size_l is ship_arg_l_destroyer-01.xml with:

Code: Select all

<diff> 
	<add sel="//components/component/connections">			
		<connection name="con_buildmodule" tags="buildmodule">
			<offset>
				<position x="0" y="0" z="0.0"/>
			</offset>
		</connection>
		<connection name="con_shiptradernpc" value="-1" tags="shiptrader ">
			<offset>
				<position x="0" y="0" z="0"/>
			</offset>
		</connection>
	</add> 
</diff>
AND in extensions\repair\assets\units\size_l\macros the file ship_arg_l_destroyer_01_a_macro.xml

Code: Select all

<diff> 
	<add sel="//macros/macro/connections">
	    	<connection ref="con_buildmodule">
			<macro ref="buildmodule_gen_carrier_macro" connection="object" />
            	</connection>
	</add> 
</diff>
I have tried replacing the ship type from destroyer to carrier.
I tried creating a buildmodule_gen_destroyer_macro
There are no errors in the debug log (other than signature)
What am I missing? There has got to be a way to make this work.
Thanks for taking the time to read this.

Return to “X4: Foundations - Scripts and Modding”