IPB

Welcome Guest ( Log In | Register )

"snipery" ai, "snipery" ai
BF2 SP Freak on ...
post Aug 6 2016, 12:50 AM
Post #1


Private
**

Group: Soldiers
Posts: 15
Joined: 6-August 16
Member No.: 11,722



Hello, its the first time i post a question in this forum though i have known it for a long time & love it. Anyway, Im looking for sugestions on how to make the BF2 ai stop moving towards a target once it "spotted" it & opened fire, or to be more likely to crouch/prone/take cover when it spots a target & shoot from a distance, instead of running & shooting at the enemy rambo-style. I like Project Reality Multiplayer, and I want to give BF2 Singleplayer as much the same "feeling" as possible. I have already set the ai difficulty to 1.0 and it helped quite a bit. I know this kind of changes would make the game more slow-paced & I dont care. In other words I want:

* More realistic/snipery behaviour in all ground units
* Infantry on both teams to stop running at each other like in a never-ending Banzai charge
* Vehicles to stop ramming into enemy vehicles like bumping carts

Sorry for the long paragraph but it was a difficult concept to sumarize.
Thanx in advance 4 reading & anwsering
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies (1 - 9)
Bubbles
post Aug 6 2016, 11:59 AM
Post #2


General
*****

Group: Soldiers
Posts: 1,464
Joined: 13-February 06
From: Earth
Member No.: 1,539



Have look here:

http://www.battlefieldsingleplayer.com/for...c=19061&hl=

You can also compare the aitemplates between your current and your mod, or just copy them over.
Go to the top of the page
 
+Quote Post
MasterChiefRulZ
post Aug 6 2016, 11:59 AM
Post #3


You know the drill...
Group Icon

Group: Mr. Admin
Posts: 10,332
Joined: 31-December 03
From: Home
Member No.: 48



QUOTE
Im looking for sugestions on how to make the BF2 ai stop moving towards a target once it "spotted" it & opened fire

I am unsure, but my first gut reaction would be tweaking the weapon AI. Looking at the M4 weapon AI in "Objects_server/Weapons/Handheld/USRIF_M4/ai

CODE
weaponTemplate.minRange 0.0
weaponTemplate.maxRange 72.0
weaponTemplate.optimalRangePercentage 35
weaponTemplate.setFiringPose Crouching

Maybe increasing the range and range percentage would help.


QUOTE
I like Project Reality Multiplayer, and I want to give BF2 Singleplayer as much the same "feeling" as possible.

Might take a peek at PR's AI to see how it's setup. Probably be akin to what you're looking for.


--------------------
Go to the top of the page
 
+Quote Post
BF2 SP Freak on ...
post Aug 9 2016, 12:15 AM
Post #4


Private
**

Group: Soldiers
Posts: 15
Joined: 6-August 16
Member No.: 11,722



Thank you both for anwsering so soon. What I was looking for was not about better range or accuracy but about making it so ground units, when start firing, hold their ground where they are and dont move forward until all targets are destroyed or out of sight/range.
If its possible to do that its probably a tweak somewhere in the ai behaviours, but i dont know enough to try doing it myself.
I will probably use later what you wrote anyway so thanks again
Go to the top of the page
 
+Quote Post
ACE_sweden
post Aug 11 2016, 07:23 PM
Post #5


Enryuu Studios
***

Group: Soldiers
Posts: 89
Joined: 4-December 12
From: Dalarna, Sweden
Member No.: 9,375



Try messing around with the optimal range percentage, as it controls the preferred distance the bots would want to use. So for example, if the maxrange is 72 and the optimalrangepercentage is 35, they'll start firing at 72 but will move toward the optimal range which is 35% of the maxrange so in this case 25.2. They should then theoretically stay there as long as they're using the same weapon.

EDIT: I'll just leave this link here: http://www.battlefieldsingleplayer.com/for...showtopic=13677

This post has been edited by ACE_sweden: Aug 11 2016, 07:25 PM
Go to the top of the page
 
+Quote Post
BF2 SP Freak on ...
post Jul 4 2017, 07:20 PM
Post #6


Private
**

Group: Soldiers
Posts: 15
Joined: 6-August 16
Member No.: 11,722



Hello guys, I have another weird question, is it possible that typing "100" in the "optimalRangePercentage" doesn't work because of being a 3-digit number?
Go to the top of the page
 
+Quote Post
Fastj@ck
post Jul 5 2017, 08:52 AM
Post #7


Major
****

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



QUOTE (BF2 SP Freak on weed @ Jul 4 2017, 09:20 PM) *
Hello guys, I have another weird question, is it possible that typing "100" in the "optimalRangePercentage" doesn't work because of being a 3-digit number?


How it looks with 99 ?

I see in PR mod some values in the weapons.ai that exceed 100. Maybe the RangePercentage doesn't work with 3 digit numbers.

This post has been edited by Fastj@ck: Jul 5 2017, 08:57 AM
Go to the top of the page
 
+Quote Post
MasterChiefRulZ
post Jul 6 2017, 09:23 AM
Post #8


You know the drill...
Group Icon

Group: Mr. Admin
Posts: 10,332
Joined: 31-December 03
From: Home
Member No.: 48



QUOTE (Fastj@ck @ Jul 5 2017, 10:52 AM) *
QUOTE (BF2 SP Freak on weed @ Jul 4 2017, 09:20 PM) *
Hello guys, I have another weird question, is it possible that typing "100" in the "optimalRangePercentage" doesn't work because of being a 3-digit number?


How it looks with 99 ?

I see in PR mod some values in the weapons.ai that exceed 100. Maybe the RangePercentage doesn't work with 3 digit numbers.

It's possible. I try to stick to examples set by the default code of the game (as it was when released). If 3 digit numbers aren't used I would avoid doing so.


--------------------
Go to the top of the page
 
+Quote Post
BF2 SP Freak on ...
post Jul 7 2017, 01:27 AM
Post #9


Private
**

Group: Soldiers
Posts: 15
Joined: 6-August 16
Member No.: 11,722



99 doesn´t seem to work as it should (to my eyes). I think the max. value might be 90 (The highest in default settings)
thanx for the answers anyway.
Go to the top of the page
 
+Quote Post
Fastj@ck
post Jul 10 2017, 04:19 PM
Post #10


Major
****

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



You can go around by adding a little bit more range when they start with shooting. So you compensate the missing 10%

For excample : You want 1000 meter!
This dont work : Range 1000 meter percentage 100%
Also not working : Range 1000 meter percentage 99%

1000 meter percentage 90% = 900 meter
1110 meter precentage 90% = 999 meter (nearly 1000 meter)

You get what i mean?
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: 21st July 2017 - 12:50 PM