Page 1 of 3

UKRoads /w Signs & UK Total Bridge Renewal Set

Posted: 14 Aug 2011 10:28
by Leanden
UKRoads /w Signs
Current Version: 0.2

An adapted version of Bornacorn's UK Roads with Added Road Signs. (Includes one billion dalek's one way roads).

Licence: CC-BY-NC-SA v3.0

Total Bridge Renewal Set UK Roadset
Current Version: 1.0

An adapted version of Thgergo's Total Bridge Renewal Set, modified to be compatible with UK Roadset and UK Roads /w Signs.

Licence: CC-BY-NC-SA v3.0

Re: UK Road Set with Signs

Posted: 14 Aug 2011 11:04
by FooBar
The one from the content download is CC-BY-NC-SA v3.0

That means you can do whatever you like, as long as you credit the original authors, don't use it for commercial purposes and release any release under the same license.
If you're planning a release, make sure to change the GRFID an preferrably also change the name (although that isn't mandatory from the license, it will lead to confusion if you don't).

Re: UK Road Set with Signs

Posted: 14 Aug 2011 14:52
by Leanden
I will be changing the name and ID of course. One further question:

Is it possible to add code in NFO so that a different T-junction will be drawn if an adjacent tile is a one-way road.?

(Or even in NML?)

Re: UK Road Set with Signs

Posted: 14 Aug 2011 14:56
by FooBar
No, unfortunately that's not possible. At this moment the only way to define "new" road surfaces and such is by replacing the default road tiles. That's all the game offers at this moment, and that's all you have to work with.

Whether you use NFO or NML makes no difference. All road-related stuff is fully available in NML.

Re: UK Road Set with Signs

Posted: 14 Aug 2011 15:36
by Leanden
Ok ill have to make some sacrifices on that front then. However there is a difference between normal and town roads isnt there? (i.e. pavement and street lights)

Re: UK Road Set with Signs

Posted: 14 Aug 2011 15:46
by FooBar
Yes, there is. There's also different sprites for that.
Maybe you should start by decoding trg1(r).grf or ogfx1_base.grf to see what actual sprites are available for you to replace. That should give you an idea of what's possible and what's not.

Re: UK Road Set with Signs

Posted: 14 Aug 2011 18:37
by Leanden
The NFO seems inconsistent with other GRFCodec produced NFOs, in that i can't seem to find the GRFID. I know the ID is 554B5201, but i cant see any reference to this anywhere in the NFO:

Code: Select all

// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
    0 * 4	 88 02 00 00
    1 * 6	 07 83 01 \7= 03 00
    2 * 9	 0D 70 \D= FF 00 00 00 00 00
    3 * 9	 07 88 04 \7G "ER05þ"
    4 * 9	 07 88 04 \7G 49 45 00 01 FE
    5 * 9	 07 88 04 \7G 54 57 09 00 FE
    6 * 9	 07 88 04 \7G 53 5A 02 00 FE
    7 * 9	 07 88 04 \7G 00 00 00 01 FE
    8 * 9	 07 88 04 \7G 49 45 00 01 FE
    9 * 9	 09 88 04 \7gg 43 45 52 01 02
   10 * 9	 0D 7E \D= 01 "þCER" 01
   11 * 6	 07 7E 01 \7= 01 FE
   12 * 9	 09 88 04 \7gg 56 43 00 01 02
   13 * 9	 0D 7E \D= 02 FE 56 43 00 01
   14 * 6	 07 7E 01 \7! 00 FE
   15 * 6	 07 9A 01 \7! 00 FF
   16 * 11	 10 "þVery bad" 00
   17 * 53	 0B 02 7F "ÿAnother Readset is active (and "
	 "thus conflicting)" 00
(Snippet of the first 17 lines of the NFO)

Re: UK Road Set with Signs

Posted: 14 Aug 2011 19:27
by Leanden
Ok so i've adjusted some of the sprites using MSPaint, from the Windows Pallete. However, now when i try to encode the GRF again, it just says:

Code: Select all

Encoding in temporary file UKRoadsetw.new
Loading sprites/UKRoadsetw.pcxssed:100% (Transparency:100%, Redundancy:100%)
Error: Unrecognized palette, aborting.
Specify -f on the command line to override this check.
99% of the sprite sheet is the same as when i decoded it, so why is this happening?

Re: UK Road Set with Signs

