Making AI Police Cars in ETS2 and ATS

b738pilot
PPM
Posts: 72
Joined: September 4th, 2020, 2:57 am

Making AI Police Cars in ETS2 and ATS

Post by b738pilot » October 2nd, 2020, 6:10 pm

Hello everyone,

Since there are no forum topics about this and there are a few map projects that would also benefit from this information, I'd like to start a thread here.

I tried to figure out how to make AI police cars for a new country, call it Fakeland, but I ran into 3 issues on ATS:

1. My Fakeland police cars are spawning in other map mod's countries

2. The texture I used gets distorted on the car (PO in POLICE for example on the front side of the door shrinks it size despite it looking normal on the DDS)

3. Using Arayas' alternate look method to clone the PMD file, SCSEditor does not let me edit the Variants (for example, I cloned the crown_victoria, it carried over about 5 other police cars and I used the Arizona DPS one to replace, but I still have to keep in the def files variant "ar_hp" for it to find my replacement texture)

My question is can someone with experience in this can run a step by step on how to properly implement an AI police car for Fakeland on both ATS and ETS2.

Thank you!
User avatar
Arayas
Site Admin
Posts: 7394
Joined: December 15th, 2018, 3:25 am
Location: Romania
Contact:

Re: Making AI Police Cars in ETS2 and ATS

Post by Arayas » October 2nd, 2020, 8:22 pm

1.car definition should contain
spawn_ratio: 0.0
in def/vehicle/ai cardefinition.sii
to spawning of the car just in your Fakeland should be introduced to def/country/fakeland/traffic.sii
This way your car will travel in just Fakeland
2. texture should be identichal with original one, the lines and badges should be in exact same place. Look at the original car and also its DDS to understand where the lines and Badges are positioned on car and DDS.
3.dont bother with variants from definitions, those are not visible in the game. As long you manage to add very little to the definitions, more chances you have to work properly.
ImageImage Image
support@roextended.ro
www.roextended.ro
b738pilot
PPM
Posts: 72
Joined: September 4th, 2020, 2:57 am

Re: Making AI Police Cars in ETS2 and ATS

Post by b738pilot » October 2nd, 2020, 8:29 pm

That was it then, my car definition had spawn_ratio to 1.0. Hopefully that fixes it, will test later tonight and report back. Thank you as always from Fakeland!
b738pilot
PPM
Posts: 72
Joined: September 4th, 2020, 2:57 am

Re: Making AI Police Cars in ETS2 and ATS

Post by b738pilot » October 3rd, 2020, 3:18 am

Reporting back. I tested a few states in C2C and didn't see a single Fakelandic police car. That zero spawn out worked, thanks Arayas!

Now the fun part is messing around with this DDS file. Fun!

Appreciate the help as always!
b738pilot
PPM
Posts: 72
Joined: September 4th, 2020, 2:57 am

Re: Making AI Police Cars in ETS2 and ATS

Post by b738pilot » February 25th, 2021, 8:58 pm

Hi again, working on adding another police car, and was hoping I can get some of your help, Arayas! And I'll leave it here for future modders having a similar issue:

I ported over a focus_2009 police car from Hungary over to ATS to make a Cuban police car. I thought I ported everything over properly, but I still get this error in the editor:

Code: Select all

00:00:17.748 : <ERROR> [unit] The unit '.country.info.traffic.focus_2009.police' of type 'country_traffic_info' has no attribute named 'country_traffic_info'.
00:00:17.750 : <ERROR> load_filtered_unit_array() - Failed to load units from file (/def/country/cuba/traffic.sii)
In the editor, police cars still default to the default ATS police car.

Any advice on where/what I should check first?

Thank you!
User avatar
Ronin
VIP
Posts: 1506
Joined: October 17th, 2019, 11:16 am
Location: Gorinchem, Netherlands

Re: Making AI Police Cars in ETS2 and ATS

Post by Ronin » February 26th, 2021, 6:17 pm

Anyone who can help?
Proc: i7-9750H 2,6 GHz (max. 4,5 GHz)
Mem: 16GB
Graphics: ASUS ROG -STRIX-RTX2060-O6G-GAMING 6 GB GDDR6
User avatar
Arayas
Site Admin
Posts: 7394
Joined: December 15th, 2018, 3:25 am
Location: Romania
Contact:

Re: Making AI Police Cars in ETS2 and ATS

Post by Arayas » February 27th, 2021, 10:08 am

Sorry i didnt answer this sooner, the response is...i don't know. You should import the car with exact same name as in ETS and also the values from def/country/hungary/traffic.sii
I dont understand ETS logic in spawning police cars. Some are in definitions FE skoda_p and in spawn skoda_pol. If i do the same, for me it doesnt work.
ImageImage Image
support@roextended.ro
www.roextended.ro
User avatar
Ronin
VIP
Posts: 1506
Joined: October 17th, 2019, 11:16 am
Location: Gorinchem, Netherlands

Re: Making AI Police Cars in ETS2 and ATS

Post by Ronin » February 27th, 2021, 11:06 am

Thanks Arayas for the help
Proc: i7-9750H 2,6 GHz (max. 4,5 GHz)
Mem: 16GB
Graphics: ASUS ROG -STRIX-RTX2060-O6G-GAMING 6 GB GDDR6
b738pilot
PPM
Posts: 72
Joined: September 4th, 2020, 2:57 am

Re: Making AI Police Cars in ETS2 and ATS

Post by b738pilot » February 27th, 2021, 11:39 pm

Image


Thanks, Arayas! I got it in by doing what you told me to do. And you know what I noticed when I re-copied the Hungary police files?
..........
...........


.........you got your facepalm ready?
................
................

I forgot the closing

Code: Select all

 } 
symbol.....

DOH!
User avatar
Arayas
Site Admin
Posts: 7394
Joined: December 15th, 2018, 3:25 am
Location: Romania
Contact:

Re: Making AI Police Cars in ETS2 and ATS

Post by Arayas » February 28th, 2021, 12:21 am

Glad you did it! We all facepalm ourselfs from time to time :laugh2: :laugh2:
ImageImage Image
support@roextended.ro
www.roextended.ro
Post Reply