.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Metamod and metamod plugins (http://forums.bots-united.com/forumdisplay.php?f=15)
-   -   introducing... BotAim 2! (http://forums.bots-united.com/showthread.php?t=3566)

Pierre-Marie Baty 11-02-2005 22:28

introducing... BotAim 2!
 
yes! it's here :D

BotAim 2 plugin for metamod that gives your bot the most configurable (and hopefully the best) aiming ever!

whoopee

http://filebase.bots-united.com/inde...on=file&id=274


well and here's the readme
Quote:

*******************************************
* BotAim 2 - human-like bot aiming Plugin *
*******************************************
by Pierre-Marie Baty <pm@bots-united.com>

This metamod plugin allows bot server administrators to change the way their bots turn and aim in any Half-Life MOD to a more realistic method.
Technically, any bot that use the "idealpitch" and "ideal_yaw" field of its entity variables structure for storing the final aim angles can be affected by this plugin. Since most bot authors used botman's template, many bots are ok.

PLEASE NOTE that this plugin does not change the bot's AI, it does not alter their decisions and ESPECIALLY IT DOES NOT CHANGE WHERE THEY WANT TO LOOK. It just enables them to move the crosshair in a smoothened way. If you see your bots aiming at stupid locations, or trying to look through walls, blame the bot, NOT the plugin!

The algorithm implemented assimilates the crosshair movement to a spring with several physical constraints. Since the generic equation describing a spring's movement is well-known by modern physics, this modelization enables the user to define the bot aiming's parameters as the stiffness and damping coefficient of the equivalent spring.

The aiming system is HIGHLY configurable. You can set it to suit your tastes in all domains. The aiming can be greatly affected by your changes, and not two servers using this plugin will feel the same if the settings are not identical. You are warmly encouraged to toy with the CVAR's values to find the perfect aiming that will challenge you ;-)


featured CVARS:

botaim_enable (default: 1)
Enables or disables the plugin. Set to 1 (enabled) by default. Set to 0 to disable BotAim and restore the bot's original aiming algorithms.

botaim_spring_stiffness_x (default: 13.0)
VERTICAL (up/down) spring stiffness of the aiming system. This value affects the quickness of the crosshair movement, as well as the frequency of the resulting oscillations.

botaim_spring_stiffness_y (default: 13.0)
HORIZONTAL (left/right) spring stiffness of the aiming system. This value affects the quickness of the crosshair movement, as well as the frequency of the resulting oscillations.

botaim_damper_coefficient_x (default: 2.0)
VERTICAL (up/down) damping coefficient of the aiming system. This value also affects the quickness of the crosshair movement, and the amplitude of the resulting oscillations.

botaim_damper_coefficient_y (default: 2.0)
HORIZONTAL (left/right) damping coefficient of the aiming system. This value also affects the quickness of the crosshair movement, and the amplitude of the resulting oscillations.

botaim_deviation_x (default: 20.0)
VERTICAL (up/down) error margin of the aiming system. This value affects how far (in game length units) the bot will allow its crosshair to derivate from the ideal direction when not targeting any player in particular.

botaim_deviation_y (default: 90.0)
HORIZONTAL (left/right) error margin of the aiming system. This value affects how far (in game length units) the bot will allow its crosshair to derivate from the ideal direction when not targeting any player in particular.

botaim_influence_x_on_y (default: 0.25)
Perpendicular influence of the vertical axis on a HORIZONTAL movement. This value affects how much (in fraction of 1) the bot will be disturbed when moving its crosshair on an axis by the inherent movement on the other axis.

botaim_influence_y_on_x (default: 0.17)
Perpendicular influence of the horizontal axis on a VERTICAL movement. This value affects how much (in fraction of 1) the bot will be disturbed when moving its crosshair on an axis by the inherent movement on the other axis.

botaim_offset_delay (default: 1.2)
Maximal value in seconds after which the aiming system will re-evaluate its ideal direction. This affects how often a bot will attempt to correct an imprecise crosshair placement by moving the crosshair inside the error margin bounds defined by the botaim_deviation CVARs.

botaim_notarget_slowdown_ratio (default: 0.3)
Fraction of the full speed the aiming system will adopt as speed when aiming at nothing in particular. This affects how slow the bot will move its crosshair when targeting nobody, relatively to its full speed capacity.

botaim_target_anticipation_ratio (default: 0.8 )
Fraction of the estimated target's velocity the aiming system will rely on when aiming at a moving target. This affects how well the bot will be able to track moving targets on the fly, and whether it will have a tendancy to aim ahead of it or behind it.

botaim_fix (default: 1)
This CVAR tells whether the vertical (x) component of the bot's body angles should be negated, due to a very common bug in Half-Life bots that was already present in botman's template, causing these angles to be reverted. If you see the bots looking up when they should look down and inversely looking down when they should look up, try setting this CVAR to its opposite value. The default is 1 (aimbug fix activated).

Long live bot servers!

The Storm 11-02-2005 22:30

Re: introducing... BotAim 2!
 
Is this based on the your new aim algoritm ?

Pierre-Marie Baty 11-02-2005 22:31

Re: introducing... BotAim 2!
 
yes, that's the one we've been discussing with Aspirin and the others. It's also explained in the wiki btw :)

@$3.1415rin 11-02-2005 22:51

Re: introducing... BotAim 2!
 
nice, but I'd rather use that k^2 = 4dm relation and give the user just a factor how much larger, i.e. how many more oscillation he wants and let him just edit one of those, either k or d.

hm, once again using frametime inside the speed calculations ?! well, or I gotta read that after the physics test tomorrow, maybe I see it then.
hm, why commented out the bot movement itself ? worked fine here ...

PS: "modern" physics, lol

The Storm 11-02-2005 23:06

Re: introducing... BotAim 2!
 
I tested the plugin and I see very good aim. But from my point I think that the shot after the bot fire is automaticality go in me. The bots shoot no stop and all shots go in me. Maybe your plugin need a some fix ;).

Maybe my english need a fix :P.

Pierre-Marie Baty 12-02-2005 17:37

Re: introducing... BotAim 2!
 
argh, you were right! Paulo-La-Frite's aim fix bug struck again :D I corrected it and uploaded a new version. You can download the plugin again, it should be fixed. Note that if you find the aiming too skillful, you can tweak its parameters yourself.

@aspirin: "hm, why commented out the bot movement itself ? worked fine here ..." well yes... in theory it should work fine, that's what I was thinking too... but in practice the effects are horrible, the bots can't aim crap with that thing turned on. I must have screwed something, or else I got it all wrong... Weird :| Anyway I'm fully satisfied with the aiming as it is, and I think I'll leave it as is until someone complains. :D

@$3.1415rin 12-02-2005 18:57

Re: introducing... BotAim 2!
 
looked it up again. the reason, like I already told you about your post in the wiki, that you multiply your speed already with the frametime. this isnt a good idea, because in the next frame, you'll have problems with the damping, because you then have sort of frametime^2 there. and it's not fps independant when doing it the way you do it. just multiply with the frametime when adding the speed to the current angles. you might also check that when regarding the units in your equations I think.

Pierre-Marie Baty 13-02-2005 13:22

Re: introducing... BotAim 2!
 
hm yes, you are right. Something could be improved here. Hold on...

Cool438 13-02-2005 17:31

Re: introducing... BotAim 2!
 
I've noticed an enormous aim improvement with this plugin :) BUT only against human players. When multiple bots fight each other, they constantly miss and shoot above the head, then they go close up and fire single shots at each other :'(. This is very annoying as it takes a long time for the round to finish. Please try to fix this problem. I am using the latest P0DBot_mm.dll.

Pierre-Marie Baty 14-02-2005 18:04

Re: introducing... BotAim 2!
 
8D
You were right and I finally found the bug! Phew, that was a pesky one :D

The bots were simply forgetting they were targeting someone, and thus switched back their aiming into "no target" mode. This could happen because in order to know if the bot targets someone I was firing a TraceLine in the direction of its ideal angles. BUT, because the plugin needs to work on the StartFrame_Post() hook, the player's origin had already been moved by the game DLL and my traceline was simply missing its target... :)
I fixed that by adding a delay between switching back to no target mode. This way, if one traceline fails the whole combat aiming won't be compromised.

I have also fixed the frame time problem as suggested by aspirin. This leads to new values for the damping coefficients.

I'm uploading the plugin again. 8)

@$3.1415rin 14-02-2005 22:49

Re: introducing... BotAim 2!
 
did the new changes also influence the correction for the own movement of the bot ?

Cool438 15-02-2005 01:08

Re: introducing... BotAim 2!
 
The plugin works great! :D It works much better than the old BotAim2 dll. The bots have extraordinary aim now BUT they still have problems attacking other bots. The bots have trouble targeting the other bots and miss:(. They miss more often when the other bots are moving and they still miss even when they are 2 feet apart.

Pierre-Marie Baty 15-02-2005 02:35

Re: introducing... BotAim 2!
 
Actually, the bots aim equally at real players and bots. If you find you're being targeted too easily by them, maybe it's because you don't move enough ? :) There is nothing in the code that makes a difference between bots and real players. But as it is said in the readme, the aiming can be completely customized. Maybe your bots move a lot when firing, and they have problems with moving targets; in this case, try setting the botaim_target_anticipation_ratio CVAR to 1.0 instead of 0.8 (or even, try increasing it to 1.2 if it's not enough). This is the CVAR that tells the bot whether to aim ahead or behind a moving target. Keep me informed of your results :)

@aspirin: yes. The msec badly plugged in the equation was the only reason :D

MarD 16-02-2005 21:44

Re: introducing... BotAim 2!
 
Heyyo,

Gj on this pmb, when I first ran it? after 10 seconds all I could hear was "headshot!" from my statsme announcer. :P

I also tried it with E[POD]bot, also ran great, lots of headshots, lots of killing. Definately makes the bots difficulty go up. ;)

