Train-Sim.Com
Microsoft Train Simulator

Unable to Edit .wag and .sd Files!

Unable to Edit .wag and .sd Files! – image 1

Notice to all visitors and members of the Train-Sim.Com message forums:
If you plan on using a signature banner in your posts, we would like to remind you that there is a maximum size for banners. That maximum is 450 pixels wide by 120 pixels high, and not to exceed 25k. Your compliance is appreciated. FORUM RULES Problems? There are two common reasons for problems with logging in and posting messages. The first is that you are running a firewall that prevents your messages from being sent to the server. The other is that you have cookies disabled; the DCForum software requires cookies to work properly.

Previous Topic | Next Topic

Printer-friendly copy Email this topic to a friend

Reading Topic #14615

Charter Member · 41 posts

I am trying to modify a cars .wag and .sd files as it appears that the size and bounding box values may be a bit too long (z axis).The files in question are b&o_572808-48.wag and b&o_wellcar-48.sd from file b&owell.zip (available from file library).After changing values within the above files and saving, MSTS on loading reports that there is an error in the wagon file. And the new or changed file sizes seem to be smaller than the original file sizes by about half!!??I used Unicode compatible editors (Wordpad, unicode editor within Route Riter plus others), but to no avail. I get the same error every time! The original files can be restored from the original zip file and I no longer get file errors.I am sure that the new values I am using are legitimate (within certain limits).So I am beginning to suspect some form of encrytion or protection is being used to prevent editing, unless there are errors on the original files which allow MSTS to run OK but somehow prevent editing.Anyone have any ideas?Thanks.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

RE: Unable to Edit .wag and .sd Files!?, derekmorton, Dec-17-02, 11:36 PM, (1) RE: Unable to Edit .wag and .sd Files!?, nascarphan, Dec-17-02, 11:42 PM, (2) RE: Unable to Edit .wag and .sd Files!?, Meeshu, Dec-18-02, 01:54 AM, (3) RE: Unable to Edit .wag and .sd Files!?, Bing, Dec-18-02, 10:24 AM, (4) RE: Unable to Edit .wag and .sd Files!?, dvdhoven, Dec-18-02, 12:03 PM, (5) RE: Unable to Edit .wag and .sd Files!?, Meeshu, Dec-18-02, 03:27 PM, (7) RE: Unable to Edit .wag and .sd Files!?, dvdhoven, Dec-19-02, 12:07 PM, (8) RE: Unable to Edit .wag and .sd Files!?, Meeshu, Dec-19-02, 04:08 PM, (9) RE: Unable to Edit .wag and .sd Files!?, sixman, Dec-18-02, 01:21 PM, (6)

Conferences | Topics | Previous Topic | Next Topic

Charter Member · 919 posts

RE: Unable to Edit .wag and .sd Files!?

Giday Peter,Would you like to post the before and after so we could comment?
There is nothing wrong with the editors you have used.Derek

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 52 posts

RE: Unable to Edit .wag and .sd Files!?

Check the properties of the file. It is probably set to read only. Change the property to archive and then you should be able to edit the file.nascarphan

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 41 posts

RE: Unable to Edit .wag and .sd Files!?

Thanks for the prompt replies.The files are not read only, so that is not the problem.From the .wag file:-before changes -Size ( 3.04m 6.05m 20.76m)
comment( 24.0 empty, 100.0 full )
Mass ( 80.0t )
WheelRadius ( 0.42m )
InertiaTensor ( Box (3.04m 6.05m 20.76m) )after changes -Size ( 3.04m 6.05m 20.25m)
comment( 24.0 empty, 100.0 full )
Mass ( 80.0t )
WheelRadius ( 0.42m )
InertiaTensor ( Box (3.04m 6.05m 20.25m) )
From the .sd file:-before changes -ESD_Bounding_Box ( -1.520000 0.050000 -10.380000 1.520000 6.053750 10.380000 )after changes -ESD_Bounding_Box ( -1.520000 0.20000 -10.1250000 1.520000 6.050000 10.125000 )The values I believe are reasonable, so why the error? I have had little or no problem editing other files.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 512 posts

RE: Unable to Edit .wag and .sd Files!?

before changes -ESD_Bounding_Box ( -1.520000 0.050000 -10.380000 1.520000 6.053750 10.380000 )after changes -ESD_Bounding_Box ( -1.520000 0.20000 -10.1250000 1.520000 6.050000 10.125000 )----------------------------------------------------Note that in the second ESD value, you have 5 characters to the right of the decimal place, whereas the original is six. Similarily, the third vlaue edited is seven characters, original is six, there are other "places" differences. MIght be worth a try to rework these - game engine routines are sometimes set for fixed places and can be extremely fussy about it. I don't claim this as a cure, simply as a possibility.Bing

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 1588 posts

RE: Unable to Edit .wag and .sd Files!?

Hi,To tosh in my 2 cents.An ampersand in a file name is not a nice one.
Change that to an underscore.
The same for the name in the wag file.The length from the size parameter should always be some longer then size from the bounding box.
General rule:
The bounding box includes the car WITHOUT the couplers
The size parameter includes the car WITH the couplersA great number of decimals in a bounding box is not really necessary. 1.5 satisfies as well.Dick van den HovenUnable to Edit .wag and .sd Files! – image 2

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 41 posts

RE: Unable to Edit .wag and .sd Files!?

Bing, the number of decimal places was a possibility I thought of also, but adjusting those had no effect; I still had errors.dvdhoven, ampersand and underscore? I didn't think it made a difference, and as it turns out it doesn't (see below).
My understanding is that the Size parameter does NOT include couplers. Couplers are additional to the size.sixman, I had no trouble editing the other files using Wordpad.Last night I tried editing the problem files using BBoxedit (entering values manually) and it worked! No errors!
This morning I tried again to edit the (original unzipped) problem files using Wordpad, and this time it worked!!?? No errors!So, I don't know why I was getting errors yesterday. Perhaps the unzipping process somehow corrupted the files? Or maybe the editors (Wordpad, Route Riter editor etc.) for some reason were not saving the modified files in the correct (unicode) format, or corrupting them while saving? Who knows.Today, editing seems to work (fingers crossed).Thanks to all for your time.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 1588 posts

RE: Unable to Edit .wag and .sd Files!?

Hi,As I have experimented a lot with coupling refusing cars, I am very stubborn on this point:
The length from the size shall include the couplers.This way I have got several cars to couple and sit at the right distance.Dick van den HovenUnable to Edit .wag and .sd Files! – image 3

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 41 posts

RE: Unable to Edit .wag and .sd Files!?

Dick,I believe that you may be right. After changing size and bounding box values and checking the results in MSTS, it appeared that the "Size" parameter does indeed include the couplers.Some people say it doesn't include couplers, and I thought it didn't either, but after closer inspection of the above changes I've now changed my thoughts.Regards.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 227 posts

RE: Unable to Edit .wag and .sd Files!?

The .wag and .sd files are NOT encrypted or protected. I just downloaded the zipfile and edited the .wag file the same as you did. Size before was 5,318 bytes; size after still 5,318 bytes. Do you have the same problem with any of the other .wag files in that zipfile?

Alert | IP


[ Home | MSTS Forum | MSTS FAQ | File Library ] Copyright © 2002 by Nels Anderson. All Rights Reserved.

Restored from the Train-Sim.Com archive, captured January 19, 2003. About this archive.