Page 1 of 2

Hunt Enhancements?

Posted: Mon May 22, 2006 12:14 pm
by I_Died_Once
OK, you can hunt people

In rabbit hunt mode, you automatically hunt whoever is rabbit.

Hows about a feature somehow or another that'll allow you to automatically hunt people who happen to hold a given flag? You can select WG and then if anyone on the server picks up the WG flag,

This could be useful if you pick up Laser... put CL on flag hunt.


Also, this might work into the first idea, but also how about different levels, or priorities & degrees of hunt? One can make people flash on radar in one color, another level flashes another color....

I often hunt with a mindset of "Get this guy, watch out for that other guy"and this would help be an end to that means.

Posted: Mon May 22, 2006 7:54 pm
by Winterberry
I like the flag hunt idea. Oftentimes I hunt a player who's being annoying with a superflag, but when he gets downed it's sometimes inconvenient to pull him off hunt. If I could get it to auto-hunt laser or gm or oo, that would be very helpful.

Posted: Mon May 22, 2006 9:20 pm
by The Knights Who Say Ni
I Died Once wrote: but also how about different levels, or priorities & degrees of hunt? One can make people flash on radar in one color, another level flashes another color....
instead of the colours you could have HUD markers like team flags but either colours that represent the flag youre hunting or the ID of the flag (e.g ST - stealth)

also wouldnt that count as a slight degree of cheating as you can see who has the set flag instantly when they grab it

and what happens if two people grab the same flag?

also this would be usless in rabbit hunt

Posted: Mon May 22, 2006 9:26 pm
by Tanner
I like the flag hunt idea, could be used in some situations.
The Knights Who Say Ni wrote:
I Died Once wrote: but also how about different levels, or priorities & degrees of hunt? One can make people flash on radar in one color, another level flashes another color....
instead of the colours you could have HUD markers like team flags but either colours that represent the flag youre hunting or the ID of the flag (e.g ST - stealth)

also wouldnt that count as a slight degree of cheating as you can see who has the set flag instantly when they grab it

and what happens if two people grab the same flag?

also this would be usless in rabbit hunt
Sure its instant, but right clicking would be just as instant if you knew where to look.

-Tanner

Posted: Mon May 22, 2006 11:46 pm
by trepan
Been thinking about adding something like this for a while.
I've just added it to CVS, and it could easily be added to
2.0.10 if it ever exists.

From the AutoHunt.h header:

Code: Select all

//
//   set autohunt G:CL?L:ST?GM:RATIO:LEADER
//
//   G:       always hunt a player with the Genocide flag
//   CL?L:    if the local player has Cloak, hunt players with Laser 
//   RATIO:   if an enemy player has more kills then deaths on you, hunt them
//   LEADER:  hunt the enemy with the best score
//
Note that you could also use /localset instead of setting
the variable in your config file.

It should be easy to add extra types or triggers if anyone
comes up with good ones. It might also be nice to have
different types of hunt indicators...

Posted: Mon May 22, 2006 11:51 pm
by Tropican8
[edit]...Was going through threads too fast, forget it...

Posted: Mon May 22, 2006 11:55 pm
by trepan
Here's another example string:

Code: Select all

/localset autohunt leader::G:SW::R*:G*:B*:P*::ST?SE::SE?ST::ST?GM::CL?L::SB?OO::OO?SB
The ':' character separates fields, and can be doubled up
to make the string a little more readable. The '?' character
in fields indicates a flag association. Flag can be associated
to any number of other flags.

Posted: Mon May 22, 2006 11:57 pm
by trepan
Tropican8: Don't just read, comprehend.

Posted: Tue May 23, 2006 12:29 am
by I_Died_Once
Glad to see someone "got it"

'Cause its like... say I log on a server, and theres a true & through hard core BZ Flagger that I just really, really wanna steer clear of. So I put him on hunt.

Then a short while later, some punk faced, good for nothing, person I can't stand, say they log on, and its someone that I just *must* pwn and make into my biznitch. So, I put this fool on hunt, too.