Pierre-Marie Baty 17-02-2005 00:36

Re: introducing... BotAim 2!
 
How about the first-person spectator mode? Does it look convincing? :)
(well, apart of the bot's mistakes, as I say, the plugin can't change the mind of the bot on where it wants to look...)

robbob4 17-02-2005 01:20

Re: introducing... BotAim 2!
 
Great mod! and...

Quote:

Pierre-Marie Baty
Council Member

Join Date: Nov 2003
Posts: 3,940
=) WOW 8D

Pierre-Marie Baty 17-02-2005 09:23

Re: introducing... BotAim 2!
 
...normal, I'm one of the founders :D (and certainly topmost spammer too, as attested by this post)

von Ryan 19-02-2005 21:58

Re: introducing... BotAim 2!
 
Ok, there is too much math and C++ cluttering this thread, so let me cut to the chase:

Great work in this one, PMB, indeed. I've just tweaked the settings juuust the way I like it (H4xx0rz Hard!)

Can't wait for RACC's new version to come out to test them both toghether :D

davidov 20-02-2005 16:10

Re: introducing... BotAim 2!
 
will there be a linux release for this mm plugin?

Pierre-Marie Baty 20-02-2005 20:18

Re: introducing... BotAim 2!
 
guess what? I simply forgot it :)

