Making AI Police Cars in ETS2 and ATS
Making AI Police Cars in ETS2 and ATS
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!
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!
Re: Making AI Police Cars in ETS2 and ATS
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.
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.
Re: Making AI Police Cars in ETS2 and ATS
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!
Re: Making AI Police Cars in ETS2 and ATS
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!
Now the fun part is messing around with this DDS file. Fun!
Appreciate the help as always!
Re: Making AI Police Cars in ETS2 and ATS
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:
In the editor, police cars still default to the default ATS police car.
Any advice on where/what I should check first?
Thank you!
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)
Any advice on where/what I should check first?
Thank you!
Re: Making AI Police Cars in ETS2 and ATS
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
Mem: 16GB
Graphics: ASUS ROG -STRIX-RTX2060-O6G-GAMING 6 GB GDDR6
Re: Making AI Police Cars in ETS2 and ATS
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.
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.
Re: Making AI Police Cars in ETS2 and ATS
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
Mem: 16GB
Graphics: ASUS ROG -STRIX-RTX2060-O6G-GAMING 6 GB GDDR6
Re: Making AI Police Cars in ETS2 and ATS
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
}
DOH!
Re: Making AI Police Cars in ETS2 and ATS
Glad you did it! We all facepalm ourselfs from time to time