Conquer Club

Coding AJAX-compatible GM scripts

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.

Postby casper on Fri Nov 09, 2007 8:22 pm

yep i use large maps. any idea yeti? what is that feature for in the first place?
User avatar
Major casper
 
Posts: 416
Joined: Wed Feb 01, 2006 6:36 pm
Location: Chicago

Postby yeti_c on Sat Nov 10, 2007 2:09 am

casper wrote:yep i use large maps. any idea yeti? what is that feature for in the first place?


Widowmakers pointed out the pixels were off by one... but they weren't for me... and no-one else had complained... so my assumption - and I believe it's still true is that "most" people it works with the offsets at 0...

However there are a few with this problem - thus I intorduced the ability to move the numbers around a bit to line them up... the overlaid numbers are there to replace the existing numbers that get faded out when you change the map fade options...

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

Postby yeti_c on Sat Nov 10, 2007 2:09 am

Frop wrote:
yeti_c wrote:
Frop wrote:
yeti_c wrote:
Frop wrote:I like how the Map Inspect option was modified, but you're still stuck to manually refreshing the page if you want the 'Map Inspect' text map to (dis)appear.

Apart from that, keep up the great work! :)


Actually - the latest version does the on off for map inspect on the fly - check the correct topic for better updates...

C.


Yeah, with 'modified' I was talking about the on-the-fly stuff. What I meant was that you still have to manually refresh the page if you want the 'Map Inspect' text map to (dis)appear. :)

Image


What version of the code are you running?

C.


Firefox 2.0.0.9, Greasemonkey 0.7.20070607.0, script version 2.13. To avoid issues I always uninstall the previous version of the script including all associated preferences.

I took a number of screenshots, hopefully I can illustrate the situation. Prerequisite is to browse a game with Map Inspect turned off.

Image
1) Off

Now when I turn Map Inspect on, you can see that it works when I hover over a country - yet there is no text map.

Image
2) On, no refresh

However, when I manually refresh the page the text map shows up (site option 'refresh map' does not have the same effect).

Image
3) On, refreshed

When I turn Map Inspect off again the text map remains on the screen and doesn't disappear until I manually refresh the page.

Image
4) Off, no refresh

:)


Great bug report - I'm pretty sure I know what's going on - I'll fix it on Monday...

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

Postby Marshall Law on Sat Nov 10, 2007 2:13 am

yeti_c wrote:
casper wrote:the overlaid numbers are there to replace the existing numbers that get faded out when you change the map fade options...
C.


It seems to go back and forth for me. Sometimes it's right on and other times it's not. I haven't looked into the code (I am a bit rusty) but i dont understand why it has to be this way. In the older versions of BOB was there an double overlay approach like this one? Are the original numbers locked into the map image? Thanks, yeti.
User avatar
Private 1st Class Marshall Law
 
Posts: 50
Joined: Mon Aug 13, 2007 9:45 am

Postby yeti_c on Sat Nov 10, 2007 2:17 am

Marshall Law wrote:
yeti_c wrote:the overlaid numbers are there to replace the existing numbers that get faded out when you change the map fade options...
C.


It seems to go back and forth for me. Sometimes it's right on and other times it's not. I haven't looked into the code (I am a bit rusty) but i dont understand why it has to be this way. In the older versions of BOB was there an double overlay approach like this one? Are the original numbers locked into the map image? Thanks, yeti.


The old non ajax way of coding the site was completely changed for the AJAX way... and the only way for me to be able to fade the map - fades the numbers... and then the only way to get non faded numbers is to overlay another map that's not inside the div that's faded...

It's interesting that it changes for you... I assumed it would either be correct or out!!

I've not found any rhyme or reason as to why it's out - except that Widowmakers reported it - and he's got a long user name - and that might knock out some layout!!

C.
Last edited by yeti_c on Sat Nov 10, 2007 6:31 am, edited 1 time in total.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Postby yeti_c on Sat Nov 10, 2007 6:30 am

OK - I've just uploaded the latest version...

VERSION : 2.14

FIXED :
Map Inspect Div now dynamic when turning it on and off.

TODO :