download the file again, it has a Linux .so library in it now :)

davidov 21-02-2005 19:45

Re: introducing... BotAim 2!
 
thanks , i try it now

Pierre-Marie Baty 24-02-2005 11:52

Re: introducing... BotAim 2!
 
New release, for Windows and Linux: fixes a crash condition caused by a possible angle overflow error :)

Get it at the same URL, or from the filebase:
http://filebase.bots-united.com/inde...on=file&id=274

robbob4 24-02-2005 14:53

Re: introducing... BotAim 2!
 
can you atach the old version for me because I need to test something for botmeiser to test meanloader killing locked up programs.

Pierre-Marie Baty 24-02-2005 16:59

Re: introducing... BotAim 2!
 
sorry I can't... the new version has overwritten the old one, and I don't keep old versions myself :(

@$3.1415rin 24-02-2005 17:03

Re: introducing... BotAim 2!
 
muhaha

Pierre-Marie Baty 24-02-2005 18:46

Re: introducing... BotAim 2!
 
what's so funny ? :|

Rifleman 25-02-2005 05:53

Re: introducing... BotAim 2!
 
if this the final release ?

Pierre-Marie Baty 25-02-2005 14:35

Re: introducing... BotAim 2!
 
I never release anything as "final" explicitly. If nobody finds bugs, maybe that will be the last release I'll make, or maybe not. Perhaps some day I'll have a nice idea that I'll want to put in, and I'll get back to it. But so far, I consider I'm stopping here with it.

Rifleman 25-02-2005 15:27

Re: introducing... BotAim 2!
 
how about provide several type of congfiguration ? Like easy set , normal set and hard set , the cvars make me dizzy ...

w0uter#01 03-03-2005 20:05

Re: introducing... BotAim 2!
 
i run a cs server with the following plugins

[ 1] Adminmod RUN - admin_mm.dll v2.50.60
[ 2] ChickenMod RUN - chicken_mm.dll v1.0.5.1
[ 3] STATSME RUN - statsme_mm.dll v2.8.3
[ 4] HeadShot RUN - headshot_mm.dll v0.3
[ 5] POD-Bot mm RUN - podbot_mm.dll vR2b46b
[ 6] HLGuard RUN - hlguard_mm_optim v1.71
[ 7] BotAim RUN - botaim_mm.dll v2.1

bug 1:
if 2 hostile bots different from hight they will shoot straight ahead in the floor/wall.
the bullets dont even come close to hitting.

bug 2:
when hs only mod is enabled. bots still hit the chest/limbs.
while non-bots can only hit people in the head

w0uter#01 05-03-2005 18:05

Re: introducing... BotAim 2!
 
disregard bug 2 fixed it by playing around with the order of the plugins

and in addition to bug 1 they simply do not shoot you when you are on top of a crate. even if they can see you, they just dont aim for you for some weird reason.

Pierre-Marie Baty 05-03-2005 18:43

Re: introducing... BotAim 2!
 
read the readme...

Quote:

botaim_fix (default: 1)
This CVAR tells whether the vertical (x) component of the bot's body angles should be negated, due to a very common bug in Half-Life bots that was already present in botman's template, causing these angles to be reverted. If you see the bots looking up when they should look down and inversely looking down when they should look up, try setting this CVAR to its opposite value. The default is 1 (aimbug fix activated).

w0uter#01 05-03-2005 23:48

Re: introducing... BotAim 2!
 
tryd it didnt work still the same. its not like they invert it or something they just dont aim if they differ from hight. as in keeping the last position of the crosshair

MarD 06-03-2005 04:20

Re: introducing... BotAim 2!
 
Heyyo,

Hmm, PMB? I have a demo recorded of PB MM v2.46a, statsme v2.8.3 and with your botaim2 plugin, should be v2.1.. and a bot seems to not even notice me for a bit until another bot had to beat the crap outta him. If ya want me to send the demo file to ya just pm me an adress I could send it to. ;)

