GRF encoder tool: GRFMaker [under development]

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

Moderator: Graphics Moderators

User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: GRF encoder tool: GRFMaker [under development]

Post by FooBar »

AndersI wrote:Unfortunately, it's not much use reporting problems with GRFMaker 4.01, as the open source version is only at 3.04B_r_<something>. I don't know who is programming the 4.01 version, but it seems it is only available on the hungarian tt-forum?
I have the feeling that this 4.01 version is violating GPL. I'd be very suprised if the person(s) working on this 4.01 version are using a different version as base than the version that was made open source three years ago.
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: GRF encoder tool: GRFMaker [under development]

Post by NekoMaster »

I was wondering, how do I... (in grf maker)

A) Define new cargo types
B) Create New Industries to replace other industries
C) Deal with the sprite block for industries
and...
D) Add new town buildings (Im thinking of making a "Canadian Town Set" sometime eventually)
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: GRF encoder tool: GRFMaker [under development]

Post by Eddi »

FooBar wrote:
AndersI wrote:Unfortunately, it's not much use reporting problems with GRFMaker 4.01, as the open source version is only at 3.04B_r_<something>. I don't know who is programming the 4.01 version, but it seems it is only available on the hungarian tt-forum?
I have the feeling that this 4.01 version is violating GPL. I'd be very suprised if the person(s) working on this 4.01 version are using a different version as base than the version that was made open source three years ago.
just because a program was once made open source, doesn't mean it can't be also distributed under a different license. the right to choose licenses lies with the author.

also, only the author can file against copyright violations, so i'm afraid there is nothing you can do, except ask the original author...
Zonta
Engineer
Engineer
Posts: 7
Joined: 18 Aug 2010 12:44

Re: GRF encoder tool: GRFMaker [under development]

Post by Zonta »

I got a small question where i need to go in newgrf to modify the road texture?
Image
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: GRF encoder tool: GRFMaker [under development]

Post by NekoMaster »

How do I add tenders to steam locomotives in grfmaker?
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
User avatar
Bob_Mackenzie
Chairman
Chairman
Posts: 823
Joined: 25 Mar 2010 13:36

Re: GRF encoder tool: GRFMaker [under development]

Post by Bob_Mackenzie »

NekoMaster wrote:How do I add tenders to steam locomotives in grfmaker?
My guess is its done in exactly the same was as articulated road vehicles. It is a guess though - I've never done trains
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: GRF encoder tool: GRFMaker [under development]

Post by FooBar »

Eddi wrote:just because a program was once made open source, doesn't mean it can't be also distributed under a different license. the right to choose licenses lies with the author.

also, only the author can file against copyright violations, so i'm afraid there is nothing you can do, except ask the original author...
I know, but usually if one makes something open source, one doesn't provide someone in particular the right to continue closed-source development...

Also, I'm not going to do anything about it, just saying what I'm thinking: that two versions of the same thing are developed independent of each other. ;)
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: GRF encoder tool: GRFMaker [under development]

Post by NekoMaster »

I believe that the GNU license states that if someone modifies and/or distributes a open source application then they must also provide access to the source code of the (modified) program.
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: GRF encoder tool: GRFMaker [under development]

Post by Rubidium »

NekoMaster wrote:I believe that the GNU license states that if someone modifies and/or distributes a open source application then they must also provide access to the source code of the (modified) program.
That's correct, but the original author is still allowed to give it under another license to someone else in which case GPL doesn't apply to that "fork".
Zonta
Engineer
Engineer
Posts: 7
Joined: 18 Aug 2010 12:44

Re: GRF encoder tool: GRFMaker [under development]

Post by Zonta »

Ill bump my question since no answer :

I got a small question where i need to go in newgrf to modify the road texture? (to make a grf with my own road texture)
Image
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: GRF encoder tool: GRFMaker [under development]

Post by planetmaker »

There are many more people who know how to do that when you do NOT use grfmaker... there you basically just replace all sprites which are related to roads via a simple actionA; that includes all level crossings and road bridges and possibly a few ground tiles used by houses which match the pavement. You may need to do all work twice, if you want it to look good in both base sets as their ground tiles differ, of course. See http://wiki.ttdpatch.net/tiki-index.php ... phicsSpecs and http://wiki.ttdpatch.net/tiki-index.php?page=ActionA

But meanwhile there's an emerging alternative for writing newgrf, NML. When it comes to simple sprite replacement needed for roads, I do recommend this alternative as it supports already everything needed: http://dev.openttdcoop.org/projects/nml and http://bundles.openttdcoop.org/nml/nightlies/LATEST/

EDIT: Example code would look like this:

Code: Select all

// Rail overlays for crossings
replace (1005, "src/gfx/rails_overlays.png") { // start replacing base sprite 1005
		[ 20,198, 40,21, -20,  5] // x,y, sizeX, sizeY, offsetX, offsetY
		[ 71,198, 40,21, -20,  5]
		[117,198, 40, 7, -20,  5]
		[165,198, 40, 7, -20, 21]
		[216,198, 12,19,  10,  5]
		[248,198, 12,19, -24, 11]
}
If you only want to draw it once, consider this: TTD base set is used by ~35 .. 40% of the people, OpenGFX is used by 60 ... 65% of the people reporting bugs in OpenTTD. Many of the people who just use the windows installer might never report anything back and are offered OpenGFX for convenient download upon install, but I have no data on the percentages there.
Last edited by planetmaker on 26 Aug 2010 16:03, edited 1 time in total.
maquinista
Tycoon
Tycoon
Posts: 1828
Joined: 10 Jul 2006 00:43
Location: Spain

Re: GRF encoder tool: GRFMaker [under development]

Post by maquinista »

