[Question] 'External' dock, possible?

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

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

User avatar
Axeface
Posts: 3034
Joined: Fri, 18. Nov 05, 00:41
x4

[Question] 'External' dock, possible?

Post by Axeface »

Hi, I'm planning a ship im making and I need to know whether something is possible in order to decide what i'm going to do with it.

Is an external dock, like in X3 possible in X4? Mechanically it would be a simple dock position without the dock mesh, and the player would have to go to their ships transporter and they would get an option for 'bridge' on the host ship only (no dock area and no possibility for ship to get 'stored', player ship should not open its doors/canopy).
Also, is it absolutely necessary for a dock to be aligned horizontally? (I would like to put 2 vertical S docks on the side of a ship).

Cheers
Gallery of my X ships and fanart eg, Boron Megalodon
My wishlist
Disclaimer: Axeface will ignore 'don't like it don't use it' responses :wink:
User avatar
Shuulo
Posts: 1633
Joined: Mon, 14. Apr 08, 17:03
x4

Re: [Question] 'External' dock, possible?

Post by Shuulo »

There is no external dock on any vanilla ship, and I believe games logic is built upon assumption that player can leave docked ship and walk into elevator, so I do not think its possible.

I guess you can put docks in any position/rotation. they may have some pathing issues though, if there is a lot of ship mesh near it.
YellowBelllyBlackSnake
Posts: 19
Joined: Sun, 12. Jan 14, 23:05
x4

Re: [Question] 'External' dock, possible?

Post by YellowBelllyBlackSnake »

It's definitely possible! I managed to create a Mercury Vanguard transport with two external docks by using dockingbay_gen_s_inv_macros.

The only thing that didn't work was using the shipboard teleporter to travel between ships, but you could still use the move to ship option to travel between them. There was also some pathing problems if a docking ship was on the opposite side of the Mercury transport when ordered to dock.

Here's the code I used for the macro file.

Code: Select all

<diff>
	<add sel="//connections">
		<connection ref="con_dockarea_arg_s_ship_01">
			<macro ref="dockingbay_gen_s_inv_macro" connection="con_component01" />
		</connection>
		<connection ref="con_dockarea_arg_s_ship_02">
			<macro ref="dockingbay_gen_s_inv_macro" connection="con_component01" />
		</connection>
	</add>
</diff>
and the code for the component file

Code: Select all

<diff>
	<add sel="//connections">
		<connection name="con_dockarea_arg_s_ship_01" tags="dockingbay">
			<offset>
				<position x="-15" y="0" z="25"/>
				<quaternion qx="-0" qy="-0" qz="-0.7071066" qw="-0.7071069"/>
			</offset>
		</connection>
		<connection name="con_dockarea_arg_s_ship_02" tags="dockingbay">
			<offset>
				<position x="15" y="0" z="25"/>
				<quaternion qx="-0" qy="-0" qz="0.7071067" qw="-0.7071068"/>
			</offset>
		</connection>
	</add>
</diff>
User avatar
Shuulo
Posts: 1633
Joined: Mon, 14. Apr 08, 17:03
x4

Re: [Question] 'External' dock, possible?

Post by Shuulo »

oh wow, ok, i was wrong, now need to see how many bugs this can cause :)
User avatar
Axeface
Posts: 3034
Joined: Fri, 18. Nov 05, 00:41
x4

Re: [Question] 'External' dock, possible?

Post by Axeface »

Thanks for the replies and code, its great to here its possible. I'm getting tripped up with even the most simple things on my first ship however so I wont be trying to tackle docks on this one.
Gallery of my X ships and fanart eg, Boron Megalodon
My wishlist
Disclaimer: Axeface will ignore 'don't like it don't use it' responses :wink:

Return to “X4: Foundations - Scripts and Modding”