Page 1 of 1

Changing a truck load

Posted: 25 Apr 2011 19:35
by Emperor Darth Sidious
Hi there,

I have accomplished a lot of things for myself. But I could sure need some help with this. I have a problem with the scrapyard.

Since most of the times there are a lot of car-dealers in a town and it would be a stupid sight to create only train-routes from the car-dealers to the scrapyards I was wondering if it would be possible to make an existing truck to carry scrap. Via this method it would sure be a lot simpeler to transport scrapmetal from a dealer to a nearby scrapyard.

But how can you do this ?

I want to change the coal/iron ore/grain truck so it can carry scrap metal, does somebody know how to do this ?

Here's an example-screen of how it has to be...(Sorry about placing the wrong type of industry, of course the steelworks has to be a factory)
Screenshot2.PNG
(280.88 KiB) Downloaded 3 times
Thnxsss for the help guys !

Re: Changing a truck load

Posted: 25 Apr 2011 19:58
by Illegal_Alien
Just find the cargoID of the scrap :)

Re: Changing a truck load

Posted: 25 Apr 2011 20:24
by Emperor Darth Sidious
It already worked, but thankls for the reply Alien. I found it out for myself. I copied the cargo from the scrapmetal-train car to the truck and changed it name in the XML. file from SHOPPER to SRHOPPER and the nam of the dat file as well.

For that I changed the cargo code in the XML from the original to this:

<cargo num="0" capacity="32">
<cargotype id="22">0</cargotype>
<cargotype id="23">512</cargotype>
</cargo>


Now I have 2 trailers. One for scrap, and one for grain, iron ore and coal (See Screenshot)
Screenshot11.PNG
(250.36 KiB) Downloaded 3 times
The only thing that I wasn't able to change was the scrapmetal in the truck. It still looks as if it transports coal... :(

If there is a way to change that as well I would love to know that, but it probebly has something to do with changing it sprite by sprite :o :)

Re: Changing a truck load

Posted: 25 Apr 2011 21:24
by Lighthouse
CanĀ“t you use the brown from the Iron Ore load? That is almost a "rusty" colour.

Re: Changing a truck load

Posted: 26 Apr 2011 08:14
by Emperor Darth Sidious
Yeah that looks a lot better of course. But how do I do that ? It now took Coal as a load. How can I make it use the Iron ore load ? Should I remove the Coal sprites, or do I have to use another code for that ?

Thnx !

Re: Changing a truck load

Posted: 26 Apr 2011 13:25
by Lighthouse
As usual Try and Error:
Image
This is what i see with my code change. Truck 2 is half loaded, Truck 1 is fully loaded.

Types 22 & 23 are for Plastikmans both types of scrap i believe?
For the sprites i think from 0 to 511 is used for the coal load
from 512 to 1023 is used for iron ore,
and from 1024 is for grain
Not sure but here it is working.

Code: Select all

 
	<cargo num="0" capacity="32">
		<cargotype id="22">512</cargotype>
		<cargotype id="23">512</cargotype>
	</cargo>
p.s. truck = from Plastikman, original trailer from The Fanpage

Re: Changing a truck load

Posted: 26 Apr 2011 15:32
by Plastikman
Lighthouse has it correct for the sprite selection.

Maydays trucks are here http://www.tt-forums.net/viewtopic.php?f=40&t=23752

Re: Changing a truck load

Posted: 30 Apr 2011 10:17
by Emperor Darth Sidious
Ok thanksss ! It worked. I also managed to change the truckload for an other truck, it can now transport waste !