Giter Club home page Giter Club logo

eqalert's People

Contributors

dependabot[bot] avatar ischwarz3 avatar mgeitz avatar rypervenche avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

eqalert's Issues

Unable to Add New Characters to the Config

Reproduction

  • Create a new character and login, producing a new log
  • Reload the config, or restart eqalert.py
  • Application crashes with brief trace

Example

Full trace encountered

2019-06-25_18-52

As Text
Traceback (most recent call last):
  File "eqalert.py", line 200, in <module>
    main()
  File "eqalert.py", line 64, in main
    chars = eqa_config.get_chars(config)
  File "/home/arch/project/eqalert/lib/eqa_config.py", line 43, in get_chars
    add_char(name.lower())
  File "/home/arch/project/eqalert/lib/eqa_config.py", line 62, in add_char
    chars.append(name.lower())
NameError: global name 'chars' is not defined

Expected

  • Obviously expected a new chararcter log to be processed

Dynamic Received Message Tone

The spoken tell messages set in the default cnofig are pretty fun, it does a great job of speaking each full line identified as tell outloud.

This can feel slow due to the xyz tells you, prefix.

This can feel annoying when receiving tells from multiple people at once.

Can I modify the tone/speed of the spoken message based off the senders username? This would be more interesting.

Settings tab

Populate settings tab

  • character selection
  • toggle raid mode
  • toggle tbd optional parses (heal, damage, etc) in events tab

Timers

Step 1

  • timer_q, process_timer
  • /say command driven timers
  • /say command driven metranomes
  • Automatic respawn timers for zone default values
  • restructure zones in config and add default timers

Step 2

  • Import the spell file
  • Build line matches for each spell output line

Step 3

  • Spell timers

Step 4

  • Display most recent timers in tab or pop-up

Improve Char / Server Organization

Currently characters and servers are stored seperately, while each character may have n servers and each server likely has n characters - these should be unified in the config under the filename or char/server combo.

Character Selection Issue

Character selection seems to only actually change characters 30% of the time.

This is puzzling.

On the bright side you can eventually change your character to the one you want if you just keep changing selections and selecting.

Missing Log Lines

The current implementation to read the active log file assumes the log is only written to at most every 0.001 seconds and is never written with more than one line at a time.

During high log traffic, lines are missed.

This is reproducable when receiving a tell with the speak alert set while sitting beside combat between many parties.

Either, pyinotify is not fast enough, the updates occur more frequently than every 0.001 seconds, or there is an unknown issue with the log file processor.

who_line not matching

Players on EverQuest:
---------------------------
[ANONYMOUS] Foobar  <Guild>

Several who matches are missing. Players are matching fine, but anon tagged players are missed.

Limit Filesizes

  • Check filesize of ~/.eqa/log/undetermined.txt and ~/.eqa/log/eqalert.txt at startup
  • Delete or truncate them

Replace Default Sound Names

Replace 1, 2, 3, 4, 5 with the actual spoken words they match to, or allow the value of sound to be any arbitrary string to be spoken.

Parser Rewrite

The last part of this to survive the initial rewrite..

Prerequisite #12

  • trie structure?
  • dict structure?
  • use regex?
  • regex hash table of substring regex hash tables of linked lists?

I'm positive this cobbled if/else structure can be optimized by using a different data structure

Map Tab

This would be a doozy.. but, a tab with a map of the current zone and most recent loc would be cool. Both should be in the new state object

Group Invite Line Type

This is no longer getting picked up and reaching undetermined.txt

Foobar invites you to join a group.
To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel.

Character switching

Post rewrite character log switching isn't working, currently only the default character works

Incorrect Sound Path

On occasion, the incorrect sound path is used when playing a "run time" sound

INFO:root:[2019-10-30_19:03:24]: speak: Error on line 69: [Errno 2] No such file or directory: "/tmp/eqa/sound/chacoo tells you, 'i'm in innothule/feerot'.wav"

Missing LFG on Who

This is reaching undetermined:

[60 Oracle] Zudagg (Troll) <Kingdom> LFG

Silient Application Crash

There is a silent crash in the process log thread which causes the parser to stop listening to the log

INFO:root:[2019-10-28_13:02:45]: process_log: Error on line 59: list index out of range

Rebuild Settings Tab

This tab should really just mirror and manipulate config.json

enter should select things, not right arrow. What was I thinking?

Character Log Specific Last State