Another situation would be if I am rogue, and I am on a server that employs the RogueGeno plugin. In THAT case, I'd want to make it to where anyone who picks up Geno is put on hunt.

But the idea was to be able to select what "flag" you wanna hunt on the fly. Sometimes, I'll find myself in a spot reigning down the pain with GM & it'll be where only someone with SW can take me out.

Or, if I wanted, I could put anyone with superbullets on hunt instead, or in addition to who and whatever else you got on hunt.

I was thinking that on your radar, those being hunted would get different colors, and maybe different sounds when you're near, pending on what kind of hunt you got em on.

Posted: Tue May 23, 2006 5:16 am
by trepan
I've started to add in Hunt Levels and proximity requirements:

Code: Select all

ex: SW<100#8
The <100 part means that the hunt only becomes active if the player
if within 100 meters of the player. The #8 part sets up the hunt level
(currently only displays a different hunt color). Having different radar
markers for different hunt levels isn't looking that great so far, it
results in information overload.

P.S. The "autohunt" variables can also reference other BZDB variables
to make it easier to manage:

Code: Select all

set autohunt *ahBasics:*ahFlags:*ahTeams:*ahTmp
set ahBasics leader#4:ratio#3
set ahFlags G#8:SW<100#8:ST?GM:ST?SE:SE?ST:OO?SB:SB?OO:CL?L
set ahTeams R*#7:G*#7:B*#7:P*#7
This whole thing is getting a bit whack, and might find its config
transferred into a dedicated file. This file could also define the
hunt level colors, radar draw modes, etc...

Posted: Tue May 23, 2006 9:23 pm
by A Meteorite
trepan
Is this in 2.0.x CVS and 2.1.x CVS?

Posted: Wed May 24, 2006 2:00 am
by trepan
It's only been committed to 2.1. I've got a patch
file that should work against v2_0branch, and I'll
probably post it once I'm satisfied with the radar
markers for auto hunt.

P.S. v2_0branch is not supposed to receive any
new features, as mentionned at the top of its
Changelog.

Posted: Wed May 24, 2006 3:49 am
by A Meteorite
trepan wrote:P.S. v2_0branch is not supposed to receive any
new features, as mentionned at the top of its
Changelog.
Yes, but it would be sorta nice to have this in for those that can compile (as this is a nice feature).

And even if you can't make it "official" by putting it in CVS, a patch file would still be pretty sweet. :)

Posted: Wed May 24, 2006 7:38 am
by trepan
Here's the initial version of my patch. I'm not quite happy
with the radar display (needs more differentiation between
levels), but it's good enough for a first release.

RadarDisplay:
Levels 1-3 have slow blinking
Levels 4-6 have corner markers (no blinking)
Levels 7-9 have corner markers (blinking)

To apply the patch, get a recent copy of the v2_0branch CVS
branch. Move the patch into the src/bzflag directory, and type:

Code: Select all

patch -p0 < autohunt_bz2.0.9_v1.0.diff
http://trepan.bzflag.bz/autohunt_bz2.0.9_v1.0.diff

Posted: Wed May 24, 2006 7:46 am
by trepan
The 1.0 autohunt patch supports using level ranges.
Using ranges can save you a lot of typing if you want
change the apparence of the hunt markers depending
on the distance to the target.

Code: Select all

ex:  set autohunt min<500#1:max<50#9:SW:GM:L
The example sets up 9 different levels for the SW, GM,
and L flags. Here's the output from bzflag with -d -d -d:

Code: Select all

  level: 1, dist: 500.000000
  level: 2, dist: 443.750000
  level: 3, dist: 387.500000
  level: 4, dist: 331.250000
  level: 5, dist: 275.000000
  level: 6, dist: 218.750000
  level: 7, dist: 162.500000
  level: 8, dist: 106.250000
  level: 9, dist: 50.000000
