OTTD: Modern European Metro Set

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

What next?

Düsseldorf U-Bahn
9
10%
Amsterdam Metro
6
6%
Oslo Metro
3
3%
Hannover Stadtbahn
4
4%
Rome Metro
2
2%
London Underground
26
28%
Paris Metro
12
13%
Milan Metro
2
2%
Athens Metro
1
1%
Rotterdam Metro
3
3%
Madrid Metro
2
2%
Barcelona Metro
3
3%
Moscow Metro
16
17%
Petersburg Metro
1
1%
Bucharest Metro
3
3%
 
Total votes: 93

User avatar
Hans Kruzer
Traffic Manager
Traffic Manager
Posts: 229
Joined: 03 Jul 2013 20:24
Location: Toronto

Re: The Modern U-Bahn Set

Post by Hans Kruzer »

The end/tail wagon is complete!!!! Quite easy, all I had to do was replace the headlights in the engine to red :P
woo you know what that means? that means we finally finished the Berlin HK type..only about 8 more trains to go!

and fooling around I repainted views of a passenger wagon in the Berlin Christmas train colours. In real life it is a double unit HK U-bahn train that runs in Berlin only on every Sunday of December, annually :D
Attachments
end wagon
end wagon
BerlinUbahnHKzugendtrans.PNG (2.14 KiB) Viewed 4143 times
Christmas!!!
Christmas!!!
BerlinUbahn[Christmastrain]trans.PNG (2.24 KiB) Viewed 4127 times
Tschüß!
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: Modern German U-Bahn Set

Post by Transportman »

You might want to consider using a template to place the graphics in, as that makes it easier to code later.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
User avatar
Hans Kruzer
Traffic Manager
Traffic Manager
Posts: 229
Joined: 03 Jul 2013 20:24
Location: Toronto

Re: Modern German U-Bahn Set

Post by Hans Kruzer »

and now revealing the older Berlin U-Bahn train, the F-type. Heer the commonly F92...Unlike the modern HK the windows are smaller and there is less glass on the doors, so I tried to make the doors look less dark as those on the newer H-type
Attachments
F92 front engine
F92 front engine
BerlinUBahnF92zugtrans.PNG (2.44 KiB) Viewed 4102 times
Tschüß!
User avatar
Hans Kruzer
Traffic Manager
Traffic Manager
Posts: 229
Joined: 03 Jul 2013 20:24
Location: Toronto

Re: Modern German U-Bahn Set

Post by Hans Kruzer »

