Page 1 of 2

Rolling stock to static scenic item

Posted: Sun Jul 08, 2018 7:16 pm
by RobertM
Hi all,

For my Swanage route someone has kindly contributed a repainted sleeper from WCML_S into green to represent the static sleeper at Swanage station, question is can this coach me made into a scenic item so it doesnt need to placed for each scenario the route will have?

Robert

Re: Rolling stock to static scenic item

Posted: Sun Jul 08, 2018 8:05 pm
by AndiS
You can place anything that may be a scenario-specific item permanently on the route, for all scenarios, by placing it in normal World Editor mode and not in Scenario Editor. I hope this is the answer. :D

Technical detail: there is some ValidInScenarios flag in the .bin file of each scenery item. If that is eTrue, you can (also) place this in Scenario Editor, specifically for this scenario. Normally it is eFalse and you can only place the object in normal building mode.

Could it be that things changed now and with eTrue, you cannot use an item in normal mode? I remember using something in both modes, but that was years ago.

Re: Rolling stock to static scenic item

Posted: Sun Jul 08, 2018 9:02 pm
by gptech
AndiS wrote:You can place anything that may be a scenario-specific item permanently on the route, for all scenarios, by placing it in normal World Editor mode and not in Scenario Editor
Not a Rail Vehicle Andy, there's no such category in the World Editor so they don't show as available.

All you need to do is create a Scenery Blueprint for the vehicle:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<cBlueprintLoader xmlns:d="http://www.kuju.com/TnT/2003/Delta" d:version="1.0">
	<Blueprint>
		<cSceneryBlueprint>
			<Name d:type="cDeltaString"></Name>
			<BrowseInformation>
				<iBrowseableBlueprint-cBrowseInformation>
					<DisplayName>
						<Localisation-cUserLocalisedString>
							<English d:type="cDeltaString">Name of asset to show as available in the editor</English>
							<French d:type="cDeltaString"></French>
							<Italian d:type="cDeltaString"></Italian>
							<German d:type="cDeltaString"></German>
							<Spanish d:type="cDeltaString"></Spanish>
							<Dutch d:type="cDeltaString"></Dutch>
							<Polish d:type="cDeltaString"></Polish>
							<Russian d:type="cDeltaString"></Russian>
							<Other/>
							<Key d:type="cDeltaString"></Key>
						</Localisation-cUserLocalisedString>
					</DisplayName>
					<Description>
						<Localisation-cUserLocalisedString>
							<English d:type="cDeltaString"></English>
							<French d:type="cDeltaString"></French>
							<Italian d:type="cDeltaString"></Italian>
							<German d:type="cDeltaString"></German>
							<Spanish d:type="cDeltaString"></Spanish>
							<Dutch d:type="cDeltaString"></Dutch>
							<Polish d:type="cDeltaString"></Polish>
							<Russian d:type="cDeltaString"></Russian>
							<Other/>
							<Key d:type="cDeltaString"></Key>
						</Localisation-cUserLocalisedString>
					</Description>
					<Category d:type="cDeltaString">eMisc</Category>
					<ValidInScenarios d:type="cDeltaString">eTrue</ValidInScenarios>
				</iBrowseableBlueprint-cBrowseInformation>
			</BrowseInformation>
			<RenderComponent>
				<cSceneryRenderBlueprint>
					<PrimaryNamedTextureSet>
						<iBlueprintLibrary-cAbsoluteBlueprintID>
							<BlueprintSetID>
								<iBlueprintLibrary-cBlueprintSetID>
									<Provider d:type="cDeltaString"></Provider>
									<Product d:type="cDeltaString"></Product>
								</iBlueprintLibrary-cBlueprintSetID>
							</BlueprintSetID>
							<BlueprintID d:type="cDeltaString"></BlueprintID>
						</iBlueprintLibrary-cAbsoluteBlueprintID>
					</PrimaryNamedTextureSet>
					<SecondaryNamedTextureSet>
						<iBlueprintLibrary-cAbsoluteBlueprintID>
							<BlueprintSetID>
								<iBlueprintLibrary-cBlueprintSetID>
									<Provider d:type="cDeltaString"></Provider>
									<Product d:type="cDeltaString"></Product>
								</iBlueprintLibrary-cBlueprintSetID>
							</BlueprintSetID>
							<BlueprintID d:type="cDeltaString"></BlueprintID>
						</iBlueprintLibrary-cAbsoluteBlueprintID>
					</SecondaryNamedTextureSet>
					<GeometryID d:type="cDeltaString">Full path to the .GeoPcDx file of the asset. including the Provider and Product but without the file extension</GeometryID>
					<CollisionGeometryID d:type="cDeltaString"></CollisionGeometryID>
					<Pickable d:type="cDeltaString">eTrue</Pickable>
					<ShadowType d:type="cDeltaString">eShadowType_None</ShadowType>
					<ViewType d:type="cDeltaString">ExternalView</ViewType>
					<HeatHaze/>
					<TexText/>
					<ProjectedLightElement/>
					<Instancable d:type="bool">0</Instancable>
					<DetailLevelGenerationRange>
						<cSceneryRenderBlueprint-sDetailLevelGenerationRange>
							<HighestLevel_1isHighest d:type="sInt32">1</HighestLevel_1isHighest>
							<LowestLevel_10isLowest d:type="sInt32">10</LowestLevel_10isLowest>
						</cSceneryRenderBlueprint-sDetailLevelGenerationRange>
					</DetailLevelGenerationRange>
				</cSceneryRenderBlueprint>
			</RenderComponent>
			<PosOriComponent>
				<cPosOriBlueprint/>
			</PosOriComponent>
			<ContainerComponent>
				<cEntityContainerBlueprint>
					<Children/>
				</cEntityContainerBlueprint>
			</ContainerComponent>
			<CollisionComponent>
				<cCollisionComponentBlueprint>
					<Boxes/>
					<RequiredAtEndOfTrack d:type="bool">0</RequiredAtEndOfTrack>
				</cCollisionComponentBlueprint>
			</CollisionComponent>
		</cSceneryBlueprint>
	</Blueprint>
