My attempts at steam mods...

The "spiritual sequel" to Transport Tycoon Deluxe: Chris Sawyer's Locomotion is the latest game from him - general discussion about it here please!

Moderator: Locomotion Moderators

Post Reply
nyc6025
Engineer
Engineer
Posts: 4
Joined: 24 Dec 2021 21:06

My attempts at steam mods...

Post by nyc6025 »

Despite the age of the game, I still enjoy using Locomotion from time to time, and I've decided lately to take the plunge and start experimenting with mod creation. Being a steam guy, I've opted to learn how to create new steam locos--or rather, how to create mods by modifying existing MSTS locos--in spite of the difficulty and challenge involved. I spent my free time during the holidays trying to learn from several tutorials, pages, threads, and methods to figure out how to make it happen. (***NOTE: I will obviously not be releasing anything without gaining the permission of the original creator of any file!)

The first locomotive I have tried modding is this, a Denver & Rio Grande Western T-29:
http://www.elvastower.com/forums/index. ... 0-and-793/
(Also found at TrainSim.com)

My first attempt, using MSTS2Loco went moderately well, but I was disappointed to find that the program doesn't allow for animated steam. So, on I went with my search to find a different method. After discovering Shape Viewer and the "Camera Angles" method (see viewtopic.php?t=50278), I've spent further time experimenting with that, and finally got something that would run in the game, despite a few issues (including a pair of blue spruces sprouting from the tender, in place of bogies...). After ironing out those bugs, I finally arrived at this result:
Screenshot33.jpg
Screenshot33.jpg (336.16 KiB) Viewed 5050 times
Correctly "set" on the track, fully animated, and looking good/running well with no errors. However, after successfully using the model in one test scenario, and saving one game from said scenario, a new issue arose. I have noticed a pattern that repeats itself over and over:
If I try to open any scenario that uses the locomotive I created--whether starting new/from the beginning or from a saved game--Locomotion instantly crashes upon trying to run that scenario. However, if I first open the Scenario Editor, then navigate to Vehicle selection in Object Settings, view the locomotive I created, exit out of the Scenario Editor, and then open a scenario using the locomotive, the error disappears and I am able to continue on as normal. I can't imagine what might be causing this to happen, and if anyone has any advice on what I could do about that, I'd greatly appreciate it.

Now, I wonder if I'll try another locomotive sometime soon?...
User avatar
Walter1940
Tycoon
Tycoon
Posts: 983
Joined: 19 Mar 2007 01:30
Location: Munich, Germany
Contact:

Re: My attempts at steam mods...

Post by Walter1940 »

I congratulate you to your first steam locomotive.
Do I understand it right? A finished scenario crashes you. But if you first considered the locomotive in the editor, then it works?
That would be strange and a mistake which has not yet occurred. At least I hear about it for the first time. I have no solution for you. But I can look at the XML if you want it.
http://www.walter1940.de
Vehicles for Locomotion

Tutorials in english
- From MSTS to Locomotion ---> http://www.walter1940.de/tutorial/msts2loco/
- Wally ---> http://www.walter1940.de/tutorial/wally/
- xml-modding ---> http://www.walter1940.de/tutorial/xml-modding/
nyc6025
Engineer
Engineer
Posts: 4
Joined: 24 Dec 2021 21:06

Re: My attempts at steam mods...

Post by nyc6025 »

Thank you. I especially appreciate the tutorials that you provided on your website; they have been very helpful as I have been learning.

I think you understand correctly, though I'll explain again to be sure that I haven't left anything out. With the scenario I created using the loco, it worked the first time without any issue. But, if I save a game, exit Locomotion, start it again, and EITHER 1. Start a new game, or 2. Load a saved game with that specific scenario, the game crashes. The game does not crash if I use any other scenario without the locomotive I created. However, if I open Scenario Editor and simply view the locomotive, the issue gets resolved. I do not need to create a new scenario using the locomoitve, it only needs to be viewed, as seen below:
Screenshot36a.jpg
Screenshot36a.jpg (89.57 KiB) Viewed 4993 times
I will attach the .xml below. It is different from the original version that Vehicle Creator made, though it was only to make changes to correct minor problems. I compared it to other .xml flies of other vehicles (including the Special 2-4-2 and steam locomotives from the North American Megapack) to see if everything was placed correctly in the file.
LTWDRGW1.xml
(152.25 KiB) Downloaded 110 times
User avatar
Walter1940
Tycoon
Tycoon
Posts: 983
Joined: 19 Mar 2007 01:30
Location: Munich, Germany
Contact:

Re: My attempts at steam mods...

Post by Walter1940 »

I have compared your XML with one of my steam locomotives. The two marked lines are the some serious difference to mine. What happens if you leave these two lines away? Either that's the mistake, or it has no influence.
If this is not the problem, so I would examine the pictures or reassemble. But that's the last choice.
capture_01072022_074631.jpg
capture_01072022_074631.jpg (148.7 KiB) Viewed 2780 times
http://www.walter1940.de
Vehicles for Locomotion

Tutorials in english
- From MSTS to Locomotion ---> http://www.walter1940.de/tutorial/msts2loco/
- Wally ---> http://www.walter1940.de/tutorial/wally/
- xml-modding ---> http://www.walter1940.de/tutorial/xml-modding/
nyc6025
Engineer
Engineer
Posts: 4
Joined: 24 Dec 2021 21:06

Re: My attempts at steam mods...

Post by nyc6025 »

Thank you for taking the time to look at that.

It appears that I goofed badly on this one :oops: . I think I must have accidentally copied those lines from the Special 2-4-2 .xml, while I was using it as a comparison. Having discovered the TT-Wiki recently, I looked up tonight what those lines are for (https://www.tt-wiki.net/wiki/Variable:L ... -_Vehicles), and found that "field_B4[0]" and "field_B4[1]" are used only when the file has bogey sprites separate from the locomotive/tender. Because my locomotive does not have separate bogeys, it makes sense that including these lines would cause errors.

Everything seems to be fixed now! I no longer experience any crashing with any usage of my locomotive. I'll be sure to be more careful with my .xml files in the future!
User avatar
Walter1940
Tycoon
Tycoon
Posts: 983
Joined: 19 Mar 2007 01:30
Location: Munich, Germany
Contact:

Re: My attempts at steam mods...

Post by Walter1940 »

No problem.
I actually wanted to convert this locomotive. But that is no longer necessary. Can you tell me which steam locomotives do you want to build? Then I consider myself with this if it makes sense to convert themselves. We are not many anymore. And now not our time wastes the same locomotives twice.
http://www.walter1940.de
Vehicles for Locomotion

Tutorials in english
- From MSTS to Locomotion ---> http://www.walter1940.de/tutorial/msts2loco/
- Wally ---> http://www.walter1940.de/tutorial/wally/
- xml-modding ---> http://www.walter1940.de/tutorial/xml-modding/
Post Reply

Return to “General Locomotion”

Who is online

Users browsing this forum: Semrush [Bot] and 1 guest