nomns / nparse

Nomns' Parser for Project1999
GNU General Public License v3.0
43 stars 22 forks source link

Idea: Pause button for timers #12

Open TVOps opened 5 years ago

TVOps commented 5 years ago

Having a simple "Pause timers" button could be useful when camping buffs. They would be lost if closing Nparse, though there could also be an option to manually "pause timers and quit" and then upon reopening nparse, a prompt could be "do you want to resume your previous timers?" Due to server ticks and how diligently you click pause/resume, the timers may be off by several seconds, but that would be preferable to not having a ballpark figure of times left.

nomns commented 5 years ago

I can definitely save the set of buffs you have on yourself to a state in a json file or something and then reload, recalculate, resume as soon as you reopen nParse. That would be pretty easy to implement. I think it might be better to just auto remember and resume them automatically rather than asking the user every time they open the program as most people will have timers left over if they are a caster. Buffs are easy enough to click off or you can just double click on your "You" target to clear them all. I am also trying to compartmentalize each parser so I don't want actions for parsers other than enable/disable toggle within the tray icon.

I am not entirely sure I like the manual pausing situation since I see that being a potential nuisance. If buffs on yourself are paused, you would have to manually remember to pause/unpause -- a state which will be saved between nParse being opened/closed. All new spells cast would be autopaused as well if the pause is toggled. I will think of a way to implement this. Most likely I will put a pause icon on the spell parser.

I will add this to my stuff to work on.

TVOps commented 5 years ago

Yeah, auto saving/pausing on exit would work fine. You could also have it set to autopause 5 seconds after the "It will take about 5 more seconds to prepare your camp." Obviously, this would not work if you /quit but then you could "manually " pause by simply exiting nParse. You could have it auto resume (assuming you run nParse before launching EQ) by the line "Welcome to Everquest!"

nomns commented 5 years ago

I don't really wanna add parse checks for such a small thing. Just to check that autopause after "it will take 5 more seconds...," that check would be done on every line in the parser. Kind of a waste of processing power.

Also, the log checker (the process which figures out which log you are using) is prompted by what file is updated last. It knows which log file is being used by the latest one to write to, which is why, if you turn on nParse while EQ is already open, it starts processing after the 2nd line has been written to the file. Because of this, I don't think I can parse "Welcome to Everquest!," and once again, it would just be unnecessary processing use.

Think about being in a raid and you have 200-300 lines going through your parser every second. Anytime I add a check for something, that is an additional 200-300 possible text matches I would have to make per second. This is why I hesitate to add little things like.. every single clickie etc.

I can see adding a pause button and manually having the user do it, but I don't see the usefulness outweighing more parse checks.