Also, I'm not sure if botaim2 handles the actual firing of the weapons, I think it only handles the aiming.. so yeah.. :P

Pierre-Marie Baty 06-03-2005 04:37

Re: introducing... BotAim 2!
 
yeah I'd like to... send any demo you have at pm at bots dash united dot com

sPlOrYgOn 06-03-2005 04:50

Re: introducing... BotAim 2!
 
hmm
Code:

  // is the plugin disabled ?
  if (!botaim_enabled)
      return; // then don't do anything

should rather be
Code:

  // is the plugin disabled ?
  if (!botaim_enabled)
      RETURN_META (MRES_IGNORED); // then don't do anything

or else you get flooded by metamod saying it didn't set a metaresult..
[edit]
some good settings I've noticed are
botaim_damper_coefficient_x 0.001
botaim_damper_coefficient_y 0.001
botaim_notarget_slowdown_ratio 0.5
and rest on default

but they do shoot above the head a lot..
[/edit]
[edit2]
they also can't aim with nade or shoot breakables.
[/edit2]

Pierre-Marie Baty 06-03-2005 14:00

Re: introducing... BotAim 2!
 
aww, you're right splo about the RETURN_META :)

the problem with grenades and breakables is quite hard to solve, and it's the same problem in fact: the plugin needs to guess whether the bot is aiming at something or not, and switch the aiming accordingly. When you shoot a grenade, your ideal angles aim upwards, so it's hard to tell with a traceline that you're in "fighting mode". Same for breakables (but I can do something for that case).

I'd enjoy demos of the bots shooting above the head and the other problems.

MarD 06-03-2005 19:57

Re: introducing... BotAim 2!
 
Heyyo,

Heh, forgot to mention the part for ya pmb.. but I think it's the 2nd round of that demo, n' I run to tunnels n' after a flash I whup a few bots, another bot pops out from behind the crates n' tries to run by me, as if I wasn't there.. I diddn't shoot him cause I ran outta ammo n' had to switch to pistol. :P

But yeah, PMB? does your bot take over the firing? cause I notice the bot seems to start to fire off before he even centers his aim at other bots. I havn't seen a prob with it aiming too high.. but then again I tinkered with the aiming cvars.. your deviation_y is set to 60.0 by default.. that's a pretty high number so I cranked mine down to aboot 20.0-30.0 I think.. so I suggest to others to just lower this setting. I think it's:

botaim_deviation_y "put number here"

Hmm, I just read the readme, and it states this's only for when not aiming at someone, but still give it a shot.

Err.. I always though Y was the vertical.. and I wrong? cause in the readme it says X is the vertical.

Pierre-Marie Baty 06-03-2005 22:53

Re: introducing... BotAim 2!
 
Yes, in the Half-Life engine, the Y angles are horizontal, and the X angles are vertical.

All that the plugin does is changing the way the bot moves the crosshair, that's all... it doesn't change where it wants to look (or very slightly) nor when it wants to fire or not, that is decided by the bot code, not the aiming plugin.

I have not viewed your demo yet but I'll give it a spin this evening :)

Pierre-Marie Baty 07-03-2005 19:27

Re: introducing... BotAim 2!
 
Double posting to update the time stamp..

I've watched your demo.. you pwn indeed :D but I haven't seen anything that could be caused by the plugin. Even when the bot runs on you without shooting, it can't be caused by the plugin. Maybe the bot was out of ammo and it had not noticed it. I didn't see bots aiming too high up either, so either I'm blind or I'm dumb :|


All times are GMT +2. The time now is 08:50.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.