Conquer Club

BOB version 1.2 [was CC Greasemonkey script - unofficial]

Archival storage to keep things organized and uncluttered. Can't find what you need? Search for old topics here.

Moderator: Tech Team

Forum rules
Please read the Community Guidelines before posting.

What should the name of this script be?

Poll ended at Fri May 18, 2007 5:51 am

Bob
11
28%
TSAR
7
18%
TSAR BOMBA
6
15%
B.O.M.B.
5
13%
Trojan
1
3%
Trojan Horse
9
23%
 
Total votes : 39

Postby stocksr on Sat Apr 21, 2007 5:31 am

mibi wrote:
weirdbro wrote:Since this script rocks, I'm gonna be a pest and request another feature:

When you click on the name of a country anywhere, in the card list, text map, log, etc., it could jump to the map, and flash the highlight for a bit to show where the country is.


seconded... nothing worse than searching a foreign map for some obscure country name.


Split into 3 parts.


1. card list - this is done in version .8
2. text map - this should be possible.
3. Game Log - There are two reasons why this could be a problem.

3a. Performance - Attaching the click handlers is a slow process, I had a version that attached to the players names in the log and it killed performance.

3b. The country names are not marked in any special way so I would have to search for the text, again this will be very slow and prone to errors,


to re-cap I like the idea but I am not sure it will be possible, I will add it to the todo list, but the text map wont be till version .9 at the latest and the game log may have to wait even longer.
r.
User avatar
Corporal stocksr
 
Posts: 132
Joined: Wed Mar 07, 2007 11:30 am
Location: South Coast, UK

Postby coolpsp on Sat Apr 21, 2007 8:42 am

how do you edit script
Private coolpsp
 
Posts: 20
Joined: Mon Jan 22, 2007 12:01 pm

Postby MountainLion on Sat Apr 21, 2007 11:54 am

THERE IS NO POINT IN EDITING THESE: CHANGES HERE WILL HAVE NO EFFECT
// There are TWO ways to edit the settings, EASY WAY: Use the new setting menu.


Where is the setting menu?

EDIT: Nevermind I found it. :roll:
User avatar
Major MountainLion
 
Posts: 1282
Joined: Fri Mar 02, 2007 4:33 pm
Location: Colorado

Postby yeti_c on Sun Apr 22, 2007 6:26 am

Wow - I've just thought of an amazing idea...

Not sure your script is the place for it...

But an "estimated next turn time"...

Basically it analyzes the logs to work out when people play their turns then calculates when it reckons you'll next get your turn... would only work for Sequential games...

For example...

Player 1 has played turns between 1 & 5 AM GMT
Player 2 has played turns between 10 & 11 PM GMT
Player 3 only plays at 5PM GMT

So estimated gap between 1 and 2 = 19.5 hours
Gap 2 and 3 = 15.5 hours...
Thus player 4's turn will be available in approx 35 hours!

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Postby weirdbro on Sun Apr 22, 2007 6:47 am

to re-cap I like the idea but I am not sure it will be possible, I will add it to the todo list, but the text map wont be till version .9 at the latest and the game log may have to wait even longer.

Yeah, I guess that could be hard.
However, wouldn't it be much easier to have a search box, where you type in the name of the country and it flashes?
Edit: And for that mountain map, or others with the same name, flash 'em all.
Sergeant weirdbro
 
Posts: 52
Joined: Wed Jan 24, 2007 6:33 pm

Postby RobinJ on Sun Apr 22, 2007 12:42 pm

Don't know if this has been reported before but the clock is moving twice as fast as it should - I just timed it.

Edit: Sorry - I didn't read your first post - I still had Tr0y's activated. However, why can I edit the clock? (As in I can type numbers into it) :?
nmhunate wrote:Speak English... It is the language that God wrote the bible in.


Highest Score: 2437
Highest Place: 84
User avatar
Sergeant 1st Class RobinJ
 
Posts: 1901
Joined: Mon Aug 21, 2006 1:56 pm
Location: Northern Ireland

Postby weirdbro on Mon Apr 23, 2007 2:10 pm

I've found another bug. Its nothing major, but when you click the menu for confirm actions and confirm ends, it toggles Army Estimates button instead. Then, of course, the page refreshes, and the menu is fine, and the correct option was changed.

