News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

How to attach Scania R620 trailers to another truck in .dat file?

Started by Aquel, February 04, 2010, 05:59:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Aquel

Hello

I'm Aquel, I'm currently trying to make some french trucks for Simutrans.
Currently I've done 2: the Renault Magnum and the Renault Premium. both with .dat and .png file they're still on beta test.

My question is, can I attach trailers from the Scania R620 Topline on my truck?
If yes what should I modify in the .dat file?

Some people I've been trying to do but couldn't manage to make it work.
Link: http://forum.simutrans.com/index.php?topic=4005.240

Any help is welcomed! ;D

Attached file is .PNG and .DAT of the truck I'm talking about.

Cheers! :)
Créateur de véhicule routier français: http://simutrans-france.fr.nf/doku.php?id=fr:vehicules_routiers_byaquel
Making French road vehicule a reality: http://simutrans-france.fr.nf/doku.php?id=en:vehicules_routiers_byaquel

Impossible n'est pas français!
Napoléon Bonaparte a écrit"Ce n'est pas possible, m'écrivez-vous : cela n'est pas français", en répondant à Jean Léonard, Comte Le Marois, qui lui faisait part de l'impossibilité de réaliser un projet.  Napoléon Bonaparte wrote: "It's not possible, you're telling me: it's not french", responding to Jean Léonard, Count Le Marois regarding the impossbility of making a project   [img]http://graphics.simutrans.com/albums/userpics/1000

The Hood

You need to use something like the example from pak128.Britain I've attached below.

The thing doing the business is the line

Constraint[Next][0]=xxx

in the tractor unit, and the line

Constraint[Prev][0]=yyy

in the trailer.

If no Constraint lines are supplied, then it will link with any other vehicle.  I suspect therefore that the problem is in the dat file for the Scania trailers: if they have a Constraint[Prev], then your truck will not couple with it.  The only solution is to add

Constraint[Prev][N]=Renault_Magnum_Truck

to the dat file of the trailer, where N is a number 0,1,2,3, etc (starting with 0, but if 0 is taken, then use 1, etc)

DirrrtyDirk

Some trailers have constraints, some don't. I don't know how VS wants to handle this...
  
***** PAK128 Dev Team - semi-retired*****

VS

Martin said he will work on truck replacements (which he did!), and I gave him carte blanche regarding constraints. I think he didn't finish that, 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!

Aquel

Hello People! :)

Thanks for your feedback.
Unfortunalty that means I'll have to make my own trailer which I really didn't wanted to, too lazy and short on time for this ;D ...
Well at least I'll have an excuse for making crazy art on the trailers!!! ???

Anyway thanks again for your "enlightning" answers. ;D

Cheers
Créateur de véhicule routier français: http://simutrans-france.fr.nf/doku.php?id=fr:vehicules_routiers_byaquel
Making French road vehicule a reality: http://simutrans-france.fr.nf/doku.php?id=en:vehicules_routiers_byaquel

Impossible n'est pas français!
Napoléon Bonaparte a écrit"Ce n'est pas possible, m'écrivez-vous : cela n'est pas français", en répondant à Jean Léonard, Comte Le Marois, qui lui faisait part de l'impossibilité de réaliser un projet.  Napoléon Bonaparte wrote: "It's not possible, you're telling me: it's not french", responding to Jean Léonard, Count Le Marois regarding the impossbility of making a project   [img]http://graphics.simutrans.com/albums/userpics/1000

The Hood

Or you could just ask for the sources from the person who made the trailers...

Aquel

Quote from: The Hood on February 05, 2010, 07:02:33 PM
Or you could just ask for the sources from the person who made the trailers...

That's a good answer
but then the next question is who is it??
Anyone knows?

I have some work to do so cannot make it for now.
Thanks again for your feedback.

Cheers
Créateur de véhicule routier français: http://simutrans-france.fr.nf/doku.php?id=fr:vehicules_routiers_byaquel
Making French road vehicule a reality: http://simutrans-france.fr.nf/doku.php?id=en:vehicules_routiers_byaquel

Impossible n'est pas français!
Napoléon Bonaparte a écrit"Ce n'est pas possible, m'écrivez-vous : cela n'est pas français", en répondant à Jean Léonard, Comte Le Marois, qui lui faisait part de l'impossibilité de réaliser un projet.  Napoléon Bonaparte wrote: "It's not possible, you're telling me: it's not french", responding to Jean Léonard, Count Le Marois regarding the impossbility of making a project   [img]http://graphics.simutrans.com/albums/userpics/1000

martin

The Scania trucks don't have constraints in their .dat files. The restrictions are set in the .dat files for the trailers. There's not much I can do about that right now. I'm planning on reorganizing the constraints, but need to look further into that. Besides that the constraints can only be set to trucks in the official pak128 set.
I had an idea a long time ago to implement categories to be used in relation to constraints, but that never got implemented. That would have made it easier to hook up new trucks to existing trailers...

