Page 1 of 2

Script: Handy Game History - Version 1.4

PostPosted: Thu Aug 05, 2010 8:01 am
by Dako
This script is based on philh-2007 Handy Game History script.

Install the script and a 'visualise' link will show up under 'Game Log'. Click it, and you'll be able to go backwards and forwards through the game history. For example you'll be able to see who started with each territory, etc.

Where do I get it?
Install the userscript from here: http://tools.conquerclub.com/handygamehistory/
Should work on all browsers supporting Tampermonkey

This script now is working with current CC version. Have fun and comment if you have found any bugs.
1.4 changes
  • Fixed a problem with getting the coordinates (dgz345)


1.3 changes
  • Added panelinterface support (dgz345)


1.2 changes
  • Adopted to new site changes


1.1 changes
  • Added unvisualize link
  • Changed the code to support new XML format (thanks to sherkaner for pointing this out)
  • Code clean-up, documentation and refactoring
  • Changed the colors to the current CC system

Re: Handy Game History 1.0

PostPosted: Thu Aug 05, 2010 8:07 am
by jleonnn
thnx! :D

Re: Handy Game History 1.0

PostPosted: Thu Aug 05, 2010 9:18 am
by iamkoolerthanu
Is there a way to "unvisualize" without leaving and re-entering the game, or by refreshing the page?

And a bug.. Colors are comming up wrong when I click it in an 8 player speed game

Re: Handy Game History 1.0

PostPosted: Thu Aug 05, 2010 9:26 am
by iamkoolerthanu
I'll be more specific. Red comes up as redish orange. Green comes up as light green. Blue comes up as blue. Yellow comes up as yellow. Pink comes up as cyan. Cyan comes up as light pink. Orange comes up as light orange. Silver comes up as dark pink.

Re: Handy Game History 1.0

PostPosted: Thu Aug 05, 2010 11:00 am
by sherkaner
iamkoolerthanu wrote:I'll be more specific. Red comes up as redish orange. Green comes up as light green. Blue comes up as blue. Yellow comes up as yellow. Pink comes up as cyan. Cyan comes up as light pink. Orange comes up as light orange. Silver comes up as dark pink.

Yeah, it seems to use some outdated colors. And I haven't tried it yet, but it seems to fetch the XML, you could get that piece out too and use the new format.

Re: Handy Game History 1.0

PostPosted: Thu Aug 05, 2010 11:33 am
by Dako
I will add the unvisualize button later.

@sherkaner - what format are you talking about? I was not going into details of the script - merely fixed it to work with current CC system. If you will expand what you mean I might be able to enhance the script.

Re: Handy Game History 1.0

PostPosted: Thu Aug 05, 2010 3:40 pm
by sherkaner
Dako wrote:I will add the unvisualize button later.

@sherkaner - what format are you talking about? I was not going into details of the script - merely fixed it to work with current CC system. If you will expand what you mean I might be able to enhance the script.

Ah well, it's not the easiest of changes, but it makes the script work on more maps (just tried prohibition chicago, doesn't work for that map, can't find the xml).
The XML isn't the preferred way to fetch the territories and territory locations any more, this script still uses that tactic.
But now it's in the page already, which saves you a request to the server and you'll always have the right data (lack doesn't guarantee some mechanisms are still working, I think the script uses one of those).
So if you get it from the page (see CM for 1 way to fetch it), you'll only have to pour it in the structure the plugin uses, and everything should work.
It seems to only fetch the territories with name and coordinates, and put them in a map with the name as the key, not terribly complicated luckily.

Re: Handy Game History 1.1

PostPosted: Fri Aug 06, 2010 6:45 am
by Dako
New version is out!

http://userscripts.org/scripts/show/83035

1.1 changes
  • Added unvisualize link
  • Changed the code to support new XML format (thanks to sherkaner for pointing this out)
  • Code clean-up, documentation and refactoring
  • Changed the colors to the current CC system


Known issue - script is working unstable with fog games (cause of all the unknown neutrals).

Re: Handy Game History 1.1

PostPosted: Sat Aug 07, 2010 2:56 pm
by ender516
Well, if it works well once the fog lifts at the end of the game, that will be good at least for post-mortem analysis.

Re: Handy Game History 1.1

PostPosted: Sat Aug 07, 2010 6:28 pm
by iamkoolerthanu
ender516 wrote:Well, if it works well once the fog lifts at the end of the game, that will be good at least for post-mortem analysis.

It will be very good for those games :)

I will try the new version out on a speed game or two and let you know what happens :)

Re: Handy Game History 1.1

PostPosted: Sun Aug 08, 2010 7:03 pm
by the.killing.44
No Chrome compatibility?

Re: Handy Game History 1.1