Posted: 14 Aug 2011 22:27
by FooBar
The Action8 with the grfid is most likely even further down, after all the checks. I can't check right now, as I'm on my phone at the moment.

And for mspaint; that might not be able to save paletted pcx/png files. It doesn't have proper palette features anyways. Try a little more advance graphics program, of course you can still keep using paint for the editing and only use the other program for converting the file. Suggestions are paint.net or gimp. I also recommend trading pcx for png; modern versions of grfcodec work with png by default anyways.

Re: UK Road Set with Signs

Posted: 14 Aug 2011 22:39
by Leanden
I used Paint.net to convert it into a pcx file. It is the pcx file which is causing the error, do i need to specify a pallette with Paint.net?

Re: UK Road Set with Signs

Posted: 15 Aug 2011 09:39
by FooBar
Yes, you need to specify a palette.
Unfortunately, I can't find how to do that in paint.net. Thought it could, but maybe I'm mistaken, so you might need to get a more advanced editor anyways.

Re: UK Road Set with Signs

Posted: 15 Aug 2011 11:25
by Leanden
Is there a pallette template i can download for GIMP?

Re: UK Road Set with Signs

Posted: 15 Aug 2011 11:34
by planetmaker
You find palettes for a few graphics programme on the DevZone, among them also gimp palettes: http://dev.openttdcoop.org/projects/home/documents

If someone has a palette for a programme whiere the palette is not yet found there, I'd be very happy to add it to that list there.

Generally you might prefer to use png instead of pcx files. png is easier to view with e.g. a browser.

Re: UK Road Set with Signs

Posted: 15 Aug 2011 11:58
by Leanden
Ive used the GIMP windows codec to index the image to only use those colours and saved it as a pcx file.

I run grfcodec which returns the same unrecognised pallet error. So i use the -p gpl:ttd-newgrf-win.gpl command and it returns the error: "This is not a GIMP pallet" even though i know it is because i just used it in GIMP 2.0

Re: UK Road Set with Signs

Posted: 15 Aug 2011 15:11
by FooBar
In GIMP, go to Window > Dockable Dialogs > Palettes. Then right-click in the list with palettes and choose Import Palette. Browse to the palette file, give it a name and Import.

Then go to Image > Mode and select RGB.
Then go once more into Image > Mode and select Indexed...
Select Custom Palette, select the palette you just imported. Uncheck "remove unused colours". No dithering.
Apply with Convert and save the file. This file should now be good to go in grfcodec. Remember to use the -p 2 option if you've used the Windows palette.

That should do the trick.

Re: UK Road Set with Signs

Posted: 15 Aug 2011 21:53
by Leanden
Still the same error. :(

Back to the previous problem, why does it say "This is not a GIMP Palette" when it clearly is. I've tried using Default.gpl from the GIMP folder and that isn't recognised either.

Here is the modified sprite sheet (and the original NFO):

Re: GRFCodec Problems (Formerly UKRoads /w Signs)

Posted: 15 Aug 2011 23:43
by PikkaBird
That pcx looks fine to me, at a glance. Did you try doing what the grfcodec error message suggested?
FooBar wrote:Remember to use the -p 2 option if you've used the Windows palette.
Silly FooBar, you don't need to specify a palette when encoding... :P

Re: GRFCodec Problems (Formerly UKRoads /w Signs)

Posted: 16 Aug 2011 00:23
by Leanden
It said i could override the 100% transparency error by using the function -f.

The resulting GRF produces roads like this however:

Re: GRFCodec Problems (Formerly UKRoads /w Signs)

Posted: 16 Aug 2011 04:34
by planetmaker
If your grfcodec didn't produce by default a png upon de-compilation, please update it.

Also you're doing something wrong with encoding...

Code: Select all

grfcodec -e UKRoadsetw.nfo
with your pcx results here in
ukroad.png
ukroad.png (48.81 KiB) Viewed 21873 times
As it was made for the TTD base set it also does not match my ground tiles, it would be nice to have a parameter to change that.

Re: UK Road Set with Signs

Posted: 16 Aug 2011 05:02
by Snail
planetmaker wrote:If someone has a palette for a programme whiere the palette is not yet found there, I'd be very happy to add it to that list there.
Hi Planetmaker,
I've got a DOS palette for GraphicConverter, a very good graphics editor for Mac. Would you be interested in adding it to that list? Should I just attach it here or send it to you through PM?