Zonta wrote:Ill bump my question since no answer :

I got a small question where i need to go in newgrf to modify the road texture? (to make a grf with my own road texture)
It's better if You start drawing your first 64×31 sprites. Also, You should open a new topic for your project. Your NFO code would look like this, adding the proper offsets and sizes.

Code: Select all

  132 * 5	 0A 01 26 34 05
  133 Without_lines/Without_lines.pcx 0 0 01 1 1 -1 -1
  134 Without_lines/Without_lines.pcx 0 0 01 1 1 -1 -1
  135 Without_lines/Without_lines.pcx 0 0 01 1 1 -1 -1
(...)
  169 Without_lines/Without_lines.pcx 0 0 01 1 1 -1 -1
  170 Without_lines/Without_lines.pcx 0 0 01 1 1 -1 -1
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
User avatar
Bob_Mackenzie
Chairman
Chairman
Posts: 823
Joined: 25 Mar 2010 13:36

Re: GRF encoder tool: GRFMaker [under development]

Post by Bob_Mackenzie »

See http://www.tt-forums.net/viewtopic.php? ... 54#p901854

I suspect this is a bug in GRFMaker
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: GRF encoder tool: GRFMaker [under development]

Post by AndersI »

Which version of GRFMaker? Can you post the .lst and image file? Or PM them to me if you don't want them out in the wild...
User avatar
Bob_Mackenzie
Chairman
Chairman
Posts: 823
Joined: 25 Mar 2010 13:36

Re: GRF encoder tool: GRFMaker [under development]

Post by Bob_Mackenzie »

v4.01
BRBV v0.6.1.zip
(394.38 KiB) Downloaded 237 times
The Ist and Graphics are in the file. Rather than try and remember which graphics were obsolete and which were current I dumped the lot in to the zip, but as long as they are all in the right pace the Ist will sort out the correct ones

Ignore the test Ist

For anyone who cares there is the most up to date BRBV in the zip with as yet unreleased sprites :)
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: GRF encoder tool: GRFMaker [under development]

Post by AndersI »

As I've said before, GRFMaker 4.01 cannot be supported here, as the source is not available. You have to go to the Hungarian TT-forums and ask about it there.

This time, though, I think it's a user error: I opened your project "BRBV v0.6.1.lst" in the 3.04 Beta r216 that we do have the sources to, got no error indication, and looked at the vehicle sprite block for livestock (line 122, G(A2)), and you definitely have extreme xrel/yrel values there - see picture - so it's no wonder it looks as it does.

Edit: And opening up the sprite aligner tool shows the sprite way up, left, just as the xrel/yrel says.
Attachments
Ex23.png
Ex23.png (17.91 KiB) Viewed 9020 times
User avatar
Bob_Mackenzie
Chairman
Chairman
Posts: 823
Joined: 25 Mar 2010 13:36

Re: GRF encoder tool: GRFMaker [under development]

Post by Bob_Mackenzie »

Firstly my apologies - while I was trying to troubleshoot this I was obviously having a brain fart - I was looking at the goods sprite and not the livestock sprite :roll:

Secondly - thanks for taking the time to put it right :D

Thirdly - I always use the sprite aligner tool and that Xrel/Yrel is just so far out its inconceivable it was there by operator error. I wonder if it was a graphics error - do the red blocks under the graphic encode the Xrel/Yrel for GRF maker?

Cheers

Bob
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: GRF encoder tool: GRFMaker [under development]

Post by AndersI »

Firstly my apologies - while I was trying to troubleshoot this I was obviously having a brain fart - I was looking at the goods sprite and not the livestock sprite :roll:
BTDT. When looking at things you've done yourself, you always see what you *thought* you were writing, not what's really there :-)
I always use the sprite aligner tool and that Xrel/Yrel is just so far out its inconceivable it was there by operator error. I wonder if it was a graphics error - do the red blocks under the graphic encode the Xrel/Yrel for GRF maker?
Yes, the red blocks under the sprite is an encoding of the xrel/yrel, and they must be kept intact, and at the exact place they are put by GRFMaker. This means that there *must* be at least four empty lines under the lowest sprite, and you must be very careful when copy&paste in the graphics.

At the same time, it can be very useful: I often copy&paste just the red pixels from one sprite set to another and Hey, Presto! - the alignment is all done (assuming it should be exactly the same). You can do the same thing in GRFMaker: Save alignments from one sprite set to a text file, and the reload that text file for another sprite set.
User avatar
Bob_Mackenzie
Chairman
Chairman
Posts: 823
Joined: 25 Mar 2010 13:36

Re: GRF encoder tool: GRFMaker [under development]

Post by Bob_Mackenzie »

Thanks for the confirmation :)
GullLars
Engineer
Engineer
Posts: 12
Joined: 23 Mar 2011 15:38

Re: GRF encoder tool: GRFMaker [under development]

Post by GullLars »

I just went through the tutorial by James Vassie, and everything went smooth, until the end when i was supposed to make the GRF, then i got the error: "Invalid file name" regardless of what name i entered.
Then i downloaded the example file "townlistexample.lst", imported it successfully, and tried to make a grf of it too, same error.
I'm using 64-bit Windows 7 ultimate, and setting compatibility mode to Vista or XP didn't work.

Does anyone know what the cause of this is? And how i can fix it?

I'm planning to make gas turbine models for ships (like Turbinia, 63.9 km/h in 1894) and trains (like UAC TurboTrain), as well as ramjet and SCramjet futuristic planes. Possibly a nuclear freighter ship and train too.

If there already exists newGRF packs with such models, please reffer me to them :)
I know of one train model with turbine propulsion, but it's in a large set that i don't like that much :(
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 4 guests