</cBlueprintLoader>
Just the 2 lines to edit to suit the coach/whatever you want as a static item.

Re: Rolling stock to static scenic item

Posted: Mon Jul 09, 2018 7:18 am
by IronBidder
gptech, would you mind doing a worked example of the above? Ideally a LM 170, which I want to place in Chiltern Mainline.

Thanks

Re: Rolling stock to static scenic item

Posted: Mon Jul 09, 2018 7:47 am
by AndiS
gptech wrote:
AndiS wrote:You can place anything that may be a scenario-specific item permanently on the route, for all scenarios, by placing it in normal World Editor mode and not in Scenario Editor
Not a Rail Vehicle Andy, there's no such category in the World Editor so they don't show as available.

All you need to do is create a Scenery Blueprint for the vehicle:
Of course a scenery item. Now I understand the original question much better !! :D

The the key is: You need to make the vehicle a scenery item in the first place.
You loose the snapping to track on the way. But there is not much you can do about that. Track related items can somehow snap to track using the TAB key, but implementing static rolling stock as dummy signals could have a negative impact on performance, too. And I guess we talk about few instances placed, in the case at hand.

Re: Rolling stock to static scenic item

Posted: Mon Jul 09, 2018 7:57 am
by gptech
I'm sure there are some newer static/scenery items of rolling stock that have 'snap to track' implemented; possibly in one of the Wales Coastal routes.

Re: Rolling stock to static scenic item

Posted: Mon Jul 09, 2018 8:43 am
by RobertM
Snap to track can be done with any scenic object, just hold TAB (I think) while placing the object and float your mouse above the track and left click.

Re: Rolling stock to static scenic item

Posted: Mon Jul 09, 2018 8:46 am
by SkylineBoy
Indeed, and adding a piece of rolling stock how Gary has outlined above usually means the rolling stock will orientate itself perfectly in position too.

Re: Rolling stock to static scenic item

Posted: Mon Jul 09, 2018 8:51 pm
by Springer6
RobertM wrote:Snap to track can be done with any scenic object, just hold TAB (I think) while placing the object and float your mouse above the track and left click.

Brilliant ! You learn something every day ! :D Thanks

Re: Rolling stock to static scenic item

Posted: Mon Jul 09, 2018 9:33 pm
by gptech
IronBidder wrote:gptech, would you mind doing a worked example of the above? Ideally a LM 170, which I want to place in Chiltern Mainline.

Thanks
I don't mind at all.....

Image

is the result of 10 minutes work knocking together 3 .bin files for the class 170 coaches.
However........there's a wee glitch...

Image

as there's no scripting or even the coach's .bin file in operation so the lights are all on, and the numbers are *wrong*...
The numbers aren't a huge problem for a static item, but the lights could be---still not that hard to sort out but would need edited textures and would involve a copy/paste of the default .GeoPcDx file.

