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: 22
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 - 14)
Bubbles
post Aug 6 2016, 11:59 AM
Post #2


General
*****

Group: Soldiers
Posts: 1,466
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,387
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: 22
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: 22
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: 253
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,387
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: 22
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: 253
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
BF2 SP Freak on ...
post Jul 23 2017, 12:16 AM
Post #11


Private
**

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



Yeah I understood, I had thought of that, but I have been watching the AI more closely and 99 might be working after all (And I'm not gonna make a correction for that difference).
Thanx for anwsering anyway
Go to the top of the page
 
+Quote Post
BF2 SP Freak on ...
post Aug 12 2017, 11:52 PM
Post #12


Private
**

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



Hello guys, it's me , yet again. I was further fooling around with these parameters when I noticed that the EU guns don't have these .ai files, how can I tweak the ai for these? would just copying & pasting another gunīs file work?
Thanx in advance
Go to the top of the page
 
+Quote Post
Ants
post Aug 13 2017, 04:34 AM
Post #13


Enlisted
*

Group: Soldiers
Posts: 13
Joined: 28-November 14
Member No.: 10,412



QUOTE (BF2 SP Freak on weed @ Aug 13 2017, 12:52 AM) *
Hello guys, it's me , yet again. I was further fooling around with these parameters when I noticed that the EU guns don't have these .ai files, how can I tweak the ai for these? would just copying & pasting another gunīs file work?
Thanx in advance


Every gun does not need a seperate AI file. You can use another weapons AI. (IE: m4 AI on g36c and such).


--------------------
Go to the top of the page
 
+Quote Post
MasterChiefRulZ
post Aug 13 2017, 01:11 PM
Post #14


You know the drill...
Group Icon

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



As an addendum I just want to add that if you put weapons in different zipped folders it's necessary to create an additional AI file for your new zipped folder. At least in my case it was.

I had weapons in a separate server.zip file referencing back to the original AI folders in the original Objects_server.zip and the AI wouldn't use them, I had to copy paste AI files over to my new .zip in order for the AI to work correctly.

Once a copy of the AI files were in my new server.zip file I could reference them just fine without having to make multiple duplicates.


--------------------
Go to the top of the page
 
+Quote Post
BF2 SP Freak on ...
post Aug 14 2017, 01:06 AM
Post #15


Private
**

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



OK, thanx for the info, guys
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: 24th September 2017 - 06:45 PM