Clock Format doesn't work <- does anyone care about this one?
Clock Parsing not always correct (Noticed with 08 and 09 times - anymore?)

WISHLIST :

Objectives <- Added once first map with this in Quenched (AoR?)
Territory counter for FOW games.
Anything else that needs to be added?

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

Postby casper on Sat Nov 10, 2007 4:16 pm

i updated to 2.14 and the pixel problem is gone. thanks yeti!!
User avatar
Major casper
 
Posts: 416
Joined: Wed Feb 01, 2006 6:36 pm
Location: Chicago

Postby Lobster Crush on Sat Nov 10, 2007 9:21 pm

good job on this yeti...but bob's been wacky for me since about version 2.09 or so.
see image below...the army counts are duplicated again below the map, and map inspect doesn't work at all.
also, there's no menu for bob on the left.

Image

i've tried clearing my cache, etc., but with no luck so far.
the only thing i haven't done is opened up the script to manually tweak the settings, to see if it's one setting in particular that's causing the bug.
if i discover something, i'll post it here.
User avatar
Sergeant 1st Class Lobster Crush
 
Posts: 93
Joined: Sun Mar 18, 2007 12:18 am
Location: Winneapolis, Minnetoba

Postby Frop on Sat Nov 10, 2007 10:13 pm

casper wrote:i updated to 2.14 and the pixel problem is gone. thanks yeti!!


That's funny, I updated as well and still have the same problem. :p
User avatar
Captain Frop
 
Posts: 1201
Joined: Thu May 10, 2007 3:02 pm

Postby yeti_c on Mon Nov 12, 2007 3:48 am

Lobster Crush wrote:good job on this yeti...but bob's been wacky for me since about version 2.09 or so.
see image below...the army counts are duplicated again below the map, and map inspect doesn't work at all.
also, there's no menu for bob on the left.

Image

i've tried clearing my cache, etc., but with no luck so far.
the only thing i haven't done is opened up the script to manually tweak the settings, to see if it's one setting in particular that's causing the bug.
if i discover something, i'll post it here.


Hi Lobster,

Can you do the following...

a) Install latest.
b) goto "Tools" -> "Error Console"
c) Press the "Clear" button.
d) Press the "Errors" tab
e) Load a game that this occurs in
f) Copy what appears in the Error Console screen and post it in here.

Cheers,

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

Postby yeti_c on Mon Nov 12, 2007 3:50 am

Frop wrote:
casper wrote:i updated to 2.14 and the pixel problem is gone. thanks yeti!!


That's funny, I updated as well and still have the same problem. :p


None of the pixel code was changed - those with this problem will just have to use the alignment features... unless I or someone else can work out what's causing it!!

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

Postby yeti_c on Mon Nov 12, 2007 6:30 am

[quote="yeti_c"]OK - I've just uploaded the latest version...

VERSION : 2.15

FIXED :
Neutral armies where being blatted when Unknown armies were present.

TODO :

Clock Format doesn't work <- does anyone care about this one?
Clock Parsing not always correct (Noticed with 08 and 09 times - anymore?)

WISHLIST :

Objectives <- Added once first map with this in Quenched (AoR?)
Territory counter for FOW games.
Anything else that needs to be added?

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

Postby yeti_c on Mon Nov 12, 2007 6:32 am

Bad Speler wrote:Great script, just noticed it today. Just one small bug I see, neutral armies arent shown in the stats in FOW games even if they are visible on the map.


See above - fixed now...

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

Postby rebelman on Mon Nov 12, 2007 10:32 am

http://www.conquerclub.com/game.php?gam ... 9#map-cell

yeti i have the latest version installed but the combination of your script plus ajax is ridiculously slow in this build /everyone attack rebel game. I noticed similar problems in other games with large numbers deployed but this is the worst.
Don't now why people on here don't like being cooks, remember under siege: A former SEAL, now cook, is the only person who can stop a gang of terrorists when they sieze control of a US Navy battleship.
User avatar
Private rebelman
 
Posts: 2968
Joined: Thu Aug 02, 2007 5:24 pm
Location: People's Republic of Cork

