RainbowMage / OverlayPlugin

Other
132 stars 182 forks source link

Addon Request: Custom Triggers #23

Closed billyvg closed 8 years ago

billyvg commented 9 years ago

Sorry, I tried doing this myself but, the community version of VS2013 and the editor would constantly freeze up (also I'm not a C# developer at all). If you're too busy to do this, could you show me where I can examine the ActGlobals object? Also let me know if I'm just stupid and this is already supported.

Triggers

Using the Custom Triggers in ACT, would it be possible to listen to these triggers and pass it to a new overlay? I'm not sure how ACT handles the Triggers, but if we could do generic triggers that would be great. i.e. /You move into ([^ ]+)/

Otherwise, setup a trigger with this regex: /You move into Raptor Form/, and give it a name like "stanceon-raptor". I'm not sure what information ACT provides, but send as much useful information to the overlay to let it handle it.

The overlay could then listen for stanceon-<stance name> and display something, and listen for stanceoff-<stance name> to hide it. This would be more flexible and accurate than using spell timers since it isn't always bound to a timer. Raptor Form lasts for 10 seconds but you can move out of it before then.

Configuration

It would be great if each Overlay you add had its own JSON configuration. config/<OverlayName>.json. When the overlay is first loaded, send an event with the JSON object, and also listen to an event to write to the configuration file.

Thanks!

RainbowMage commented 9 years ago

For triggers:

There is no event which occurs custom trigger has fired. But you can get list of custom trigger from ActGlobals.oActFormMain.ActiveCustomTriggers and you can subscribe for ActGlobals.oActFormMain.OnLogLineRead event to get new logs.

For overlay configuration:

I think I have to implement cookie handler for internal browser. But that is a bit complicated. Please wait for that.

billyvg commented 9 years ago

Ok, I'll try to play around with that, thanks. Maybe I'll just feed in the raw logs to the overlay and handle the parsing on the app side.

localStorage seems to only save to memory, it would be nice if we can get that saving to disk.