WIN - DOS conversion

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

User avatar
Marcel
President
President
Posts: 917
Joined: 08 Mar 2003 15:36
Location: Bochum, Germany

WIN - DOS conversion

Post by Marcel » 14 Aug 2003 18:46

This is a requested tutorial how to convert dos graphics to win and vice versa.

I will explain first how to convert .exe files from win to dos.

1. Find out to which grf file the .exe is corresponding to, on dos mode use the command: nameoffile.exe -l. You will also get information about the changed spritenumbers. Remember them.

2. Rename the corresponding grf file to a win file. Do this by adding a "r" in the filename. For example trg1.grf will be trg1r.grf. Execute the exe file. Rename the file back to its original name.

3. Decode the grf file. You can use the grf wizard for this, get it on Andrex`s site. You will be asked which colour palette should be used, take the Win palette. You will get a folder named "sprites". Rename it to "spriteswin", or whatever you want. Now decode the file again, using the dos palette. This is necessary when the exe file changes the size of the sprite.

4. You now have two pcx - files, one with the win colours, one with the dos colours. For the next step you can use any graphic program which can handle pcx files. Open the file with the win palette (in the spriteswin folder), copy the sprites you have remembered in the first step and copy them in the file with the dos palette. They must be on the same place, do this careful. Save the file. You will not need the win palette file (yes, in the sriteswin folder) anymore, delete it.

5. Encode the sprites now, use again the wizard for the easiest way. You can use also the wizard to create an exe file for your conversion.

6. Sometimes there are graphic errors like blinking dots, you have to remove them manually. Do this by changing the colour with a similar one. But this is very seldom.

A dos - win conversion works on the same way, but have in mind that you have to rename the grf file from win to dos (remove the "r"), copy the sprites from the dos palette pcx file....

For a grf conversion, like the traffic sets for example, start at step 3. You will have to copy/paste all sprites in the pcx file.

This looks very complicated, maybe it is not the best way to do this, but it works well, and that is the point. Try it a few times, you will understand why and how it works, and you can convert a file in a few minutes. Or ask someone to do it for you, for example me. :wink:

User avatar
Dinges
Tycoon
Tycoon
Posts: 2865
Joined: 07 Jan 2003 18:00
Location: Fryslân Boppe!
Contact:

Post by Dinges » 14 Aug 2003 18:57

A little more feedback on Graphic files found in newgrf folder:

they can be changed easyer than .exe file, use this:

Code: Select all

grfcodec -e tempenh2w.grf -m 1
copy tempenh2w.grf tempenh2.grf
grfcodec -e tempenh2w.grf
to convert such file to DOS...
Dinges

Who is the other person in me?

my Blog (dutch) - my Last.fm profile

Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/

User avatar
Marcel
President
President
Posts: 917
Joined: 08 Mar 2003 15:36
Location: Bochum, Germany

Post by Marcel » 14 Aug 2003 19:00

Yes, but this works only when all sprites should be converted, when you have at least on sprite in the pcx file which should not be changed, no way.

User avatar
Dinges
Tycoon
Tycoon
Posts: 2865
Joined: 07 Jan 2003 18:00
Location: Fryslân Boppe!
Contact:

Post by Dinges » 14 Aug 2003 19:04

Mostly GRF files have that...
Dinges

Who is the other person in me?

my Blog (dutch) - my Last.fm profile

Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/

User avatar
Marcel
President
President
Posts: 917
Joined: 08 Mar 2003 15:36
Location: Bochum, Germany

Post by Marcel » 14 Aug 2003 19:07

We know that, but maybe someone is out there who tries to convert exe -files on the way you said, wondering about funny results.

User avatar
Dinges
Tycoon
Tycoon
Posts: 2865
Joined: 07 Jan 2003 18:00
Location: Fryslân Boppe!
Contact:

Post by Dinges » 14 Aug 2003 19:10

So, don't do it, unless you are sure you going convert all sprites...

I glued this topic, I hope you don't mind...
Dinges

Who is the other person in me?

my Blog (dutch) - my Last.fm profile

Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/

User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13190
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus » 14 Aug 2003 19:25

Dinges wrote:A little more feedback on Graphic files found in newgrf folder:

they can be changed easyer than .exe file, use this:

Code: Select all

grfcodec -e tempenh2w.grf -m 1
copy tempenh2w.grf tempenh2.grf
grfcodec -e tempenh2w.grf
to convert such file to DOS...
So to Windows it should be as easy as

Code: Select all

grfcodec -e tempenh2.grf -m 0
copy tempenh2.grf tempenh2w.grf
grfcodec -e tempenh2w.grf
I think it should be like this and that there is an error in your last code line, Dinges. You wrote tempenh2w.grf but that doens't exist anymore after copy command.

User avatar
Dinges
Tycoon
Tycoon
Posts: 2865
Joined: 07 Jan 2003 18:00
Location: Fryslân Boppe!
Contact:

Post by Dinges » 14 Aug 2003 19:27

it does, I copyed, not moved it...

remember what it does

1. Make the file for DOS
2. Copy the file with another name (usualy withour 'w')
3. Make the file for WIN

Rember that if you do this, you should work in the pallete you make last (this time it is WIN)
Dinges

Who is the other person in me?

my Blog (dutch) - my Last.fm profile

Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/

User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13190
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus » 14 Aug 2003 19:38

Code: Select all

grfcodec -e tempenh2w.grf -m 1
copy tempenh2w.grf tempenh2.grf
grfcodec -e tempenh2w.grf
This does the following:
- encode tempenh2w.grf to DOS palette
- make a copy of tempenh2w.grf named tempenh2.grf
- encode tempenh2w.grf again

So actually the copy is the version that should work onder DOS, right?

User avatar
Dinges
Tycoon
Tycoon
Posts: 2865
Joined: 07 Jan 2003 18:00
Location: Fryslân Boppe!
Contact:

Post by Dinges » 15 Aug 2003 08:48

yes
Dinges

Who is the other person in me?

my Blog (dutch) - my Last.fm profile

Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/

User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3602
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Post by eis_os » 15 Aug 2003 11:04

Looks like you using the batch I suggested on #tycoon 8)

User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13190
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus » 15 Aug 2003 12:12

Dinges wrote:yes
Well, guess what: I tried to convert from DOS to Windows and it doesn't work. It's still the wrong palette!

User avatar
Dinges
Tycoon
Tycoon
Posts: 2865
Joined: 07 Jan 2003 18:00
Location: Fryslân Boppe!
Contact:

Post by Dinges » 15 Aug 2003 12:52

file like DBset, tempenh and other graphic files found in newgrf folder should work fine...
Dinges

Who is the other person in me?

my Blog (dutch) - my Last.fm profile

Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/

User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13190
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus » 15 Aug 2003 12:56

Well, I had my fill of it for now. I'm not gonna try it myself, if anybody else feels like trying to convert dbsetw to dbset: be my guest. Of course (sneaky as I am) I need to here from you how you managed.

User avatar
Dinges
Tycoon
Tycoon
Posts: 2865
Joined: 07 Jan 2003 18:00
Location: Fryslân Boppe!
Contact:

Post by Dinges » 15 Aug 2003 13:02

You say you couldn't convert DBset :?:

hmm, I wonder how MB made it then...
Dinges

Who is the other person in me?

my Blog (dutch) - my Last.fm profile

Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/

User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13190
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus » 15 Aug 2003 13:03

No, I meant converting from DOS to Windows in general. And I suppose MB started in Windows and converted to DOS, something that does seem to work.

User avatar
Dinges
Tycoon
Tycoon
Posts: 2865
Joined: 07 Jan 2003 18:00
Location: Fryslân Boppe!
Contact:

Post by Dinges » 15 Aug 2003 13:04

Hyronymus wrote:No, I meant converting from DOS to Windows in general. And I suppose MB started in Windows and converted to DOS, something that does seem to work.
hmmm, my tempenh DOS worked didn't it :?:
Dinges

Who is the other person in me?

my Blog (dutch) - my Last.fm profile

Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/

User avatar
George
Tycoon
Tycoon
Posts: 4306
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: SPb, Russia.
Contact:

Post by George » 15 Aug 2003 19:33

Hyronymus wrote:No, I meant converting from DOS to Windows in general. And I suppose MB started in Windows and converted to DOS, something that does seem to work.
If you my long vehicles are correct in dos, than win->dos convertion works. I can't check the dos version myself.

User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13190
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus » 15 Aug 2003 20:29

Please guys, is it so hard to get? You are all talking about Windows->DOS conversion. I'm trying to convert from DOS->Windows and that doesn't work (yet).

User avatar
Dinges
Tycoon
Tycoon
Posts: 2865
Joined: 07 Jan 2003 18:00
Location: Fryslân Boppe!
Contact:

Post by Dinges » 16 Aug 2003 09:13

George wrote:
Hyronymus wrote:No, I meant converting from DOS to Windows in general. And I suppose MB started in Windows and converted to DOS, something that does seem to work.
If you my long vehicles are correct in dos, than win->dos convertion works. I can't check the dos version myself.
Longvehicles DOS seems to work, nobody cries about it :!:
Dinges

Who is the other person in me?

my Blog (dutch) - my Last.fm profile

Owner of http://ttdgraphics.cjb.net/ ! Temp addr: http://ttdgraphics.owenrudge.com/

Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Ragin1_ and 5 guests