Page 1 of 1

Child object headlight

Posted: Sun Sep 13, 2015 8:19 pm
by faedundee2
Could someone please be able to advise me what the code is and where to place it to get the child object headlight onto the front of the Kuju split headcode box 37? I have had a look through the code of ones I have already that have the headlight but cannot find where the actual headlight is called up at.
Thanks in advance.

Re: Child object headlight

Posted: Sun Sep 13, 2015 10:03 pm
by gptech
It'll be a child object, so towards the bottom of the .bin file.

If you've been looking in .bin files of reskins that have the headlight fitted They could be referencing the class 47 object from the RW2 Default reskins in the UKTS freepack.

Look for a section that looks something like:

Code: Select all

						<cEntityContainerBlueprint-sChild d:id="29109648">
							<ChildName d:type="cDeltaString">MainHeadlight1</ChildName>
							<BlueprintID>
								<iBlueprintLibrary-cAbsoluteBlueprintID>
									<BlueprintSetID>
										<iBlueprintLibrary-cBlueprintSetID>
											<Provider d:type="cDeltaString">Kuju</Provider>
											<Product d:type="cDeltaString">RailSimulator</Product>
										</iBlueprintLibrary-cBlueprintSetID>
									</BlueprintSetID>
									<BlueprintID d:type="cDeltaString">RailVehicles\Diesel\Class47\FP RW2 Default\Engine\headlight.xml</BlueprintID>
								</iBlueprintLibrary-cAbsoluteBlueprintID>
							</BlueprintID>
							<Matrix>
								<cHcRMatrix4x4>
									<Element>
										<e d:type="sFloat32" d:alt_encoding="000000000000F0BF" d:precision="string">-1</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="000000000000F0BF" d:precision="string">-1</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="000000608FC2C5BF" d:precision="string">-0.17</e>
										<e d:type="sFloat32" d:alt_encoding="000000C01E85F73F" d:precision="string">1.47</e>
										<e d:type="sFloat32" d:alt_encoding="000000803D8A2240" d:precision="string">9.27</e>
										<e d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</e>
									</Element>
								</cHcRMatrix4x4>
							</Matrix>
						</cEntityContainerBlueprint-sChild>
						<cEntityContainerBlueprint-sChild d:id="29109648">
							<ChildName d:type="cDeltaString">MainHeadlight2</ChildName>
							<BlueprintID>
								<iBlueprintLibrary-cAbsoluteBlueprintID>
									<BlueprintSetID>
										<iBlueprintLibrary-cBlueprintSetID>
											<Provider d:type="cDeltaString">Kuju</Provider>
											<Product d:type="cDeltaString">RailSimulator</Product>
										</iBlueprintLibrary-cBlueprintSetID>
									</BlueprintSetID>
									<BlueprintID d:type="cDeltaString">RailVehicles\Diesel\Class47\FP RW2 Default\Engine\headlight.xml</BlueprintID>
								</iBlueprintLibrary-cAbsoluteBlueprintID>
							</BlueprintID>
							<Matrix>
								<cHcRMatrix4x4>
									<Element>
										<e d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</e>
										<e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
										<e d:type="sFloat32" d:alt_encoding="0000002085EBC13F" d:precision="string">0.14</e>
										<e d:type="sFloat32" d:alt_encoding="000000A047E1F63F" d:precision="string">1.43</e>
										<e d:type="sFloat32" d:alt_encoding="000000205C8F22C0" d:precision="string">-9.28</e>
										<e d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</e>
									</Element>
								</cHcRMatrix4x4>
							</Matrix>
						</cEntityContainerBlueprint-sChild>
The paths to the headlight.bin (shown as .xml in RW Tools) file on your system might not match how I've butchered things, if so just amend as necessary.

You'll have to change the figures in the matrix too, the ones above are for the 47 so wont match the length of the 37. The figures of 9.27 and -9.28 (15th entry in each matrix) are the distance in metres from the loco centre, 13th entry is the offset (left/right) from centre and the 14th the height from the rails (I think----just have a play around and test in game)