PostPosted: Mon Aug 09, 2010 2:49 am
by Dako
Do you need it? I can try to alter the code and make it work there as well.

Re: Handy Game History 1.1

PostPosted: Mon Aug 09, 2010 9:07 am
by Doc_Brown
Thanks for updating this! I had thought about trying it myself a while back, but I don't know enough about the scripting format for plugins and decided this was going to take some work. Anyway, I did find one bug. The vertical position of the markers is incorrect when you use large maps. It looks like the problem is in the getTerrCoords () function:

var ly = ts[i].yS; should read var ly = ts[i].yL;

Re: Handy Game History 1.1

PostPosted: Mon Aug 09, 2010 9:45 am
by Dako
the.killing.44 wrote:No Chrome compatibility?

Actually, the script was working already (awesome, me) so I just added 1 line for indicators positioning and it is working fine right now (you can just reinstall the script).

Doc_Brown wrote:Thanks for updating this! I had thought about trying it myself a while back, but I don't know enough about the scripting format for plugins and decided this was going to take some work. Anyway, I did find one bug. The vertical position of the markers is incorrect when you use large maps. It looks like the problem is in the getTerrCoords () function:

var ly = ts[i].yS; should read var ly = ts[i].yL;

True, thanks for spotting this! Already fixed.



Also, nuke games makes this script work unexpectedly because you don't know which player's region were nuked - hence can't build the history correctly.

Re: Handy Game History 1.1

PostPosted: Wed Aug 11, 2010 8:20 pm
by the.killing.44
<3

Re: Handy Game History 1.1

PostPosted: Wed Sep 15, 2010 3:20 am
by amazzony
This sounds interesting, must get it when I get to my home computer (yep, marking my territory :P ).

Re: Handy Game History 1.1

PostPosted: Fri Oct 08, 2010 1:32 pm
by wolfpack0530
I went to install it and Chrome gave me a warning. 'This script can access your data on all websites"

this is worrysome, so to be safe, I did not complete the download. what is the real possiblility that private data can fall into the wrong hands?

Re: Handy Game History 1.1

PostPosted: Fri Oct 08, 2010 2:04 pm
by sherkaner
wolfpack0530 wrote:I went to install it and Chrome gave me a warning. 'This script can access your data on all websites"

this is worrysome, so to be safe, I did not complete the download. what is the real possiblility that private data can fall into the wrong hands?

Chrome gives that message with all scripts I think, and it's actually wrong in case of most userscripts. They are only activated on certain URL's.
Privacy is another item though, the source code is available so you could check for yourself whether it contains any methods to send data to other servers. In general, people just trust the creator or 'the community' enough to just install it.

Re: Handy Game History 1.1

PostPosted: Fri Oct 08, 2010 3:08 pm
by Dako
wolfpack0530 wrote:I went to install it and Chrome gave me a warning. 'This script can access your data on all websites"

this is worrysome, so to be safe, I did not complete the download. what is the real possiblility that private data can fall into the wrong hands?

Chrome gives this warning for all the scripts. Handy game history works only on game page of CC. I can guarantee you that script doesn't access your private data at all. The code is open-sourced so you can look at it. There are much more dangers in the internet than scripts made for community by community moderators.

Script is safe.

Re: Handy Game History 1.1

PostPosted: Thu Oct 14, 2010 12:53 am
by wolfpack0530
thanks for the replies. I dont doubt that the script is safe, just wondering how easily it may be used as a vehicle to view another's computer or something. no doubt there are some brilliant minds on this site who may know how to do such a thing. I guess this question is not specific to this script, but all of them i guess.

Because as sherk. said, i am getting the warning on all of them, so i am not really considering it to be a big deal at all. just curious

Re: Handy Game History 1.1

PostPosted: Thu Oct 14, 2010 3:32 am
by Dako
It is relatively easy to do so :).

Re: Handy Game History 1.1

PostPosted: Sat Oct 16, 2010 1:43 pm
by cometripas
I have using handy game history for a few days and it worked fine, but now it doesn't work. I have uninstalled it and installed it again, tried with different games, but nothing. Does anyone have the same problem? Maybe incompatibility with other scripts from CC?

Thanks.

Re: Handy Game History 1.1

PostPosted: Sat Oct 16, 2010 1:46 pm
by Dako
The script is not working due to the last site changes. I am waiting for admins to fix 1 minor error and then the script will work again. I will post about it in this thread.

Re: Handy Game History 1.1

PostPosted: Sun Oct 17, 2010 5:40 am
by cometripas
Ok, we are waiting.

Re: Handy Game History 1.1

PostPosted: Tue Dec 07, 2010 5:18 pm
by Dako
New version is out with the fixed of current site changes.

Enjoy - http://userscripts.org/scripts/show/83035.