You probably have outdated xml cached in your browser.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.
BOB version 1.2 [was CC Greasemonkey script - unofficial]
Moderator: Tech Team
Forum rules
Please read the Community Guidelines before posting.
Please read the Community Guidelines before posting.
- lackattack
- Posts: 6097
- Joined: Sun Jan 01, 2006 10:34 pm
- Location: Montreal, QC
lackattack wrote:You probably have outdated xml cached in your browser.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.
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.
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
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
- Ishiro
- Posts: 324
- Joined: Mon Jul 17, 2006 5:53 pm
- Gender: Male
- Location: Under the Rainbow
- Contact:
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.
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.
- jako
- Posts: 1022
- Joined: Sun Jun 03, 2007 4:50 am
- Gender: Male
- Location: A lost soul with no-one to stalk.
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.

Time to retire this much loved sig of mine with a new clan.
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.
- Aerial Attack
- Posts: 1132
- Joined: Mon Jun 04, 2007 7:59 pm
- Location: Generation One: The Clan
-
jedi-knight83
- Posts: 8
- Joined: Fri Sep 28, 2007 6:27 pm
-
jedi-knight83
- Posts: 8
- Joined: Fri Sep 28, 2007 6:27 pm
ok with the latest version i have found this section
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
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
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.Coleman wrote:Nevermind, figured it out, the title doesn't match the site name.Coleman wrote:Does anyone know why BOB is not working for D-Day?
I wonder if BOB doesn't like the : in the file...
Warning: You may be reading a really old topic.
-
jedi-knight83
- Posts: 8
- Joined: Fri Sep 28, 2007 6:27 pm
-
jedi-knight83
- Posts: 8
- Joined: Fri Sep 28, 2007 6:27 pm
Issues with D-Day map
Coleman wrote: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.Coleman wrote:Nevermind, figured it out, the title doesn't match the site name.Coleman wrote:Does anyone know why BOB is not working for D-Day?
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
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="/);-
jedi-knight83
- Posts: 8
- Joined: Fri Sep 28, 2007 6:27 pm
- Ishiro
- Posts: 324
- Joined: Mon Jul 17, 2006 5:53 pm
- Gender: Male
- Location: Under the Rainbow
- Contact:
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.
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.
-
jedi-knight83
- Posts: 8
- Joined: Fri Sep 28, 2007 6:27 pm
MIDDLE AMERICA MAP