Co-op: AI Ignoring Vehicles For Certain Factions/Maps

Suggestions and feedback pertaining to Project Reality Single Player.
Post Reply
O.Ortega
Posts: 53
Joined: 2015-05-21 11:48

Co-op: AI Ignoring Vehicles For Certain Factions/Maps

Post by O.Ortega »

I recently got back into PR and I've mostly enjoyed it, except there is a bug that stops me from playing certain co-op maps. Sometimes the AI spawns outside the main base or in some other place I can't, and doesn't take any vehicles. Examples of this occurring are in:
  • Shija Valley: China ignores vehicles in Alternate and Standard Layouts, even though it can use vehicles fine in Black Gold. The UK does use their vehicles, which leads to a slaughter.
  • Al Basrah Alt: The UK soldiers that spawn south of the main base don't use the vehicles.
  • Shahadah Standard: The polish armed forces spawn outside the base and don't take any vehicles. This may be a good thing since there is TOWs along the road.
  • Asad Khal Alternate: Both sides ignored their APCs. About 30(?) minutes into the match I took a MEC APC and conveniently the IDF AI finally used one of their APCs.
  • Beirut Standard: The AI ignored the M163 Vulcan. I could get an IDF soldier to enter the vehicle if I was the driver. The AI would not fire the turret gun and it turned out I couldn't fire the turret gun either (nothing happened when I hit the fire button).
I hope this doesn't seem like a dump of complaints. I'm trying to give as much info as possible to narrow down what it could be.

I cannot think of any particular faction which cannot use vehicles on any map.

I cannot remember having this issue back in 1.3 (2015) which was the last version I played.

I have had this issue for a AI difficulty 0.7 and 0.9. I haven't tried other AI difficulty levels.

I remember reading somewhere that the AI uses "temperatures". That would be the first time I've heard of heatmaps being used with the navmesh pathing. Perhaps the "temperature" of the home bases were turned down on certain maps for certain factions? Though that wouldn't explain the AI not taking the vehicles when the AI spawns right in the base.
Last edited by O.Ortega on 2018-12-01 17:37, edited 1 time in total.
Reason: Clarify which PR version I last played which didn't have a problem.
Arab
PR:BF2 Developer
Posts: 2887
Joined: 2012-05-18 03:37

Re: Co-op: AI Ignoring Vehicles For Certain Factions/Maps

Post by Arab »

Thank you for putting this report together! Good effort :)

For COOP, the most non _sp vehicles are set to not attract bots to use them from their PCO AI template.

Exactly right, bots use temperatures to see whether to use a vehicle or not. For Jets and Helicopters, they will intentionally avoid non-bf2 physics Jets and Helicopters as they are intended for players to use only due to the AI Template setting the temperature to 0.


The code is "aiTemplate.basicTemp #" and it's found in Objects.ai (You'd have to extract objects_vehicles_server.zip, navigate to weapon_ranges_land/weapon_ranges_air folder and add all Objects.ai into Notepad++ to see the code).


Some weapons may need to be updated to allow bots to use them. 2 of our team members, [R-CON]Double_13 and [R-CON]Fastjack are working on revising AI templates to make them smarter basically and also work out map issues like the ones you described.

For certain guns like the M163 Vulcan, bots cannot fire when there's any delay set in the weapon's .tweak file whether it's Fire Start Delay, Delay To Use and/or the Weapons.ai deviation settings needing tweaking they can't use it so a version of the weapon has to be made without the delays, and the mapper must adjust the COOP layer to use those versions. You can see it for the ats_tow_ndl versions (_ndl is the version without any fire delay for bot use).
Image
Fastjack
PR:BF2 Contributor
Posts: 525
Joined: 2011-09-04 19:47

Re: Co-op: AI Ignoring Vehicles For Certain Factions/Maps

Post by Fastjack »

Basically, we need only to revert the temperature values from EVERYTHING back to the vanilla ones and adjust them slightly. Also the strategicstrength's of everything need a rework.
In my opiniom, the SAI cannot make correct decisions based on the temperatures and strategicstrength's calculations.

Sorry to say that but i can return next year february to modding because i have to much rl work atm. but after that i will ask Double for help to create a new ai for the bots from base.
I hope it will fix also known issues like moonwalking or the flag spawn selection.

But than we have also new things.
Arab
PR:BF2 Developer
Posts: 2887
Joined: 2012-05-18 03:37