To fix this, in functions toggleConfirmActions, toggleConfirmEnds, and toggleArmieEstimates, change option1a to this.
Sergeant weirdbro
 
Posts: 52
Joined: Wed Jan 24, 2007 6:33 pm

Postby stocksr on Tue Apr 24, 2007 3:55 am

yeti_c wrote:Wow - I've just thought of an amazing idea...

Not sure your script is the place for it...

But an "estimated next turn time"...

Basically it analyzes the logs to work out when people play their turns then calculates when it reckons you'll next get your turn... would only work for Sequential games...

For example...

Player 1 has played turns between 1 & 5 AM GMT
Player 2 has played turns between 10 & 11 PM GMT
Player 3 only plays at 5PM GMT

So estimated gap between 1 and 2 = 19.5 hours
Gap 2 and 3 = 15.5 hours...
Thus player 4's turn will be available in approx 35 hours!

C.


I think this would be a task for a different script, and also there is not enough data in one game for it to be any good.

E.G. I could check every day at 9am and 4pm if it was not my turn at 9am every day the site would never know that I could take my turn then.

That and we would have to consider weekends.


Feel free to take the game log processing and player identification parts of this script and have a go, if you come up with somthing that works, then I would be interested in seeing it.

If you need programming help then pm me a link to your script and I am happy to help (but I cant prommise anything regarding timescales)
r.
User avatar
Corporal stocksr
 
Posts: 132
Joined: Wed Mar 07, 2007 11:30 am
Location: South Coast, UK

Postby stocksr on Tue Apr 24, 2007 3:59 am

RobinJ wrote:why can I edit the clock? (As in I can type numbers into it) :?


Because that was the way it was programmed! ( you would have to ask Tr0y he did that bit)

Just to be clear editing the clock to give yourself an extra 2 hours to complete your turn, while a nice feature to have won't actually work, sorry.
r.
User avatar
Corporal stocksr
 
Posts: 132
Joined: Wed Mar 07, 2007 11:30 am
Location: South Coast, UK

Postby stocksr on Tue Apr 24, 2007 4:00 am

weirdbro wrote:I've found another bug. Its nothing major, but when you click the menu for confirm actions and confirm ends, it toggles Army Estimates button instead. Then, of course, the page refreshes, and the menu is fine, and the correct option was changed.

To fix this, in functions toggleConfirmActions, toggleConfirmEnds, and toggleArmieEstimates, change option1a to this.


Thanks, the curse of copy paste programming, this is fixed in the .8 release, which is due out in the next few days.
r.
User avatar
Corporal stocksr
 
Posts: 132
Joined: Wed Mar 07, 2007 11:30 am
Location: South Coast, UK

Postby yeti_c on Tue Apr 24, 2007 4:06 am

stocksr wrote:
yeti_c wrote:Wow - I've just thought of an amazing idea...

Not sure your script is the place for it...

But an "estimated next turn time"...

Basically it analyzes the logs to work out when people play their turns then calculates when it reckons you'll next get your turn... would only work for Sequential games...

For example...

Player 1 has played turns between 1 & 5 AM GMT
Player 2 has played turns between 10 & 11 PM GMT
Player 3 only plays at 5PM GMT

So estimated gap between 1 and 2 = 19.5 hours
Gap 2 and 3 = 15.5 hours...
Thus player 4's turn will be available in approx 35 hours!

C.


I think this would be a task for a different script, and also there is not enough data in one game for it to be any good.

E.G. I could check every day at 9am and 4pm if it was not my turn at 9am every day the site would never know that I could take my turn then.

That and we would have to consider weekends.


Feel free to take the game log processing and player identification parts of this script and have a go, if you come up with somthing that works, then I would be interested in seeing it.

If you need programming help then pm me a link to your script and I am happy to help (but I cant prommise anything regarding timescales)


I agree that your script isn't the place for this either...

Would be monster hard to do and to be anywhere close to accurate... the longer the game the more accurate... but as most games are over in 10 turns here it probs wouldn't work!!

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Postby weirdbro on Tue Apr 24, 2007 4:57 am

You could have it study the other games players are in, too. That'd be much harder, much slower, and much more accurate.
Sergeant weirdbro
 
