Help to code a 3 parts EMU with boogies.

Discuss, get help with, or post new modifications, graphics or related tools for Locomotion in this forum.

Moderator: Locomotion Moderators

Post Reply
maquinista
Tycoon
Tycoon
Posts: 1809
Joined: 10 Jul 2006 00:43
Location: Spain

Help to code a 3 parts EMU with boogies.

Post by maquinista »

I'm trying to code a EMU with 3 parts and boogies. I have tried to code it with vehicle creator, but It didn't work. Also, I tried to search some help here, but I don't find something useful.

I need to know the number of the sprites needed. I have found this post that is interesting for single locomotives, but I can't use it with EMUs with 3 parts.

For the moment, I tried this numeration without suscess:
000 - 135 ---> First part.
136 - 183 ---> Boogies of first part.
184 - 319 ---> Second part.
320 - 367 ---> Boogies of second part.
368 - 503 ---> Third part.
504 - 551 ---> Boogies of Third part.


I don't know if this numeration is correct or I need to use a different numeration. Also, I don't know if I can use the same boogie sprites for all parts, because It's the same model.
Attachments
The first wagon is in the top-right corner.
The first wagon is in the top-right corner.
train_bad.png (10.27 KiB) Viewed 1154 times
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]

User avatar
Plastikman
Tycoon
Tycoon
Posts: 3941
Joined: 24 Dec 2005 03:14

Re: Help to code a 3 parts EMU with boogies.

Post by Plastikman »

Use only one set of boogies for all cars.

You put the car pngs in a row then tack the boogies on the end.

Also, if all your cars are the same, You can use just one sprite and repeat it. You can also use one sprite for the two end cars and one for the middle car.
North American sets and then some...
US SET Ver 3.1.0 updated ~ Amtrak Pack 3.1.0 ~ US Passenger/Metro Set 3.1.0 updated~ Auto Factory 2.6 ~ VIA Rail Pack ~ LTD ED1 Conrail Alcos ~ LTD ED2 NJ Transit ~ DBR E60 ~ TGV Duplex ~ Umbrella Corp. ~ Comboios de Portugal~ Dekosoft UP/BN/BNSF Sets ~ ICE // MegaPack = 1.0.3.
Image
Image
Image
My Trains are made from 100% recycled electrons!

maquinista
Tycoon
Tycoon
Posts: 1809
Joined: 10 Jul 2006 00:43
Location: Spain

Re: Help to code a 3 parts EMU with boogies.

Post by maquinista »

It starts to work. I should place the boogies in the correct places, and render all the sprites (I have rendered only the sprites for the rear part). Also, I will try to use a good dithering algorithm, because GIMP doesn't give the best results.

The correct numbers sprites are:

0-135, 136-271 and 272-407: First part, second part and third part, without boogies.
408-551: Three sets of 48 sprites each, with the boogies graphics.

Note that the boogies are not placed well by Vehicle creator. But It can be fixed modifying the XML file.

Code: Select all

	<structure name="field_24[0]" size="6">
		<variable name="length" size="1">50</variable> ---> Distance from start of vehicle and front boogie.
		<unknown name="field_1" size="1">50</unknown> ---> Distance from end of vehicle and rear boogie.
		<unknown name="field_2" size="1">0</unknown> ---> Put a 0 here.
		<unknown name="field_3" size="1">0</unknown> ---> Put a 0 here.
		<variable name="spriteind" size="1">0</variable>
		<unknown name="field_5" size="1">2</unknown>
	</structure>
Also, You should modify field_1 and length. They are the distance between the rear boogie and the end of vehicle, and the start of vehicle and front boogie.

This is very useful:
http://wiki.locomotiondepot.net/index.p ... -_Vehicles
Plastikman wrote:Use only one set of boogies for all cars.

You put the car pngs in a row then tack the boogies on the end.

Also, if all your cars are the same, You can use just one sprite and repeat it. You can also use one sprite for the two end cars and one for the middle car.
Thanks. I was writing my response while You answered the question.
Attachments
Screenshot.
Screenshot.
train_less_bad.png (6.82 KiB) Viewed 1139 times
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]

User avatar
kingmush360
Route Supervisor
Route Supervisor
Posts: 471
Joined: 02 Sep 2008 13:20
Location: At the computer, playing Locomotion!

