Setting spawn probability of truck+trailer traffic [SOLVED]

Post Reply
User avatar
Boeing73FLY
Posts: 447
Joined: 11 Jun 2013 00:00
Location: Kalos, Pokémon world -- Las Vegas, NV, USA, Earth
Contact:

Setting spawn probability of truck+trailer traffic [SOLVED]

#1 Post by Boeing73FLY » 21 Apr 2017 23:52

So here is my modding situation:

I have made additional .SII files of truck traffic. I made them so that they will drive at maximum 70 km/h with overweight trailers. They DO NOT replace existing truck traffic definitions in the def folder so that way those trucks can still spawn regular trailers normally. At the moment, I am experimenting with only excavator loads connected to 23 vanilla trucks.

Now here's my issue: I see more truck traffic pulling excavators than any other trailer; I mean, the regular trailers still spawn normally, but the excavator-loaded low bed trailers appear more frequently.

So my question is: How can I balance the spawning probability between regular cargo and excavator cargo in traffic?

To show you guys what I have done, here are my files:

Sample DAF XF105 limited to 70 km/h daf_c_6x4_70.SII #Reminder: NO INTENT to replace daf_c_6x4.SII. Same to occur for 22 other trucks

Code: Select all

traffic_vehicle : traffic.70kph.dafxf_c6x4
{
	accessories[]: .70kph.dafxf_c6x4.chassis
	accessories[]: .70kph.dafxf_c6x4.fwheel
	accessories[]: .70kph.dafxf_c6x4.rwheel
	accessories[]: .70kph.dafxf_c6x4.rwheel2

	max_speed: 70
	attachable_trailer[]: "traffic.trailer.overweight.excavator"
	trailer_count[]: 1

	sound_move[]: "/sound/ai/ai_renault-magnum.ogg"

	engine_torque: 2300

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

	vehicle_mass: 17000
@include "drivers_generic.sui"	
}

vehicle_accessory: .70kph.dafxf_c6x4.chassis
{
	data_path: "/def/vehicle/ai/truck/daf.xf/c6x4.sii"
}

vehicle_wheel_accessory: .70kph.dafxf_c6x4.fwheel
{
	offset: 0
	data_path: "/def/vehicle/f_wheel/steel.sii"
}

vehicle_wheel_accessory: .70kph.dafxf_c6x4.rwheel
{
	offset: 0
	data_path: "/def/vehicle/r_wheel/steel.sii"
}
vehicle_wheel_accessory: .70kph.dafxf_c6x4.rwheel2
{
	offset: 2
	data_path: "/def/vehicle/r_wheel/steel.sii"
}
excavator_traffic.SII #Originally not included in vanilla traffic; connected to 22 other vanilla trucks, all of which are limited to 70 km/h

Code: Select all

traffic_trailer : traffic.trailer.overweight.excavator 
{
	accessories[]: .traffic.overweight.excavator.tchassis
	accessories[]: .traffic.overweight.excavator.trwheel0
	accessories[]: .traffic.overweight.excavator.trwheel1
	accessories[]: .traffic.overweight.excavator.trwheel2
	accessories[]: .traffic.overweight.excavator.cargo

	cargo_mass: 24720

	allowed_tractor[]: "traffic.70kph.dafxf_b4x2"
	allowed_tractor[]: "traffic.70kph.dafxf_c6x4"
	allowed_tractor[]: "traffic.70kph.daf_e6_a4x2"
	allowed_tractor[]: "traffic.70kph.ivecoh_a6x4"
	allowed_tractor[]: "traffic.70kph.ivecos_a4x2"
	allowed_tractor[]: "traffic.70kph.ivecos_c6x4"
	allowed_tractor[]: "traffic.70kph.mantgx_a4x2"
	allowed_tractor[]: "traffic.70kph.mantgx_c6x4"
	allowed_tractor[]: "traffic.70kph.merc_a4x2"
	allowed_tractor[]: "traffic.70kph.merc_a6x4"
	allowed_tractor[]: "traffic.70kph.merc_2014.a4x2"
	allowed_tractor[]: "traffic.70kph.rmag_c_4x2"
	allowed_tractor[]: "traffic.70kph.premium_a4x2"
	allowed_tractor[]: "traffic.70kph.premium_b4x2"
	allowed_tractor[]: "traffic.70kph.scania_r_a"
	allowed_tractor[]: "traffic.70kph.scania_r_b"
	allowed_tractor[]: "traffic.70kph.scania_r_c"
	allowed_tractor[]: "traffic.70kph.sline_a"
	allowed_tractor[]: "traffic.70kph.sline_c"
	allowed_tractor[]: "traffic.70kph.vlv09_a4x2"
	allowed_tractor[]: "traffic.70kph.vlv09_c6x4"
	allowed_tractor[]: "traffic.70kph.vlv12_a4x2"
	allowed_tractor[]: "traffic.70kph.vlv12_c6x4"
}