Postby yeti_c on Mon Nov 12, 2007 10:37 am

rebelman wrote:http://www.conquerclub.com/game.php?game=917929#map-cell

yeti i have the latest version installed but the combination of your script plus ajax is ridiculously slow in this build /everyone attack rebel game. I noticed similar problems in other games with large numbers deployed but this is the worst.


Such is life I'm afraid...

There's a huge amount of data to be downloaded and processed there... this will make it inevitably slow...

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

Postby rebelman on Mon Nov 12, 2007 11:47 am

yeti_c wrote:
Such is life I'm afraid...

There's a huge amount of data to be downloaded and processed there... this will make it inevitably slow...

C.


I appreciate the honesty of your answer (even if it wasn't what I wanted to hear :()
Don't now why people on here don't like being cooks, remember under siege: A former SEAL, now cook, is the only person who can stop a gang of terrorists when they sieze control of a US Navy battleship.
User avatar
Private rebelman
 
Posts: 2968
Joined: Thu Aug 02, 2007 5:24 pm
Location: People's Republic of Cork

Postby yeti_c on Mon Nov 12, 2007 11:48 am

rebelman wrote:
yeti_c wrote:
Such is life I'm afraid...

There's a huge amount of data to be downloaded and processed there... this will make it inevitably slow...

C.


I appreciate the honesty of your answer (even if it wasn't what I wanted to hear :()


No worries...

Lack is coding up some speed ups for the initial load - but that won't improve the processing time of BOB... (I've done pretty much as much as I can on that)

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

Postby Lobster Crush on Mon Nov 12, 2007 2:23 pm

yeti_c wrote:Hi Lobster,

Can you do the following...

a) Install latest.
b) goto "Tools" -> "Error Console"
c) Press the "Clear" button.
d) Press the "Errors" tab
e) Load a game that this occurs in
f) Copy what appears in the Error Console screen and post it in here.

Cheers,

C.


hi yeti,

here's what the error looks like:

Image

thanks,
lc
User avatar
Sergeant 1st Class Lobster Crush
 
Posts: 93
Joined: Sun Mar 18, 2007 12:18 am
Location: Winneapolis, Minnetoba

Postby yeti_c on Mon Nov 12, 2007 2:53 pm

Lobster Crush wrote:
yeti_c wrote:Hi Lobster,

Can you do the following...

a) Install latest.
b) goto "Tools" -> "Error Console"
c) Press the "Clear" button.
d) Press the "Errors" tab
e) Load a game that this occurs in
f) Copy what appears in the Error Console screen and post it in here.

Cheers,

C.


hi yeti,

here's what the error looks like:

Image

thanks,
lc


Interesting...

I don't know what this is to be honest... are you on Mac?

What version of FireFox do you have?

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

Postby Lobster Crush on Mon Nov 12, 2007 5:17 pm

yeti_c wrote:
Interesting...

I don't know what this is to be honest... are you on Mac?

What version of FireFox do you have?

C.


Nope, I'm on a PC running Vista, latest version of FF (2.0.0.9), and latest version of GM (0.7.20070607.0). Perhaps Vista's the problem, except shouldn't Greasemonkey scripts run cross platform?
User avatar
Sergeant 1st Class Lobster Crush
 
Posts: 93
Joined: Sun Mar 18, 2007 12:18 am
Location: Winneapolis, Minnetoba

Postby Lobster Crush on Mon Nov 12, 2007 6:03 pm

Lobster Crush wrote:
yeti_c wrote:
Interesting...

I don't know what this is to be honest... are you on Mac?

What version of FireFox do you have?

C.


Nope, I'm on a PC running Vista, latest version of FF (2.0.0.9), and latest version of GM (0.7.20070607.0). Perhaps Vista's the problem, except shouldn't Greasemonkey scripts run cross platform?


Not sure if this info helps...I commented out all calls to your SHIFT_MAGICMAP() function, and I get the BOB menu back on the left, and Map Inspect works...but only on the lower set of army numbers (i.e., the second set of armies shifted below the map).

I'm not 100% sure of this, but I think this bizarre behaviour started after the pixel-shifting code was baked into BOB. Is it possible to send me a version of the code before this was added so that I can test this theory?

