Traffic.sii issue

Frank007
Posts: 311
Joined: 19 Jul 2013 22:54

Traffic.sii issue

#1 Post by Frank007 » 30 Apr 2017 20:20

Hi guys!

Is it enough for defining a country border if I check the box "Country border" on node properties panel of a road or prefab and choose the countries in "country" field for back- and forward items?
Or is a border prefab required or any prefab where "state border" is checked on its panel?

Because I want to add a specific traffic ( with public buses) for Budapest. I defined a new country named Budapest and created the traffic file for that adding the bus as well.
I made the borders on every road leaving the city as mentioned above, and rebuilt the map.

The country definition seems to be correct, no errors and on the node panels of the roads, "Budapest" is shown inside the city and "Hungary" in the rest of the map. So it's OK!

But the public buses are running on the whole map, not only in Budapest!
Now I tried to define only one type of car for the traffic outside the city just for curiosity. so If it worked , the map would be full of these cars, but no...
The traffic.sii for Hungary seems to be ignored.

Am I doing something wrong?

Thanks for your help in advance! ;)
Last edited by Frank007 on 02 May 2017 21:26, edited 1 time in total.
The author of HUNGARY MAP
If you appreciate our work, you can support us on the first page!


Thank you in advance!
Frank007
Posts: 311
Joined: 19 Jul 2013 22:54

Re: Creating a new country

#2 Post by Frank007 » 02 May 2017 18:55

Does traffic.sii in a country folder actually have any use at all?

Because I deleted everything in traffic.sii in Hungary and Budapest folder, but the traffic remained the same.
I think the game is reading the data from traffic.storage...sii files spawning all the vehicles defined there and ignores traffic.sii files...

How is it done with the new patch, that every country has a specific police car? Not with traffic.sii?
The author of HUNGARY MAP
If you appreciate our work, you can support us on the first page!


Thank you in advance!
User avatar
SlavikSD
Posts: 945
Joined: 03 Aug 2015 22:59
Location: Russia

Re: Creating a new country

#3 Post by SlavikSD » 02 May 2017 20:24

Frank007 wrote:How is it done with the new patch, that every country has a specific police car? Not with traffic.sii?
traffic.sii in the folder of each country. For each country included need a police car with its skin.
For example, Austria:
[ external image ]
Frank007
Posts: 311
Joined: 19 Jul 2013 22:54

Re: Creating a new country

#4 Post by Frank007 » 02 May 2017 21:09

That's what I thought too!

So if it works with the police cars why it doesn't work with my buses?

In country/budapest/traffic.sii I included this definition:

country_traffic_info : .country.info.traffic.ikarus260 {
object: traffic.ikarus260
spawn_frequency: 5.00
}

But I left it out in country/hungary/traffic.sii and yet the bus is still in the traffic on the whole map...

As I wrote I deleted every definition from both traffic.sii's for a try but all vehicles are still running on the roads incuding the buses as well.
Shouldn't all roads of the map be empty with no vehicles included?


This is why I asked what's the use of traffic.sii if it has no effect to the traffic... :shock: :?:

This file is supposed to define which cars take part in a country's traffic, isn't it?
The author of HUNGARY MAP
If you appreciate our work, you can support us on the first page!


Thank you in advance!
User avatar
cip
Posts: 3113
Joined: 26 Aug 2016 08:14
Location: Brussels

Re: Traffic.sii issue

#5 Post by cip » 03 May 2017 10:02

Dear Frank,
I am not an expert but I know few things related to traffic... perhaps other experienced people like Piva can reply to you also.
In my opinionm traffic.sii from the country folder should make the difference. for your buses you simply create one traffic.sii file for the "country" Budapest where you set a certain frequency of the buses and mandatory you create one traffic.sii file for the real country, Hungary where you set frequency 0.00. if you don't do this, on Hungary you will have buses circulating at the default frequency.
Enjoy driving with my Real Traffic Density for ETS2 and ATS
Enjoy listening my Real Ai Traffic FMOD Sounds for ETS2 and ATS
I have quit SCS forum...
User avatar
Mohegan13
Global moderator
Posts: 19284
Joined: 05 Jul 2013 09:44
Location: West Yorkshire; Mars
Contact:

