OTTD: Modern European Metro Set
Moderator: Graphics Moderators
- Hans Kruzer
- Traffic Manager
- Posts: 229
- Joined: 03 Jul 2013 20:24
- Location: Toronto
Re: The Modern U-Bahn Set
The end/tail wagon is complete!!!! Quite easy, all I had to do was replace the headlights in the engine to red
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
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
- Attachments
-
- end wagon
- BerlinUbahnHKzugendtrans.PNG (2.14 KiB) Viewed 4207 times
-
- Christmas!!!
- BerlinUbahn[Christmastrain]trans.PNG (2.24 KiB) Viewed 4191 times
Tschüß!
-
- Tycoon
- Posts: 2781
- Joined: 22 Feb 2011 18:34
Re: Modern German U-Bahn Set
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
- Hans Kruzer
- Traffic Manager
- Posts: 229
- Joined: 03 Jul 2013 20:24
- Location: Toronto
Re: Modern German U-Bahn Set
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
- BerlinUBahnF92zugtrans.PNG (2.44 KiB) Viewed 4166 times
Tschüß!
- Hans Kruzer
- Traffic Manager
- Posts: 229
- Joined: 03 Jul 2013 20:24
- Location: Toronto
Re: Modern German U-Bahn Set
what do you mean so? I am new to this example?Transportman wrote:You might want to consider using a template to place the graphics in, as that makes it easier to code later.
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üß!
Re: Modern German U-Bahn Set
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
I'll be following this thread!
Sorry for my english :F
I'll be following this thread!
Sorry for my english :F
- Hans Kruzer
- Traffic Manager
- Posts: 229
- Joined: 03 Jul 2013 20:24
- Location: Toronto
Re: Modern German U-Bahn Set
thanks, I won't give up paintin' until I'm satisfied
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 and I never suspected I'd end up doing work, it was simply a request
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 and I never suspected I'd end up doing work, it was simply a request
Tschüß!
-
- Tycoon
- Posts: 2781
- Joined: 22 Feb 2011 18:34
Re: Modern German U-Bahn Set
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).Hans Kruzer wrote:what do you mean so? I am new to this example?Transportman wrote:You might want to consider using a template to place the graphics in, as that makes it easier to code later.
Do you mean remove everything except the sprites (like the pallette and name?? )
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
- Hans Kruzer
- Traffic Manager
- Posts: 229
- Joined: 03 Jul 2013 20:24
- Location: Toronto
Re: Modern German U-Bahn Set
Okay, I made them easier for coding here I suppose
- Attachments
-
- 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 4118 times
- Top-Bottom: Berlin U-Bahn HK-type,
Tschüß!
Re: Modern German U-Bahn Set
Did you just suddenly managed to draw all of that from just following the tutorial?!
That is very fast!
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ɑ̌ŋ]
Java Scenario Found Here - Version 2 out
[tweɪ̂ pû tɕʰì wɔ̀ mǐlɤ lû tɕʰìŋ nì pɑ́ŋmɑ̌ŋ]
-
- Tycoon
- Posts: 2781
- Joined: 22 Feb 2011 18:34
Re: Modern German U-Bahn Set
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
-
- Tycoon
- Posts: 5950
- Joined: 27 Apr 2005 07:09
- Contact:
Re: Modern German U-Bahn Set
@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.
regards
Michael
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.
Not necissarily. If a vehicle is symmetric, it needs only 4 sprites.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.
regards
Michael
- Hans Kruzer
- Traffic Manager
- Posts: 229
- Joined: 03 Jul 2013 20:24
- Location: Toronto
Re: Modern German U-Bahn Set
Oh no now I gotta start all over again ahhhmichael blunck wrote:@Hans
As I already told you, you´re using a damaged palette
xD
I can just replace the colours with those on the new pallette ?
and yes thats what I made straight off the tutorial
Tschüß!
-
- Tycoon
- Posts: 5950
- Joined: 27 Apr 2005 07:09
- Contact:
Re: Modern German U-Bahn Set
You misunderstood.Hans Kruzer wrote:Oh no now I gotta start all over again ahhhmichael blunck wrote:@Hans
As I already told you, you´re using a damaged palette
xD
I can just replace the colours with those on the new pallette ?
"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
- Hans Kruzer
- Traffic Manager
- Posts: 229
- Joined: 03 Jul 2013 20:24
- Location: Toronto
- Hans Kruzer
- Traffic Manager
- Posts: 229
- Joined: 03 Jul 2013 20:24
- Location: Toronto
Re: Modern German U-Bahn Set
Im gonna take out the F92 and redo it with DOS Pallete since I only started it
- Attachments
-
- 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 4059 times
- much easier for coding?
Last edited by Hans Kruzer on 09 Aug 2013 09:02, edited 1 time in total.
Tschüß!
-
- Tycoon
- Posts: 5950
- Joined: 27 Apr 2005 07:09
- Contact:
Re: Modern German U-Bahn Set
You are already using the "DOS palette", only an distorted one.Hans Kruzer wrote:Okay, the next trains I make I will use the DOS pallete
regards
Michael
Re: Modern German U-Bahn Set (OpenTTD)
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:
and the text strings:
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.
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;
}
}
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 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 132 times
-
- converted .png file
- BerlinUbahnHKset_20130809T1055_8bppDOS.png (2.61 KiB) Viewed 4018 times
-
- it works!
- hg_type_in_game.png (47.79 KiB) Viewed 4018 times
- Hans Kruzer
- Traffic Manager
- Posts: 229
- Joined: 03 Jul 2013 20:24
- Location: Toronto
Re: Modern German U-Bahn Set (OpenTTD)
yay at least we can see that something's coded
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
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
Tschüß!
Re: Modern German U-Bahn Set (OpenTTD)
The method of writing 10 km random numbers is available too, if you like Just code in NFO instead of in NML.Hans Kruzer wrote:yay at least we can see that something's coded
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
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.
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.Hans Kruzer wrote:hmm the ub.grf file doesn't seem to install into my OTTD...
- Hans Kruzer
- Traffic Manager
- Posts: 229
- Joined: 03 Jul 2013 20:24
- Location: Toronto
Re: Modern German U-Bahn Set (OpenTTD)
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
I'll just stick to easiest task which is painting Lol
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
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
- BerlinUbahnHKset.PNG (4.01 KiB) Viewed 3926 times
Tschüß!
Who is online
Users browsing this forum: Bing [Bot], Google Adsense [Bot] and 8 guests