Page 1 of 1

Question about changing driven locos

Unread postPosted: Sat Jan 05, 2013 4:03 pm
by Griphos
I'm swapping out some locos in some of my scenarios for others I like driving better. Easy to do with RW_Tools. However, in the sim, these scenarios still show up as having the original locos. This makes it hard to find them again in the future when I want to drive them. I'd prefer to be able to sort by engine in the single player menus and find them.

I've searched the RW_Tools manual, and looked all through the options in the editor there, but can't see how to get the sim to recognize the new driven loco in order to list it under that loco in the filters. How does one do this, if it is possible?

Re: Question about changing driven locos

Unread postPosted: Sat Jan 05, 2013 8:03 pm
by Chacal
I thought this was the purpose of the "Drive it" button.

Anyway it changes for me if I open the scenario in the railworks scenario editor, save, then close.

Re: Question about changing driven locos

Unread postPosted: Sat Jan 05, 2013 8:27 pm
by Griphos
Not sure what you mean about the "Drive It" button. But opening and saving the scenarios seems to do the trick. Thanks.

Re: Question about changing driven locos

Unread postPosted: Sat Jan 05, 2013 10:51 pm
by Chacal
Sorry, the "Drive it" button in the RW-Tools scenario editor.

Re: Question about changing driven locos

Unread postPosted: Sat Jan 05, 2013 10:53 pm
by glenn68
You have to go into the railworks scenario editor and make sure the assets for that locomotive is checked in the flyout button. then it will show up in the scenario properties.

Re: Question about changing driven locos

Unread postPosted: Sat Jan 05, 2013 11:39 pm
by Griphos
No, the "Drive it" button just makes that consist or loco the one you start in. It doesn't update the scenario with the correct loco if you change it and then click the button.

Perhaps checking the asset in the flyout will do it, but I've just done it by making a small change in the scenario, like switching the weather to something else and then back and saving. The ones I've changed show up correctly now under the new loco in the scenario filters.

Thanks.

Re: Question about changing driven locos

Unread postPosted: Sun Jan 06, 2013 12:18 am
by Chacal
I've looked into the ScenarioProperties.xml file and there is no node for this information.

I found it in \Content\SDBCache.bin . It is put there by the RW scenario editor when you modify a scenario.
This is the dynamically built file that drives your game menu. It contains data about what scenario you played, you completed, etc.

Re: Question about changing driven locos

Unread postPosted: Sun Jan 06, 2013 10:03 am
by Griphos
Ahh... Yeah I dug around in the scenario properties.xml and couldn't find a place where it noted that info. I'm kind of hesitant to muck around in a dynamic .bin file that records info about all the scenarios and routes. I'd hate to mess that up. And I'm not sure how to label the new loco anyway in such a file. I suppose I could look to see how it is labeled in other scenarios. Still I try to avoid "serzing" .bin files.

Thanks for snooping that out. That's probably why Mike hasn't implemented it in RW_Tools yet.

Re: Question about changing driven locos

Unread postPosted: Sun Jan 06, 2013 2:27 pm
by Chacal
From my tests, I think the RW scenario editors just grabs the name of the loco from the <Loco Name> node (the same name that shows in the RW Tools scenario editor) and puts it in the cache, along with other info such as the time the scenario was last modified, etc.

There is only one entry, so the RW editor puts the name of the loco with driver that was modified last. Not a problem with standard scenarios (they have only one driveable loco), but with free-roam scenarios with several driveable locos it is somewhat arbitrary.

Re: Question about changing driven locos

Unread postPosted: Sun Jan 06, 2013 2:34 pm
by Griphos
This is interesting. Where in RW_Tools scenario editor is the <Loco name> found? I've looked, but I don't spot it.

Still, since this is the cache that is modified, would it be risky to open it (with serz and RW_Tools) to change these things manually and then convert back to .bin? I suppose it's easy enough to open in the game's editor and then save, except for the new 2013 bug that sometimes wrecks the scenarios when you save them from the editor.

Re: Question about changing driven locos

Unread postPosted: Sun Jan 06, 2013 2:56 pm
by Chacal
To see the xml nodes, you have to open the ScenarioProperties.xml file itself in a text editor. This can be edited without danger.
I *THINK* it is not dangerous to modify the cache file using the RW Tools file editor, or a text editor along with serz.exe. In any case I'd make a backup first.

Re: Question about changing driven locos

Unread postPosted: Sun Jan 06, 2013 4:24 pm
by Griphos
Okay, if I'm understanding correctly, you don't mean the <Loco name> shows up somewhere in the actual Scenario Editor in RW_Tools, but that if you open the scenarioproperties.xml file in RW_Tools, you can see the various <Loco name> entries for all the consists with a loco, right?

Then, if you change the driven loco in RW_Tools scenario editor, and open the scenarioproperties.xml after that, you'll see the correct <Loco name> for the new driven loco and can then copy and paste that into the cache file after changing it from a .bin to an .xml. Then you'd change it back to a .bin (with serz or RW_Tools I guess, but I've never used this feature of RW_Tools) and you'd be set. Theoretically. *!!wink!!* And if not, they you could just replace the cache file with the one you saved before dinking around. !!*ok*!!

I think I'll keep doing it in the game scenario editor. I'm not that practiced at editing files. I hope Mike is able to add this feature to RW_Tools, though. I'm often changing out locos in scenarios I've cloned so I can drive different engines, and when I clone the scenario, it keeps the old engine in the filter no matter what I change it to.

Re: Question about changing driven locos

Unread postPosted: Sun Jan 06, 2013 4:34 pm
by Griphos
I opened the cache file in RW_Tools and looked around. I found the places it records the names. For instance, in my scenario "London Cement" on the GWML, it shows the loco name as:

<Loco>
<sSDLoco d:id="42332080">
<LocoName d:type="cDeltaString">Class 47 Triple Grey</LocoName>


But it also shows the location of the correct loco a few lines down:

<DescFilepath d:type="cDeltaString">Kuju\RailSimulator\railvehicles\diesel\class47\railfreight_grey\engine</DescFilepath>


and then again a few lines further:

<LocoBlueprintID>
<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\railfreight_grey\engine\class47_rfd.xml</BlueprintID>
</iBlueprintLibrary-cAbsoluteBlueprintID>
</LocoBlueprintID>



I'm guess you'd need to change all of this. I suppose you could grab the correct stuff from some other scenario that uses the engine you want to use.

Re: Question about changing driven locos

Unread postPosted: Sun Jan 06, 2013 10:16 pm
by Chacal
That's the problem with those files for which we have the data fileds but not any referential integrity rules. We don't know which fields have to be synced together and we'd have to do lenghty tests to find out. Until then it's better to use the official editor.

Re: Question about changing driven locos

Unread postPosted: Wed Jan 09, 2013 4:49 pm
by pzfaus
Griphos wrote:I'm swapping out some locos in some of my scenarios for others I like driving better. Easy to do with RW_Tools. However, in the sim, these scenarios still show up as having the original locos. This makes it hard to find them again in the future when I want to drive them. I'd prefer to be able to sort by engine in the single player menus and find them.

I've searched the RW_Tools manual, and looked all through the options in the editor there, but can't see how to get the sim to recognize the new driven loco in order to list it under that loco in the filters. How does one do this, if it is possible?



If you want to see your swapped locos in the sim after RW_Tools use, simply edit the same scenario with scenario editor and save it.
At least works for me.