Re: Help to code a 3 parts EMU with boogies.

Post by kingmush360 »

That looks like a good EMU there, are you releasing it?
Kingmush, being awkward and trying to mod since 2008.

maquinista
Tycoon
Tycoon
Posts: 1809
Joined: 10 Jul 2006 00:43
Location: Spain

Re: Help to code a 3 parts EMU with boogies.

Post by maquinista »

kingmush360 wrote:That looks like a good EMU there, are you releasing it?
I will release it, but now I only have rendered one part. Also, It needs a better dithering.

My next idea is to release it with reversing (this would allow to use back lights and always the rear pantograph). I think that I need five sets sprites. I will try to find something in the forums.

When I had the first EMU finished, I will release the variations faster. This train is the class 440, a typical train in Spain that I have modelled for OpenTTD.
Attachments
Other variant of 440 EMU.
Other variant of 440 EMU.
locomotion_440.png (1.23 KiB) Viewed 1087 times
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]

User avatar
Plastikman
Tycoon
Tycoon
Posts: 3941
Joined: 24 Dec 2005 03:14

Re: Help to code a 3 parts EMU with boogies.

Post by Plastikman »

it might be a bit long for lomo.

as a general rule. when we make trains, we cut 10% off length and 15-25% off for passenger coaches due to clipping.
North American sets and then some...
US SET Ver 3.1.0 updated ~ Amtrak Pack 3.1.0 ~ US Passenger/Metro Set 3.1.0 updated~ Auto Factory 2.6 ~ VIA Rail Pack ~ LTD ED1 Conrail Alcos ~ LTD ED2 NJ Transit ~ DBR E60 ~ TGV Duplex ~ Umbrella Corp. ~ Comboios de Portugal~ Dekosoft UP/BN/BNSF Sets ~ ICE // MegaPack = 1.0.3.
Image
Image
Image
My Trains are made from 100% recycled electrons!

maquinista
Tycoon
Tycoon
Posts: 1809
Joined: 10 Jul 2006 00:43
Location: Spain

Re: Help to code a 3 parts EMU with boogies.

Post by maquinista »

Plastikman wrote:it might be a bit long for lomo.

as a general rule. when we make trains, we cut 10% off length and 15-25% off for passenger coaches due to clipping.
Thanks. That's true, I had some problems with clipping sprites, and the 2×2 curve was a bit unrealistic.

The problem that I have is that the train doesn't change the sprites when It reverses their direction. I have drawn some colour spots on some sprites, and They doesn't change when I invert the direction of the train.
Attachments
locomotion_440b.png
locomotion_440b.png (5.92 KiB) Viewed 1060 times
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]

User avatar
Plastikman
Tycoon
Tycoon
Posts: 3941
Joined: 24 Dec 2005 03:14

Re: Help to code a 3 parts EMU with boogies.

Post by Plastikman »

You are correct. by the nature of the game, If it is motorized, it does not turn around at the end of the line without a trailer/car on the back.

Obviously that is an issue for some of my trains because they are EMU's and clearly have a front.

If you look at the Zephyr here:
Image

I coded it with a mash up of truck and train code mixed together. it seems stable so far. it has been 4 years and no complaints yet.

Take a look at the wiki again or disassemble that unit.
North American sets and then some...
US SET Ver 3.1.0 updated ~ Amtrak Pack 3.1.0 ~ US Passenger/Metro Set 3.1.0 updated~ Auto Factory 2.6 ~ VIA Rail Pack ~ LTD ED1 Conrail Alcos ~ LTD ED2 NJ Transit ~ DBR E60 ~ TGV Duplex ~ Umbrella Corp. ~ Comboios de Portugal~ Dekosoft UP/BN/BNSF Sets ~ ICE // MegaPack = 1.0.3.
Image
Image
Image
My Trains are made from 100% recycled electrons!

maquinista
Tycoon
Tycoon
Posts: 1809
Joined: 10 Jul 2006 00:43
Location: Spain

Re: Help to code a 3 parts EMU with boogies.

Post by maquinista »

Thanks, I wil try it.
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]

Post Reply

Return to “Locomotion Graphics, Modifications & Tools”

Who is online

Users browsing this forum: No registered users and 1 guest