Posts: 52
Joined: Wed Jan 24, 2007 6:33 pm

Postby stocksr on Tue Apr 24, 2007 5:11 am

NEW VERSION:
.8 is now out.

http://robertstocks.co.uk/conquerClub/conquerclub-rjs.8.user.js

New in this release
Code: Select all
//-----------------------------------------------------------------------------
// New features in Version RJS.8
//-----------------------------------------------------------------------------
//  * Add hover to the cards in the my cards list.
//  * Change the text map to offer two versions (Standard and Extended)
//  * Hover Highlight now includes those territories that can attack the selected one as well as the ones that you can attack
//  * Change the Map Inspect text line to show territories you can attack and territories that can attack you
//  * Change the clock format option to  Off|24h|am/pm
//  * Added Help Popup
//  * Bug Fix : Jump to map option refesh was not working correctly
//  * Formatting Change AM/PM -> am/pm & add leading 0 to 24h clock
//  * Bug Fix : Map fade 0% prevented menu from working correctly, thanks weirdbro
//  * Bug Fix : Some menu items where updating the wrong menu text when clicked, thank weirdbro
//  * Split confirm actions into two options - Confirm Deploy and Confirm Auto-Attack
//  * Consolidate Duplicated Continent Names
//  * Adds a points summary to the end of the log in Terminator games.



I have delegated all help text work to cicero .. if you find any errors or have suggestions for additions [to the help text] or simply don't understand the help (which is its primary function after all) please post to this thread and cicero will respond.
r.
User avatar
Corporal stocksr
 
Posts: 132
Joined: Wed Mar 07, 2007 11:30 am
Location: South Coast, UK

Postby yeti_c on Tue Apr 24, 2007 8:35 am

Wow... great update Rob...

Love the "Standard" text map... Nice and succint and great way to display that info...

Nice touch on the "No Continent" listing too.
----------------------------------------------------
One thing I notice that version 7 didn't do (not sure about 8 yet)...

The fortify button needs to have "are you sure" on chained/adjacent games... (as this will end your fortification too)

Unlimited it should only be on "End Fortification".

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Postby yeti_c on Tue Apr 24, 2007 9:58 am

Rob - See the topic below...

http://www.conquerclub.com/forum/viewtopic.php?p=371667

Lacks new changes give cards to team mates from DeadBeats...

I guess you'll have to change the log enquiring code a bit...

Of course you don't have to - as Lack's Card counter works you could just rip the figures from there instead?

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Postby stocksr on Tue Apr 24, 2007 10:35 am

yeti_c wrote:Rob - See the topic below...

http://www.conquerclub.com/forum/viewtopic.php?p=371667

Lacks new changes give cards to team mates from DeadBeats...

I guess you'll have to change the log enquiring code a bit...

Of course you don't have to - as Lack's Card counter works you could just rip the figures from there instead?

C.


Have you got a game number I can use for testing?
Edit: also your linked post could not be found
r.
User avatar
Corporal stocksr
 
Posts: 132
Joined: Wed Mar 07, 2007 11:30 am
Location: South Coast, UK

Postby weirdbro on Tue Apr 24, 2007 3:04 pm

I just went through the time code, and fixed the editable time in my version. I'll email you the fixes, it was just one thing, but changing it forced me to change other parts too. Also, I would strongly recommend much of it be rewritten, because window.setInterval(countDown,1000) is not guaranteed to actually be one second long, would could explain reports that the clock goes too fast/slow.
Sergeant weirdbro
 
Posts: 52
Joined: Wed Jan 24, 2007 6:33 pm

Postby cicero on Tue Apr 24, 2007 6:13 pm

yeti_c wrote:The fortify button needs to have "are you sure" on chained/adjacent games (as this will end your fortification too).


I agree with and second yeti_c's request .. no need for any additional menu options .. this feature is turned on via Confirm Phase End for the game types mentioned.


cicero
FREE M-E-Mbership and simple rules. Conquer Club - it's not complicated.

random me statistic @ 13 December 2008 - 1336 posts : 232nd most public posts (not counting Tower of Babble) of all time.
User avatar
Sergeant cicero
 
Posts: 1358
Joined: Wed Mar 07, 2007 1:51 pm
Location: with the infected neutrals ... handing out maps to help them find their way to CC

