-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugins #828
Comments
I don't know what plugins you would add, honestly. This software is wonderful as it is. The plugins would be things like "archive your decks" (already in), "notate your games" (Done.) "Import from websites" (Yep.) I guess you were accidentally too efficient. :p |
Well, plugins allow for others to add functionality without it having to be "built-in". |
it could bring more problems than advantages :( please focus on fixing bugs and adding features which were reported here :) |
I do rarely do things other than fixing reported bugs and implementing suggested features. Please note that this is a project I work on Pluigins are fun because it is something new to learn and try out. Having fun means I am less likely to get burnt out and am more likely keep adding and fixing stuff (given I have the time to do so). Makes sense? SO, you were speaking of problems. Please do elaborate. |
What sort of architecture do you have in mind for your plug-ins? Implementing a specific interface from an API and pulling in the plug-ins via an assembly load using reflection? Or will we have submit PR's for plug-in inclusion? |
My current test setup is the former. PRs would kinda defeat the purpose :). Obviously not done yet, probably lots of public/internal issues, but the basic functionality is there. Reference the exe, implement IPlugin, place dll in HDT/Plugins, good to go. There are not really any events in the code plugins could hook on to at the moment either, might be something to consider. Probably the easiest by exposing an API for the most common things. |
Seems like a good idea. I cloned the code yesterday and think it would be fun to try out a couple features. I definitely think having some events to subscribe to would be needed. Let's say someone wanted to monitor active games and do some deck type detection, they'd want easy access to knowing the state of the game and when cards are played. Seems pretty straight-forward. |
Not really sure how to handle events yet. Having "normal" public events means plugins could crash the whole app, no good. Just try-catching those means if the first throws an exception, no one else gets notified, no good either. Maybe having multiple interfaces plugins could implement is the way to go?
Stuff like that? |
@Epix37 - I fully understand, I have coding like a hobby (I am a member of 3 free open source projects). First of all, it would be really good if you can delete issues which are not relevant - I can fix some issues which are mentioned here on GitHub but I must to know what is a valid or invalid report. Also milestones and sort issues into categories would be nice. We have there over 165 issues, I think that almost 40% are out of date or not complete useless bug reports. I really like your Deck Tracker and I am happy everytime when you release a new version with new features and bug fixes. EDIT: What about these 4 PRs which are not merged? I really like the ideas, maybe you can add them in your way |
I am currently building a web interface to check my own micro-statistics relating to the cards. Things like "How often did I get 2 doomguards in my hand? How many of those times did it happen before I could play even one? How often have I mulliganed into Tirion?" so I can make informed decisions on whether or not to cut duplicates of cards or think of better synergies. I am doing it however using the 1300+ replays I have from your app! Its difficult to disseminate the replays but its coming along. Having the ability to make my own plugin for your app to easily export only relevant data from the HDT replays/logs would be great! So I fully support this idea! |
@CU8ER I do clean up from time to time, but often when it comes to how to spend my time (coding vs cleaning here), coding wins. As for the PRs, I don't completely dislike the ideas, that's why they are still there. None of those are very high priority though. Feel free to keep pointing out outdated/solved issues and I will gladly close them. Actually on topic: |
I think plugins are a great idea, it will really help you to concentrate on the core functionality. I've already got some ideas, have to go look at the code. |
Added a few more events. Here is a test build: https://github.com/Epix37/HDT-Test/releases/tag/v0.9.8_PRE3_PLUGINS
This is one where I really need feedback more than ever. What other events or API fuctionallity would you guys want? What's public but should be internal? Vice-versa? |
Would this allow a plugin writer to create a plugin which exports the data you see on the stats screen to another file, like a csv spreadsheet? |
It would, yes. |
Count me as a +1 for thinking plugins are a great idea. I've been toying with the idea of building a metagame tracking website, and it would be awesome if a HDT plugin could submit game results every time a game finishes. I haven't had a chance to look at the HDT code much yet, but it sounds like you've already got most of what I'd need -- basically just an event every time a game ends and a way to get at the replay so I can see what cards got played. The one other thing I can think of is some way to hook into the UI, like the way Hearthstats gets a dropdown off the main toolbar. |
Would a "Plugins" menu item (or even titlebar dropdown button) be sufficient? I could then give IPlugin a Being able to add entries to the main menu would technically not be an issue either but the menubar does not really handle too many items to well. If an item cant be fully displayed it just gets cut off. |
I've been trying out the plugin interface with a quick implementation of @GiggliG stats to csv idea. It all seems to work great. I can't think of any other events at the moment, you seem to have the relevant ones covered. As regards public vs internal nothing jumps out at me yet, but I didn't really look that close 😄 I do like the menu item or toolbar idea. The plugins menu item sounds best, otherwise the menu bar will get out of hand. It will make the plugins functionality more accessible too. |
That sounds great, andburn. Would you be able to choose between deck, class, or all stats for export? (Not that it really matters, you could filter after export if you grab everything). Epix, would a plugin be able to alter the layout of current forms?
|
As it stands, changing the UI is probably possible but very "hacky" and will probably easily break if things in the UI change.
Possibly, not sure. That's something I would very much willing to have by default though, so a pullrequest would be a much better fit for this.
Probably not? Maybe. Again, I would have no problems with this as a default.
Yes. But again, no need for that to be a plugin.
Maybe :). If it's implemented and integrated in a fitting way I would not mind having this as a default feature either.
Again maybe. And again something that I wouldn't really mind as a default feature. In conclusion: Just because things can (or could) be done as plugins does not mean that's it's necessary, the best way or even the easiest way. All of the things above would be way easier to implement directly in the application, than into make them work as plugins. |
If those features can be added as core features, fantastic! I just didn't want to give you extra work. |
@GiggliG Well, it's not neccessarily me doing the work :). But whoever would implement those as plugins might as well just submit a pullrequest for the feature. That's the point I was trying to make. Another topic: If you are planning on making plugins it's probably at least interesting. |
The debug window could be very useful, great feature. |
I thought of a plugin. I use hearthstone deck tracker on two different computers. On the laptop, my wife and I both use it (I had to install in different directories, and it’s very confusing.)
How about a player login, so that more than one user can log into the same installed copy?
From: Epix
Sent: Thursday, April 02, 2015 9:17 AM
To: Epix37/Hearthstone-Deck-Tracker
Cc: FenrisWolffe
Subject: Re: [Hearthstone-Deck-Tracker] Plugins (#828)
@GiggliG Well, it's not neccessarily me doing the work :). But whoever would implement those as plugins might as well just submit a pullrequest for the feature. That's the point I was trying to make.
Another topic:
Not sure if this will be actually useful for anyone but me, but the next pre/release (not 0.9.10) will have a simple debug window, which currently displays (live) all property of the Game class and all entites during a game. Accessible via options > tracker > logging > debugwindow.
If you are planning on making plugins it's probably at least interesting.
http://imgur.com/a/8Gf4I
—
Reply to this email directly or view it on GitHub.
|
Plugins will be in the next update! So if anyone wanted to create plugins but wanted to hold off until it's actually in the software, it is now :). There will probably still be lots of modifications but (I think) nothing that should horribly break your code. V0.10.0 prerelease: https://github.com/Epix37/HDT-Test/releases/tag/v0.10_PRE1 I will be adding your (open souce) plugins to a list in the main readme (or wiki?), unless you don't want me to obviously. The tracker's "available plugins" link will refer to that, at least for the moment. Small wikl entry on plugin creation: https://github.com/Epix37/Hearthstone-Deck-Tracker/wiki/Creating-Plugins |
Extracted the release into the directory, and all hell broke loose. Prepare for wall of text: please use pastebin http://pastebin.com/D5saSy4p |
fixed and uploaded new build |
The plugin functionality is looking good. I have a couple of requests/suggestions:
|
This is great! Thanks for doing this. Quick question: what's the most sensible way to added UI elements to the in-game overlay? |
At the moment there is no "out of the box" way to do this. You can probably make it work using reflection. Would exposing the overlay canvas element already be enough? Edit: Actually, that already is accessible. Helper.MainWindow.Overlay.CanvasInfo (not sure why it's called CanvasInfo...) |
I'm not super familiar with WPF, but I imagine that would work for what I want to do. :) I'd like to try adding fatigue counters. |
FYI: fatigue counters already exist :). See |
Oh nice! I actually hadn't noticed. I more just wanted to experiment with the plugins anyway. Thank you! |
I've been playing with the idea of adding plugin support for a while now and got around to testing it for a bit today. I like it.
Plugins would (at least for a start) just have access to everything and I will probably add an API later on.
Roughly the interface:
Is there interest in this?
Thoughts? Suggestions?
This is my first time trying to implement something like this. Anything specific I should pay attention to or be careful with?
The text was updated successfully, but these errors were encountered: