Help with lights please

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

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

antoniut
Posts: 198
Joined: Sat, 4. Oct 14, 13:07
x4

Help with lights please

Post by antoniut »

I would like to "down" the ambient light inside cockpit, but i have no idea where is the "switch" :D

Any idea?

Thanks


EDIT 1

It could be this inside unit_player_ship-xml maybe?

Code: Select all

<lights>
					<spot name="XU Spot01" angle="45" gradientindex="1" range="500" r="0" g="0" b="0" lighteffect="1" trigger="1" intensity="1">
						<lightanimations/>
						<offset>
							<position x="1.378943" y="-2.50185" z="-0.7779036"/>
							<quaternion qx="0.7372773" qy="-0" qz="-0" qw="-0.6755902"/>
						</offset>
					</spot>
				</lights>
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Hey antoniut,

Wouldn't it be in one of units_player_cockpit_ files? You'd probably know better than I do though.

Nice to see you back!
antoniut
Posts: 198
Joined: Sat, 4. Oct 14, 13:07
x4

Post by antoniut »

Hi Mr. Evans! How are you? Hope well

Dunno yet where is it. I'm trying this at this moment:

Code: Select all

<diff>    
<replace sel="/components/component[@name='units_player_ship']/layers/layer/lights" >        
		<lights>
		    <spot name="XU Spot01" angle="45" gradientindex="1" range="500" r="0" g="0" b="0" lighteffect="1" trigger="1" intensity="0.1">
			<lightanimations/>
			<offset>
				<position x="1.378943" y="-2.50185" z="-0.7779036"/>
				<quaternion qx="0.7372773" qy="-0" qz="-0" qw="-0.6755902"/>
			</offset>
			</spot>
		</lights>				
</replace>	
</diff>
	
but doesn't work:

Code: Select all

=ERROR=] 5895.71 Cannot match path '/components/component[@name='units_player_ship']/layers/layer/lights' in patch file 'extensions\mis_cockpit_graphics\assets\units\player\unit_player_ship'. Skipping node.
Any idea why?

Thanks

EDIT 1
Forgot original:

Code: Select all

<components>
	<component name="unit_player_ship" class="ship_m">
		<source geometry="assets\units\player\unit_player_ship_data"/>
		<layers>
			<layer>
				<waypoints/>
				<lights>
					<spot name="XU Spot01" angle="45" gradientindex="1" range="500" r="0" g="0" b="0" lighteffect="1" trigger="1" intensity="1">
						<lightanimations/>
						<offset>
							<position x="1.378943" y="-2.50185" z="-0.7779036"/>
							<quaternion qx="0.7372773" qy="-0" qz="-0" qw="-0.6755902"/>
						</offset>
					</spot>
				</lights>
			</layer>
		</layers>
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

antoniut wrote: <replace sel="/components/component[@name='units_player_ship']/layers/layer/lights" >
your attempt will still not be successful though - the light you try to replace here is the headlight of the Skunk, not an Internal Light of the CP.
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 ;)
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Uni beat me to it. Although I didn't know about it being a headlight!

Also, if all you wanted to change was that one number, would be a lot less intrusive if you did:

<replace sel="/components/component[@name='unit_player_ship']/layers/layer/lights/spot[@name='XU Spot01']/@intensity">0.1</replace>

or, since that file only has the one spotlight with that name:

<replace sel="//spot[@name='XU Spot01']/@intensity">0.1</replace>
antoniut
Posts: 198
Joined: Sat, 4. Oct 14, 13:07
x4

Post by antoniut »

UniTrader wrote:
antoniut wrote: <replace sel="/components/component[@name='units_player_ship']/layers/layer/lights" >
your attempt will still not be successful though - the light you try to replace here is the headlight of the Skunk, not an Internal Light of the CP.
Ouch! :D Thanks!
antoniut
Posts: 198
Joined: Sat, 4. Oct 14, 13:07
x4

Post by antoniut »

UniTrader wrote:
antoniut wrote: <replace sel="/components/component[@name='units_player_ship']/layers/layer/lights" >
your attempt will still not be successful though - the light you try to replace here is the headlight of the Skunk, not an Internal Light of the CP.
Ouch! :D Thanks!

I will keep searching for the switch

@ Evans Thanks again.

Edit 1 Oops sorry for double post

Return to “X Rebirth - Scripts and Modding”