Postby tahitiwahini on Tue Apr 24, 2007 7:38 pm

weirdbro wrote:I just went through the time code, and fixed the editable time in my version. I'll email you the fixes, it was just one thing, but changing it forced me to change other parts too. Also, I would strongly recommend much of it be rewritten, because window.setInterval(countDown,1000) is not guaranteed to actually be one second long, would could explain reports that the clock goes too fast/slow.


The only report I've heard of an inaccurate clock was in this thread from someone who thought it was running too fast, but then realized they had two versions of the script running at the same time. I haven't heard of anyone reporting the clock is running too slow.
Cheers,
Tahitiwahini
User avatar
Private 1st Class tahitiwahini
 
Posts: 964
Joined: Fri Jan 19, 2007 5:26 pm

Postby weirdbro on Tue Apr 24, 2007 7:41 pm

Oh, well, still, I fixed the editable clock.
Sergeant weirdbro
 
Posts: 52
Joined: Wed Jan 24, 2007 6:33 pm

Postby stocksr on Wed Apr 25, 2007 3:34 am

cicero wrote:
yeti_c wrote:The fortify button needs to have "are you sure" on chained/adjacent games (as this will end your fortification too).


I agree with and second yeti_c's request .. no need for any additional menu options .. this feature is turned on via Confirm Phase End for the game types mentioned.


cicero


Done! This will be in the .9 release.
r.
User avatar
Corporal stocksr
 
Posts: 132
Joined: Wed Mar 07, 2007 11:30 am
Location: South Coast, UK

Postby yeti_c on Wed Apr 25, 2007 3:37 am

Rob,

Apoogies... I assume some over zealous mod has removed that forum post...

Check this game...

game

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Postby stocksr on Wed Apr 25, 2007 3:46 am

weirdbro wrote:I just went through the time code, and fixed the editable time in my version. I'll email you the fixes, it was just one thing, but changing it forced me to change other parts too. Also, I would strongly recommend much of it be rewritten, because window.setInterval(countDown,1000) is not guaranteed to actually be one second long, would could explain reports that the clock goes too fast/slow.


Thanks, I just looked at how this works in detail for the first time, (this was a feature that was in Tr0y's script),

Thinking about it, this can never be 100% accurate, because the time remaining is generated on the server, so there will always be a "few" seconds before our code picks up on it, and starts rolling the clock.

To make this more accurate, we could record the current time when we load, and in the clock tick event work out how long has passed and set the display according to that value.

E.G. On Tick.
Code: Select all
 TimeRemaining = TimeRemainigAtLoad - (TimeNow-TimeAtLoad)


weirdbro, do you want to programme this and send me the patch?
r.
User avatar
Corporal stocksr
 
Posts: 132
Joined: Wed Mar 07, 2007 11:30 am
Location: South Coast, UK

Postby stocksr on Wed Apr 25, 2007 4:13 am

yeti_c wrote:Rob,

Apoogies... I assume some over zealous mod has removed that forum post...

Check this game...

game

C.


Thanks, I am working on a fix for this, do you have any idea what happens in a triples game (An example would be most helpful),

Also I could do with a few more examples of deadbeats in team games, I would like to see

a case of an entire team deadbeating to check that the cards are lost
a case of a player deadbeating after their team mate is killed.

and for triples games
a case of player 1 deadbeating - to see who gets the cards
a case of player 2 deadbeating - to see who gets the cards
a case of player 3 deadbeating - to see who gets the cards
r.
User avatar
Corporal stocksr
 
Posts: 132
Joined: Wed Mar 07, 2007 11:30 am
Location: South Coast, UK

Postby yeti_c on Wed Apr 25, 2007 5:55 am

It's always the top player that gets the cards...

So...

IF 1 alive and 2 or 3 DB - 1 gets cards.
IF 1 DB's then 2 will get cards.

If 2 DB's and 1 dead then 3 will get cards.

(replace 1 2 & 3 with 4 5 6 respectively.)

BTW - instead of interrogating the logs (as previous) could you just interrogate Lacks Card counter... that is correct in these examples as he must get the data from the data rather than the log?

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

PreviousNext

Return to Tool Archives

Who is online

Users browsing this forum: No registered users

cron