PDA

View Full Version : Proximity Filter Patch



tarwyn
06-21-2006, 02:59 AM
Here's a small patch to the 5.5.0.0 tree of ShowEQ that adds proximity alerts. Proximity alerts trigger when a proximity filtered mob is moving within the field of view (FOV) of the player. If used with audio commands, this could be used to alert you, if a roamer has moved close to your location.
The FOV setting on the map controls the proximity alert area.

To apply the patch, save the attached file to the showeq-5.5.0.0 folder and execute



cd src
patch -p1 <../showeq_5_5_0_0_patch.txt


Then rebuild ShowEQ



make
make install


[Edited: patch now includes a seperate map icon for the proximity filter]

-Tarwyn

purple
06-21-2006, 11:32 AM
On first pass, this looks good. I'll work it into the tree when I can. Thanks for the contribution!

BlueAdept
06-21-2006, 07:07 PM
NM. Spoke too soon. Thought it was a patch to add danger alerts which exist. This adds a new audio alert and I guess a new icon for it.

purple
06-21-2006, 08:09 PM
Caution adds a line a at hard-coded 500 distance. Danger does 1000 and 500 I think. But this actually uses the "field of view" circle on the map as the distance and lets you adjust it. It seems reasonable to me.

BlueAdept
06-21-2006, 10:29 PM
Heh...seems it took me quitting EQ before people got interested in filters. :)

tanner
06-22-2006, 01:40 AM
Purple you give this code your blessing?

If so, I'l patch-add (quilt) it into Debian packages.

tarwyn
06-22-2006, 02:11 AM
I decided I needed an audio alert for wandering mobs after I was brutally murdered by an roaming guard while happily medding in what I felt was a safe spot. The danger/caution filters only provide visual cues.

Now it works a bit like a reverse-sonar. Filtered mobs entering your FOV "ping" audibly, alerting you to their presence.

In one more revision I've added a command line parameter "%p", which will be replaced with a fractional value ranging from 0.100 - 1.500 (it's a fraction with 3 significant digits), which represents the proximity (0.1=at the very border of the FOV, 1.5=very very close - this value is reached before the mob is on top of the player). I use this as a volume modifier with sox, playing a Sonar sound and piping it through to esd:

Audio command:


/usr/local/bin/soxplayesd -v %p /usr/local/share/sounds/SonarShort.wav &


soxplayesd:


#!/bin/sh
/usr/bin/sox "$1" "$2" "$3" -c 4 -t .raw - 2>/dev/null | /usr/bin/esdcat 2>/dev/null


(you may have to change the -c parameter above depending on your soundcard/setup)

I've tested this patch for several hours yesterday and haven't encountered any problems with it (which doesn't mean there aren't any ;))

Cheers
-Tarwyn

purple
06-22-2006, 07:49 AM
Purple you give this code your blessing?

If so, I'l patch-add (quilt) it into Debian packages.

I didn't say that. I just said it looks ok from first glance. Whether it gets put in word for word when I merge it into the tree or not depends. I'd wait until it's in CVS if I were you, but you can do whatever you want!