vehicle_accessory: .traffic.overweight.excavator.tchassis
{
    	data_path: "/def/vehicle/trailer/overweight/chassis1.sii"
}

vehicle_wheel_accessory: .traffic.overweight.excavator.trwheel0
{
	offset: 0
    	data_path: "/def/vehicle/t_wheel/overweight.sii"
}

vehicle_wheel_accessory: .traffic.overweight.excavator.trwheel1
{
	offset: 2
    	data_path: "/def/vehicle/t_wheel/overweight.sii"
}

vehicle_wheel_accessory: .traffic.overweight.excavator.trwheel2
{
	offset: 4
    	data_path: "/def/vehicle/t_wheel/overweight.sii"
}
vehicle_accessory: .traffic.overweight.excavator.cargo
{
    	data_path: "/def/vehicle/trailer/overweight/excavator.sii"
}
 

I would appreciate any help from those smarter than me :lol: ... please :|
Last edited by Boeing73FLY on 23 Apr 2017 01:43, edited 1 time in total.
MY ESSENTIAL MOD FOR REALISM

Enhanced Driving XPerience (EDXP) 2.0 + Addons for ATS (1.47) / ETS2 (1.47)
User avatar
LeafeonGold
Posts: 1832
Joined: 09 Jun 2013 03:11
Location: Philadelphia, PA
Contact:

Re: Setting the spawn probability of truck + trailer traffic

#2 Post by LeafeonGold » 23 Apr 2017 01:16

Here's what will fix that issue, you have to make an additional file for traffic frequency in the /def/country/[country]/ folder for your trucks, else they will have a spawn frequency of "1" (100%).

As a small example if you were to create a new file in those directories (ie. /def/country/netherlands/traffic.70kph.sii) you would set it up with. . .

Code: Select all

country_traffic_info : .country.info.70kph.dafxf_c6x4 {
	object: traffic.70kph.dafxf_c6x4
	spawn_frequency: 0.15
}
. . . and that will give it a 15% spawn chance. Then, all you would have to do is repeat for the other 21 trucks, and copy the files for the other 15 countries.
"Don't try extra hard to make your presence known, but make sure your absence is noticed."

Intel I7-4790K |//| EVGA GeForce GTX 1080 FTW |//| 32GB RAM
Workshop |//| ATS Screens |//| ETS2 Screens
User avatar
Boeing73FLY
Posts: 447
Joined: 11 Jun 2013 00:00
Location: Kalos, Pokémon world -- Las Vegas, NV, USA, Earth
Contact:

Re: Setting spawn probability of truck+trailer traffic [SOLV

#3 Post by Boeing73FLY » 23 Apr 2017 01:42

Ah, okay! I completely forgot about that file. Thanks RiXeN!
MY ESSENTIAL MOD FOR REALISM

Enhanced Driving XPerience (EDXP) 2.0 + Addons for ATS (1.47) / ETS2 (1.47)
Post Reply

Return to “Help center - player to player”

Who is online

Users browsing this forum: No registered users and 5 guests