I was thinking it'd be really neat if there were an addon that let you jot down notes and then set them to pop up as reminders to yourself based on various conditions like:
- a specific clock time
- a specific number of minutes in the future
- entering a specific zone
- gaining a level
- having a certain number of an item (farming goals, or reminder to buy reagents)
- opening your mailbox
- visiting the auction house (either entering an AH or talking to an auctioneer)
- visiting a vendor
- visiting a bank
Neat idea. I would suggest though to try to separate the note part and the conditions part. I could see the conditions part being handled by a separate lib, and the notes part just using that lib as a listener. That way the code can be reused for other purposes, e.g. raid warnings, etc.
As for single situation based events like bank,vendor,auction, lvling, mailbox things like that.. could easily be done. but timed and zone based would be a bit more interesting...
I was thinking that the new timer/reminder functions that Blizz introduced could be (ab)used for the timed events. I don't foresee the zone event being too much of a problem either - I'd be worried more about taint than anything else. Which gives me the idea that it could also be set to alert when a certain amount of honor has been farmed.
While it might be an interesting subject, I don't think an FSM has any application here. The state space needs to be finite, and known in advance (at compile time).
This notepad addon would just have to listen to certain events, evaluate conditions, and perform an action depending on the results. Brute force evaluation of all conditions would probably work well enough. But if you want to use a more advanced model, I suggest modeling the condition network as a DAG.
Personally, I think you're over-complicating things. It just needs to hook some events and when the events fire it needs to check which notes may need to be made visible as a result. If you want to be more efficient, don't hook an unneeded event until a note is created that calls for it. It may be an efficiency increase as well to maintain a list for each event type of references to notes that are registered for that event type so that you don't have to iterate over all notes to find the one out of a hundred that is set to pop up when you go to the AH.
I guess a more complex model could be useful if you want to create thousands of notes to make some kind of interactive questing guide out of it or something.
I've been playing around with a proof-of-concept for this. I'm not very good at developing addons, so I'm sure that once I go ahead and post it, y'all will rip it apart and rebuild it twice as good. I'm really just trying to get a good base for it right now. ^_^
Glad to hear that there's some developer interest :) I'm an addon writing novice as well, and have limited time for such things, so I just threw the idea out there in hopes that someone more able might pick it up and run with it.
So I've been completely swamped with work just recently, and I'm not sure when it will let up. I will continue to tinker with this in my spare time, but I certainly don't want to preclude anyone else from taking this up.