Does anyone know if there is a modable setting, that will allow to control AI response distance?
It is common in AI code, to have a variable that sets the max distance, that the AI should react to other AI' and most important, the player.
If this can be done in BF, it opens for new gameplay possibilities
I fear it is hardcoded, after reading con-file after con-file. I would love to be wrong.
Variable that controls AI responce distance?
-
Fastjack
- PR:BF2 Contributor
- Posts: 525
- Joined: 2011-09-04 19:47
Re: Variable that controls AI responce distance?
What you mean with RESPONSE?
You mean when bots start firing at longer distance at players/bots?
When you mean this, look into the weapon.ai. There exististing values from minimum distance to maximum distance.
You mean when bots start firing at longer distance at players/bots?
When you mean this, look into the weapon.ai. There exististing values from minimum distance to maximum distance.
-
Fastjack
- PR:BF2 Contributor
- Posts: 525
- Joined: 2011-09-04 19:47
Re: Variable that controls AI responce distance?
2 things have hardcodded base value settings but i dont remember the exact numbers.
viewdistance : infantry 200 / vehicles 300 and that can be overridden in the map ai.
When this values arent defined in the map ai the upper values kicks in.
Excample:
aiSettings.setViewDistance 500
viewdistance : infantry 200 / vehicles 300 and that can be overridden in the map ai.
When this values arent defined in the map ai the upper values kicks in.
Excample:
aiSettings.setViewDistance 500
-
PRbear
- Posts: 24
- Joined: 2019-12-04 17:11
Re: Variable that controls AI responce distance?
I thought so, but it does notFastjack wrote: viewdistance : infantry 200 / vehicles 300 and that can be overridden in the map ai.
Excample:
aiSettings.setViewDistance 500
I used
Code: Select all
rem ai settings
aiSettings.overrideMenuSettings 1
aiSettings.maxBotsIncludeHumans 0
aiSettings.setMaxNBots 9
aiSettings.setBotSkill 1
aiSettings.setViewDistance 5Famously was the case in the campaign in the Cyrillic-isle, where the battle in the 3 m high grass got to be known as 'battle of the bloody grass'.
It would be a very intense map-experience to 'walk' your avatar through high dense undergrowth, listening for footsteps.
Code: Select all
[i]aiSettings.setViewDistance[/i]-
Outlawz7
- Retired PR Developer
- Posts: 17261
- Joined: 2007-02-17 14:59
-
T.E.D.F4257845
- PR:BF2 QA Tester
- Posts: 57
- Joined: 2011-06-12 09:31
Re: Variable that controls AI responce distance?
From weapons_server, look for weapons/handheld/weapon_ranges. There you can select whichever weapon type you want and then change the values in the weapon.ai file. Change the min and max range from there. You can also get the AI to use rifles or other weapons on ground assets like tanks and APC by changing the Strenght value if you want.
"Never underestimate the power of BRDMs in large groups"
-
PRbear
- Posts: 24
- Joined: 2019-12-04 17:11
Re: Variable that controls AI responce distance?
Is there an aiTemplatePlugIn. for AI-bots? Is that paramter not for vehicles?Outlawz7 wrote:Try aiTemplatePlugIn.cullDistance
Can you tell me the name of the con-file for the bots?
Well that is not the same. The AI perception is what should be changedT.E.D.F4257845 wrote:From weapons_server, look for weapons/handheld/weapon_ranges. There you can select whichever weapon type you want and then change the values in the weapon.ai file.
'Awareness' is commonly done by ray-casting. The AI casts a ray in the known direction of TPC. Solids will cut off the ray and the ray has a finite length. It is the length of the ray casted, that should be shortened
-
Fastjack
- PR:BF2 Contributor
- Posts: 525
- Joined: 2011-09-04 19:47
Re: Variable that controls AI responce distance?
The ray cast is also called SensingAgentPattern
C:\Program Files (x86)\Project Reality\Project Reality BF2\mods\pr_edit\ai
aibehaviours ai-file
aiSettings.addSensingAgentPattern Infantery Soldier
aiSettings.addSensingAgentPattern Fixed Turret
You welcome to figure out about the BAPS language. I never found any Intel ressources about this in the Internet.
C:\Program Files (x86)\Project Reality\Project Reality BF2\mods\pr_edit\ai
aibehaviours ai-file
aiSettings.addSensingAgentPattern Infantery Soldier
aiSettings.addSensingAgentPattern Fixed Turret
You welcome to figure out about the BAPS language. I never found any Intel ressources about this in the Internet.
-
Arab
- PR:BF2 Developer
- Posts: 2898
- Joined: 2012-05-18 03:37
Re: Variable that controls AI responce distance?
A good tip for testing bot response while having them not move (Known info from BF2:SP modding community):
In aibehaviours.ai, replace aiSettings.setBehaviour 1 MoveTo with aiSettings.setBehaviour 1 Idle and that prevents bots from moving except with TakeCover (Grenade thrown), Revive etc in which you can replace them with Idle as well to test.
Very useful for testing weapon ai view distances granted that you place spawn points in a flat test map and also to test soldier material damage
In aibehaviours.ai, replace aiSettings.setBehaviour 1 MoveTo with aiSettings.setBehaviour 1 Idle and that prevents bots from moving except with TakeCover (Grenade thrown), Revive etc in which you can replace them with Idle as well to test.
Very useful for testing weapon ai view distances granted that you place spawn points in a flat test map and also to test soldier material damage
-
PRbear
- Posts: 24
- Joined: 2019-12-04 17:11
Re: Variable that controls AI responce distance?
That could actually be interesting!Fastjack wrote:The ray cast is also called SensingAgentPattern
C:\Program Files (x86)\Project Reality\Project Reality BF2\mods\pr_edit\ai
aibehaviours ai-file
aiSettings.addSensingAgentPattern Infantery Soldier
aiSettings.addSensingAgentPattern Fixed Turret
You welcome to figure out about the BAPS language. I never found any Intel ressources about this in the Internet.
Very good tip! Thanks!Arab wrote: In aibehaviours.ai, replace aiSettings.setBehaviour 1 MoveTo with aiSettings.setBehaviour 1 Idle


