The International Simutrans Forum

Community => Simutrans Help Center => Topic started by: PlayTrans2009 on September 07, 2009, 08:10:10 am

Title: How to make the truck to bring wood as cargo?
Post by: PlayTrans2009 on September 07, 2009, 08:10:10 am
I'm making an addon for pak96.comic. How to make some changes to let the truck to bring wood on dat file?

You have got to understand me please.
Title: Re: How to make the truck to bring wood as cargo?
Post by: vilvoh on September 07, 2009, 08:32:49 am
Sample of a truck that can carry wood from the SVN (http://simutrans.svn.sourceforge.net/viewvc/simutrans/pak64/vehicle/road/):

Code: [Select]
obj=vehicle
name=Holztransporter
copyright=Hajo
waytype=road
freight=Holz
payload=16
engine_type=diesel
smoke=Diesel
speed=60
cost=320000
weight=6
power=210
RunningCost=220
sound=1
Constraint[Prev][0]=none
intro_year = 1927
intro_month = 12
retire_year = 1965
EmptyImage[S]=veh-wood.2.0
EmptyImage[N]=veh-wood.2.1
EmptyImage[E]=veh-wood.2.2
EmptyImage[W]=veh-wood.2.3
EmptyImage[SE]=veh-wood.2.4
EmptyImage[NW]=veh-wood.2.5
EmptyImage[NE]=veh-wood.2.6
EmptyImage[SW]=veh-wood.2.7
FreightImage[S]=veh-wood.3.0
FreightImage[N]=veh-wood.3.1
FreightImage[E]=veh-wood.3.2
FreightImage[W]=veh-wood.3.3
FreightImage[SE]=veh-wood.3.4
FreightImage[NW]=veh-wood.3.5
FreightImage[NE]=veh-wood.3.6
FreightImage[SW]=veh-wood.3.7

The png image for this dat file is this one (http://simutrans.svn.sourceforge.net/viewvc/simutrans/pak64/vehicle/road/veh-wood.png?revision=19&view=markup).
Title: Re: How to make the truck to bring wood as cargo?
Post by: Spike on September 07, 2009, 09:36:08 am
In general, you need to look up the name of the good. It can be different in each pak set.

Quote
freight=Holz

Once you figured the name of the good, put a line like the above in your DAT file. Be sure to write upper and lower case correct.
Title: Re: How to make the truck to bring wood as cargo?
Post by: PlayTrans2009 on September 07, 2009, 09:47:37 am
So, I copy the cargo to the truck dat file.

I using pak96. What are the cargo's names?
Title: Re: How to make the truck to bring wood as cargo?
Post by: Spike on September 07, 2009, 09:49:07 am
I'd think you can look into the pak96.comic folder, and check the goodXXX.pak files. The names of the goods should be in place of the XXX. It's been long though that I worked with other pak sets, and I don't have a copy of Simutrans at hand to check it.

Edit: I suspect the names to be in German, so you need to feed them into a translator to make sense of them. Should work fairly well, though, since it's only single words.
Title: Re: How to make the truck to bring wood as cargo?
Post by: PlayTrans2009 on September 07, 2009, 09:51:17 am
Wow. Thanks!