Put:

  last_state: {                                                                  
  ¦ ¦afk¦: ¦true¦,                                                               
  ¦ ¦character¦: ¦Indef¦,                                                        
  ¦ ¦direction¦: ¦South¦,                                                        
  ¦ ¦location¦: {                                                                
  ¦ ¦ ¦x¦: ¦552.31¦,                                                             
  ¦ ¦ ¦y¦: ¦-84.95¦,                                                             
  ¦ ¦ ¦z¦: ¦99.1¦                                                                
  ¦ },                                                                           
  ¦ ¦server¦: ¦P1999Green¦,                                                      
  ¦ ¦zone¦: ¦Plane of Mischief¦                                                  
  },       

In each:

  ¦ ¦Indef_P1999Green¦: {                                                        
  ¦ ¦ ¦char¦: ¦Indef¦,                                                           
  ¦ ¦ ¦disabled¦: ¦false¦,                                                       
  ¦ ¦ ¦file_name¦: ¦eqlog_Indef_P1999Green.txt¦,                                 
  ¦ ¦ ¦server¦: ¦P1999Green¦                                                     
  ¦ },

Regex Actions

Rewrite lib/actions.py

  • No more word arrays
  • split into action group defs

Abstract Determine

Split up the determine method in lib/parser.py by grouped line types, ordered by assumed frequency.

melee
spells
recieved messages
sent messages
command output
system messages
emotes
pets

Config Reload

Reloading the config seems to cause the program to exit without error in a bash shell using the terminator terminal emulator

Merge Bootstrap and Startup Checks

Bootstrap:

eqalert/eqa/eqalert.py

Lines 43 to 78 in 9fe831c

def bootstrap(base_path):
"""Bootstrap first run"""
try:
print("Bootstrapping for first run . . .")
# Make the main folder
if not os.path.exists(base_path):
print(" - putting this stuff in " + base_path)
os.makedirs(base_path)
# Make the log folder
if not os.path.exists(base_path + 'log/'):
print(" - making a place for logs")
os.makedirs(base_path + 'log/')
# Make some sounds
sound_directory = base_path + 'sound/'
if not os.path.exists(sound_directory):
print(" - making some sounds")
os.makedirs(base_path + 'sound/')
eqa_sound.speak('hello', 'false', sound_directory)
eqa_sound.speak('hey', 'false', sound_directory)
eqa_sound.speak('listen', 'false', sound_directory)
eqa_sound.speak('look', 'false', sound_directory)
eqa_sound.speak('watch out', 'false', sound_directory)
# Generating a config file
print(" - generating json config")
eqa_config.init(base_path)
eqa_config.update_logs(base_path)
except Exception as e:
print('Unfortunately, the bootstrap step failed with: ' +
str(sys.exc_info()[-1].tb_lineno) + ': ' + str(e))
exit(1)

Startup checks:

eqalert/eqa/eqalert.py

Lines 118 to 129 in 9fe831c

# Ensure the character log file exists
if not os.path.exists(char_log):
print('Please review `settings > paths` in config.json, a log with that default server and character cannot be found.')
exit(1)
# Ensure the configuration is up-to-date
if 'version' not in config["settings"]:
print('Please move or delete your current configuration. A new config.json file must be generated.')
exit(1)
elif not config["settings"]["version"] == str(pkg_resources.get_distribution('eqalert').version):
print('Please move or delete your current configuration. A new config.json file must be generated.')
exit(1)

make eqa/lib/bootstrap.py

Say Commands

Use in-game /say to send parser commands, better for single monitor setups I think

/say parser debug on
/say parser debug off
/say parser raid on
/say parser raid off
/say parser mute
/say parser unmute
/say parser mute tell
/say parser unmute tell
/say parser mute tell [playername]
/say parser unmute tell [playername]

Undetermined Test Lines

The following test cases are falsly reporting as undetermined lines:

you forget ensnare.
your spell is interrupted.
you were hit by non-melee for 17 damage.
parser grabs hold of parsette and begins to dance with her.
it begins to rain.
it begins to snow.
<linkdead>[60 phantasmist] dagner (gnome) <tempest>
it will take you about 30 seconds to prepare your camp.
you abandon your preparations to camp.
you no longer have a target.
you no longer have a target.

Archive or Migrate Old Configs

Currently configs are just dismissed based on the value of version in it. It changes a lot less these days, and when it does it is just new line types.

