Question - How to make the external docking bay invisible ?

The place to discuss scripting and game modifications for X Rebirth.

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

dertien
Posts: 283
Joined: Tue, 22. Feb 05, 13:27
x2

Question - How to make the external docking bay invisible ?

Post by dertien »

Ok,

I've been trying to get rid of the "box" visual that represents the docking bay of the Skunk. I'm making a Triath player ship which is very sleek, and the box is bigger than any part I can hide it in:

Here's a screenshot of what I mean:

Image

Adding code to the unit_player_ship.xml to remove the drone bay and re-adding one directly underneath it with a reference to a transparent dds image did not work:

Here's the code:

Code: Select all

<remove sel="/components/component[@name='unit_player_ship']/connections/connection[@name='Connection01']">
		
</remove>
	
	
<add sel="/components/component[@name='unit_player_ship']/connections">
	<connection name="Connection01" tags="part  ">
				<offset>
							<position x="0" y="5.1" z="-28"/>
							<rotation yaw="0" pitch="0" roll="0"/>
				</offset>
				<parts>
					<part name="part_player_drone_lb">
						<lods>
							<lod index="0">
								<materials>
									<material id="1" ref="dummy.transparent"/>
								</materials>
							</lod>
						</lods>
						
						<size>
							<max x="3.148481" y="2.100149" z="5.843072"/>
							<center x="0" y="0" z="-0.1108739"/>
						</size>
					</part>
				</parts>
				<waypoints/>
			</connection>
			<connection name="Con_launchpos" tags="launchpos " parent="part_player_drone_lb">
				<offset>
					<position x="9.411871E-04" y="-2.649278E-02" z="3.557141"/>
					<quaternion qx="-0" qy="-1" qz="-0" qw="7.54979E-08"/>
				</offset>
			</connection>
			<connection name="Con_todock" tags="todock " parent="part_player_drone_lb">
				<offset>
					<position x="3.038025E-02" y="2.48057E-03" z="-39.83282"/>
					<quaternion qx="7.022142E-09" qy="1.306566E-07" qz="-0.7071068" qw="0.7071068"/>
				</offset>
			</connection>
			<connection name="Connection_component" tags="component dock_xs ">
				<offset/>
	</connection>
</add>
Making a new unit_player_dronelaunchbay.xml with a <diff> tag in did nothing either.

I know this is the right one, because I can move the box's offset position (xyz) in the code above. However referencing it to a different material from the library (like dummy.transparent instead of player.player_trims) does not seem to work.

Anyone any ideas, cause I really want to get rid of this box, but keep the drone bay spawn point for obvious reasons.

removing the Connection01 entirely removes the box, but also the drone bay, so that's not really an option.

Thanks
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

the material in the macro/component xml is irrelevant. you have to change it in the referenced xmf file. this is a simple search-and-replace operation, just make sure the texture name is the same length byte-wise and fill unneeded chars with the nul character.
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
dertien
Posts: 283
Joined: Tue, 22. Feb 05, 13:27
x2

Post by dertien »

Hi UniTrader,
UniTrader wrote:the material in the macro/component xml is irrelevant.
That starts to make more sense now...

However;

I tried that, and the search operation is pretty straightforward... however, the replace operation is a different matter.

Tried to change this file: 'part_player_drone_lb-lod0.xmf'

Found the relevant reference in plain text like you said: player.player_trims in 'part_player_drone_lb-lod0.xmf' and tried to replace the it with 'dummy.transparent'

Code: Select all

XUMF @ ¼ˆ u   ½                                                                  ^  u                                              X    X   X   dw   
 dw­￾?nþÿÿÿ­[wÅ«[w￾      ￾            ;       ; d¢) 57H   1óK  TöŠ       ^            Ø   ½                       ]@    øs¨ðr
  …"€   ðúŠûŠ0÷+   H÷+ðúŠ“¤[wP÷+P÷+   ûŠCDcu  ;     H÷+PûŠ9Lîs  ;     XLîsÔ
