IPB

Welcome Guest ( Log In | Register )

Bot's viewdistance, and some other misc bot code lines
imtheheadhunter
post Jun 9 2009, 04:37 PM
Post #1


Debug assertion failed! Text:people == stupid!
Group Icon

Group: Mr. Admin
Posts: 1,005,138
Joined: 8-March 06
From: The freaking Twilight zone!
Member No.: 1,609



The max distance that bots will fire at an enemy seems to be capped at ~250 meters, and the max view distance is whatever the "GameLogic.MaximumLevelViewDistance #" is set too. You can change the distance that bots want to fire at enemys at with the 2 lines,

weaponTemplate.maxRange ###
weaponTemplate.optimalRangePercentage ##


Yes, there is a remed out "aiSettings.setViewDistance ###" line in a map's ai.ai file, but it doesn't seem to do anything. So ignore it. However, Outsider says that adding that line in the "mods/(mod)/levels/LEVEL/AI/ai.ai", file, will work.

QUOTE
aiTemplatePlugIn.setIsAntiAircraft used to be a boolean value, but it was changed during BF2 development to be an enumeration. The following values are valid for aiTemplatePlugIn.setIsAntiAircraft:

0 = Do not attack vehicles that are marked with ITAir and are more than 5m above ground and/or moving faster than a certain speed. This is the default, and hence there is no need to actually put this in a file.
1 = Treat airborne vehicles as any other vehicle. Attack them at will.
2 = The unit is allowed to take opportunity shots at airborne enemies if it gets the chance. For instance, if a tank gets attacked by a helicopter head on, and the helicopter is close enough to where the tank is already aiming, then the tank can try and take out the helicopter, but if it misses, and the helicopter passes, then the tank is not allowed to chase after the helicopter.

QUOTE
The bot skill is used to see how big a part of the ai weapon deviation is used (there is a default value that most weapons use, so that's why you don't normally see it). Time is also involved. A bot that keeps shooting at the same target will have its deviation decreased. A bot skill of 1 results on no additional bot deviation.

The bots target the point that they see. They first try to see the centre of an object, if that fails, they try for the camera, and if that fails they try for a random position.


Other vehicle AI stuff,

aiTemplate.degeneration - how long this vehicle can be out of view before the bot who saw it forgets it is there and looks for another target

aiTemplate.allowedTimeDiff - how long before information about this vehicle, as seen by another bot, is considered old and needs to be updated. faster vehicles need quicker updates but quicker updates chew more CPU cycles so a compromise is usually made for balance. not so much of an issue these days where PCs are able to handle the heavier load easily

aiTemplatePlugIn.setStrategicStrength - these tell the bot how effective that vehicle is at defending, and at attacking. the higher the number the better it is, i.e. a car might have a value of 1 whereas a jet might have a value of 3


--------------------
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies (1 - 4)
ballard44
post Jun 10 2009, 10:20 AM
Post #2


Major
****

Group: Soldiers
Posts: 116
Joined: 30-September 06
Member No.: 2,229



QUOTE
The max distance that bots will fire at an enemy seems to be capped at ~250 meters

After alot of testing quite awhile ago this seems to be true, but only for vehicles.
I've had bots using their rifles on each other at over 600+ meters.
Begs the question as to why vehicles seem limited?

QUOTE
and the max view distance is whatever the "GameLogic.MaximumLevelViewDistance #" is set too

Yeah, this does not effect bots in any way...Same tests with this variable set to 25 meters and they were still shooting at each other from 600+ meters.
This setting has much more to do with helping our computers cope with the graphic side of BF2.
To 'hid' this feature from just cutting off the map, they included 'fog'.

QUOTE
Yes, there is a remed out "aiSettings.setViewDistance ###" line in a map's ai.ai file, but it doesn't seem to do anything. So ignore it. However, Outsider says that adding that line in the "mods/(mod)/levels/LEVEL/AI/ai.ai", file, will work.

This seems to be redundant or I am not understanding it correctly?
What's the difference between an AI.ai file in the 'map' and an AI.ai file in the levels/AI folder?

Regardless, I don't think the aiSettings.setViewDistance setting actually does anything.
Again, I've set this to 20 meters and 700 meters and the bots still attacked each other at 600+ meters.
I had a theory that this setting might be somehow 'saved' in another file during the navmesh process, but i re ran the navmesh using both settings and no difference in bot behavior.

Good to know about the 'anti-air' code.
Was never sure what the difference between 1 and 2 was.
Go to the top of the page
 
+Quote Post
clivewil
post Jun 10 2009, 10:50 AM
Post #3


meh.
Group Icon

Group: Mr. Admin
Posts: 2,008,262
Joined: 24-July 07
From: Perth, Western Australia
Member No.: 3,545



QUOTE
What's the difference between an AI.ai file in the 'map' and an AI.ai file in the levels/AI folder?

the map settings override the default mod ones, so you can have the ai set up on a custom per-map basis.

the pathfinding commands let you set different navmesh brush widths, plus specifying clusters for boats on water maps etc. as well as being a handy spot to launch any command line items you want to affect the gameplay, like maxBots or teamRatioPercent or other similar adjustments


--------------------
Go to the top of the page
 
+Quote Post
imtheheadhunter
post Jun 10 2009, 11:40 AM
Post #4


Debug assertion failed! Text:people == stupid!
Group Icon

Group: Mr. Admin
Posts: 1,005,138
Joined: 8-March 06
From: The freaking Twilight zone!
Member No.: 1,609



QUOTE (ballard44 @ Jun 10 2009, 12:20 PM) *
QUOTE
Yes, there is a remed out "aiSettings.setViewDistance ###" line in a map's ai.ai file, but it doesn't seem to do anything. So ignore it. However, Outsider says that adding that line in the "mods/(mod)/levels/LEVEL/AI/ai.ai", file, will work.

This seems to be redundant or I am not understanding it correctly?
What's the difference between an AI.ai file in the 'map' and an AI.ai file in the levels/AI folder?


Eh, well not really redundant. When I read that first, I thought he was talking about a file in the mod's folder, not the map's.....but still, not really redundant....Experience shows that line in the ai.ai file in the map does nothing, even though Outsider says that it will. I figure it's worth saying that he says it works, even if it doesn't seem to.


--------------------
Go to the top of the page
 
+Quote Post
ballard44
post Jun 21 2009, 07:15 PM
Post #5


Major
****

Group: Soldiers
Posts: 116
Joined: 30-September 06
Member No.: 2,229



FYI, I just saw AAV take down a heli that was hovering over a CP from about 500+ meters.
Used missiles to do it.

So hand weapons and AAV missiles can work over 250 meters.

Why do those work and others aren't capable? No idea.

Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th September 2017 - 04:28 PM