Clean the upgrade path here, deleting or manually updating the config sucks.

Config Init

  • Script to bootsrtap new config (may accept input)
  • .gitignore the config

Default Character in New Config

When eqemu logs exist and a new config is generated, the default log user is not updated from Change to a real user.

The filler user Change should only be needed if no logs exist for said server

Duplicate Alerts

While a part of #55 is resolved, there is a more broad issue causing some alerts to process twice regardless of their type.

Potentially related to the use of pyinotify per #61

Second Start Config Error

INFO:root:[2022-03-09_21:51:58]: set last state: Error on line 182: Extra data: line 615 column 6 (char 13512)

Sometimes either changing characters or zones to last_state after generating a new config.json adds extra json formatting characters.

Doesn't happen on configs with a populated last_state

Mute Button

Toggle mute for full text to speech triggers

State tab

Populate state tab

  • raid state

  • zone

  • character

  • camping state

  • afk state

  • zone population state?

  • location?

Parse More

  • spell_other_begin_cast
Brightie begins to cast a spell.
  • spell_other_cast_recover
alumi regains concentration and continues casting.
  • spell_other_cast_interrupt
Tiale's casting is interrupted!
  • mob_enrage_on
a fatestealer drake has become ENRAGED.
  • mob_enrage_off
The Avatar of War is no longer enraged.
  • mob_rampage_on
Adjutant Jharll goes on a RAMPAGE!
  • mob_defeated_other
a gust of wind has been slain by Bilbowned!
  • mob_defeated
You have slain Treasure Chest!
  • trade_total
the total trade is: 0 pp, 0 gp, 148 sp, 0 cp
  • spell_memorize
you have finished memorizing spirit of wolf.
  • spell_gate_collapse
your gate is too unstable, and collapses.
  • spell_cooldown_active
you haven't recovered yet...
  • group_invite_instruction
to join the group, click on the 'follow' option, or 'disband' to cancel.
  • spell_memorize_already
you cannot memorize a spell you already have memorized.
  • spell_memorize_finishe
you have finished memorizing circle of wakening lands.
  • group_joined
you have joined the group.
  • group_removed
you have been removed from the group.
  • group_invite_other
you invite outcast to join your group.
  • group_joined_other
outcast has joined the group.
  • group_disbanded
your group has been disbanded.
  • consider
cromen regards you indifferently -- he appears to be quite formidable.
  • experience_group
you gain party experience!!
  • experience_solo
You gain experience!!
  • combat_other_melee_dodge
percisely tries to crush a vapor golem, but a vapor golem dodges!
  • combat_other_melee_parry
percisely tries to crush a vapor golem, but a vapor golem parries!
  • combat_other_melee_block
a vapor golem tries to hit zipperzuk, but zipperzuk blocks!
  • combat_other_melee_crit
Glowin Scores a critical hit!(175)
  • combat_other_melee_reposte
percisely tries to crush a vapor golem, but a vapor golem ripostes!
  • looted_item_other
--zipperzuk has looted a rune of al'kabor.--
  • looted_item_you
--You have looted a Flayed Skin Leggings.--
  • looted_money_other
you receive 0 platinum, 2 gold, 1 silver, 2 copper as your split.
  • tracking
a desert madman is ahead and to the left.
a desert madman is ahead and to the right.
a desert madman is straight ahead.
a desert madman is behind and to the left.
a desert madman is behind and to the right.
a desert madman is behind you.
a desert madman is to the left.
a desert madman is to the right.
  • pet_folowwing
a drolvarg guardian says 'following you, master.'
  • pet_guarding
a drolvarg guardian says 'guarding with my life..oh splendid one.'
  • pet_back
a drolvarg guardian says 'sorry, master..calming down.'
  • pet_attack_fail
a drolvarg guardian says, 'that is not a legal target master.'
  • time_earth
Earth Time: Friday, March 11, 2022 12:02:16
  • time_game
Game Time: Saturday, January 07, 3153 - 10 AM
  • drink_consume
Glug, glug, glug...  Aaeerian takes a drink from a Pod of Water.
  • spell_you_casting
You begin casting Engulfing Roots.
  • motd_game
MESSAGE OF THE DAY: Welcome to Project 1999: Green!  Please take the time to visit our forums and review the Play-Nice-Policy!
  • motd_guild
GUILD MOTD: Calcium - foobar
  • motd_welcome
Welcome to EverQuest!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.