Page 14 of 28
Posted: Mon May 28, 2007 8:14 pm
by tahitiwahini
weirdbro wrote:It still gets cards from the log? I thought it switched to just reading from what CC says now that it was added.
You may be right about that bro.
But now I'm even more puzzled. Here's why:
2007-05-28 14:58:30 - Game has been initialized
2007-05-28 15:01:54 - mushyman18 gets a card
2007-05-28 15:04:44 - Incrementing game to round 2
2007-05-28 15:05:36 - mushyman18 gets a card
2007-05-28 15:07:02 - Incrementing game to round 3
So when the snapshot was taken prior to the beginning of round 3, red would have had 2 cards, which is confirmed by the number of cards listed next to red in the player roster.
So, something pretty strange went on there.
stocksr might have some ideas, but I'm pretty much stumped.
Posted: Mon May 28, 2007 8:46 pm
by tahitiwahini
Ok, having thought about it a little more here's what I think happened:
You were right bro, stocksr seems to be getting the number of cards held by player by parsing the information contained in the player roster to the right of the map.
A snippet of the code staring from line 703:
Code: Select all
/*--- Get Player Card Counts ---*/
var tmp2 = getElementsByClassName(rightside,"li","status");
for ( i in tmp2 )
{
var tmp3 = tmp2[i].textContent.split(/\W/);
pl[pIndxs[i].innerHTML]._cards=parseInt(tmp3[1]);
}
This is how the number of cards held are being parsed. But this is an assassin game, and it just so happens that your (The1exile) target is red. So there is a target symbol (crossthreads) there that would under normal circumstances not be there. The tmp3[1] item must be the target symbol (crossthreads) which cannot be converted into a number (yet is considered a word character), hence the number of cards held by the red player is set to NaN (Not a Number, the result of attempting to convert something that isn't a number into a number). So in the statistics table the red player's cards are listed as NaN and the Card Set Estimate will be -3 when the number of cards held by a player is NaN. Also it explains why at the end of the game the statistics table is correct, because at that point the target symbol is removed from the player roster because at that point in time the game is over.
I guess the quickest fix is simply to insert the following lines:
Code: Select all
if (isNaN(pl[pIndxs[i].innerHTML]._cards)) {
pl[pIndxs[i].innerHTML]._cards = parseInt(tmp3[2]);
}
thusly:
Code: Select all
/*--- Get Player Card Counts ---*/
var tmp2 = getElementsByClassName(rightside,"li","status");
for ( i in tmp2 )
{
var tmp3 = tmp2[i].textContent.split(/\W/);
pl[pIndxs[i].innerHTML]._cards=parseInt(tmp3[1]);
if (isNaN(pl[pIndxs[i].innerHTML]._cards)) {
pl[pIndxs[i].innerHTML]._cards = parseInt(tmp3[2]);
}
}
Of course, the only way to test this is to start an assassin game and see that your target's cards held is being calculated correctly.
[Update] The proposed fix has been tested and seems to work.
Posted: Tue May 29, 2007 1:01 am
by haoala
haoala wrote:i just realised a BIG BIG GLITCH with this thing
since lack introduced the new rule where if someone deadbeats in a team, the troops and cards will be given to the next guy.
but this isnt counted in the script, and it becomes inaccurate
will somebody fix this?
Posted: Tue May 29, 2007 3:03 am
by yeti_c
Tahiti,
Rob knows about the Assassin bug - and has a fix for it...
It will be in the next release...
C.
Posted: Tue May 29, 2007 7:05 am
by stocksr
yeti_c wrote:Tahiti,
Rob knows about the Assassin bug - and has a fix for it...
It will be in the next release...
C.
Which will be out some time in the next few days real life permitting.
Posted: Tue May 29, 2007 7:12 am
by stocksr
haoala wrote:haoala wrote:i just realised a BIG BIG GLITCH with this thing
since lack introduced the new rule where if someone deadbeats in a team, the troops and cards will be given to the next guy.
but this isnt counted in the script, and it becomes inaccurate
will somebody fix this?
Hi Haoala, Do you have a game number we can check out, the script should work just fine, as we simply read the card and army counts from the page.
However please check that you are running the latest version as earlier version work differently and would have problems in this situation.
Posted: Tue May 29, 2007 7:22 pm
by Sparqs
Fantastic script! Thanks to stocksr, et al. <applauds>
I see that you are about to release BOB so it might be a bit late, but a few suggestions:
Remember custom fade setting for each map
The fade is great, but I need more fade on some maps to make them readable than I need on others.
Click fills-in Attacker/Defender
It would be nice if clicking on a country filled in the appropriate select box, saving me from choosing from the list.
Toggle stats and text map
When examining the log to determine what happened, referring back to the map is made more difficult by the stats and text map. Rather than click through various modes and waiting for redraw, it would really help to twiddle a control and hide those displays temporarily. As a workaround, an option to switch the log between it's current position and above stats would suffice.
Again, thanks to all for such a great script. It took no time at all to see how useful it is. If it's too late and/or difficult to get changes into BOB, I may try to add some of this myself. It looks like a good excuse to learn Greasemonkey.
Posted: Tue May 29, 2007 9:43 pm
by haoala
stocksr wrote:haoala wrote:haoala wrote:i just realised a BIG BIG GLITCH with this thing
since lack introduced the new rule where if someone deadbeats in a team, the troops and cards will be given to the next guy.
but this isnt counted in the script, and it becomes inaccurate
will somebody fix this?
Hi Haoala, Do you have a game number we can check out, the script should work just fine, as we simply read the card and army counts from the page.
However please check that you are running the latest version as earlier version work differently and would have problems in this situation.
http://www.conquerclub.com/game.php?game=448378
the games ended, but it still shows the wrong number of cards
Posted: Tue May 29, 2007 9:46 pm
by haoala
sorry!!!
i seemed to be using an older version
but now its ok
thanks
and sorry for wasting your time
Posted: Tue May 29, 2007 9:48 pm
by tahitiwahini
haoala wrote:stocksr wrote:haoala wrote:haoala wrote:i just realised a BIG BIG GLITCH with this thing
since lack introduced the new rule where if someone deadbeats in a team, the troops and cards will be given to the next guy.
but this isnt counted in the script, and it becomes inaccurate
will somebody fix this?
Hi Haoala, Do you have a game number we can check out, the script should work just fine, as we simply read the card and army counts from the page.
However please check that you are running the latest version as earlier version work differently and would have problems in this situation.
http://www.conquerclub.com/game.php?game=448378the games ended, but it still shows the wrong number of cards
When I went to look at the game both the BOB statistics and the player roster show the same number of cards for each player. How is it wrong? What should the number of cards each player holds be?
Posted: Tue May 29, 2007 9:50 pm
by haoala
i already said, my bad
Posted: Tue May 29, 2007 10:47 pm
by tahitiwahini
haoala wrote:i already said, my bad
No problem, I was fastposted.
Posted: Wed May 30, 2007 4:10 am
by g.
great script!!
suggestion: I think it would be nice to have also "data from last round" or "changes since last round" visible in the table with all the player stats. like that it would be easier to follow changes without reading the whole Game Log.
/g.
Posted: Wed May 30, 2007 5:15 am
by stocksr
Sparqs wrote:Fantastic script! Thanks to stocksr, et al. <applauds>
I see that you are about to release BOB so it might be a bit late, but a few suggestions:
Remember custom fade setting for each map
The fade is great, but I need more fade on some maps to make them readable than I need on others.
Click fills-in Attacker/Defender
It would be nice if clicking on a country filled in the appropriate select box, saving me from choosing from the list.
Toggle stats and text map
When examining the log to determine what happened, referring back to the map is made more difficult by the stats and text map. Rather than click through various modes and waiting for redraw, it would really help to twiddle a control and hide those displays temporarily. As a workaround, an option to switch the log between it's current position and above stats would suffice.
Again, thanks to all for such a great script. It took no time at all to see how useful it is. If it's too late and/or difficult to get changes into BOB, I may try to add some of this myself. It looks like a good excuse to learn Greasemonkey.
Hi Sparqs,
Thanks for the ideas, you are correct that it is a bit late to get theses suggestions into BOB v1.0 however I have added them to the ideas pile, and will see what I can do for BOB v1.1, if you want to work on them yourself then you are more than welcome, however I do suggest that you wait for BOB v1.0 (next couple of days I promise) as there are a few significant changes to the code which could cause problems if/when we try and re integrate the two branches.
Posted: Wed May 30, 2007 5:20 am
by stocksr
g. wrote:great script!!
suggestion: I think it would be nice to have also "data from last round" or "changes since last round" visible in the table with all the player stats. like that it would be easier to follow changes without reading the whole Game Log.
/g.
Hi g.
I like what you are suggesting however given the current game log, there is not actually enough information available to do this, for example there is no way to work out how many armies were on each territory at any given point except the current situation.
Latest Site Changes
Posted: Wed May 30, 2007 5:22 am
by stocksr
Hi, has anybody noticed any problems since the latest update to the site? if so please let me know the game number. Thanks
Posted: Wed May 30, 2007 5:42 am
by Tubby Rower
the only thing is that I can't see anyone's new ranks unless I turn off the script.
Posted: Wed May 30, 2007 5:48 am
by Selin
same with me
Posted: Wed May 30, 2007 5:54 am
by Tubby Rower
it's working now

at least for me.
Posted: Thu May 31, 2007 1:42 am
by cicero
Tubby Rower wrote:the only thing is that I can't see anyone's new ranks unless I turn off the script.
As you/Selin have probably discovered by now you just need to refresh(F5) your browser.
The missing icons are nothing to do with BOB.
Cicero
Posted: Fri Jun 01, 2007 6:42 pm
by pancakemix
I'm having a problem.
The script isn't working. I've had it installed for a while now, but it just disappeared. It's not on my list of installed scripts and when I try to reinstall it, it says it's already installed.
Posted: Fri Jun 01, 2007 8:10 pm
by tahitiwahini
pancakemix wrote:I'm having a problem.
The script isn't working. I've had it installed for a while now, but it just disappeared. It's not on my list of installed scripts and when I try to reinstall it, it says it's already installed.
Try this:
http://www.conquerclub.com/forum/viewtopic.php?t=15255
Posted: Fri Jun 01, 2007 8:47 pm
by pancakemix
tahitiwahini wrote:pancakemix wrote:I'm having a problem.
The script isn't working. I've had it installed for a while now, but it just disappeared. It's not on my list of installed scripts and when I try to reinstall it, it says it's already installed.
Try this:
http://www.conquerclub.com/forum/viewtopic.php?t=15255
This doesn't quite address the problem. It's just not there and I can't reinstall it as it won't uninstall because it's not there.
Posted: Sat Jun 02, 2007 2:35 am
by stocksr
pancakemix wrote:I'm having a problem.
The script isn't working. I've had it installed for a while now, but it just disappeared. It's not on my list of installed scripts and when I try to reinstall it, it says it's already installed.
This is a known bug in greasemonkey, you will need to delete the script file from your profile folder manually, I am posting from my phone or I would provide detailed instructions
Posted: Sat Jun 02, 2007 3:20 am
by yeti_c
stocksr wrote:pancakemix wrote:I'm having a problem.
The script isn't working. I've had it installed for a while now, but it just disappeared. It's not on my list of installed scripts and when I try to reinstall it, it says it's already installed.
This is a known bug in greasemonkey, you will need to delete the script file from your profile folder manually, I am posting from my phone or I would provide detailed instructions
Now there is dedication... Hang on - I'll help...
Scripts will be located in the following folder...
C:\Documents and Settings\Chris\Application Data\Mozilla\Firefox\Profiles\cdheyiiz.default\gm_scripts
(Modify for your username on your PC)
Delete them from there and hey presto...
C.