Skip to content

Commit

Permalink
Ability Output Config (#222)
Browse files Browse the repository at this point in the history
* Ability Output Config
  - Separate out abilities to dedicated config

* Add Group Leader to Status Bar
  - seems generally helpful to know who the group leader is in group or raid context

* Toggle Encounter Parse Known Player Target
  - when enabled never generate encounter reports for known players

* Fix emote parser dupes

** Guild Status to Player List
  - Use `/guildstatus` output in the player list

* Bump gTTS to 2.3.2

* README Update
  - Add installation steps for Linux distributions which adopted PEP 668
  - Alphabetize more things
  - Re-order some sections
  - Readability tweaks

* Bump Dockerfile Base Image

* Resolve Regex Errors
  • Loading branch information
mgeitz authored Oct 15, 2023
1 parent 87f6818 commit ef78652
Show file tree
Hide file tree
Showing 19 changed files with 740 additions and 404 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ build/
*.pyc
.git
.gitignore
.venv/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ MANIFEST
build/*
*.pyc
eqalert.egg-info/*
.venv/*
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.16-slim-buster
FROM python:3.11-slim-bookworm

LABEL maintainer="mgeitz" \
description="A Configurable and Context Driven Project 1999 Log Parser with NCurses Interface for Linux"
Expand All @@ -16,7 +16,6 @@ RUN apt-get update && \
gir1.2-gtk-3.0 \
gstreamer1.0-alsa \
gstreamer1.0-dev \
gstreamer1.0-doc \
gstreamer1.0-gl \
gstreamer1.0-gtk3 \
gstreamer1.0-libav \
Expand Down
149 changes: 85 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,32 @@ A Configurable and Context Driven Project 1999 Log Parser with NCurses Interface

![img](https://i.imgur.com/TtUwq12.png)

> Best used with the [Linux EQ Launch Manager](https://gist.github.com/mgeitz/aa295061c51b26d53dd818d0ebb3e37a) to maintain reasonable log file size
> Best used with a [launch script](https://gist.github.com/mgeitz/aa295061c51b26d53dd818d0ebb3e37a) which maintains reasonable log file size


## Install

Install from pypi
#### PyPI
```sh
$ pip3 install eqalert
$ # or if your distribution is using externally managed environemnts
$ pipx install eqalert
```

_or_ install manually to your host machine
#### Locally
```sh
$ git clone git@github.com:mgeitz/eqalert.git
$ git clone https://github.com/mgeitz/eqalert.git
$ cd eqalert
$ python3 -m pip install -e .
$ # or if your distribution is using externally managed environments
$ # (remember the venv must be sourced to run eqalert when installed this way)
$ python3 -m venv .venv; source .venv/bin/activate; python3 -m pip install -e .
```

_or_ install and run through docker
#### Docker
```sh
$ git clone git@github.com:mgeitz/eqalert.git
$ git clone https://github.com/mgeitz/eqalert.git
$ cd eqalert
$ docker compose build
$ docker compose run eqalert
Expand All @@ -32,6 +38,7 @@ $ docker compose run eqalert
> Note: If running through docker after installing and running on your host, update or regenerate `~/.eqa/config/settings.json` to reflect local container paths in `/home/eqalert`


## Getting Started

Start things up
Expand Down Expand Up @@ -64,35 +71,42 @@ Spot check these default paths generated in `config/settings.json`
"sound": "[$HOME/.eqa/]sound/",
"tmp_sound": "/tmp/eqa/sound/"
},
}
```
> Press `0` to reload your configs or restart the program if any changes were made. Though generally, it's a good idea to stop eqalert before manually editing your config files.


## Data

### Spell Timers
#### Spell Timers

EQ Alert will generate a file for spell timers in `data/spell-timers.json` by default by parsing `spells_us.txt` in your EverQuest directory.

This file will only regenerate if it is missing, malformed, or a newer `spells_us.txt` file is present.

### Spell Casters

#### Spell Casters

EQ Alert will generate/overwrite `data/spell-casters.json` each version. This file contains which classes can cast a given buff which timers should be made for.

### Spell Lines

#### Spell Lines

Many spells cast in EverQuest share the same log output lines. EQ Alert will generate/overwrite `data/spell-lines.json` each version as a mapping of which possible spells a given output line could be associated to.

### Spell Items

#### Spell Items

EQ Alert will generate/overwrite `data/spell-items.json` each version as a mapping of which items a given spell could be cast by.

### Players

#### Players

EQ Alert uses in-game `/who` output to keep an up-to-date list of each seen players class, level, and guild organized by server in `data/players.json` for alerting spell duration.

### Saved Timers

#### Saved Timers

If the active character is changed or EQ Alert is stopped, all active timers are saved to a file in `data/timers/` by the previously active character and server name. This file is consumed when the parser sets that character as active again, adding all non-expired timers back to the timer list.

Expand All @@ -102,6 +116,7 @@ If the active character is changed or EQ Alert is stopped, all active timers are
When encounter parse saving is enabled, complete encounter reports are saved under `encounters/[zone_name]/[date]/` as the time stamp of the encounter and the encounter target.



## Controls

### Keyboard Controls
Expand Down Expand Up @@ -136,35 +151,68 @@ When encounter parse saving is enabled, complete encounter reports are saved und

> Note: WASD or arrow keys will work
### Say Controls


## Settings & Options

Settings and options can be modified in `config/settings.json`

- `auto mob timer`: Create timer events after gaining experience for a duration based on the zone you are in
- `auto mob timer delay`: Set a delay for the auto mob timer notification n seconds before the actual event
- `character mention alert`: if enabled, speak any chat received line containing the active players name
- `consider eval`: Speak "safe" or "danger" based on consider output
- `debug mode`: Slows down parser performance and produces lots of file output
- `detect character`: Automatically set parser to listen to the most recently active eqlog
- `encounter parsing`: Parse encounter damage
- `encounter parsing auto save`: Save verbose encounter parse results to a file
- `mute`: Disable all text-to-speech output
- `persist player data`: Save /who player output for spell timers
- `raid mode auto set`: Auto-set raid context by zone
- `speech expand lingo`: When speaking a line, replace common EQ abbreviations with complete words
- `speech lang`: The language (IETF language tag) to read the text in - [gTTS documentation reference](https://gtts.readthedocs.io/en/latest/module.html)
- `speech tld`: Top-level domain for the Google Translate host - [gTTS documentation reference](https://gtts.readthedocs.io/en/latest/module.html)
- `spell timer consolidate`: When a spell timer expires consolidate timers for the same spell in the next 3 seconds to one alert
- `spell timer delay`: Set a delay for all spell timer notifications n seconds before the actual event
- `spell timer filter by list`: If enabled only create spell timers for spells in filter list
- `spell timer filter guild only`: Filter all spell timer events so they are only for yourself or guild members
- `spell timer filter list`: List of spells, when true, to filter timers to
- `spell timer filter yours only`: Filter all spell timer events to be only spells you cast
- `spell timer guess`: If there is moderate uncertainty in guessing a spell, go for it
- `spell timer other`: Set spell timers for spells that land on other players
- `spell timer self`: Set spell timers for spells that land on yourself
- `spell timer zone drift`: If enabled add time between zoning to spell timers targetting yourself



## Say Controls

You can control some parser settings using `/say` in-game. This is better suited for one monitor setups.

#### Settings

`/say parser raid` - Toggle raid mode

`/say parser debug` - Toggle debug mode

`/say parser raid` - Toggle raid mode

#### Mute

`/say parser mute/unmute` - Toggle global mute/unmute

`/say parser mute/unmute speak` - Toggle mute/unmute on all `speak` alerts.

`/say parser mute/unmute alert` - Toggle mute/unmute on all `alert` alerts.

`/say parser mute/unmute line` - Mute all sound alerts from a type of line
`/say parser mute clear` - Clear all muted line types and players

> example: /say parser mute engage
> Does not effect global mute
`/say parser mute/unmute line` - Mute all sound alerts from a type of line

`/say parser mute/unmute line player` - Mute all sound alerts of a given line type from a specific source

> example: /say parser mute tell indef
`/say parser mute clear` - Clear all muted line types and players
`/say parser mute/unmute speak` - Toggle mute/unmute on all `speak` alerts.

> Does not effect global mute
> example: /say parser mute engage
#### Encounters

Expand Down Expand Up @@ -192,45 +240,16 @@ You can control some parser settings using `/say` in-game. This is better suite

`/say parser consider` - Toggle consider evaluation

`/say parser hello` - Hello

`/say parser what context` - Speak context state

`/say parser what state` - Speak *everything* in the state object

`/say parser hello` - Hello
`/say parser where` - Where am I?

`/say parser who [player_name]` - Speaks player level, class, and guild if known

`/say parser where` - Where am I?


## Settings & Options

Settings and options can be modified in `config/settings.json`

- `character mention alert`: if enabled, speak any chat received line containing the active players name
- `consider eval`: Speak "safe" or "danger" based on consider output
- `debug mode`: Slows down parser performance and produces lots of file output
- `detect character`: Automatically set parser to listen to the most recently active eqlog
- `encounter parsing`: Parse encounter damage
- `encounter parsing auto save`: Save verbose encounter parse results to a file
- `mute`: Disable all text-to-speech output
- `persist player data`: Save /who player output for spell timers
- `raid mode auto set`: Auto-set raid context by zone
- `speech expand lingo`: When speaking a line, replace common EQ abbreviations with complete words
- `speech tld`: Top-level domain for the Google Translate host - [gTTS documentation reference](https://gtts.readthedocs.io/en/latest/module.html)
- `speech lang`: The language (IETF language tag) to read the text in - [gTTS documentation reference](https://gtts.readthedocs.io/en/latest/module.html)
- `auto mob timer`: Create timer events after gaining experience for a duration based on the zone you are in
- `auto mob timer delay`: Set a delay for the auto mob timer notification n seconds before the actual event
- `spell timer delay`: Set a delay for all spell timer notifications n seconds before the actual event
- `spell timer filter by list`: If enabled only create spell timers for spells in filter list
- `spell timer filter list`: List of spells, when true, to filter timers to
- `spell timer filter guild only`: Filter all spell timer events so they are only for yourself or guild members
- `spell timer filter yours only`: Filter all spell timer events to be only spells you cast
- `spell timer guess`: If there is moderate uncertainty in guessing a spell, go for it
- `spell timer other`: Set spell timers for spells that land on other players
- `spell timer self`: Set spell timers for spells that land on yourself
- `spell timer zone drift`: If enabled add time between zoning to spell timers targetting yourself
- `spell timer consolidate`: When a spell timer expires consolidate timers for the same spell in the next 3 seconds to one alert


## Custom Alerting
Expand All @@ -257,18 +276,18 @@ Example configuration for a line type:
#### Reaction Values

##### General
- `false`: Disable alerting for this line type
- `"alert"`: Alert for matching strings in `alert` for the line type using the set sound
- `"all"`: Alert for all lines of a given line type using the set sound
- `false`: Disable alerting for this line type

##### Context Driven
- `"solo"`: Alert when solo, grouped, and raiding
- `"solo_only"`: Alert only when solo
- `"afk"`: Alert only when afk
- `"group"`: Alert when in a group and raiding
- `"group_only"`: Alert only when grouped
- `"solo_group_only"`: Alert only when not raiding
- `"raid"`: Alert when in a raid
- `"afk"`: Alert only when afk
- `"solo"`: Alert when solo, grouped, and raiding
- `"solo_group_only"`: Alert only when not raiding
- `"solo_only"`: Alert only when solo

#### Alert Keys

Expand Down Expand Up @@ -335,17 +354,17 @@ Alert for the item `Hand Made Backpack` when someone else `/auctions` it and is
- `true`: Alert for the string

##### Context Driven
- `"solo"`: Alert when solo, grouped, and raiding
- `"solo_only"`: Alert only when solo
- `"afk"`: Alert only when afk
- `"group"`: Alert when in a group and raiding
- `"group_only"`: Alert only when grouped
- `"solo_group_only"`: Alert only when not raiding
- `"raid"`: Alert when in a raid
- `"afk"`: Alert only when afk
- `"solo"`: Alert when solo, grouped, and raiding
- `"solo_group_only"`: Alert only when not raiding
- `"solo_only"`: Alert only when solo

#### Sound Values
- `true`: When an alert is raised speak the entire line
- `false`: Play no sound when an alert is raised
- `true`: When an alert is raised speak the entire line

> Any other sound value (as a string) will be spoken as the audio trigger for that line type
Expand All @@ -367,7 +386,9 @@ For example, the below configuration will alert if the word `help` is found in a

This can be helpful if you would like to alert for something not yet matched by the parser, though your [contribution](CONTRIBUTING.md#pull-requests) to a new line type match in the parser would also be welcome!

### Zones


## Zones
Zone data is stored in `config/zones.json`

#### indoors
Expand Down
Loading

0 comments on commit ef78652

Please sign in to comment.