Community Forum

AL Traffic

Forum Overview >> Farming Simulator 19

CategoryFarming Simulator 19
Created01.07.2021 17:08

Tommy Aleksandersen (WolfBoy) 01.07.2021 17:08
Hi. I have set up traffic system on my map. But there is somethng I wondering about. is the possibility of only one 1 car coming on the track ?

And if so. Where and how do I adjust it? I know there is the xml file :)

Thank you.

Bilbo Beutlin (BBeutlin) 01.07.2021 17:42
Each spline in map.i3d may have its individual trafficSystem.xml.
It is determined by spline user attribute 'xmlFile' which points in default maps to "$data/maps/mapDE|US_trafficSystem.xml". For a custom file change this to eg. "maps/trafficSystem.xml" where you setup the traffic individually. If you examine the default files you should be able to create your own ones. By name the meaning of xml tags and attributes should be self-explanatory.

Tommy Aleksandersen (WolfBoy) 02.07.2021 13:02
Yes I know. I have a custom xml file with only one vehicle in it, my path is xml/mapUS_trafficSystem.xml.
But on the road ingame there is several vehicle of the same type. I only want 1 showing up on the road.

This is some of my xml file. The rest of it is about motor, color and stuff.

<vehicle topSpeed="0.017" accel="0.0000010" probability="0.07">
<assets filename="../vehicles/jdd.i3d" triggerIndex="3" lightsIndex="0" driverIndex="4">
<wheel yRotNode="9" xRotNode="9" radius="0.9" distToRotCenter="6.3" />
<wheel yRotNode="10" xRotNode="10" radius="0.9" distToRotCenter="6.3" />
<wheel yRotNode="11" xRotNode="11" radius="0.9" distToRotCenter="0" />
<wheel yRotNode="12" xRotNode="12" radius="0.9" distToRotCenter="0" />
<wheel yRotNode="13" xRotNode="13" radius="0.9" distToRotCenter="0" />
<wheel yRotNode="14" xRotNode="14" radius="0.9" distToRotCenter="0" />

I can`t figure out where to adjust it so it`s only 1 vehicle that show up on the road.

I have also note that if I have a short route there is 1, but if the route is long there will be several of same type.

Thank you

Bilbo Beutlin (BBeutlin) 02.07.2021 18:12
On an spline with "TrafficSystem.onCreate" the game engine controls the amount of cars automatically, depending on spline lenght and system settings.

If you need a specified amount of cars (or other objects) you must use "Ship.onCreate". See example maps with moving deco objects.

Tommy Aleksandersen (WolfBoy) 02.07.2021 21:49
Ah. I was on a map and there They had use this command. Now I understand. There is no xml file to that so it must be controlled by giants engine then ?

That was a lot of help Bilbo. I understand lot more now. it is hard to find info on this kind of stuff. is there any place I can read what all this user attributes commands mean ? Maybe there is more user attributes I can use for stuff. I learned something new to day.

Thank you again Bilbo, you are the boss :)

Bilbo Beutlin (BBeutlin) 02.07.2021 22:37
Unluckily it is not documented anywhere, not even in the debugger sources.
So far I know only the user attributes "numShips" and "speed" what should be self-explanatory.
Since it is a very primitive, only used for background deco stuff, I don't expect more.
For cars it is probably less suitable, guessing the wheels won't turn.

Tommy Aleksandersen (WolfBoy) 06.07.2021 09:26
Ginants love seecrets lol thank you for helping Bilbo. I got it to work, it`s fun to learn this stuff. I have startet to make my own map now, wherry time consuming but fun :)

Note: Log in to post. Create a new account here.