(I know, I should have backed up my working BOB in the first place...but your improvements were so good, I didn't think I needed to.)

Thanks,
lc
User avatar
Sergeant 1st Class Lobster Crush
 
Posts: 93
Joined: Sun Mar 18, 2007 12:18 am
Location: Winneapolis, Minnetoba

Postby yeti_c on Tue Nov 13, 2007 3:54 am

Lobster Crush wrote:
Lobster Crush wrote:
yeti_c wrote:
Interesting...

I don't know what this is to be honest... are you on Mac?

What version of FireFox do you have?

C.


Nope, I'm on a PC running Vista, latest version of FF (2.0.0.9), and latest version of GM (0.7.20070607.0). Perhaps Vista's the problem, except shouldn't Greasemonkey scripts run cross platform?


Not sure if this info helps...I commented out all calls to your SHIFT_MAGICMAP() function, and I get the BOB menu back on the left, and Map Inspect works...but only on the lower set of army numbers (i.e., the second set of armies shifted below the map).

I'm not 100% sure of this, but I think this bizarre behaviour started after the pixel-shifting code was baked into BOB. Is it possible to send me a version of the code before this was added so that I can test this theory?

(I know, I should have backed up my working BOB in the first place...but your improvements were so good, I didn't think I needed to.)

Thanks,
lc


It's interesting that the SHIFT_MAGICMAP() function breaks it... that one is fairly unusual code!?

I have the same version of FF & GM... so it can't be that - but I am using XP...

However - the Magicmap div is what seems to be the problem (i.e. it's not being inserted into the correct place for you)

Do you have any other scripts running? (BTW - you are running with AJAX on?)

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

Postby Lobster Crush on Tue Nov 13, 2007 10:30 am

yeti_c wrote:
Lobster Crush wrote:
Lobster Crush wrote:
yeti_c wrote:
Interesting...

I don't know what this is to be honest... are you on Mac?

What version of FireFox do you have?

C.


Nope, I'm on a PC running Vista, latest version of FF (2.0.0.9), and latest version of GM (0.7.20070607.0). Perhaps Vista's the problem, except shouldn't Greasemonkey scripts run cross platform?


Not sure if this info helps...I commented out all calls to your SHIFT_MAGICMAP() function, and I get the BOB menu back on the left, and Map Inspect works...but only on the lower set of army numbers (i.e., the second set of armies shifted below the map).

I'm not 100% sure of this, but I think this bizarre behaviour started after the pixel-shifting code was baked into BOB. Is it possible to send me a version of the code before this was added so that I can test this theory?

(I know, I should have backed up my working BOB in the first place...but your improvements were so good, I didn't think I needed to.)

Thanks,
lc


It's interesting that the SHIFT_MAGICMAP() function breaks it... that one is fairly unusual code!?

I have the same version of FF & GM... so it can't be that - but I am using XP...

However - the Magicmap div is what seems to be the problem (i.e. it's not being inserted into the correct place for you)

Do you have any other scripts running? (BTW - you are running with AJAX on?)

C.


Yup, AJAX is on (I just double checked). I've only got 2 unrelated scripts that run on all pages, and I've tried with them disabled as well...no luck.
User avatar
Sergeant 1st Class Lobster Crush
 
Posts: 93
Joined: Sun Mar 18, 2007 12:18 am
Location: Winneapolis, Minnetoba

Postby yeti_c on Tue Nov 13, 2007 10:42 am

Lobster Crush wrote:Yup, AJAX is on (I just double checked). I've only got 2 unrelated scripts that run on all pages, and I've tried with them disabled as well...no luck.


Hmmm - do you have access to another PC? (one without Vista?)

Can you test it there?

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

Postby Night Strike on Tue Nov 13, 2007 4:24 pm

Vista shouldn't be the problem: mine runs just fine.
Image
User avatar
Major Night Strike
 
Posts: 8512
Joined: Wed Apr 18, 2007 2:52 pm

PreviousNext

Return to Tool Archives

Who is online

Users browsing this forum: No registered users