Transportman wrote:You might want to consider using a template to place the graphics in, as that makes it easier to code later.
what do you mean so? I am new to this :( example?

Do you mean remove everything except the sprites (like the pallette and name?? )
Last edited by Hans Kruzer on 09 Aug 2013 06:52, edited 1 time in total.
Tschüß!
Sunmannus
Engineer
Engineer
Posts: 25
Joined: 09 Aug 2013 06:31

Re: Modern German U-Bahn Set

Post by Sunmannus »

I've wandered for many years in this forum, but had never felt the need to register. Now, seeing as you have started your own project, I've decided, and just to encourage you to don't give up! I never have drawn sprites or similar before, but looking how you started, I feel motivated to start something by myself :P

I'll be following this thread!


Sorry for my english :F
User avatar
Hans Kruzer
Traffic Manager
Traffic Manager
Posts: 229
Joined: 03 Jul 2013 20:24
Location: Toronto

Re: Modern German U-Bahn Set

Post by Hans Kruzer »

thanks, I won't give up paintin' until I'm satisfied :D

it was hard for me to figure out how to paint pixels from something like windows paint, but after that, its pretty easy but I mess up on most the things I draw Lol
I just was motivated because I can't beleive there's no U-bahn sets :o and I never suspected I'd end up doing work, it was simply a request :P
Tschüß!
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: Modern German U-Bahn Set

Post by Transportman »

Hans Kruzer wrote:
Transportman wrote:You might want to consider using a template to place the graphics in, as that makes it easier to code later.
what do you mean so? I am new to this :( example?

Do you mean remove everything except the sprites (like the pallette and name?? )
No, you can still leave palette and name in the file, but I mean to place all the sprites in the same order and in a structured way. Take a look at the files for other sets (the Dutch Train Set for example), all those files have a structured way of placing the sprites in them (in case of the Dutch Train Set, every row contains all views for 1 livery/part).
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
User avatar
Hans Kruzer
Traffic Manager
Traffic Manager
Posts: 229
Joined: 03 Jul 2013 20:24
Location: Toronto

Re: Modern German U-Bahn Set

Post by Hans Kruzer »

Okay, I made them easier for coding here I suppose :lol:
Attachments
Top-Bottom: Berlin U-Bahn HK-type,<br />Berlin U-Bahn HK Passenger Wagon,<br />Berlin U-Bahn HK Christmas Wagon,<br />Berlin U-bahn HK End/Tail wagon
Top-Bottom: Berlin U-Bahn HK-type,
Berlin U-Bahn HK Passenger Wagon,
Berlin U-Bahn HK Christmas Wagon,
Berlin U-bahn HK End/Tail wagon
BerlinUbahnHKset.PNG (4.78 KiB) Viewed 4054 times
Tschüß!
TinyMusic
Tycoon
Tycoon
Posts: 1422
Joined: 02 Feb 2013 02:03

Re: Modern German U-Bahn Set

Post by TinyMusic »

Did you just suddenly managed to draw all of that from just following the tutorial?! :shock:

That is very fast!
Formerly known as UseYourIllusion.
Java Scenario Found Here - Version 2 out
[tweɪ̂ pû tɕʰì wɔ̀ mǐlɤ lû tɕʰìŋ nì pɑ́ŋmɑ̌ŋ]
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: Modern German U-Bahn Set

Post by Transportman »

That makes it already easier, but I would go with 8 sprites per row, as there are 8 views, and with 8 sprites per row you have all views on a single row.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: Modern German U-Bahn Set

Post by michael blunck »

@Hans

As I already told you, you´re using a damaged palette. Pity is that Purno knows since years that he´s forcing his wrong palette on newbies, but obviously can´t be bothered to correct it. :(
Transportman wrote: That makes it already easier, but I would go with 8 sprites per row, as there are 8 views, and with 8 sprites per row you have all views on a single row.
Not necissarily. If a vehicle is symmetric, it needs only 4 sprites.

regards
Michael
Image
User avatar
Hans Kruzer
Traffic Manager
Traffic Manager
Posts: 229
Joined: 03 Jul 2013 20:24
Location: Toronto

Re: Modern German U-Bahn Set

Post by Hans Kruzer »

michael blunck wrote:@Hans
As I already told you, you´re using a damaged palette
Oh no now I gotta start all over again ahhh
xD
I can just replace the colours with those on the new pallette ?

and yes thats what I made straight off the tutorial :P
Tschüß!
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: Modern German U-Bahn Set

Post by michael blunck »

Hans Kruzer wrote:
michael blunck wrote:@Hans
As I already told you, you´re using a damaged palette
Oh no now I gotta start all over again ahhh
xD
I can just replace the colours with those on the new pallette ?
You misunderstood.

"Purno´s palette" is rotated by 180°, so you´ll get all wrong indices for advanced techniques, like recolouring, but it contains all the TTD colours, so your drawing is not lost.

But please, don´t spread this wrong palette any further, e.g. by including it in your screenshots. If you think you need a picture of the palette included in your drawings posted here, please exchange it by the correct version.


On another note, make sure that you´re using the DOS palette, it contains more colours than the windows palette (and its layout is structured in a more convenient way), and it can be used by the game (even if you´re on windows, hehe).

Please, take a look again on the aforementioned link to spot the differences between the DOS and the windows palette.

regards
Michael
Image
User avatar
Hans Kruzer
Traffic Manager
Traffic Manager
Posts: 229
Joined: 03 Jul 2013 20:24
Location: Toronto

Re: Modern German U-Bahn Set

Post by Hans Kruzer »

Okay, the next trains I make I will use the DOS pallete :D
Tschüß!
User avatar
Hans Kruzer
Traffic Manager
Traffic Manager
Posts: 229
Joined: 03 Jul 2013 20:24
Location: Toronto

Re: Modern German U-Bahn Set

Post by Hans Kruzer »

Im gonna take out the F92 and redo it with DOS Pallete since I only started it :lol:
Attachments
much easier for coding?<br />Top-Bottom: Berlin U-Bahn HK-type,<br />Berlin U-Bahn HK Passenger Wagon,<br />Berlin U-Bahn HK Christmas Wagon,<br />Berlin U-bahn HK End/Tail wagon
much easier for coding?
Top-Bottom: Berlin U-Bahn HK-type,
Berlin U-Bahn HK Passenger Wagon,
Berlin U-Bahn HK Christmas Wagon,
Berlin U-bahn HK End/Tail wagon
BerlinUbahnHKset.PNG (3.96 KiB) Viewed 3995 times
Last edited by Hans Kruzer on 09 Aug 2013 09:02, edited 1 time in total.
Tschüß!
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: Modern German U-Bahn Set

Post by michael blunck »

Hans Kruzer wrote:Okay, the next trains I make I will use the DOS pallete :D
You are already using the "DOS palette", only an distorted one.

regards
Michael
Image
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Modern German U-Bahn Set (OpenTTD)

Post by Alberth »

Hi,

You are having so much fun, so I thought it nice to show how to code a vehicle. Below is the NML code of the engine:

Code: Select all

grf {
	grfid: "HK\01\01";
	name: string(STR_GRF_NAME);
	desc: string(STR_GRF_DESCRIPTION);
	version: 0;                // Version of this grf, increase with every release.
	min_compatible_version: 0; // This grf can be used as replacement for which older grfs?
}

spriteset(spriteset_HK_type_default, "BerlinUbahnHKset_20130809T1055_8bppDOS.png") {
    //left_x, upper_y,  width, height, offset_x, offset_y
    [  82,       2,    88- 82, 25-2,     -3,       -11  ]  // 2nd 4 images
    [  89,       2,   110- 89, 18-2,    -10,        -8  ]
    [ 111,       2,   140-111, 10-2,    -14,        -4  ]
    [ 141,       2,   162-141, 18-2,    -10,        -8  ]

    [   1,       2,     7-  1, 25-2,     -3,       -11  ]  // 1st 4 images
    [   8,       2,    29-  8, 18-2,    -10,        -8  ]
    [  30,       2,    59- 30, 10-2,    -14,        -4  ]
    [  60,       2,    81- 60, 18-2,    -10,        -8  ]
}

spritegroup spritegroup_HK_type_default {
    loaded:  [spriteset_HK_type_default];
    loading: [spriteset_HK_type_default];
}

item (FEAT_TRAINS, item_HK_type) {
	property {
		name:                        string(STR_HK_TYPE_ENGINE);
		climates_available:          bitmask(CLIMATE_TEMPERATE);
		introduction_date:           date(1975, 1, 1);
		model_life:                  20;
		reliability_decay:           20;
		refittable_cargo_classes:    bitmask(CC_PASSENGERS);
		loading_speed:               5;
		cost_factor:                 1;
		running_cost_factor:         1;
		cargo_age_period:            185;

		sprite_id:                   SPRITE_ID_NEW_TRAIN;
		speed:                       80 km/h;
		track_type:                  RAIL;
		ai_special_flag :            AI_FLAG_PASSENGER;
		power:                       50;
		running_cost_base:           RUNNING_COST_ELECTRIC;
		default_cargo_type:          DEFAULT_CARGO_FIRST_REFITTABLE;
		cargo_capacity:              50;
		weight:                      10 ton;
		engine_class:                ENGINE_CLASS_DIESEL;
		tractive_effort_coefficient: 0.3;
		air_drag_coefficient:        0.1;
		length:                      8;
		visual_effect_and_powered:   VISUAL_EFFECT_DIESEL;
	}

	graphics {
		default:  spritegroup_HK_type_default;
	}
}
and the text strings:

Code: Select all

##grflangid 0

STR_GRF_NAME          :Berlin U-Bahn grf
STR_GRF_DESCRIPTION   :Berlin U-Bahn train vehicles

STR_HK_TYPE_ENGINE    :HK-type
I never coded a vehicle, it was easier than expected :)

I only coded the engine, and invented most of the statistics, so they need adapting a bit.
Also, the x-offset and y-offset are rough guesses, and seem to need some more careful consideration.

Your original image was an RGB image (ie a 24-bit colour image) instead of a 8-bit (256 colours) indexed image, so I converted it to the DOS palette, and attached it again for you. While testing I had to swap the first 4 images and the 2nd 4 images to get it right, perhaps you want to swap direction of your graphics.
Attachments
ub.grf
the resulting newgrf
(1.35 KiB) Downloaded 131 times
converted .png file
converted .png file
BerlinUbahnHKset_20130809T1055_8bppDOS.png (2.61 KiB) Viewed 3954 times
it works!
it works!
hg_type_in_game.png (47.79 KiB) Viewed 3954 times
User avatar
Hans Kruzer
Traffic Manager
Traffic Manager
Posts: 229
Joined: 03 Jul 2013 20:24
Location: Toronto

Re: Modern German U-Bahn Set (OpenTTD)

Post by Hans Kruzer »

yay at least we can see that something's coded :P
I used to think coding would be like 10 km of writing and random numbers lol well it looks easier than I thought but still I find it quite complicating ?(

hmm the ub.grf file doesn't seem to install into my OTTD...

as you said about it being little off it is 1 pxl off the rails I will fix that :D
Tschüß!
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Modern German U-Bahn Set (OpenTTD)

Post by Alberth »

Hans Kruzer wrote:yay at least we can see that something's coded :P
I used to think coding would be like 10 km of writing and random numbers lol well it looks easier than I thought but still I find it quite complicating ?(
The method of writing 10 km random numbers is available too, if you like :) Just code in NFO instead of in NML.
If I must, I can write NFO, but I don't use the numbers often enough to get them in my head, so they are unreadable to me.

There are a lot of properties for train vehicles (you can do a lot of customizing in NewGRF). I copied many properties, I think you can leave out a few so it uses the default value.
I would suggest you read the NML tutorial, and try to code a vehicle yourself, most will be copy/paste with a few tweaks, but it pays to have at least read the description, so you get an idea what it does.
Hans Kruzer wrote:hmm the ub.grf file doesn't seem to install into my OTTD...
Hmm, yeah, I always use the newest NML, which only works with the newer OpenTTD version (1.2.0 and newer, it seems). If you want to be able to use the newgrf for older openttd versions, you'll need to use NML 0.2.x. I doubt that much changed for something as simple as vehicles.
User avatar
Hans Kruzer
Traffic Manager
Traffic Manager
Posts: 229
Joined: 03 Jul 2013 20:24
Location: Toronto

Re: Modern German U-Bahn Set (OpenTTD)

Post by Hans Kruzer »

I have OTTD 1.2.0-beta2 as far as I know xD

I am reading on the NML tutorial and the coding you have here, I get the idea of the 'spriteset' part, basically dimensions of the engine, and some of the other properties like speed, weight etc
for now I won't try to code anything since I dont have all the tools but as far as I understand it, I'm happy. All hail the codemaster :bow: :bow:
I'll just stick to easiest task which is painting Lol :]
Attachments
added 2 pixels width to the | veiws so they look a bit better on rails :D
added 2 pixels width to the | veiws so they look a bit better on rails :D
BerlinUbahnHKset.PNG (4.01 KiB) Viewed 3862 times
Tschüß!
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Lurkmore and 38 guests