News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

Tractor-Trailer Alignment?

Started by grampybear, October 09, 2011, 01:42:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

grampybear

 If both tractor and trailer have no constraints and both have a fixed length (8) in dat file will any tractor pull any trailer or is alignment set at time of painting? Can someone explain how alignment is set?  Thank you

VS

I'm not sure if your terms match these used often, so...

Under the hood, all vehicles are drawn as images that move along predetermined "paths" across tiles. Correspondence between position in these images and resulting positions in actual view is what painters call alignment. It's a more a concept rather than single setting, there is not a particular setting alignment=xyz :) So, to have a trailer and a truck properly aligned, the graphics have to be positioned properly - that's all there is to alignment... almost! While you have to get the positions right, different lengths mean you have to get right another degree of freedom. Vehicle length affects visual distance between vehicles, and helps get the look right in these cases.

However, you ask if any tractor will pull any trailer, which is determined by constraints. These are separate for front and rear. A vehicle can list which particular vehicles it will accept from some side. If the list is empty (default), everything matches. It can also include a special entry "nothing" which means the side can be end of convoy. When assembling convoy, both rear of previous and front of next vehicle have to allow connecting.

As an example, most buses have both sides set to only end of convoy, so that nothing can be connected to them. Freight locomotives on the other hand would probably list front as themselves and empty, so that they can lead, be grouped in front, but in the rear will accept any carriage (since listing them all would be impractical).

If you're hinting at the fact that constraints can create insulated groups of vehicles that can go only together, and these will develop incompatible alignment "dialects", yes, that is possible to some extent.

So... I think I've covered both topics, but was that understandable at all? And was it actually the answer you need? I'm somewhat sceptical... ;)

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

grampybear

Thank you.  So while a trailer painted by A can be pulled by a Tractor painted by B,both with no restrictions, they may not ride properly on the road way. If sources are available for both , can this be fixed or is it set at time of painting? I ask because some trailers in pak 128 just seem to pull better( visually) than others.

VS

If sources are available, this can be fixed. Feel free to report some cases when vehicles can be joined and look bad - as long as addons are not par of the problem :) Fixing this is quite an unsatisfactory task, though... ::(

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!