Page 1 of 5
NewGRF Livery Selection/Cargo Subtypes (GRF Callback 19)
Posted: 14 May 2006 20:18
by mart3p
Some recent GRF files use "Cargo Subtypes" to select liveries or alternative cargo graphics. This patch implements newGRF callback 19 which adds suffixes to cargo types in the refit window, allowing selection of these alternative liveries.
The screenshot shows the refit lists for an IC125 train and an A380 aircraft. In the case of the train, although not reffitable to anything but passengers, the refit window will display the 5 available liveries. The A380 has a selection of airline liveries for passengers and the choice of Fed-Ex or UPS liveries for other cargoes.
The IC125 (v0.5) is by Born Acorn and is available
here. The A380 is one of Grigory1's aircraft available
here with many others. If this link is not available the A380 is posted in the forums
here.
Planeset 1.5 uses Cargo Subtypes for the selection of alternative airline company liveries. This patch makes these available. In addition, suffixes “liquid” and “solid” are added for goods. These options give (for example) alternative graphics for the Chinook cargo slings. Also have a look
here.
This patch is now also included in the
MiniIN. Find the most recent builds for all platforms
here.
Edit: Patch updated to r5428. Support for NewGRF "include” strings added (moved from Planeset 1.5 patch). 29/06/06
Edit: Bug fixed - refitting to non-temperate cargoes. Patch updated to r5451. 03/07/06
Edit: There is a win32 exe built at r5510
here which includes this patch. 17/07/06
Edit: Patch updated to r5643. 30/07/06
Edit: Patch updated to r5933. 17/08/06
Edit: Patch updated to r6104. 24/08/06
Edit: Patch updated to r6300. 01/09/06
Edit: Patch updated to r6560. 28/09/06
Edit: Most of this patch is now in the trunk. The latest version (r6901) fixes a few remaining issues (see recent post for details). 23/10/06
Edit: Patch updated to r6920. All it now does is display the cargo subtype suffix in the vehicle details window, the rest is in the trunk. 24/10/06
Posted: 15 May 2006 06:53
by Born Acorn
Ooh. Nice work!

Posted: 15 May 2006 07:50
by Brianetta
I'd rather have shared rails, than just pretend that there are lots of companies by using liveries. It is clever, though.
Posted: 15 May 2006 10:19
by mart3p
Born Acorn: Thanks, I thought you might like it.
Brianetta: I agree with you, shared rails would be great. But all my patch adds is the ability for OTTD to access features that are already in some GRF files. I would agree that company liveries are not much use for multiplayer games but they’re great for single player.
Posted: 15 May 2006 12:26
by peter1138
Yeah, it is purely a visual effect. Much like NewStations is

Posted: 15 May 2006 13:52
by Born Acorn
Brianetta wrote:I'd rather have shared rails, than just pretend that there are lots of companies by using liveries. It is clever, though.
Thats not the point. The point is you can use real life liveries now without having to have 5 entries of the same loco on the Buy Vehicle list.

Posted: 17 May 2006 17:55
by Michi_cc
Is it supposed to work with the DBSetXL as well?
Start a game around 1935, build a BR18 and add some passenger waggons. If you're doing it with the Patch, it's possible to refit those cars to special "Rheingold" ones. This option is missing in OpenTTD, even with your patch.
-- Michael Lutz
Posted: 17 May 2006 23:22
by mart3p
Michi_cc wrote:Is it supposed to work with the DBSetXL as well?
Start a game around 1935, build a BR18 and add some passenger waggons. If you're doing it with the Patch, it's possible to refit those cars to special "Rheingold" ones. This option is missing in OpenTTD, even with your patch.
Michi_cc, if DBSetXL is using callback 19 for its refit options, my patch
should make them available.
Thanks for letting me know that this isn't working. I will load up DBSetXL and look into it.
Edit: Well, it’s my patch that’s broken.

It is only checking the engine for callback 19 and not the wagons. Thanks for finding and reporting this problem. I will fix it as soon as I can.
Another edit: I've got it almost working.

