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!

« First ‹ Previous Replies 21 - 30 of 41 Next › Last »
panthar wrote
at 10:18 AM, Monday September 8, 2014 EDT
First the update urls;

Ahha! So I figured out what the "consistent" raw url is, and applied the download/update urls to the script.

If your using chrome, you can simply change the "update url" of the script to https://gist.github.com/panthar1/d53edf48599a7557a419/raw/KDiceFlagEnhancer.user.js and then perform an update from the tamper monkey script screen.

If your using firefox or the above method does not work in chrome, just un-install and re-install the script. All new updates will be available at that url, and you should be automatically updated going forward!


>>Can't count the times I lost a place in just a few hours due to the positioning of this Auto end turn. Will have to deinstall again (for now).

So firstly, I just updated it with some changes-- when you un-check the "smart auto end turn" it will also uncheck the "auto end turn", before now it was not doing this. This seems better than how it was before.

In regards to moving the checkboxes to the left of the screen. I can't figure out any CSS to get those checkboxes moved to the left of the screen, without also moving the "End Turn" button. Any of you CSS guru's want to figure out the proper CSS class additions needed for this? I would be happy to implement if anyone can figure it out!

>>THRILLHO
Lol, well, I removed the chat for obvious reasons. The intention was to show the 7x7 table, not who actually flagged who! For all you know I just checked those checkboxes ;)
Slinus wrote
at 4:27 PM, Monday September 8, 2014 EDT
Maybe I'm just the only one being such an idiot or maybe spam-pressing stuff is something only real pro gamers like me do, but I just can't get it right. I always missed turns because I didn't realize I had auto-end turned on on accident again.

In any case, thanks for your efforts.
BigDaddyKane wrote
at 4:37 PM, Monday September 8, 2014 EDT
Real Pro Gamers turn on developer tools to watch requests coming to/from their client. Never spam click in an online game noob.
probabler wrote
at 11:40 AM, Tuesday September 9, 2014 EDT
generally good idea + thanks for your job

@version 1.3.4

after yelloow words:
"green hasn't flagged purp yet anyway"

... check appeared at the table (showing that yellow flagged to green (!!!)<= not true

+ we have lots of situations like:
green: I flag purp
purp: "same"
yellow: "me2"
blue: "+ me ofc"
brown: "me to" (with error in it!)

to be continued...
panthar wrote
at 1:12 PM, Tuesday September 9, 2014 EDT
Thx for the testing probabler:

There is definitely some cases that this script just will not figure out the flag accurately, and something I will be refining over the days/weeks/months ahead because this is the hardest part of the whole script to do "right".

That's the intention of having the checkboxes there, so you can update it yourself, if you feel that the script behaved wrongly.

In addition to tweaking the text recognition a bit more, I also plan to add "me 2" checking on chat lines after a flag has occurred, as this seems to be more common that I originally anticipated releasing this.

In short, this is why a API on Ryan's end would be ideal, and would be a great enhancement to the game, imho. If Ryan happens to be reading this, I would be willing to help you implement it on the front-end JS side by incorporating the work I have already done, with your API calls (thought I would at least offer).

Anyways, hope to have some time this weekend to work on this a bit more.
StormLord wrote
at 2:14 PM, Tuesday September 9, 2014 EDT
Who needs an API? Man up and read the (obfuscated) code: kdice.com/kdice/F740F648790857403F05FB466DE748E8.cache.html
panthar wrote
at 2:48 PM, Tuesday September 9, 2014 EDT
Yeah no thx on the obfuscated JS code, lol

I am talking about the JSON API that is used for KDice. If there was a way to get/set the "flag status" of players, you could eliminate the need for using chat for flags entirely, that is my main point.
jurgen wrote
at 4:13 PM, Tuesday September 9, 2014 EDT
I showed the script to Ryan and he likes it + he likes the concept of flagging to a person (combined with flag for place I guess)

we could actually get rid of stabbing theoretically if the player who gets flagged to can toggle on/off the ability of a person who flagged him to attack him. It would be off by default but a player could maybe toggle attacks on to allow a flagged person to reconnect or to move towards someone else.

$50 that Slinus and others will hate the idea of hard coded stab prevention :D
panthar wrote
at 4:21 PM, Tuesday September 9, 2014 EDT
Thx for the input Jurgen, I would really love to see this built into kdice.

I actually think allowing people to stab is part of the game and should be preserved, but I am sure some people disagree with me. To me, it's the risk one takes in accepting a flag and without that risk, kdice might not be as much fun. I don't stab much, but even 1/100 games is fair game to me.
jurgen wrote
at 4:52 PM, Tuesday September 9, 2014 EDT
for the record, I'm not supporting the stab blocker although it's an option to consider when this site grows superbig and we have like the option to customize the rules on specific tables
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