Along with the MIN and MAX token, there's a RESET token.
If either the level or proximity is explicitly defined for a token,
then the current range is not used.

The patch also supports the TK token for selecting teamkillers
(only on your team, or any team if you are an observer). It uses
the same selection criteria as the scoreboard TK highlighting
(BZDB var tkwarnratio).

Posted: Wed May 24, 2006 1:02 pm
by trepan

Code: Select all

set autohunt G#9:gm#8:sb#8:sw#7:wg#7:L#6:V#6:F#5:BU#5:MG#5:TK#4
Image

Posted: Wed May 24, 2006 1:24 pm
by joevano
Hehe.. I think they should change your rank to "Dev Wizard Extraordinaire". This looks like a great enhancement to the hunt system...

Posted: Wed May 24, 2006 2:26 pm
by ^nightmare^
um i think im drooling just looking at the new features of that stuff. to bad its not coming out any time soon...... :x

Posted: Wed May 24, 2006 3:24 pm
by gilly
Um.. are these legal to use in public yet?

I mean.. if I go and grab the CVS will I be banned for using it ? :)

In any case, cool stuff!

Posted: Wed May 24, 2006 3:42 pm
by trepan
Here's an update that adds:

1. HuntLevel sort mode for the scoreboard.

2. The "autoFlagDIsplay" BZDB variable. If set to 1,
it will hide the flags on radar if you have good flag
(or team flag).

http://trepan.bzflag.bz/autohunt_bz2.0.9_v2.0.diff

Posted: Thu May 25, 2006 4:13 am
by trepan
Another update:
http://trepan.bzflag.bz/autohunt_bz2.0.9_v3.0.diff

With this update, you can config how the marker for each
level is drawn. From the top of AutoHunt.cxx:

Code: Select all

//   Parsing Control:
//     *var:    replace with the string in BZDB variable 'var'
//   Flag Type Control:
//     GM:      always hunt a player with the Guided Missile flag
//     CL?L:    if the local player has Cloak, hunt players with Laser 
//   Specific Triggers:
//     TKS:     if a friend has exceeded the teamkill ratio
//     RATIO:   if an enemy player has more kills then deaths on you, hunt them
//     LEADER:  hunt the enemy with the best score
//   Range Control:
//     RESET:   reset range settings
//     SET:     set all levels to value
//     MIN:     set range minimum level and its value
//     MAX:     set range maximum level and its value
//   Display Control:
//     COUNT:   chevron count
//     SPACE:   chevron space
//     DELTA:   chevron expansion rate
//     IALPHA:  chevron inner translucency
//     OALPHA:  chevron outer translucency
//     PERIOD:  chevron blink period
//     IBLINK:  tank square blink threshold
//     OBLINK:  chevron marker blink threshold
Another example: (note that the chev token has been replaced with count)
Image

Posted: Thu May 25, 2006 7:00 am
by Winterberry
This is fantastic, trepan!! Thanks much.

Posted: Thu May 25, 2006 12:05 pm
by CannonBallGuy
Nice work, I really appreciat it, don't get me wrong.
Yet it does seem a little confusing.
I'd personally love to see a /hunt command which could work like this:

Code: Select all

/hunt <player|flag> <level>
So, if I join a server and see The Red Baron there, I could do:

Code: Select all

/hunt "The Red Baron" 5
to set his tank to use the level 5 linking system...
Or if I'm using GM and want to avoid shockwave, I could do:

Code: Select all

/hunt SW 8
You'd also need a command to turn a hunt off - either set the level to 0 or use:

Code: Select all

/unhunt <player|flag>
This would just be simpler and easier, imho. :)

Posted: Thu May 25, 2006 1:42 pm
by Legolas_
Wow, nice trepan! what radar mode are you using?
CannonBallGuy
Nice ideas, but trepan has a great idea in itself

Posted: Thu May 25, 2006 2:22 pm
by CannonBallGuy
My idea is just a way to control trepan's hunt level's, since I don't actually understand his method at all.