Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: [1]

Author Topic: Victory point tracker [done]  (Read 15591 times)

0 Members and 1 Guest are viewing this topic.

nutki

  • Scout
  • ****
  • Offline Offline
  • Posts: 40
  • Respect: +195
    • View Profile
Victory point tracker [done]
« on: April 12, 2013, 05:29:40 pm »
+6

As it was easy to guess extending my greasemonkey script to add a live point counter is not that hard to do. On the other hand some players see it as an unfair advantage or when it is available to both players as changing the game (as you cannot have it in the physical version).
So while I already implemented the counter (see the attached image), it is not uploaded yet. I looked at the sources of DrHeld's point tracker scripts and from that I could see what he planned for. Basically the script acts as a chat bot and allows other players without the plugin to ask for the current score via the chat. Also disabling the tracker by other players would be possible through another chat command.
Before pushing my changes to the git repository I could put in a similar system. Additionally I thought of making it controllable through the table name. For example putting '#vp' in the title would enable point tracking at the start and '#novp' would disallow enabling it during the game by any player (veto).
What do you think?
« Last Edit: April 24, 2013, 05:11:43 am by nutki »
Logged
Want a better Goko experience?
Get Firefox, Grease monkey and my script.

rrenaud

  • Administrator
  • *****
  • Offline Offline
  • Posts: 991
  • Uncivilized Barbarian of Statistics
  • Respect: +1197
    • View Profile
    • CouncilRoom
Re: Victory point tracker
« Reply #1 on: April 12, 2013, 05:30:30 pm »
0

That all seems reasonable to me.  You probably want to include the #vp text by default if the user is using the plugin.
Logged

eHalcyon

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 8689
  • Respect: +9187
    • View Profile
Re: Victory point tracker
« Reply #2 on: April 12, 2013, 05:46:10 pm »
0

Last I heard, DrHeld was stalled on his implementation because there was some sort of trouble hooking up to the chat system.
Logged

nutki

  • Scout
  • ****
  • Offline Offline
  • Posts: 40
  • Respect: +195
    • View Profile
Re: Victory point tracker
« Reply #3 on: April 12, 2013, 05:59:01 pm »
0

You probably want to include the #vp text by default if the user is using the plugin.
I see, you would like to know if the table creator is using the extension. So it would be automatically added to indicate this. My idea is the other way around. The table host can choose to force it off (or turn it on) by adding a tag manually even if he does not use the script himself. As the script has also other purposes, like displaying the formatted logs and providing customizable avatars, having it does not mean that you want to use the point tracker.

Last I heard, DrHeld was stalled on his implementation because there was some sort of trouble hooking up to the chat system.
I did some experiments with the chat messages using the javascript console and the results were promising.
Logged
Want a better Goko experience?
Get Firefox, Grease monkey and my script.

Beyond Awesome

  • Global Moderator
  • *****
  • Offline Offline
  • Posts: 2941
  • Shuffle iT Username: Beyond Awesome
  • Respect: +2466
    • View Profile
Re: Victory point tracker
« Reply #4 on: April 13, 2013, 08:00:54 pm »
0

I am a fan of the point counter, so count me in if this gets launched. Will there be a way to get this on Chrome like the log thingy?
Logged

nutki

  • Scout
  • ****
  • Offline Offline
  • Posts: 40
  • Respect: +195
    • View Profile
Re: Victory point tracker
« Reply #5 on: April 24, 2013, 05:06:27 am »
+3

