Forum


KDice flag enhancer brwoser script (beta)
panthar wrote
at 8:23 AM, Sunday September 7, 2014 EDT
Hi All,

Just finished this script, and feel that it's ready to be released to the KDice community for feedback.

Screen shot:
http://www.panthar.net/programs/KDiceFlagEnhancer/images/KDiceFlagEnhancer.png

What this script does:

1.)Flagging: At the bottom right of your screen you will see a table with all the players in the current game your playing. This table is to keep track of who flagged who, allow you to have easy flagging without having to type anything. This script will make intelligent guess's from the chat, about who flagged who-- it's not 100% perfect, but does a pretty good job of capturing who flagged who from the chat. If at any time the script does not update the flags correctly, you can always manually update the table to add a flag to the table that the script missed.

2.)Creates a "Smart Auto End Turn" checkbox, that is used in combination with the "Auto End Turn" checkbox. What this checkbox does, is if anyone attacks you during your turn you will no longer be "auto ending turn", but instead will be allowed to take your turn, so you can attack whoever attacked you, if you want.

3.)This is similar to deadcode, but we highlight every chat that has the word "flag" in it, and if we are unsure of who flagged, we will highlight it in red instead of gray.


INSTALL:

1.)If your using Chrome, download/install the "Tamper Monkey" browser plugin. If your using firefox download/install the "Grease Monkey" browser plugin.

2.)After your browser plugin is installed, goto https://gist.github.com/panthar1/d53edf48599a7557a419 and click on the "Raw" link. on the top right of the page This should bring up a plugin installation screen. Install the plugin.

3.)Once script has been successfully installed and is enabled, close the tab with KDice, and re-open KDice in a new tab. You should now see the features on your screen during game play.


Hope this script works out well for everyone. Please let me know of any bugs you find, either in this thread, or on the GIT page.

Thanks All! Happy Playing!

Replies 1 - 10 of 41 Next › Last »
jurgen wrote
at 9:34 AM, Sunday September 7, 2014 EDT
looks pretty nice at first sight

few remarks so far:

1) add kdice.com and not only www.kdice.com because I had to change my address in order for it to work

2)have End Turn both be capitalised or none (right now one says end turn, it's np, but it will be cleaner)

3) does it "understand" typos like flg falg brwon etc?

4) does it understand flag yellow and brown?

5) what if someone flags 3rd? maybe an extra column for that info?

6) what if someone only writes flag...or writes flag and only the colour in a second a line

7) what if someone flags BDK or any other abreviation if a name (maybe it could "guess" based on the names of the other players at the table)

anyway, looks great, don't take my points as criticism, but only as brainstorming help :)
jurgen wrote
at 9:41 AM, Sunday September 7, 2014 EDT
just figured out a way to incorporate the "flag 3" issue

you could add a line for max place someone wants

if player A flags B, it's normal to assume he wants 2nd max so you could put a 2 in that column

everyone who didnt flag anyone yet could get a 1 there

if someone flags 3, you can display the 3

also, since you are visualising things, it might be useful to add a colour code for the payout structure:

what I mean is: for 5 player games 1 is obv best, then 2=3 and 4=5; for 6, 4=5=6 etc

it could help people if you could somehow incorporate that info too (just a suggestion only)
panthar wrote
at 9:47 AM, Sunday September 7, 2014 EDT
Hi Jurgen,

1)I think it should now be including *kdice.com* on git.

2)fixed

3)It does "understand" misspellings of flag. Here is what it does, firstly, it looks for the colors to be spelled out, if it find matches, it updates it. If that fails, it then looks for the first 3 characters of the players names like "flag pan" would be a flag to me. Lastly, if both of those fail, it looks for the first 3 letters of the 7 color names.

4)Yes

5)That's an interesting one. Did not think about that, but your right, another column might be a way to solve this.

6)So it will highlight any line of text that just has "flag in it". If it finds a "match" it will give it a gray background, if it can't find a match, it will give it a red background-- meaning "I am not sure".

It will not look to the 2nd line of text, and I am not sure how best to do that.

7)I think I understand what your asking, and I believe I answered it in 3.). There is a couple "edge cases" I thought of as well. When people say "same" or "me to" on the next line. We might be able to handle those somehow.


Thanks for the feedback!!
jurgen wrote
at 9:55 AM, Sunday September 7, 2014 EDT
nice, thx for all that

it looks great with what it can do already and perfection in understanding everything is impossible

but looks like you're already covering a lot of situations so keep up the good work!
jurgen wrote
at 9:58 AM, Sunday September 7, 2014 EDT
more brain storming

sometimes red asks green if he flags and green only says yes or no

maybe if there's a structure like "colour" + "flag" + "?", you could scan for answers by the guy with that colour
Troy11 wrote
at 9:58 AM, Sunday September 7, 2014 EDT
I only use internet explorer
panthar wrote
at 10:05 AM, Sunday September 7, 2014 EDT
>> maybe if there's a structure like "colour" + "flag" + "?", you could scan for answers by the guy with that colour

I thought about this as well, this might be possible as a later feature. One thing I could do, is highlight any chat-text with "flag" and "?" in it as red, meaning, it requires user to look at it.

I like your idea on the "desired" place. I am going to try to implement that. In theory, it will detect like "flag 3rd" and also, it will in theory know based on flag-hierarchy the best place a user could get, if not specified. All this is a decent amount of work, so I don't think I will have it today.
panthar wrote
at 10:07 AM, Sunday September 7, 2014 EDT
Sorry IE will not be supported, unless it plugs into it with some equivalent plugin to tamper monkey/grease monkey, which I am not aware of.
jurgen wrote
at 10:16 AM, Sunday September 7, 2014 EDT
no worries, no rush. In fact never feel obligated to add things, it's your script after all :)

I will show your script to Ryan, the author of the site because it's a very useful script

it's always good to see scripters make new stuff
panthar wrote
at 10:33 AM, Sunday September 7, 2014 EDT
>>no worries, no rush. In fact never feel obligated to add things, it's your script after all :)

Yeah, but I also want it to work as best I can. I think the "second line" chat is going to be one of the last things on the list, just because that's more complex.

>>I will show your script to Ryan, the author of the site because it's a very useful script

This concept would work even better if there was some API functions I could call to set/get info. For example, you could have this on everyone's kdice. When a player flags a another player, that player could get a "Do you accept flag from <player name>" dialog that they either accept/deny.

If you did that, you could also have to have the rule that "any player can break a flag by unchecking a checkbox".

Of course, then you would also have to work out how truces/alliances work.
KDice - Multiplayer Dice War
KDice is a multiplayer strategy online game played in monthly competitions. It's like Risk. The goal is to win every territory on the map.
CREATED BY RYAN © 2006 - 2025
GAMES
G GPokr
Texas Holdem Poker
K KDice
Online Strategy
X XSketch
Online Pictionary