IPB

Welcome Guest ( Log In | Register )

The question about AI in BF2
Tongkhangte
post Aug 20 2016, 10:51 PM
Post #1


Captain
***

Group: Soldiers
Posts: 45
Joined: 13-July 16
Member No.: 11,657



i am playing bf2 now.I want to edit smart of bots, Can i do it?. Any ideas? Thanks in advance.

This post has been edited by Tongkhangte: Aug 20 2016, 10:53 PM
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies (1 - 8)
Dicky Arya
post Aug 20 2016, 11:37 PM
Post #2


Sgt.
***

Group: Soldiers
Posts: 54
Joined: 7-November 15
From: Purwakarta,West Java,Indonesia
Member No.: 10,994



you can use void AI http://www.battlefieldsingleplayer.com/for...showtopic=15109


--------------------
Go to the top of the page
 
+Quote Post
M.Combat
post Aug 20 2016, 11:38 PM
Post #3


Mediocre animator and modder
******

Group: Soldiers
Posts: 2,085
Joined: 4-October 06
Member No.: 2,251



Inside the AI folder (Battlefield 2\mods\bf2\AI) you can play with the files in here by opening them with notepad.

Easiest is AIDefault, and changing the aiSettings.setBotSkill 0.4 value (0 being easiest, 1 being hardest)

Second is AIBehaivours, I recommend you make a backup before tinkering with this because you can break the bots.
You can change their weight values for each state they might be in such as running on foot, driving a car, flying a plane.
For example under standardweights (running on foot)

aiSettings.createBehaviourModifiers StandardWeights
aiSettings.setBehaviourModifier Avoid 1.0
aiSettings.setBehaviourModifier MoveTo 1.0
aiSettings.setBehaviourModifier Idle 0.1
aiSettings.setBehaviourModifier Fire 7.5
aiSettings.setBehaviourModifier Special 3.0
aiSettings.setBehaviourModifier TakeCover 2.0
aiSettings.setBehaviourModifier Change 1.9
aiSettings.setBehaviourModifier Revive 3.0

You could change revive from 3.0 to 8.0, meaning medics will revive you before they shoot.

Another thing you can do is change
aiSettings.setVehicleDefaultBehaviour Infantery Idle
to
aiSettings.setVehicleDefaultBehaviour Infantery MoveTo

This will mean if the bot has nothing else to do, it's default action will be to move to the next objective.


--------------------
Go to the top of the page
 
+Quote Post
Tongkhangte
post Aug 21 2016, 02:36 AM
Post #4


Captain
***

Group: Soldiers
Posts: 45
Joined: 13-July 16
Member No.: 11,657



QUOTE (M.Combat @ Aug 21 2016, 12:38 AM) *
Inside the AI folder (Battlefield 2\mods\bf2\AI) you can play with the files in here by opening them with notepad.

Easiest is AIDefault, and changing the aiSettings.setBotSkill 0.4 value (0 being easiest, 1 being hardest)

Second is AIBehaivours, I recommend you make a backup before tinkering with this because you can break the bots.
You can change their weight values for each state they might be in such as running on foot, driving a car, flying a plane.
For example under standardweights (running on foot)

aiSettings.createBehaviourModifiers StandardWeights
aiSettings.setBehaviourModifier Avoid 1.0
aiSettings.setBehaviourModifier MoveTo 1.0
aiSettings.setBehaviourModifier Idle 0.1
aiSettings.setBehaviourModifier Fire 7.5
aiSettings.setBehaviourModifier Special 3.0
aiSettings.setBehaviourModifier TakeCover 2.0
aiSettings.setBehaviourModifier Change 1.9
aiSettings.setBehaviourModifier Revive 3.0

You could change revive from 3.0 to 8.0, meaning medics will revive you before they shoot.

Another thing you can do is change
aiSettings.setVehicleDefaultBehaviour Infantery Idle
to
aiSettings.setVehicleDefaultBehaviour Infantery MoveTo

This will mean if the bot has nothing else to do, it's default action will be to move to the next objective.


i did this ways, Do you have any other way?
Go to the top of the page
 
+Quote Post
mapbear
post Mar 23 2017, 11:34 AM
Post #5


Captain
***

Group: Soldiers
Posts: 36
Joined: 30-August 16
From: Denmark
Member No.: 11,762



Does any kind of modifier make the bots on OWN team better to follow orders.
Ideally the bots should do exactly as they are told
All to often they say 'yes' and do NOTHING!
Do not get in cars
Do not move to pos
Do not attack
Can this be changed so they follow the commands of squad-leader humans, in any what so ever way
At least just better..


