Own Traffic Rule and Traffic Truck & Trailer Type

Post Reply
User avatar
Bulldozer 1973
Posts: 1200
Joined: 21 Dec 2012 00:27
Location: Treuchtlingen / Germany
Contact:

Own Traffic Rule and Traffic Truck & Trailer Type

#1 Post by Bulldozer 1973 » 31 Mar 2023 02:13

Hello SCS team and map builders,
we would like to create our own traffic rule in the map, where only the AI will show trucks with timber trailers.

My Vehicle Type looks like this "traffic_rules.rpm.sii":

Code: Select all

traffic_rule_data : traffic_rule.allow_forest.rpm
{
    name: "[access] Forstwirtschaftlicherverkehr"
    rule: "actor_access"
    num_params[]: 1 # 0 - disallow, 1 - allow
    num_params[]: 1 # 0 - inclusive, 1 - exclusive
    str_params[]: "truck_forest"
}
My vehicle type for the timber transport trailers looks like this "traffic_vehicle_type.rpm.sii":

Code: Select all

traffic_vehicle_type : traffic.vehicle_type.truck_forest
{
	speed_class: truck
	license_plate_type: truck

	tags[]: road
	tags[]: truck_forest
	tags[]: truck_all

	validation_groups[]: flares_beacon_none
	validation_groups[]: flares_blinker_min2max3
	validation_groups[]: flares_brake_min2max4
	validation_groups[]: flares_drl_min0max2
	validation_groups[]: flares_emergency_none
	validation_groups[]: flares_highbeam_min2max2
	validation_groups[]: flares_lowbeam_min2max2
	validation_groups[]: flares_parking_min2max4
	validation_groups[]: flares_reverse_min1max2
	validation_groups[]: wheel_particles_min2max4
}
My trailer storage file for the wood trailers looks like this "def\vehicle\traffic_storage_trailer_forest.rpm.sii":

Code: Select all

SiiNunit
{
# log trailer
@include "trailer/scs_log_traffic.sui"
@include "trailer/scs_gooseneck_traffic.sui"


}
In the AI trucks I have additionally entered this Trailer_type "man_tgx_a_4x2.sui":

Code: Select all

traffic_vehicle : traffic.mantgx_a4x2
{
	accessories[]: .mantgx_a4x2.chassis
	accessories[]: .mantgx_a4x2.fwheel
	accessories[]: .mantgx_a4x2.rwheel
	accessories[]: .mantgx_a4x2.trlr_cables

	max_speed: 90

	trailer_chains[]: "truck_semi"
	trailer_chains[]: "truck_forest"
	
	vehicle_mass: 7327
	engine_power: 298

	sound_move[]: "/sound/traffic/truck_eu_2.soundref"
	sound_move[]: "/sound/traffic/truck_eu_4.soundref"
	sound_horn[]: "/sound/traffic/truck_horn_1.soundref"
	sound_horn[]: "/sound/traffic/truck_horn_5.soundref"

	#color from upgrade shop
	color[]: (0.0664, 0.0664, 0.0664) #gray
	color[]: (0.8307, 0.8307, 0.8307) #white
	color[]: (0.2458, 0.0134, 0.013) #red
	color[]: (0.0343, 0.0343, 0.0343) #black
	color[]: (0.9911, 0.5906, 0.0781) #yellow
	color[]: (0.0103, 0.0171, 0.0835) #blue


@include "drivers_generic.sui"
}

vehicle_accessory: .mantgx_a4x2.chassis
{
	data_path: "/def/vehicle/ai/truck/man.tgx/a4x2.sii"
}
vehicle_wheel_accessory: .mantgx_a4x2.fwheel
{
	offset: 0
	data_path: "/def/vehicle/f_wheel/steel.sii"
}
vehicle_wheel_accessory: .mantgx_a4x2.rwheel
{
	offset: 0
	data_path: "/def/vehicle/r_wheel/steel.sii"
}
vehicle_addon_accessory : .mantgx_a4x2.trlr_cables
{
	data_path: "/def/vehicle/ai/truck/man.tgx/accessory/trlr_cables/stock.sii"
}
I don't know how to solve this anymore.
Greetings,
Harald

---
Sorry for my bad english, i from germany. I use Translators deepl.com / google.de
---
I will not distribute a modified mods without permission from the original creator / author!
User avatar
Reinhard
Posts: 4709
Joined: 20 Dec 2012 16:46
Location: Berlin, Germany

Re: Own Traffic Rule and Traffic Truck & Trailer Type

#2 Post by Reinhard » 31 Mar 2023 17:23

Knowing nothing about traffic rules, I just want to remark that you didn't say what the problem actually is. :P
User avatar
m1keY
Posts: 3501
Joined: 18 Oct 2015 22:49
Contact:

Re: Own Traffic Rule and Traffic Truck & Trailer Type

#3 Post by m1keY » 01 Apr 2023 01:20

Code: Select all

trailer_chains[]: "truck_semi"
will give the truck any trailer .....
User avatar
Bulldozer 1973
Posts: 1200
Joined: 21 Dec 2012 00:27
Location: Treuchtlingen / Germany
Contact:

Re: Own Traffic Rule and Traffic Truck & Trailer Type

#4 Post by Bulldozer 1973 » 01 Apr 2023 08:44

@m1keY

We already know that,

only in the area or there on the forest road / path then only trucks with timber trailers should drive.

Therefore, we had considered that we make another trailer_chain and call this then truck_forest.

And carry the additionally in the definition of the truck

So that he would then be in the area then with timber trailer on the road.

Because truck_semi means all trailers and no special trailers.

Translated with www.DeepL.com/Translator (free version)
Greetings,
Harald

---
Sorry for my bad english, i from germany. I use Translators deepl.com / google.de
---
I will not distribute a modified mods without permission from the original creator / author!
Post Reply

Return to “Help center - player to player”

Who is online

Users browsing this forum: Foozer and 5 guests