I've put some (new) trailers in this thread: http://forum.simutrans.com/index.php?topic=3241.0  which you could use for testing with your trucks...

Martin

VS

Since we're talking about truck/trailer constraints... there was an interesting idea in Czech forum about these. Essentially you would have a "joiner" (?), to which you would restrict trucks and trailers from each side. These objects would represent the different mechanisms used to connect trucks and trailer. The upside is that you get more freedom with constraints - you apply them to trailers and trucks, but there is the "translation layer" so you never lock particular trucks to particular trailers.

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!

Aquel

Namastéji!

@Martin: Thank you so much for the trailers!
I will test the truck as soon as I can.
By the way here are the .PNG file of the truck (Bonus pink Magnum I just have to find a use for it...) I made also a black one but it seems it was too darker... just have a look at it and tell me.
I have to make the dat file for it.

@VS: I don't get it? Does it means you will be able to attach any trailers?

Thanks again for help!

Créateur de véhicule routier français: http://simutrans-france.fr.nf/doku.php?id=fr:vehicules_routiers_byaquel
Making French road vehicule a reality: http://simutrans-france.fr.nf/doku.php?id=en:vehicules_routiers_byaquel

Impossible n'est pas français!
Napoléon Bonaparte a écrit"Ce n'est pas possible, m'écrivez-vous : cela n'est pas français", en répondant à Jean Léonard, Comte Le Marois, qui lui faisait part de l'impossibilité de réaliser un projet.  Napoléon Bonaparte wrote: "It's not possible, you're telling me: it's not french", responding to Jean Léonard, Count Le Marois regarding the impossbility of making a project   [img]http://graphics.simutrans.com/albums/userpics/1000

The Hood

@VS

That is a very cunning idea - would implement straight away for freight trains in pak128.Britain if we weren't already limited to 24 vehicles per convoy in standard... :(

VS

Aquel: it was only an idea.

The Hood: it remains yet to be seen if it's as good as suggested ;)

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!

Aquel

Quote from: martin on February 10, 2010, 08:43:50 PM
The Scania trucks don't have constraints in their .dat files. The restrictions are set in the .dat files for the trailers. There's not much I can do about that right now. I'm planning on reorganizing the constraints, but need to look further into that. Besides that the constraints can only be set to trucks in the official pak128 set.
I had an idea a long time ago to implement categories to be used in relation to constraints, but that never got implemented. That would have made it easier to hook up new trucks to existing trailers...

I've put some (new) trailers in this thread: http://forum.simutrans.com/index.php?topic=3241.0  which you could use for testing with your trucks...

Martin

Sorry for late question.
hope you did not diseapear too soon.
Can you tell me in the *.dat what do I have to change to make my truck accept any kind of trailer?
I tried to put nothing:
Constraint[Prev][0]=none

Constraint[Next][0]=

But then I cannot attach anything...
You know the way to make it?

Thanks
Créateur de véhicule routier français: http://simutrans-france.fr.nf/doku.php?id=fr:vehicules_routiers_byaquel
Making French road vehicule a reality: http://simutrans-france.fr.nf/doku.php?id=en:vehicules_routiers_byaquel

Impossible n'est pas français!
Napoléon Bonaparte a écrit"Ce n'est pas possible, m'écrivez-vous : cela n'est pas français", en répondant à Jean Léonard, Comte Le Marois, qui lui faisait part de l'impossibilité de réaliser un projet.  Napoléon Bonaparte wrote: "It's not possible, you're telling me: it's not french", responding to Jean Léonard, Count Le Marois regarding the impossbility of making a project   [img]http://graphics.simutrans.com/albums/userpics/1000

DirrrtyDirk

  
***** PAK128 Dev Team - semi-retired*****

Zeno

Yep, don't put that line and it will accept any trailer. But trailers will need your truck as [prev] constraints (or no prev constraints at all) to allow the truck to pull them. That is, both trailer and truck must be coded accordingly.

Aquel

@DirrrtyDirk
@zeno:

Thanks for the feedbazck guys.
Actually in another topic Martin answered almost my question: http://forum.simutrans.com/index.php?topic=4659.new#new
It's too late to see it but I'll try to make it tom and post you the result.
Cheers ;D
Créateur de véhicule routier français: http://simutrans-france.fr.nf/doku.php?id=fr:vehicules_routiers_byaquel
Making French road vehicule a reality: http://simutrans-france.fr.nf/doku.php?id=en:vehicules_routiers_byaquel

Impossible n'est pas français!
Napoléon Bonaparte a écrit"Ce n'est pas possible, m'écrivez-vous : cela n'est pas français", en répondant à Jean Léonard, Comte Le Marois, qui lui faisait part de l'impossibilité de réaliser un projet.  Napoléon Bonaparte wrote: "It's not possible, you're telling me: it's not french", responding to Jean Léonard, Count Le Marois regarding the impossbility of making a project   [img]http://graphics.simutrans.com/albums/userpics/1000