I'll work on that tomorrow (start of a 4 day rest period) but if you tell me just what you'd want it to do it'd help---is it just a 'parked up' consist or does it need to look like it's got somewhere to go?
RobertM wrote:Snap to track can be done with any scenic object, just hold TAB
I'm another who didn't know about that until this thread too, so thanks from me too.

Re: Rolling stock to static scenic item

Posted: Mon Jul 09, 2018 10:15 pm
by RobertM
Your both welcome.

Got the coach to static aswell, so thanks for the advice :)

Re: Rolling stock to static scenic item

Posted: Mon Jul 09, 2018 10:24 pm
by IronBidder
Hello gptech.

Stabled on sidings, so numbering irrelevant. It would be better if there were no passengers and lights, but not essential. Once I can see what you've done, I'd like to repeat myself on other 'global' siding fillers.

Stewart.

Re: Rolling stock to static scenic item

Posted: Tue Jul 10, 2018 12:12 am
by gptech
IronBidder wrote:It would be better if there were no passengers and lights
The passengers are a separate model, called as a child object in the stocks .bin files so as we're bypassing those .bin files the passengers aren't loaded, so that bit's dealt with by accident---though if anybody asks tell 'em I spent hours figuring it all out :wink:
The lights (or more accurately light glows) are textures called for in the .GeoPcDx file so (in theory) simply creating a blank texture with the right name means no visible glow would be shown, likewise for the numbers. This does mean that the .GeoPcdx will need copying, plus the required textures for the body in the *right* folder structure in relation to that copied .GeoPcDx---much harder to explain than actually do but hopefully once done you'll 'see' how it all works.
RobertM wrote:Got the coach to static aswell


Grand, we've accomplished the initial result if nothing else :)

Re: Rolling stock to static scenic item

Posted: Tue Jul 10, 2018 2:28 pm
by gptech
Wee glitch seen to :) ....

Image

It does make the directory structure a little convoluted, as the .GeoPcDx looks for the number placeholder textures in lines following this format:

Code: Select all

			<TextureByName>
				<e d:type="cDeltaString">..\..\..\..\system\textures\[00]primarynumber_<numbers 1 through to 11 go here></e>
			</TextureByName>
Sticking to the default directory structure means the placeholder textures show, but of course isn't a prototypical number--some may not care but others may prefer no number to an incorrect one. Editing the default files isn't a viable option as it'd impact on every 170 you have installed.

The download has the static vehicles living in

..\Thomson\Class170Pack01\RailVehicles\Static\Diesel\Class170\LM

which is a single folder deeper than the *real* driveable models. This allows a separate System folder to be added, nicely out of the way of the main stuff to avoid confusion (..\Thomson\Class170Pack01\RailVehicles\Static\System)

The primary number textures 1 through to 10 in this folder are simply the same blank texture (alpha channel completely black) renamed to suit the files the .GeoPcDx calls for, with primarynumber_11 being the "Not In Service" destination (a renamed copy of the destination_b texture from the main LM model)

The ..\Thomson\Class170Pack01\RailVehicles\Static\Diesel\Class170\LM\Engine folder holds the .bin files, so copy and paste the 3 .GeoPcDx files from the default model into there. The Textures folder under that Engine folder holds the default textures for the bogies, interior, body, and glass; the textures for the headlights, tail lights and red and white glows once again being appropriately named copies of the same blank texture used for the primary numbers.
The stock shows in the available assets listing in the Miscellaneous category (the one with the icon that looks like a SWAG bag, far right on the bottom row) and show as:

Static Class 170 DMCL London Midland
Static Class 170 DMSL London Midland
Static Class 170 MSL London Midland

You can grab it from https://ln.sync.com/dl/221f89bd0/qrazdt ... y-9aabu3gi

If you're invited/nagged to sign up to that site (it usually doesn't, but everywhere seems to be *recruiting*) just decline and proceed to the download. Extract the contents of the .zip archive into your Assets folder; no default files are changed as the statics live in a self contained additional branch of the folder tree---that makes it dead easy to delete too if you produce/find a better way of doing it---the files I've produced are provided with the stipulation that editing/using them, or any variation in the thinking behind them, in your own creations may only be done if you want to. In other words do what the hell you like with 'em; if you improve/simplify them what's to complain about? :D

The Thomson files of course fall under their own EULA.

Any problems or questions.....that's what this thread is for!

Re: Rolling stock to static scenic item

Posted: Tue Jul 10, 2018 3:33 pm
by SkylineBoy
For others that were unaware of the snap to track TAB function, look at section 16 on page 24 of the "HOWTOUSE_TS15Tech" document, it has a load of functions documented. It's located at Steam\steamapps\common\RailWorks\dev\Docs