Re: Traffic.sii issue

#6 Post by Mohegan13 » 03 May 2017 10:26

You really shouldn't edit the default files, it causes mod compatibility issues with other incorrectly made ones.

What you should do is create a new file called traffic.name.sii where 'name' is unique to you/the mod.
[ external image ]
I reserve the right to be 100% wrong.
Something isn't right, nothing feels the same.
Everyone around me Is a different shade of grey.
User avatar
piva
Posts: 2377
Joined: 29 Oct 2014 16:41

Re: Traffic.sii issue

#7 Post by piva » 03 May 2017 10:35

City specific traffic you can make by example from DLC France for trams, using spawn condition

traffic_vehicle : traffic.incentro.orleans
{
accessories[]: .incentro.chassis.orleans
accessories[]: .incentro.fwheel.orleans
accessories[]: .incentro.rwheel.orleans

max_speed: 50

attachable_trailer[]: "train_car.incentro.first"
trailer_count[]: 2

displacement_limit: 0.0

lod_dist[]: 70
# add lod in between
lod_dist[]: 130
lod_dist[]: 200

spawn_condition[]: .traffic.incentro.orleans.condition.city
}
vehicle_accessory: .incentro.chassis.orleans
{
data_path: "/def/vehicle/ai/incentro/chassis_locomotive_orleans.sii"
}
vehicle_wheel_accessory: .incentro.fwheel.orleans
{
data_path: "/def/vehicle/ai_wheel/incentro_front.sii"
}
vehicle_wheel_accessory: .incentro.rwheel.orleans
{
data_path: "/def/vehicle/ai_wheel/incentro_rear.sii"
}
traffic_spawn_condition: .traffic.incentro.orleans.condition.city
{
# spawn only near city with specified name
type: city
str_param[]: "orleans"
}
Frank007
Posts: 311
Joined: 19 Jul 2013 22:54

Re: Traffic.sii issue

#8 Post by Frank007 » 03 May 2017 19:29

@cipinho
I tried it!

I included in hungary/traffic.sii:
country_traffic_info : .country.info.traffic.ikarus260 {
object: traffic.ikarus260
spawn_frequency: 0.00
}

...and in budapest/traffic.sii:
country_traffic_info : .country.info.traffic.ikarus260 {
object: traffic.ikarus260
spawn_frequency: 5.00
}

But it didn't work.

I also tried not to include any vehicle in both traffic.sii!
That's all in the files:
SiiNunit
{
}


and tried to add spawn_frequency: 0.00 to every vehicle.

But all vehicles are still running around which are defined in traffic_storage_bus.sii and traffic_storage_car.sii.

I don't understand...
I added some random characters and it caused errors in the log, so the game is reading the files, at least it's already sure... :D

@Moh1336

I also created new files as you mentioned, but it didn't solve the problem.

@piva

I'll give it a try, thanks!

But I don't know yet, why traffic.sii has no effect to gameplay while new police cars are added with them...
The author of HUNGARY MAP
If you appreciate our work, you can support us on the first page!


Thank you in advance!
User avatar
Mohegan13
Global moderator
Posts: 19284
Joined: 05 Jul 2013 09:44
Location: West Yorkshire; Mars
Contact:

Re: Traffic.sii issue

#9 Post by Mohegan13 » 03 May 2017 19:38

If it's still not working then it would suggest your issue is with this line:

country_traffic_info : .country.info. traffic.ikarus260

The part in red should exactly match the unit from the buses sii file so in your case it should read:

traffic_vehicle : traffic.ikarus260

If it helps I'd be happy to take a look through the def files if you are willing to post them. (model files not required, just the def folders)


When set up correctly it will work, I have my own buses that I limit to certain countries.
[ external image ]
I reserve the right to be 100% wrong.
Something isn't right, nothing feels the same.
Everyone around me Is a different shade of grey.
User avatar
SlavikSD
Posts: 945
Joined: 03 Aug 2015 22:59
Location: Russia

Re: Traffic.sii issue

#10 Post by SlavikSD » 03 May 2017 20:08

Post Reply

Return to “Help center - player to player”

Who is online

Users browsing this forum: No registered users and 7 guests