Re: Co-op: AI Ignoring Vehicles For Certain Factions/Maps

Post by Arab »

I also will try to do my part to improving COOP along with core mod stuff and the much anticipated PR:WW2 side of 1.6
Image
O.Ortega
Posts: 53
Joined: 2015-05-21 11:48

Re: Co-op: AI Ignoring Vehicles For Certain Factions/Maps

Post by O.Ortega »

Thanks for the answers R-DEV Arab. I'm curious as to what is so special about AI vehicles. I'm guessing their speed is slower and their turning rate is higher so it's harder for them to get stuck.

I would personally prefer if all the vehicles were replaced with their AI-friendly versions in co-op. I could probably write a program to do the switch, if the all the AI friendly versions have the same name as the normal one but ending in "_sp". I'm guessing this change will cause PunkBuster to bust me if I go online, but I can use Git to swap out the modified files.

When the vehicles have higher temperatures, do the AI become more likely to spawn in the base to use them? Or is their spawn placement calculated differently?

Who knows R-CON Fastjack, maybe I'll end up fixing some map AI issues myself.
Michael Z Freeman
Posts: 240
Joined: 2009-03-27 18:45

Re: Co-op: AI Ignoring Vehicles For Certain Factions/Maps

Post by Michael Z Freeman »

O.Ortega wrote:I would personally prefer if all the vehicles were replaced with their AI-friendly versions in co-op. I could probably write a program to do the switch, if the all the AI friendly versions have the same name as the normal one but ending in "_sp". I'm guessing this change will cause PunkBuster to bust me if I go online, but I can use Git to swap out the modified files.
I'd be interested in that as I don't play online and noticed a reduction in the action after the introduction of human only vehicles. It's great to see PR doing that for Coop players but it just does not work very well for me.
Image
Fastjack
PR:BF2 Contributor
Posts: 525
Joined: 2011-09-04 19:47

Re: Co-op: AI Ignoring Vehicles For Certain Factions/Maps

Post by Fastjack »

For certain guns like the M163 Vulcan, bots cannot fire when there's any delay set in the weapon's .tweak file whether it's Fire Start Delay, Delay To Use and/or the Weapons.ai deviation settings needing tweaking they can't use it so a version of the weapon has to be made without the delays, and the mapper must adjust the COOP layer to use those versions. You can see it for the ats_tow_ndl versions (_ndl is the version without any fire delay for bot use).
weaponTemplate.burst • weaponTemplate.burst bool
This variable tells the AI if the weapon is possible to fire in automatic mode (if you can keep the button pressed and continue firing). If true, the bots will try and fire the weapon as an automatic weapon.

Code: Select all

weaponTemplate.burst 1
Arab,

You ever tested to add this to an delayed weapon.ai ? Is worth a shot.

You can add isThrown1 and weaponTemplate.setExplosionRadius x to ANY weapon.ai to trigger the dodging effect of an bot when shooting him, maybe this line, weaponTemplate.burst 1 in combo with a SingleFireComp, enforce the bot to keep pressing the firebutton.
Double_13
Posts: 45
Joined: 2016-10-16 21:29

Re: Co-op: AI Ignoring Vehicles For Certain Factions/Maps

Post by Double_13 »

New _PRSP assets should fix these issues.

These new assets have the following params changed
  • They can not be used by humans (like bot jets it will give you blackscreen)
  • APC/IFV only have 1 seat to prevent full squads hogging in 1 asset
  • Weapon fire delay is removed
To explain the reason for the human block.
Currently maps as khami and kashan contain 12 tanks (per side) and 8 of those are 1 man versions (_bf2).
The idea is to reduce the number of 1 man assets for humans to balance it.
Rather than deleting ALL oneman assets now it would be possible to allocate 2 usable 1man tanks (_bf2) and 6 _prsp versions only bots can use. this should significantly balance the encounters on multiplayer without making it unplayable on low pop.

Additionally It allows the use of assets further in the map (as shahadah has). This to prevent the parade out the main base along with 10 min driving time to the frontline.

To explain the removal of seats.
Bots like to hog in them (cus they lazy). on muttrah it is possible to whipe almost the entire team with the 8 hellfires as they are all sitting in the APC's. Removing the slots forces bots to walk and potentially spread out more. But its mainly done for midround where the bots will have more troops available for defense rather than sitting in the backs of APC's
Post Reply

Return to “Coop & Singleplayer”