P÷+„ûŠ   ëêùs` í       ½   player.player_trims                                                                                                             xÚ•–Mh\UÇ￾G,! Ș6Éš‰A„)ofxóæ+3Òy‘ÉFp!R14
bK»KD“;￾–âÆ•ŠÆMK©ËîÒùÄlãRgãFH‹´›àtüÌó¼7ïÞ{î›W®®œÿ=÷œÿ9÷NwSÍßö€1`G«ðb&š_ìöÏY˜][[[Ÿéîä|î°Ã=ø2­òjw?'ãw￾Gü\SÆ/B4£ò™2ÑäP¿,ùt9%ã'!ƒ¼Lxµ|Næ?¾Š<àûýˆ¢Ÿ.­D|ùÞNFóvé	ùÅzp#¡æ§è#ÿ,¡êWKßKýw￾à½dDÑ·:¶ß›„·°þËrMtõ]é¼Öñ;ãðrª¯ëoºCêóí¬ ·I|µCîwïÎbÿ®ñ‡®¿V‰ÔguN"_&õ[)‘û-NBûK¹ÎNë²ÌÿîCx	ï7Ñ–ü¯ÆXQð¯ú°kFóãM’3QùcüM3¢ðçÛ?Hý¯ûp
ï¯èçÇdü롚BýÉo￾äw¾wÑŸE¢_$úßAQ>]HÈü/ôá￾TäéëæCço]~:éú£«¯ÎŸaýUxHèýÂê«ðP}$mÁÀR6š¡öß÷ƒn¾’{úU_3_ºütúºùäþc°å|^{
NœXÔÎÂÅÂÞ’Ë™ó
ƒ¿ãgÍû³9—£êz¢tÉçÃø[FÚœ+IÎýË`Óù´Ð4[ÊþõïÏŽÝûƒa
,šŸQzºíéûÜ´lETÞÊÚ&ÀË‚óúI>°h}H<l`ý‚ñFGò￾§­¸9בçsðxÃê[Ë!þrù'ž¾zþ£Æ³E^_·™{©›
©ÿ(¯ò\y^r>œrZ_>_œ˜ANòKtxÿjðqín¶r?§%úaýþ‰/™Z”sÿãŸsýÓÝ/ê°Y?††ñ»e‡¼îÛ]ëõà»äÀRÿ?_ä¼ó‘בßIVÌgºÄ<?>˜¿89C¾k”óEÿz.￾Áiׄ‹þû|ÖRõgºñ&å×Ò¶’ÿ?H®ÞOôgê ØÁ/ðþüÀ¢ï—¨¯Ï￾«õýñy°?Â_>¯Ì/™Ô_bþ§Î8õƒ©¡~qtÿº¼†ü¢›y¿„?ýøÊ¼mRŠý￾|ù÷G,æ\úindÌ”yÿcÎê￾¯Ànë[¦œûgÇõOÈÿÒåXÿÛF_Ù?üÿƒ³á¸3zûCÿ'Bßç·ú"?Ÿ￾æçûy
ùµtEåÜÿÌ¡ßýº»‹ç§Îׯý'æùòàüˆüz1g=ÌOì_ŸÏZ¥?bûüt`‹ú"gž¾Z_î_þ~]ÉÞO*þõýE9õ÷·Â£þ£œú￾÷Ïãõ!WîïÏ?Ô\Ø:	—³’êü“øM@Žñ!û‰Ÿïò°ýáñ«àéÓx^Øfðæö«˜žòþÁuæi¸œ¾_|¾èýÕù"ç_/žÞÿ_.ÚzxÚÊ…NAÑÂÝÝeqww]ÜÝ}￾YXàÿC…TÒ÷ä¥!￾DK’I!ÕÒT:dZ–Ê&‡\ËSùPhEª˜J­L•SA¥U©jj¨µ:UO￾QM4Ób­ª￾v:¬SuÑM￾õª>ú°A5Ä0#6ªÆgÂ&ÕÓÌØ¬šcž[TK,³b«*Êë¶¡6ÙbÛvÔ.{ìÛ￾:äˆc;Q§œqnê’+®íFÝrǽ=¨Gžx¶ðÊ›ï»ðá„n@Ì
øtc|é￾¸÷￾ïÿýñgœ_õªš-H
So I opened notepad++,

player.player_trims (19 chars)
dummy.transparent (17 chars)

Added 2 binary nul values (with copy binary content) after 'dummy.transparent' to make it 19 chars in length to match the original player.player_trims, because that is how I understood your explanation.

Pardon my ignorance I am not a programmer, and obviously doing something wrong here but no clue how to make it work.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

forgot to mentoin if you want to replace an existing File you have to put it in a subst_01.cat/dat under the original Path.

or you use a new mesh file inside your mod for it, like i did for my logos in the Logo mod, here some reference files:
Logo Mesh (for this mostly irrelevant - in your case its simply your edited mesh):
https://github.com/UniTrader/UTFactionL ... n-lod0.xmf
Logo component File (references the aforementoined mesh in line 4 - with full path from XR.exe):
https://github.com/UniTrader/UTFactionL ... rd_10m.xml
this file also as a macro file refering to it each has an entry in the respective index-files, but since you add a new Player Ship type i think you already know about these.. use this component/macro in your new Playership macro instead of the original. a Copy of the Original file with altered id and mesh path is enough - you only want to change the looks, not the function ;)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
pref
Posts: 5625
Joined: Sat, 10. Nov 12, 17:55
x4

Post by pref »

Never edit binary files with text editors, they usually mess it up.
Use a hex editor (for ex XVI32).

You need to be careful to not change the file size, as tht can kill the whole file - thats why you have to fill the string with 0s up to the original size in case your name is shorter. But best is to pick a name with the same length.
dertien
Posts: 283
Joined: Tue, 22. Feb 05, 13:27
x2

Post by dertien »

Ok that makes sense although its still a complicated affair for just wanting to get rid of a box. Not sure why Ego made this a seperate mesh with its own texture.

I will need to have a look at this thoroughly before coming back to you guys here with results. Its' not as easy as just swapping gun models out; which is a bit odd, since this can be done by simple renaming 3d mesh files to the appropriate gun names.

Thank you for your replies both, UniTrader and Pref. Hope this will work out, otherwise I might still be forced to find a way to hide it somewhere after all.

Return to “X Rebirth - Scripts and Modding”