Just need to get rid of duplicates in the refit list.
Posted: 18 May 2006 07:54
by bobingabout
dunno if you've done it yet, but, something else with re-fit that needs fixing is the cost. in TTDP and UKRS some refits like steel to wood cost money to refit, while others like coal to ore don't, however in OTTD all cost money, and in most cases the refit costs more than the wagon itself...
Posted: 18 May 2006 09:18
by mart3p
bobingabout: I have had a quick look at this problem, as I have been frustrated by this myself when playing with UKRS. The problem is, OTTD doesn't implement newGRF action 0 property 1C which is the refit cost set by the GRF file. It's on my list of possible future patches.

Posted: 18 May 2006 10:05
by Born Acorn
bloomin hell. A list of newgrf patches!
*mind is blown*
Posted: 18 May 2006 10:15
by peter1138
Should I put mine on hold and let mart3p get on with it?
More seriously, perhaps we should put up a page on the wiki to allocate our tasks to stop duplication... Let's use
http://wiki.openttd.org/index.php/Tasks
Posted: 18 May 2006 12:55
by bobingabout
sounds good peter
i knew it'd be something like what mart said, but not knowing the NFO NewGRF structure, i didn't kow what action or property it was

Posted: 18 May 2006 13:24
by Bjarni
peter1138 wrote:Should I put mine on hold and let mart3p get on with it?
More seriously, perhaps we should put up a page on the wiki to allocate our tasks to stop duplication... Let's use
http://wiki.openttd.org/index.php/Tasks
actually we planned flyspray to contain something like this, but we ended up using it for bugs only. The idea of using flyspray was to open task A and then assign somebody to it. This person can then change due date, due release and how many % is done (so other people can follow the progress). If we also add task B, then we can make it depend on task A, like say a patch, that will do something to electrified rails would depend on electrified rails to be completed. Having it in the same system as the bug reports mean that we can make a bug report depend on completion of a patch and so on.
In theory this works, so I wonder why nobody uses it. I have used it, but it's like it's not a great idea if only one person is using it.
Posted: 18 May 2006 15:17
by KING
martp: what grf set are you useing in your 1st post?
Posted: 18 May 2006 15:40
by bobingabout
you could try reading his post, it tells you!!!
Posted: 18 May 2006 18:42
by mart3p
peter1138 wrote:Should I put mine on hold and let mart3p get on with it?

Good idea, in fact, I've already contributed.
bobingabout wrote:you could try reading his post, it tells you!!!
It not only tells you but there are download links as well!
Posted: 18 May 2006 20:06
by mart3p
There is now an updated patch in the first post. It seems to be working ok with DBSetXL.
There is one bug that I know about, one of the goods vans has the refit options "Livestock (packaged)" and "Livestock (Beer)"!!

I think the reason for this is DBSetXL's use of Action 0 property 8 for cargo types. This isn't yet supported by OTTD but I think NewCargoes might be on the way...
Please let me know if you find any further bugs. I will build a new win32 exe and post it later (follow link in first post).
Posted: 19 May 2006 07:33
by Jim Starluck
Brianetta wrote:I'd rather have shared rails, than just pretend that there are lots of companies by using liveries. It is clever, though.
That's not the only use. One player could refit to exclusively LNER appearances, the other Great Western. Essentially two complete trainsets (graphics-wise) for the cost of one .grf.
Pretty darn nifty if you ask me. Which .grfs use this again?
Posted: 19 May 2006 10:04
by Brianetta
Jim Starluck wrote:Brianetta wrote:I'd rather have shared rails, than just pretend that there are lots of companies by using liveries. It is clever, though.
That's not the only use. One player could refit to exclusively LNER appearances, the other Great Western. Essentially two complete trainsets (graphics-wise) for the cost of one .grf.
Pretty darn nifty if you ask me. Which .grfs use this again?
Sold.
The only one I'm aware of is Born_Acorn's IC125 set, which is just the one train.