Page 25 of 28

PostPosted: Mon Sep 17, 2007 1:37 pm
by lackattack
The1exile wrote:The Pearl harbour map seems to have a bunch of missing bonuses in the xml, probably due to some new code? They work in game, but damned if i can see them.
You probably have outdated xml cached in your browser.

PostPosted: Mon Sep 17, 2007 2:01 pm
by benjikat
lackattack wrote:
The1exile wrote:The Pearl harbour map seems to have a bunch of missing bonuses in the xml, probably due to some new code? They work in game, but damned if i can see them.
You probably have outdated xml cached in your browser.



the current version of BOB also doesn't understand some of the new xml features so will show both the partial and the full aircraft bonues, as well as not showing the bombardment attack options.

BOB

PostPosted: Wed Sep 19, 2007 4:32 am
by arizona
Been away for a while, and what do I find when I come back. The Greasemonkey script to end all greasemonkey scripts.

My hat's off to all its authors.... wow.

PostPosted: Fri Sep 28, 2007 2:21 am
by maritovw
i'm sad to realize that nobody's working to make this add-on compatible with AJAX.... i know how to program but never had done it in JavaScript/AJAX...

however, lately i've been reading a bit about both, and i just have had an idea that might help make this script compatible with the new AJAX stuff.. here it goes:

as i understood, AJAX uses HTML, CSS and JavaScript; it's not another language, so BOB should be (theoretically) compatible with it... now, as i understand things work (without AJAX) is that the BOB script runs when the game page loads, therefore adding its content to the page.. as i see it, the problem is that AJAX refreshes only what is necessary, so the BOB part doesn't refresh and the info doesn't update to reflex the game's state..

what i suggest is to edit the info in the buttons' HTML (using BOB) as to make it do what is supposed to do (run the AJAX script as lack intended it to) AND then refresh the BOB info all over again (or only the necessary parts)... theoretically it should work, shouldn't it? after all, it is all JavaScript...

please, if you've read trough here (and understood what i've just said), please give your comments!! even if it is to support my idea or to make me notice my stupidity when thinking that could work :lol:

PostPosted: Fri Sep 28, 2007 7:04 am
by Ishiro
There are people working on it:
http://www.conquerclub.com/forum/viewtopic.php?t=27417

Its just a pain in the ass, and there are other issues. BOB was not designed to be run multiple times on one page, so things like the Map Inspect don't work properly at all, as well as they seem to interfere with what lack does to update armies. If you have AJAX and BOB on, you can deploy armies, attack, advance and fortify, and the map will never update.

I've personally gone through about 6 versions of BOB now, and none of them have worked. But I'm still working on it.

PostPosted: Fri Sep 28, 2007 11:45 am
by jako
Ishiro wrote:There are people working on it:
http://www.conquerclub.com/forum/viewtopic.php?t=27417

Its just a pain in the ass, and there are other issues. BOB was not designed to be run multiple times on one page, so things like the Map Inspect don't work properly at all, as well as they seem to interfere with what lack does to update armies. If you have AJAX and BOB on, you can deploy armies, attack, advance and fortify, and the map will never update.

I've personally gone through about 6 versions of BOB now, and none of them have worked. But I'm still working on it.


i commend u on ur hard work. its people like u that make this an even better site than all the rest out there.

PostPosted: Fri Sep 28, 2007 3:05 pm
by maritovw
ok, now i get it... then maybe the way to go would be to stop working on BOB, and star working on AJAXBOB, adapting the old BOB script so that it works properly again. though, this shouldn't be done all at once, but little by little, implementing in AJAXBOB one by one all the feautures BOB has (maybe some issues are easier to address than others, so you could start with the easier ones) so we can have at least some of the feautures working with AJAX.

PostPosted: Fri Sep 28, 2007 5:37 pm
by Aerial Attack
I believe that's actually what they are doing. They're just calling it BOB for continuity. MFontolan and Ishiro have both mentioned that they have had to start from scratch on many of the features.

PostPosted: Sat Sep 29, 2007 4:44 pm
by Coleman
Does anyone know why BOB is not working for D-Day?

PostPosted: Sat Sep 29, 2007 5:17 pm
by Coleman
Coleman wrote:Does anyone know why BOB is not working for D-Day?
Nevermind, figured it out, the title doesn't match the site name.

PostPosted: Mon Oct 01, 2007 12:21 pm
by jedi-knight83
Hi

im a bit confussed. Ive installed greasemonkey and got conquer club-BOB on it

want to change settings to a faded map... and is it possible to see a total of how many men everyone has??

cant see user settings in my script though!?

help anyone??

PostPosted: Mon Oct 01, 2007 12:41 pm
by jedi-knight83
ok with the latest version i have found this section

Code: Select all
//-----------------------------------------------------------------------------
//  DEFAULT OPTIONS SETTINGS
//-----------------------------------------------------------------------------

// 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 settings menu.
// HARD WAY. Go to about:Config in FireFox and - Search for BOB.OPTIONS.
// Then Edit that value - BE CAREFULL if you get the format wrong the script will crash,
// if you crash it and want to recover, set that option value to exactly the next 4 chars ({})
// this will re load the defaults below.
var DEFAULT_OPTIONS = new Object();
DEFAULT_OPTIONS['jumptomap'] = false;
DEFAULT_OPTIONS['colorblind'] = true;
DEFAULT_OPTIONS['textMapType'] = "Standard";
DEFAULT_OPTIONS['fadeMap'] = 0.0; // 0 = No Fade  1 = Total WhiteOut
DEFAULT_OPTIONS['24hourClockFormat'] = "am/pm";
DEFAULT_OPTIONS['mapInspect'] = true;
DEFAULT_OPTIONS['confirmEnds'] = true;
DEFAULT_OPTIONS['confirmAutoAttack'] = true;
DEFAULT_OPTIONS['confirmDeploy'] = true;
DEFAULT_OPTIONS['statsMode'] = "Extended";


