Assault odds is a tool that quickly calculates precise odds for attacking a sequence of territories on any map. It has been deliberately designed to be faster than other similar calculators and it will also handle larger numbers of armies. It consists of a Quick calculator and a Pathfinder You can show/hide these windows on your games page by using the options in the left menu. when uses the panel interface it adds this as a panel
Changes in version 2.0.6: by dgz345 - Should work in Firefox for real. And also load your settings! I don't know who implemented the saving of the settings but he/she forgot to load them...
Excellent. I've just got around to using this. It is very nice having it intergrated with the interface panel. Thank you sir.
edit: i'm using chrome.
Re: GM Script: Assault Odds - Version 2.0.0
Posted: Sun Feb 16, 2014 5:40 pm
by dgz345
everything i do is mostly tested on chrome only.
Re: GM Script: Assault Odds - Version 2.0.0
Posted: Tue Mar 25, 2014 11:23 pm
by ztodd
Just installed this- not working for me in Chrome when using the panels- game #s 14098707 and 14098709 for example. It shows the new Odds panel, but that panel is empty. Why is this? Can it be fixed?
Also, the images are broken in the user's guide. Did photobucket change their policy so that images are not available forever? Or has it always been that way? If so, did the user's guide writer not know about that? Or not care?
So many questions... but very few will be answered probably, because people don't know or don't care. (Sorry for my negative attitude- but most of the time it's true. But I really do appreciate the site programmers and script developers.)
Re: GM Script: Assault Odds - Version 2.0.0
Posted: Thu Mar 27, 2014 4:45 am
by D4 Damager
I also get a blank Odds tab. Can provide outputs if you want to try debugging, just let me know...
Re: GM Script: Assault Odds - Version 2.0.0
Posted: Thu Mar 27, 2014 6:15 am
by dgz345
hmm im using chrome without problem. i think i noticed that it didnt work in FF.
ill take a shower.then read what you guys have writen
Re: GM Script: Assault Odds - Version 2.0.0
Posted: Thu Mar 27, 2014 6:34 am
by dgz345
ztodd wrote:Just installed this- not working for me in Chrome when using the panels- Game 14098707 and Game 14098709 for example. It shows the new Odds panel, but that panel is empty. Why is this? Can it be fixed?
ztodd wrote:Also, the images are broken in the user's guide. Did photobucket change their policy so that images are not available forever? Or has it always been that way? If so, did the user's guide writer not know about that? Or not care?
what userguide. i dont find anybroken links when i check the userguide for assault odds? link please.
ztodd wrote:So many questions... but very few will be answered probably, because people don't know or don't care. (Sorry for my negative attitude- but most of the time it's true. But I really do appreciate the site programmers and script developers.)
sorry to prove you wrong. i lurk on the tools and bug forum. i always answer if there is anything i can help with.
// // ==UserScript== // @name Conquer Club Assault Odds // @namespace http://userscripts.org/ // @version 2.0.0 // @description Calculates available attack routes and odds // @include http*://*.conquerclub.com*/game.php* // ==/UserScript== // Copyright 2009-2012 chipv.freehostia.com // All rights reserved
var is_FF = /firefox/.test( navigator.userAgent.toLowerCase() ); var is_panel = document.getElementById('console_bottom')!=null?true:false; var forumUrl = "http://www.conquerclub.com/forum/viewtopic.php?f=527&t=202003"; var scriptUrl = "http://userscripts.org/scripts/source/350060.user.js"; var cMode = "attached";
var version = "2.0.0"; var cast = 1; var display = 7; var features=[]; var mapName = document.getElementById('outer-map').style.backgroundImage; if(mapName.match(/conquerclub.com\/(.+?)\./)) { mapName = RegExp.$1; } var logDiv = document.getElementById('log'); var dashboard = document.getElementById('dashboard'); var armiesarray = new Array(); var owners = new Array(); var path = new Array(); var conq = new Array(); var steps = new Array(); var bds = new Array(); var bmb = new Array(); var terr = new Array(); var copy = new Array(); var qcalcs = new Array(); var owner; var proto; var deploy = 0; var qcalc = 1; var cols = new Array('#000','#f00','#009a04','#00f','#cc0','#f0f','#0cc','#f92','#7f7f7f'); var attacking = {'11' : 15/36,'12' : 55/216, '21' : 125/216,'22' : 295/1296,'31' : 855/1296,'32' : 2890/7776}; var defending = {'11' : 21/36,'12' : 161/216,'21' : 91/216, '22' : 581/1296,'31' : 441/1296,'32' : 2275/7776}; var splitting = {'11' : 0, '12' : 0, '21' : 0, '22' : 420/1296,'31' : 0, '32' : 2611/7776}; var displays = new Array("Quick Calc", "Pathfinder", "Statistics"); var bombard = 0; var Stack = []; var Stats = []; var compiled; var qcomps = new Array(); var sref; var map;
function updateServerNumber(response) { try { var serverVersion = /version\s+(\d+.\d+.\d+)/.exec(response.responseText)[1]; GM_setValue('updateavailable', serverVersion); updateOptionsMenu(); }catch(e){} }
function isNewVersion() { var serverVersion = GM_getValue('updateavailable', false); if (serverVersion) { var newVersion = serverVersion.split('.').map(function(string) { return parseInt(string,10); }); var thisVersion = version.split('.').map(function(string) { return parseInt(string,10); }); return (newVersion[0]>thisVersion[0] || (newVersion[0]==thisVersion[0] && (newVersion[1]>thisVersion[1] || (newVersion[1]==thisVersion[1] && newVersion[2]>thisVersion[2])))); } return false; }
function updateOptionsMenu() { var cgMenu = document.getElementById("ass"); var ul = document.createElement('ul'); ul.style.borderWidth = "0px 1px 0px 1px"; var source = scriptUrl; if(isNewVersion()) { ul.innerHTML = "<li><a id=\"assVersionInfo\" href=" + source + "><span class=\"attention\">New Update Available</span></a></li>"; cgMenu.appendChild(ul); } else { ul.innerHTML = "<li><a id=\"assVersionInfo\" href=" + source + "><span>Latest Version Installed</span></a></li>"; cgMenu.appendChild(ul); } /*var ftext = features.join("\n"); document.getElementById('cgVersionInfo').addEventListener("click" , function () { alert('New version features\n' + ftext); },true);*/ }
var leftBar = document.getElementById("leftColumn"); if(leftBar) { var ul = leftBar.getElementsByTagName("ul"); if (ul[0]) { proto = window.location.protocol; showMenu(); } }
setTable(); if (is_panel) { if (is_FF) { var oldVersion=unsafeWindow.updatePanels; unsafeWindow.updatePanels = function() { var cMode = unsafeWindow.myOptions.panels[9][1]; setTimeout(function() { GM_setValue("oddsLoc",cMode);},0); return oldVersion(); }; } else{ (function() { var oldVersion = this.updatePanels; this.updatePanels = function() { var result = oldVersion.apply(this, arguments); GM_setValue("oddsLoc",unsafeWindow.myOptions.panels[9][1]); }; })(); } if (unsafeWindow.myOptions.panelSelected=="odds") unsafeWindow.toggle_console('odds'); unsafeWindow.togglePanels(); }
break; } } }
Re: Script: Assault Odds - Version 2.0.3
Posted: Wed May 14, 2014 12:01 am
by tunafizzle
I appreciate the work on the plugin, but maybe the tool/exstension builders here could use another site besides userscripts? I know i've wanted to try out other plugins and update assault odds for a while but userscripts.org has been down for what seems to be months. Any reason these plugins can't be on github, sourceforge, etc? or at least have them mirrored on another site?
Can't upgrade to new version. Using firefox. Anyway to get it updated?
Re: Script: Assault Odds - Version 2.0.3
Posted: Mon Jun 09, 2014 4:43 pm
by Woltato
Slight bug with the latest version of assault odds. When changing the Display options tab, hiding pathfinder and statistics which I don't use, it doesn't remember the settings. refresh the page and they just re-appear again. This is on firefox.
Re: Script: Assault Odds - Version 2.0.3
Posted: Tue Jun 10, 2014 1:32 am
by dgz345
Will look at it next month when I get home to a computer
Re: Script: Assault Odds - Version 2.0.3
Posted: Sat Jun 21, 2014 12:01 pm
by ztodd
I finally installed it with Tampermonkey- working good. You're awesome dgz. For some reason it doesn't show stats for # surviving attackers less than 8 here - is that by design? Why would it not show for less than 8?
Not too big a deal though. Seems to work real good.
Click image to enlarge.
Re: Script: Assault Odds - Version 2.0.3
Posted: Sat Jun 21, 2014 12:07 pm
by ztodd
If you feel like adding new features, maybe add an option on each line for "Stay behind"- that would mean we want all the armies to stay behind instead of moving on for that attack, to attack from that same spot again to a different neighboring country. Does that make sense? I know it may not be as easy to program as I might think at first, but if you're up for the challenge...
Re: Script: Assault Odds - Version 2.0.3
Posted: Sat Jun 21, 2014 12:49 pm
by dgz345
I know I have thought about that problem. But I haven't had a computer for a month. Can check next month.
Re: Script: Assault Odds - Version 2.0.3
Posted: Sat Jun 21, 2014 11:21 pm
by ztodd
I've got all kinds of suggestions for ya... of course you can pick and choose what ya wanna do. Included my suggestion from previous post also so they're all in one place.
For quick calc: - Add a note field for each quick calc - Add an "include" checkbox on each quick calc (checked by default). The total % will only include those that have the checkbox checked.
For path-finder: - Add a checkbox on each line in the path-finder for "Stay behind"- that would mean we want all the armies to stay behind instead of moving on for that attack, to attack from that same spot again to a different neighboring country. - Add an "Add to quick calc" button in the path-finder which will add a line to quick-calc and automatically fill in the numbers from the pathfinder into it, and will automatically enter a note "From (start country) to (end country)" * Add a button or hyperlink on the rows in quick-calc that came from path-finder, which when click on, would populate the data back into path-finder again. (This might be a bit more work since you'd have to also store all the territories attacking from and to, for each line- could be stored in hidden fields or in cookie / local storage in some kind of 2-d array.)
Let me know if my suggestions aren't clear. You're awesome.
Re: Script: Assault Odds - Version 2.0.3
Posted: Sun Jun 22, 2014 3:59 am
by dgz345
I'll look at it when I get home to my computer.
I haven't created my own script so I'm not as good as the creators of the scripts but I'll see what i can do
Re: Script: Assault Odds - Version 2.0.3
Posted: Sat Jul 12, 2014 2:11 pm
by EBConquer
This addon is making the chat and log start from the top vs the bottom. Figured i'd let you know dgz.
Thanks for all your work too, dgz! I think i can speak for everybody in that all your contributions don't go unnoticed.
Edit: That's w/ the new panel interface activated btw.
Re: Script: Assault Odds - Version 2.0.4
Posted: Thu Dec 18, 2014 12:05 pm
by RobbieDub
I just tried using this in chrome on my mac with panels activated and it doesn't work. I really like panels I just wish some of my other favourite plugins worked with them as well. Hope you can have a chance to tidy them up soon.
Re: Script: Assault Odds - Version 2.0.4
Posted: Sun Aug 21, 2016 2:13 pm
by Robespierre__
Anyone able to get the assault odds to work (using Tampermonkey or whatever)? It has been a long time since I have been able to ... the newest versions of Chrome and Firefox seems to have extensions/scripts on lock down which may be causing the problem.
Re: Script: Assault Odds - Version 2.0.4
Posted: Mon Aug 22, 2016 5:20 am
by dgz345
Robespierre__ wrote:Anyone able to get the assault odds to work (using Tampermonkey or whatever)? It has been a long time since I have been able to ... the newest versions of Chrome and Firefox seems to have extensions/scripts on lock down which may be causing the problem.
it works for me on chrome using panel interface. ill check the old interface and see if it works.
EDIT: works for me in old interface aswell.
Im using latest chrome, latest tamper and latest script version
if u are using chrome press ctrl+shift+ j to open console. refresh the gamepage. send me a pm with the text in the console if its not loading.
Re: Script: Assault Odds - Version 2.0.4
Posted: Tue Jun 26, 2018 3:16 am
by tomasmk
I just installed it on Firefox with Greasemonkey. I can't see any difference or new interface, besides the "AssaultOdds Options" bar on the left side menu.
Is there any known fix to this?
Thanks
Re: Script: Assault Odds - Version 2.0.4
Posted: Tue Jun 26, 2018 4:39 am
by Dukasaur
tomasmk wrote:I just installed it on Firefox with Greasemonkey. I can't see any difference or new interface, besides the "AssaultOdds Options" bar on the left side menu.
Is there any known fix to this?
Thanks
Firefox doesn't play nice with others. 90% of these scripts now only work with Chrome and Tampermonkey.
Re: Script: Assault Odds - Version 2.0.4
Posted: Fri Jun 14, 2019 5:29 am
by anonymus
added tampermonkey and the assult-odds shows up in lefthand menu-section but no window in the actual game, am i doing something wrong here? Mainly interested in the pathfinder..