upkeep
![]() ![]() |
tried to update upkeep but it s just showing question marks
|
![]() ![]() |
display any of your barrack and shipyard... to fetch upkeep costs per units ;o) |
![]() ![]() |
hungarian translation:
previous canceled translations:
|
![]() ![]() |
hi oliezekat,
you could use information diplayed in 'view research library' link. here is some code that helps to extract datas from that page:
mainview=document.getElementById('mainview');
content=mainview.getElementsByClassName('content')[0];
reduction={
'sea':function(){
seaul=content.getElementsByTagName('h4')[0].nextSibling.nextSibling;
searesearches=seaul.getElementsByClassName('explored').length;
seafut=seaul.getElementsByTagName('li')[13].textContent;
seafutlevel=seafut.slice(seafut.lastIndexOf('('),seafut.indexOf(')')+1);
seafutlevel=seafutlevel.slice(seafutlevel.lastIndexOf(' '),seafutlevel.indexOf(')'));
seafutlevelno=parseInt(seafutlevel);
red=[0,0,0,2,2,2,6,6,6,6,6,14,14,14,14+2*seafutlevelno];
return red[searesearches];
},
'mil':function(){
milul=content.getElementsByTagName('h4')[3].nextSibling.nextSibling;
milresearches=milul.getElementsByClassName('explored').length;
milfut=milul.getElementsByTagName('li')[13].textContent;
milfutlevel=milfut.slice(milfut.lastIndexOf('('),milfut.indexOf(')')+1);
milfutlevel=milfutlevel.slice(milfutlevel.lastIndexOf(' '),milfutlevel.indexOf(')'));
milfutlevelno=parseInt(milfutlevel);
red=[0,0,2,2,2,6,6,6,6,6,14,14,14,14,14+2*milfutlevelno];
return red[milresearches];
},
}
alert(reduction.sea()+' '+reduction.mil());
sorry but i'm not a good programmer, you can write a better code... |
![]() ![]() |
Barrack and Shipyard costs (per units) not include reduction ??! |
![]() ![]() |
no. look this screenshoot:
in a city i have only one ram ship and the upkeep is 40, without considering reduction of researches |
![]() ![]() |
Could you explain me your functions : is it percentage of reduction ? Are you author of this source-code ? |
![]() ![]() |
I still get "?" even after I go to the barracks and/or shipyard. Any ideas? |
![]() ![]() |
@ oliezekat yes i wrote that code and you could use it. the 2 functions will work in the overview reserach page (there is the link in the first table of your script) where are listed all researches.
i hope you have understood what i wrote, i'm not very good in english... |
![]() ![]() |
I get only question marks. Even when I update barracks or shipyard. |
![]() ![]() |
thank matteo :) @patibar & rowdy: change your scripts order if another scripts modify these pages ;) |
![]() ![]() |
Changing order didn't seem to change it, but, all seemed to fix itself after I deleted the script and re-installed it. I re-populated the data from each of my towns and all is well. |
![]() ![]() |
yeah just delete all your script and re-install ikariam empire board and voila it works ^^ |
![]() ![]() |
Now, after deleting all my scripts, re-opening firefox and installing version 182 I see no "?" but I see "-" in upkeep column. Any idea how to make it work? PS> Thx for putting some polish translations. |
![]() ![]() |
I feel your Firefox had kept old version 180 into its cache database. Notice "upgrade" red link display by Empire Board prevent Firefox's cache instead "install" button on Userscripts ;) |
![]() ![]() |
Hej, it unblocked itself suddenly when I produced some army.
thank you. |
![]() ![]() |
Fine :o) You could "Favorite this script" and become "Fan" now ?! :Op |
![]() ![]() |
I am the biggest fan of it! :D (now officially) |
![]() ![]() |
NICE! I figured it out. Just to sum it up for people with the same problem. -Have to uninstall all your scripts. Reinstall Empire board (5 star script btw ;) -build a few spearmen or something in your barracks, and build a ship in the shipyard. Boom. Done! |
![]() ![]() |
You don't need to build something ; just display barrack/shipyard one time ;o) |
![]() ![]() |
Does the upkeep represent the cost per day? |
![]() ![]() |
yes, but don't include upkeep of units which travelling ;o) |