It says not to edit here and to use the new settings menu?? can i ask where exactly this is?

also.. if i want to fade the map and see how many men each player has what should i change?

thanks in advance

PostPosted: Mon Oct 01, 2007 5:16 pm
by Ishiro
When you are in a game, there should be a BOB menu on the left.

PostPosted: Mon Oct 01, 2007 5:19 pm
by Coleman
Coleman wrote:
Coleman wrote:Does anyone know why BOB is not working for D-Day?
Nevermind, figured it out, the title doesn't match the site name.
Nevermind again, that isn't it, and I feel dumb for thinking it was as Circus Maximus doesn't match the title (Circvs Maximvs) and BOB works fine.

I wonder if BOB doesn't like the : in the file...

PostPosted: Mon Oct 01, 2007 5:34 pm
by jedi-knight83
thanks... but seems to have stoped the auto refresh!?!?

PostPosted: Mon Oct 01, 2007 5:42 pm
by jedi-knight83
and makes the game play VERY SLOW... is this normal?

Issues with D-Day map

PostPosted: Mon Oct 01, 2007 10:48 pm
by hambone
Coleman wrote:
Coleman wrote:
Coleman wrote:Does anyone know why BOB is not working for D-Day?
Nevermind, figured it out, the title doesn't match the site name.
Nevermind again, that isn't it, and I feel dumb for thinking it was as Circus Maximus doesn't match the title (Circvs Maximvs) and BOB works fine.

I wonder if BOB doesn't like the : in the file...


I think this is because of the dash in the name of the map.

The problem is this line (about line 1060):
Code: Select all
var armiesArr = map.innerHTML.split(/armies=|,|-|" alt="/);

It's trying to split the data long 4 things: "armies=", a comma, a dash, and " alt=". Since the map name has a dash in it, it adds an additional, unexpected element to the array.

I've fixed it with the following hack that only works for the D-Day map. There will have to be another solution for maps in general.

change:
Code: Select all
var armiesArr = map.innerHTML.split(/armies=|,|-|" alt="/);

to:
Code: Select all
var armiesArr = map.innerHTML.replace(/D-Day/g,"DDay").split(/armies=|,|-|" alt="/);
armiesArr[0] = armiesArr[0].replace(/DDay/g,"D-Day");


--- use at your own risk... etc, etc.

Re: Issues with D-Day map

PostPosted: Tue Oct 02, 2007 11:07 am
by hambone
hambone wrote:I think this is because of the dash in the name of the map.

The problem is this line (about line 1060):
Code: Select all
var armiesArr = map.innerHTML.split(/armies=|,|-|" alt="/);

It's trying to split the data long 4 things: "armies=", a comma, a dash, and " alt=". Since the map name has a dash in it, it adds an additional, unexpected element to the array.

I've fixed it with the following hack that only works for the D-Day map. There will have to be another solution for maps in general.

change:
Code: Select all
var armiesArr = map.innerHTML.split(/armies=|,|-|" alt="/);

to:
Code: Select all
var armiesArr = map.innerHTML.replace(/D-Day/g,"DDay").split(/armies=|,|-|" alt="/);
armiesArr[0] = armiesArr[0].replace(/DDay/g,"D-Day");


--- use at your own risk... etc, etc.


here's a potential general fix:
change:
Code: Select all
var armiesArr = map.innerHTML.split(/armies=|,|-|" alt="/);

to:
Code: Select all
var armiesArr = map.innerHTML.replace(/-(\d)/g,"~$1").split(/armies=|,|~|" alt="/);

PostPosted: Tue Oct 02, 2007 11:16 am
by RjBeals
^ Has this been tested?

PostPosted: Tue Oct 02, 2007 11:22 am
by hambone
RjBeals wrote:^ Has this been tested?

it works for me... someone else please give this a try and report back...

PostPosted: Tue Oct 02, 2007 1:14 pm
by delorean
hambone wrote:
RjBeals wrote:^ Has this been tested?

it works for me... someone else please give this a try and report back...


tested, working.

PostPosted: Tue Oct 02, 2007 1:24 pm
by homes32
works like a charm. thanks guys!

PostPosted: Tue Oct 02, 2007 1:58 pm
by jedi-knight83
Hi

when i have BOB activated and the ajax thing turned off on my settings ... my games dont auto refresh... which is a bit annoying. Also.. when im in my go and make a move the screen refreshes take much longer than when bob is off and the ajax setting is normal.

any ideas or is this normal?

PostPosted: Tue Oct 02, 2007 3:43 pm
by Ishiro
The auto refresh is part of AJAX, so if you have AJAX off, it does not auto refresh.

And with AJAX off in order to use Greasemonkey, the whole page reloads with every action. Using AJAX is what allows the page to load pieces and parts instead of the whole thing.

So, basically everything is working correctly for you.

PostPosted: Tue Oct 02, 2007 4:33 pm
by jedi-knight83
so if it doesnt auto refresh.. i just have to keep hitting f5 myself to know when its my go next and to see whats going on with game play