--------------------
Best Regards!
Go to the top of the page
 
+Quote Post
M.Combat
post Mar 24 2017, 02:02 AM
Post #6


Mediocre animator and modder
******

Group: Soldiers
Posts: 2,085
Joined: 4-October 06
Member No.: 2,251



Bots will never follow attack/defend orders of a squad leader, as they only listen to the AI commander. It's hard coded and can't be modded to fix.
If you play as commander yourself then you replace the AI commander, which means bots won't get AI orders anymore and will just stand around.
The best thing to do is play squad leader and just accept the orders from the AI commander.

They should get in cars and whatnot, sometimes if you're using custom vehicles the seats don't have proper AI templates so bots won't use them. But for default vehicles they should use them, however they will favour spawning closer to the action than taking a tank from spawn.


--------------------
Go to the top of the page
 
+Quote Post
Fastj@ck
post Mar 24 2017, 12:38 PM
Post #7


Major
****

Group: Soldiers
Posts: 251
Joined: 24-August 08
From: Germany
Member No.: 5,523



I think the strategicareas and how they placed and connected (neighboured) is also important.

When i boss my bots around, (in my insurgency testgamemode for Project Reality), they following all orders (including move to a position where no flag is).

http://www.realitymod.com/forum/f311-coop-...mode-kokan.html


This post has been edited by Fastj@ck: Mar 24 2017, 01:53 PM
Go to the top of the page
 
+Quote Post
mapbear
post Mar 24 2017, 02:43 PM
Post #8


Captain
***

Group: Soldiers
Posts: 36
Joined: 30-August 16
From: Denmark
Member No.: 11,762



QUOTE (M.Combat @ Mar 24 2017, 02:02 AM) *
Bots will never follow attack/defend orders of a squad leader, as they only listen to the AI commander. It's hard coded and can't be modded to fix.

Ohh what a shame

QUOTE
The best thing to do is play squad leader and just accept the orders from the AI commander.

All too often AIcmd does not send to nearest, and sometimes to flags that are 'blocked', again its a real shame direct control has been omitted

QUOTE
But for default vehicles they should use them, however they will favour spawning closer to the action than taking a tank from spawn.

With default AI and default verichles i often see them ignoring the call 'Get in'
They may reply 'yes', but do not move
They will also often take a seat on a fixed pos. like igla, but not use it, and not come when told to
*sigh* Guess i have to find a way to whip them tongue.gif

QUOTE (Fastj@ck @ Mar 24 2017, 12:38 PM) *
I think the strategicareas and how they placed and connected (neighboured) is also important.

Interesting!
QUOTE
When i boss my bots around, (in my insurgency testgamemode for Project Reality), they following all orders (including move to a position where no flag is).


That is what i liked them to do. I believe the engine would allow even single unit control, and i cant for the ... understand why dice diddent implement that.
I could have been great, to really control the AIs in battle.. Kind of fps meets strategy-game and joins in harmony tongue.gif


--------------------
Best Regards!
Go to the top of the page
 
+Quote Post
Fastj@ck
post Mar 24 2017, 03:59 PM
Post #9


Major
****

Group: Soldiers
Posts: 251
Joined: 24-August 08
From: Germany
Member No.: 5,523



QUOTE
That is what i liked them to do. I believe the engine would allow even single unit control


Nah, thats not really possible.
Commands like place a explosive charge doesn't work on my bots. Only move, attack or defend orders.

Let me think about it to overcome the HARDCODDED part. idea.gif

Placing demolition charges would only work when you find a way to spawn a fake PCO with the Ordermarker mechanic and let automatically spawn an enemy bot (invisible, hidden) in it (maybe via python).
Additionally you need to create a new vehicletype for the fake PCO, that get only noticed by the opposite engineer class and only attacked by C4, other weapons will not be used against it. Here is a thread in this forum about specifiec bot behaviours. READ THAT, ITS NICE.
Also the engineer class ai must smell the Ordermarker Fake PCO at a long distance.

Using the MOVE TO command and replace the icon with a demolisher marker and the soundfile for the Order (from Move to this position -> Demolitions needed here)
You can still use the Attackmarker as MOVE order, when you placed many SA's like i did in my gamemode tests.

You place the Demolitionmarker, the Pythoncode spawns a fake PCO and a enemy bot invisible in exact position where the Marker is, the troops will Move to it and a engineer will attack the fake PCO with his special SMELL-SENSING ai settings.

dry.gif Some teamkills could happen but you ordered a bot to place a C4 charge on a specific location.

This post has been edited by Fastj@ck: Mar 24 2017, 04:01 PM
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: 17th August 2017 - 03:40 AM