The point tracker is done and added to my Grease Monkey script: https://github.com/nutki/Goko-Live-Log-Viewer/raw/master/Goko_Live_Log_Viewer.user.js (needs Firefox with the Grease Monkey plugin).
I had some issues with tapping into the event stream to handle chat messages, so this may need more testing.
Current control are as follows:
'#vpon' on the chat or in the table name will turn point tracking for everybody using the script
'#vpoff' on the chat or in the table name will disable and prevent any user from turning on the point tracking in the current game (this is possible even if you don't have the script yourself).
I was thinking about adding a chat command to query the current point state for people who don't use the script, but eventually decided against since that would be most useful on the tablets, and Goko does not support chat there as far as I know.

The point tracking itself also has some issues. I tested it against 36740 post game logs from April 12th, and I know that the point counting is correct if the deck tracking went OK. However there are several cases where there is no easy way to track the deck contents based on the log events:
Fixed:
- Fortress is reported as thrashed, but actually it always(?) stays in the deck
- Spoils and Madman are not reported as thrashed when played
- possessed payer thrashed cards are not logged as returned to the deck
- Bishop does not report its vp chip gain
Still unresolved:
- Playing Throne or KC on Feast or Death Cart will report multiple thrashing, and it is quite hard to track in the log which of the plays are Throned
- Band of Misfits events are reported under the chosen card name so when it is thrashed from play it will not be recognized
- Trader when used as a reaction with empty Silver pile will cause a 'gain Curse' (or whatever other card was to be gained), although nothing is gained
- Counterfeit played on Spoils will thrash it twice (it is not reported but a result of my workaround).
Possible Goko bugs:
- When Outpost is played on the turn in which the game has ended it disappears from the deck
- When BoM is played on a duration card in the last turn of the game the duration card is added to the final deck
The differences will most of the time have no influence on the VP, since most of them would require also a victory card that cares about deck contents. Overall the current algorithm miscounted 22 results in 14 games over the 36K games sample.
Also that was all tested on post game logs, I know that in game logs are slightly different (cards drawn are hidden, treasures may be played in more than one log event etc.)


Logged
Want a better Goko experience?
Get Firefox, Grease monkey and my script.

eHalcyon

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 8689
  • Respect: +9187
    • View Profile
Re: Victory point tracker [done]
« Reply #6 on: April 24, 2013, 10:50:48 am »
0

Fortress IS trashed, but trashing it immediately returns it to your hand.

Playing Spoils or Madman does not cause them to be trashed, but rather they return to their respective piles. I suppose it doesn't matter for point tracking purposes.

How does your tracker handle Masquerade, especially with more than 2 players?
Logged

philosophyguy

  • Minion
  • *****
  • Offline Offline
  • Posts: 575
  • Respect: +299
    • View Profile
Re: Victory point tracker [done]
« Reply #7 on: April 24, 2013, 12:18:11 pm »
0

Question: is anyone else having Goko freeze a lot during games? I had this happen several times today after installing the point counter script, but I'm not sure if it's a Goko issue or a script issue.

One thing that makes me suspicious of a script problem is that I had a frozen game and visual artifacts (my hand disappeared, except for the leftmost card) when scrolling the log up during an adventure game.
Logged

Watno

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2745
  • Shuffle iT Username: Watno
  • Respect: +2984
    • View Profile
Re: Victory point tracker [done]
« Reply #8 on: April 24, 2013, 12:20:06 pm »
0

It used to happen to me quite a lot, but hasn't lately.
Logged

andwilk

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 201
  • Respect: +152
    • View Profile
Re: Victory point tracker [done]
« Reply #9 on: April 24, 2013, 04:12:51 pm »
0

Will someone always have to type #vpon to turn the point counter on?  Is there some sort of notification that pops up to let you know that your opponent is using this script?
Logged

Beyond Awesome

  • Global Moderator
  • *****
  • Offline Offline
  • Posts: 2941
  • Shuffle iT Username: Beyond Awesome
  • Respect: +2466
    • View Profile
Re: Victory point tracker [done]
« Reply #10 on: April 24, 2013, 04:14:40 pm »
+1

Is there a way to get this on the Google Chrome store?
Logged

soulnet

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2142
  • Respect: +1751
    • View Profile
Re: Victory point tracker [done]
« Reply #11 on: April 24, 2013, 05:57:13 pm »
0

I've tried it on firefox but I only got the pretty log, not the counter. I would also really love to have it on Chrome, since goko seems to work much worse on Firefox.
Logged

nutki

  • Scout
  • ****
  • Offline Offline
  • Posts: 40
  • Respect: +195
    • View Profile
Re: Victory point tracker [done]
« Reply #12 on: April 24, 2013, 06:00:13 pm »
+2

Fortress IS trashed, but trashing it immediately returns it to your hand.
That was a shorthand. It is the return to hand that is not logged, but if this action cannot fail or be countered that is not a problem.

Playing Spoils or Madman does not cause them to be trashed, but rather they return to their respective piles. I suppose it doesn't matter for point tracking purposes.
Yes, indeed. That is probably why it is not reported - it is not a standard action (there are log lines about trashing and returning to the supply).

How does your tracker handle Masquerade, especially with more than 2 players?
This works well actually. There is a log line '[player] - passed [card]', there is no receiving logged, but this will always be the next player.

Will someone always have to type #vpon to turn the point counter on?  Is there some sort of notification that pops up to let you know that your opponent is using this script?
Yes, you have to type it each game (or use in the table name if you host). The opponent will see not only #vpon, but also a notification line reminding about the #vpoff option. Note that those commands will affect each player using the script.

Question: is anyone else having Goko freeze a lot during games? I had this happen several times today after installing the point counter script, but I'm not sure if it's a Goko issue or a script issue.
I was wondering that myself. Some of the versions I tested caused the game to crash quite reliably on the second game, and while any version I published didn't, I don't fully understand why the crashing happened. I don't want to spend much time on testing (especially that I only have Base), so maybe some of you can help and compare how the game behaves with and without the extension.

I've tried it on firefox but I only got the pretty log, not the counter. I would also really love to have it on Chrome, since goko seems to work much worse on Firefox.
Did you type '#vpon' in the chat window?
« Last Edit: April 24, 2013, 06:03:00 pm by nutki »
Logged
Want a better Goko experience?
Get Firefox, Grease monkey and my script.

soulnet

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2142
  • Respect: +1751
    • View Profile
Re: Victory point tracker [done]
« Reply #13 on: April 24, 2013, 06:56:43 pm »
0

Did you type '#vpon' in the chat window?

Solved, thanks. For some reason I thought it would be on by default. Sorry for the trouble.
Logged

Kirian

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 7096
  • Shuffle iT Username: Kirian
  • An Unbalanced Equation
  • Respect: +9415
    • View Profile
Re: Victory point tracker [done]
« Reply #14 on: April 24, 2013, 09:44:30 pm »
+1

Note: #vpon does work in Adventure mode.  The one place where I would completely encourage it.
Logged
Kirian's Law of f.DS jokes:  Any sufficiently unexplained joke is indistinguishable from serious conversation.

Slyfox

  • Coppersmith
  • ****
  • Offline Offline
  • Posts: 47
  • Respect: +78
    • View Profile
Re: Victory point tracker [done]
« Reply #15 on: April 25, 2013, 10:19:50 am »
+1

When giving the notification that the pointer tracker is enabled, I suggest that it also give a link to where the script can be found.
Logged

ooksoo

  • Swindler
  • ***
  • Offline Offline
  • Posts: 19
  • Respect: +6
    • View Profile
Re: Victory point tracker [done]
« Reply #16 on: April 25, 2013, 03:20:59 pm »
+2

y do u need such a thing?
Logged

andwilk

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 201
  • Respect: +152
    • View Profile
Re: Victory point tracker [done]
« Reply #17 on: April 25, 2013, 03:28:41 pm »
0

Will typing #vpoff override any use of #vpon (whether it is used before or after #vpoff)?  For example, if I type #vpoff after #vpon is typed by an opponent, is there a possibility that a #vpon/off war could start or is #vpoff given priority?
Logged

Watno

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2745
  • Shuffle iT Username: Watno
  • Respect: +2984
    • View Profile
Re: Victory point tracker [done]
« Reply #18 on: April 25, 2013, 03:31:06 pm »
+5

I just checked and after #vpofff has been entered, #vpon no longer works.
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Victory point tracker [done]
« Reply #19 on: April 25, 2013, 03:38:26 pm »
+4

y do u need such a thing?
for counting points...
Logged

andwilk

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 201
  • Respect: +152
    • View Profile
Re: Victory point tracker [done]
« Reply #20 on: April 25, 2013, 03:44:01 pm »
+1

I just checked and after #vpofff has been entered, #vpon no longer works.

Thanks for checking.  Glad to hear this.
Logged

ooksoo

  • Swindler
  • ***
  • Offline Offline
  • Posts: 19
  • Respect: +6
    • View Profile
Re: Victory point tracker [done]
« Reply #21 on: April 27, 2013, 05:04:30 am »
+1

y do u need such a thing?
for counting points...
so you can't count it on your own?
Logged

Kuildeous

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3840
  • Respect: +2221
    • View Profile
Re: Victory point tracker [done]
« Reply #22 on: April 29, 2013, 10:52:51 am »
+1

y do u need such a thing?
for counting points...
so you can't count it on your own?

You could, but it may annoy your opponent.

You not only have to track how many Provinces and Duchies you buy, but you have to track how many you buy of Feodums, Fairgrounds, Gardens, et al. Oh, and how many points are they worth at any given time.

Then you need to do this for each of your opponents. What did they buy? What are they worth? Wait, what did that guy just buy while my animation speed is on very fast? Time to consult the log.

I remember another thread where someone said that an opponent taking 60 seconds for each turn is excessively long. I think that if you try to count points on your own, then your turns could easily become 60 seconds, as you have to go back to the log and figure things out. If it's a BM game, that should be easy enough. If you have Silk Roads, then it's not that quick.
Logged
A man has no signature

nutki

  • Scout
  • ****
  • Offline Offline
  • Posts: 40
  • Respect: +195
    • View Profile
Re: Victory point tracker [done]
« Reply #23 on: May 06, 2013, 05:11:41 am »
0

How does your tracker handle Masquerade, especially with more than 2 players?
When I was writing the tracker I did not own the expansions and did not realize that cards passed with Masquerade are hidden information (appear in the live log as 'passed 1 card'). For two player games it can be probably tracked using game events instead of the log, but obviously not for more than that (assuming goko implemented it correctly and the information is not revealed to the clients).
A bit annoying that there is just one card that makes exact tracking impossible, especially that it does not affect duels, which seem to be most common anyway.
Logged
Want a better Goko experience?
Get Firefox, Grease monkey and my script.

shraeye

  • Minion
  • *****
  • Offline Offline
  • Posts: 690
  • Shuffle iT Username: shraeye
  • More Graph Theory please
  • Respect: +299
    • View Profile
Re: Victory point tracker [done]
« Reply #24 on: May 06, 2013, 05:45:11 am »
0

hmm
Logged
Pages: [1]
 

Page created in 0.086 seconds with 20 queries.