Editing .BIN/.XML asset files

Discussion of rolling-stock creation & re-painting.

Editing .BIN/.XML asset files

Unread postby OlPaint » Fri Mar 15, 2013 8:54 am

@ PapaXpress

I am trying to teach myself how to use SERZ.exe utility to edit the asset.bin file for locomotives or pieces of rolling stock. I have learned that you can "drag and drop" the .BIN file onto the serz utility icon and a .XML file is generated in the same directory as a decompiled .BIN file with the same name. Now the .XML file can be inspected and/or edited in an appropriate text editor. OK, now then, if you "drag and drop" the edited .XML file onto the serz utility, a new .BIN file is recompiled and it overwrites the old .BIN file in the directory. Well, I understand that that is how it should work. But my recompile operation is throwing a "Expected missing end tag" error. What am I missing?

DId I read somewhere that RSC has purposely broken the copy of SERZ.exe that is bundled with RailWorks4. So we are unable to edit their .BIN files. I am trying to change the asset name or change the coupler height of several assets.

OlPaint
__________________________
Chessie...Sleep Like A Kitten

OlPaint
User avatar
OlPaint
 
Posts: 595
Joined: Thu Jun 21, 2012 6:25 am

Re: Editing .BIN/.XML asset files

Unread postby artimrj » Fri Mar 15, 2013 10:18 am

Why not use RW Tools for your editting? I do not play with that serze thing I let RW Tools do all of that.
Bob Artim - Generation X²
I don't have a PHD, I have a DD214... Freedom carries sacrifice
I'm crawling in the dark looking for the answer
User avatar
artimrj
 
Posts: 4721
Joined: Sun Jan 31, 2010 3:07 pm
Location: Beaver, Pennsylvania

Re: Editing .BIN/.XML asset files

Unread postby PapaXpress » Fri Mar 15, 2013 10:24 am

Yes, SERZ does have a bug where it cannot compile Kuju XML files over a certain size. Its been awhile, but I think that its around 2MB. If you are seeing this problem with much smaller files then perhaps you accidentally removed a part of the end tag. There are some nice tools out there to help with editing XML files. The three I perfer are:

1) RW_Tools (compress, decompress using SERZ)
2) Notepad++ (understands XML)
3) Internet Explorer (validates XML, but does not edit)

Since I have been working with XML professionally since it first came out I am very comfortable just using RW_Tools for all my work. Once you get the hang of reading it you will be able to spot mistakes easily.
Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone

Re: Editing .BIN/.XML asset files

Unread postby Chacal » Fri Mar 15, 2013 4:26 pm

This error message may happen when dragging XML from Internet Explorer, because it changes the XML code.
Otherwise you may not have copied the whole file.
Like the others said, spare yourself the frustration and use RW-Tools.
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6599
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada

Re: Editing .BIN/.XML asset files

Unread postby PapaXpress » Fri Mar 15, 2013 4:54 pm

When did IE start mauling the XML?
Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone

Re: Editing .BIN/.XML asset files

Unread postby Chacal » Fri Mar 15, 2013 7:04 pm

Years ago, when I was working with XML a lot, we noticed IE would suppress the "<?xml version="1.0" encoding="UTF-8"?>" tag on the screen, and sometimes the outermost pair of tags as well. Other times, after selecting the whole text in IE and copying it into a different app, the last end tag would be missing. The OP's "Expected missing end tag" error reminds me of that.

I don't now if IE still does that.
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6599
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada

Re: Editing .BIN/.XML asset files

Unread postby PapaXpress » Fri Mar 15, 2013 7:25 pm

That reminds me of when I was embedding transforms in the XML.

In any case I was only suggesting to use IE to validate the XML because its very good at pointing at where the error is.
Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone

Re: Editing .BIN/.XML asset files

Unread postby Chacal » Sat Mar 16, 2013 1:22 am

Yes, I just tried and I'm impressed at the improvements.

Microsoft also offers the free Xml Notepad 2007, an editor which does applies xsl transforms and lets you enter xpath statements. I've used it in the past. Could be useful for advanced editing of blueprints.
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6599
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada

Re: Editing .BIN/.XML asset files

Unread postby Bananarama » Sat Mar 16, 2013 2:35 am

PapaXpress wrote:SERZ does have a bug where it cannot compile Kuju XML files over a certain size. Its been awhile, but I think that its around 2MB.

Large file conversion issues might mean something else entirely. I have no problem converting XML files in excess of 30Mb.
Cheers!
Marc - 3DTrains

Image
User avatar
Bananarama
 
Posts: 2749
Joined: Sat Feb 14, 2009 1:17 am
Location: Another Planet

Re: Editing .BIN/.XML asset files

Unread postby PapaXpress » Sat Mar 16, 2013 12:07 pm

Are you talking recently, or in the past? I am not pulling this out of thin air, it was covered very well over at UKTS some time ago.
Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone

Re: Editing .BIN/.XML asset files

Unread postby OlPaint » Sat Mar 16, 2013 11:22 pm

@ PapaX

Here is the error 216 that I am getting now when I try to recompile the edited .XML file in RW_Tools to .BIN
Error 216.jpg

Does this give you a clue as to the cause? It is an "Expected Missing End Tag" error but how do I head it off?

OlPaint
You do not have the required permissions to view the files attached to this post.
__________________________
Chessie...Sleep Like A Kitten

OlPaint
User avatar
OlPaint
 
Posts: 595
Joined: Thu Jun 21, 2012 6:25 am

Re: Editing .BIN/.XML asset files

Unread postby PapaXpress » Sat Mar 16, 2013 11:44 pm

Unfortunately all it tells me is that somewhere in your XML you are missing an end tag.

The sad part is that RSC could give us better information. The good news is that until a couple months ago that error message didn't even tell us that the end tag was missing... so someone is listening. I guess we could put new support tickets in, but I am not sure how far that will go.

Have you loaded the XML in IE to see what it can find?
Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone

Re: Editing .BIN/.XML asset files

Unread postby Bananarama » Sun Mar 17, 2013 12:49 am

PapaXpress wrote:Are you talking recently, or in the past? I am not pulling this out of thin air, it was covered very well over at UKTS some time ago.

I didn't think you were, but I did realize I was using an older copy of serz in my system folder. However, I just gave the latest one a try and it worked without issue on a large 36 Mb XML file.
Cheers!
Marc - 3DTrains

Image
User avatar
Bananarama
 
Posts: 2749
Joined: Sat Feb 14, 2009 1:17 am
Location: Another Planet

Re: Editing .BIN/.XML asset files

Unread postby Bananarama » Sun Mar 17, 2013 12:56 am

OlPaint wrote:Now the .XML file can be inspected and/or edited in an appropriate text editor.

By "appropriate", I'm assuming you're using something that is Unicode compatible like WordPad and not Notepad, correct?

(Edit: I see Papa mentioned Notepad++, which I believe is Unicode compliant)
Cheers!
Marc - 3DTrains

Image
User avatar
Bananarama
 
Posts: 2749
Joined: Sat Feb 14, 2009 1:17 am
Location: Another Planet

Re: Editing .BIN/.XML asset files

Unread postby Chacal » Sun Mar 17, 2013 1:15 am

If IE doesn't show you the problem, post the edited xml file, I'll have a look at it.
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6599
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada

Next

Return to Rolling-Stock Design

Who is online

Users browsing this forum: No registered users and 7 guests