PCX - Newgrf

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
User avatar
CGAGraphics
Engineer
Engineer
Posts: 1
Joined: 02 Apr 2024 00:19
Location: Your PCI Card
Contact:

PCX - Newgrf

Post by CGAGraphics »

I need to convert a .pcx file to a .grf and I am very stuck.

I'm tring to convert the pcx file to grf to ues it in game
Attachments
polishroads.pcx
(1.96 MiB) Downloaded 21 times
CGA EGA VGA
User avatar
kamnet
Moderator
Moderator
Posts: 8595
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: PCX - Newgrf

Post by kamnet »

PCX is an image file format, and it was the original graphics format that TTD, TTDX Patch and OpenTTD used for NewGRFs. Today everybody uses PNG image files instead, but PCX is still valid. You can pretty much use any graphics editing program to convert, you can also find online and downloadable PCX->PNG converters.

This file on its own will not get you a NewGRF. A NewGRF is composed of two or more parts: one or more spritesheets which has all the images you want to use, and a plain text file with all of the code required. The code was traditionally written in the NFO machine language spec, but today most people use the NML language, and there's also M4NFO and YAGL as alternatives. Whatever method you choose, you wilil still need to compile your code and images with a software program (which one depends on the language you pick) which will then create a .grf file.
User avatar
Quast65
Tycoon
Tycoon
Posts: 2670
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: PCX - Newgrf

Post by Quast65 »

To make matters even worse, this PCX is from a wrongly decoded .GRF
As it has a lot of pinks in it, as it is decoded in the wrong palette

Decode it again and use -p 2, like this:

Code: Select all

grfcodec -d -p 2 c:/grfcodec603/dstatadd_part3/dstatadd_part3_v003.grf c:/grfcodec603/dstatadd_part3
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 14 guests