Simple Ikariam Town Resources Board

By SiCoTiC Last update Apr 13, 2013 — Installed 148,728 times.

1.070+ bug reports - CLOSED

Subscribe to 1.070+ bug reports - CLOSED 159 posts, 21 voices

SiCoTiC Script's Author

remove the script completely and re-install, that appears to be an issue from a long time ago due to imcompatabilities.
info here:

i havent had anyone elses troops in any of my towns for a while, so i dont know what the table looks like at that point.
It's definitely something i need to look into.

At this moment there is a more pressing issue todo with ikariam's js disabling tabs that for some reason is fixable in the console but not in script... no idea why.

goegae User

Thank you SiCoTiC, it worked :-)

SiCoTiC Script's Author

Also @SVSV
The parse of the army page doesnt work like that, i know what each cell in each table represents on my page, so i can pull out both localization data and values from the same page. When you are occupied or when you have friendly troops in your town this page may change and break the way i parse it.

Until i can see the HTML of the table with either/both situations true, i cannot actually fix it as i drilled down as far as i could with ID's.

feel free to copy the html from the army popup and send me that in a PM enclosed in pre tags (without spaces)

< pre> </ pre>

MickM User

I'm having a display issue in 1.071 with my wine towns not showing the green "infinity" symbol anymore.
I think the problem is line 912: "incRes" should be changed to "inc"

Also I would find it helpful for the time until wine runs out to be expressed in days rather than hours. For example, 3.8D is easier to understand for me than 91.2hrs. It would be really great to express it in hours if less than 48 hours remain, otherwise express it in days.

Things are shaping up well, though. Keep up the good work!

starkwiz User

I have issue with the wine consumption display in Resources Overview tab.
521,602 -
+1,503 -345 NaNhrs
What is NaNhrs ? this appears only for one of the wine towns, others look fine.

SiCoTiC Script's Author

I'll add a function to format the date and I'll correct that oversight :D

NaN = Not a Number.
inc+con = 1158 (incRes +con = 0.4175 +(-345)= -344.5825) *bug from post above you* Should be infinity but its not due to that bug.
hrs = cur/con = 521602/-345 = -1151.8 It should currently show this but it doesnt ...
FormatNumToStr(Math.round((hrs) * 10) / 10, false) throws NaN at me when i sub in your numbers and throw in a few random decimal places to 'un-round' your numbers.

var testVar = Math.round((521602.054684/-345.000002485) * 10) / 10;
console.log('Rounded: '+testVar);
console.log('Formatted: '+FormatNumToStr(testVar, false));
Rounded: -1511.9
Formatted: NaN

So, one bug found another bug in a function i HATE looking at :D aparently you cant subtract a string from 0 :D :D must have been asleep when i wrote that :P


SiCoTiC Script's Author

Considering what i was trying to do with the rest of the script, the check for updates slightly too obvious, im sorry, i'll sort that out and make it a little more discreet soon-ish

I guess you wont even get to see it till then anyway :D



i hate the codes here :)

starkwiz User

Hi SiCoTiC,

Thank you very much for the quick fix. The new version is looking awesome.
I noticed the extra options in settings tab.
I would like to suggest that the "Show on top" option should be enabled by default.

I had this issue which I didn't bother to report.
The board was stuck behind the top menu bar(where you see the highscore etc options.) And I couldnt move it from there.
Today, luckily I was able to find a very little gap where I had a focus on the board instead of the menu bar.
I dragged it from there and enabled the "show on top" option, which prevents it from hiding behind any object.
Thanks for this fix too.

MickM User

In 1.073, the newly added city research is incorrect. I don't think it's taking into account the effects of researches (such as paper, ink, mechanical pen, and the scientific futures) and form of government (such as technocracy). For example, I have technocracy and scientific future 5. According to my town center, my capital city has 122 scientists, costing 488 gold (4 per scientist) and producing 158 research points per hour (1.29 research points per scientist, rounded up). The number displayed on the table is 162 (488/3, rounded down).

Morph/Morphias User

In 1.073, the city research is now taking my total scientists and dividing them by 2.

In towns I have 212 scientists - the city research is showing 106 - My academy shows 258
In towns I have 198 scientists - the city research is showing 99 - My academy shows 241

Then again what MickM said it is not taking governments into effect as those numbers are my Scientists cost / 6

I have the Democracy government that adds +1 research point for every CT that I have with other members

Most government effects are not shown in the individual academies - They affect the grand total research points display

Technocracy formula: ( research points + research additions ) x 1.05 = total research points per hour. This number is seen only on the research adviser screen.

Democracy formula: ( research points + research additions ) + ( Total CT's from the museums ) = total research points per hour. This number is seen only on the research adviser screen.

The researches that give 3% / 5% corruption do affect the Academy displays, as some of these corruptions affect all towns and some affect only your colonies.

SiCoTiC Script's Author

I did that at about 4:30am, yes its wrong :D

But its kinda correct... its the number of scientists actually, but in your case, not quite :D.

i remember thinking that i'd write the parse for the gov type etc but got hung up on something else and forgot

Its a bit more code to parse some more info and then

cost = 6 - (3 + (-1) ) =  // Paper chute & govType == Technocracy
Scientists = TotalCost/cost = 488/4 = 122
researchMod 1 + 0.02 + 0.04 + 0.08 + 0.02*(5) + 0.05 = 1.29 // paper + ink + pen + futures + gov
research = scientists * researchMod = 122*1.29=157.38

Its beacause you havent visited the research view and parsed in your researches, it needs each of the research areas in the subsequent left menu to be clicked so the content pops up, im working on a notification of such.

Current research count is actually ScienceCost/ScientistCost, and doesnt take into account government, I'll fix this up today before the GW2 Beta this evening.

Also, i think i should add some kind of note to update cirtain things on the board, would make this blind taste test so to speak, just a little bit easier :)

Looking at it now, thanks.
Fixed - even if i dont finish up before GW2 i'll upload this change

research issue also fixed up and uploaded

New tooltips arent broken like mine were *stomps on flashy tip bug* and are a lot more flexible, they arent styled properly yet, only had time to do a quick pass.

Toasts are new, same again with the styling as i borrowed the css and base code from elsewhere.

Have fun over the weekend folks ;)

Morph/Morphias User

Ok with new update and me going through each research - fixed most everything I had mentioned

My individual research points per city is off by +1 -- when my Academy shows 241 - the script shows 242 (are you rounding up when you should be rounding down on those decimal [fractional amounts]) -- I just realize it is showing as a -242 instead of 241 as my academy shows.

My Grand total on bottom bar is correct, including my Democracy governmental effect

SiCoTiC Script's Author

Total is actually pulled from the research page so its 100% correct, i left it like this due to government type etc. It may never actually be neccesary to calculate that.

I also saw that they were mostly out by 1 after i uploaded tonight, doing the calcs manualy it seems that ikariam prob truncates the decimal on display but seemingly it is added the total, i'll check it out.
Note: Math.floor(-256.99) = 257 wheras Math.floor(256.99) = 256, so theres the extra 1. Fixed that random -ve, may add 1 decimal place and rounding to be a bit more accurate to total if ikariam doesn't trunc for total.

Currently the only pages that the board looks at are: CityMilitary (left menu), research advisor (all 4 views), finances, Palace (for govt type) and the main city view.

BTW, if anyone wants/needs more data/features putting into the board you have to just ask for it as i dont use half of whats in it already :D

edy101edy User

Hi, don't know why there is a blank spot on the building overview specifically for a building made on the upper right hand portion of the town map for all the towns. This problem only occurs on the new server (RHO us.ikariam) but works fine on my game from an old server. I have reinstalled and installed the script and cleared all cache.

Hope you could also include safe resources, incoming resources and total resources.

Thanks for the nice script.

Cherry Scriptwright

I have founded new city.
This is also shown in the table.

Now I have cleared the city.
It is still available in the overview.

SiCoTiC Script's Author

ok, will fix that tomorrow.

Im not quite sure what you mean by upper right hand side, if its a new server is this something to do with beaurocracy and the extra building spot?

Safe resources is something i'll look at i the coming week.

MickM User

There's an error that's messing up the research calculation for me.
In lines 1038 and 1045, "technocracie" should be "technokratie"

I ran across another error in line 271: "ArmySuppy" should be "ArmySupply"

SiCoTiC Script's Author

late night and or rushed coding strikes again :(
Thanks, i'll fix that up.

I've worked out the issue, just adding a fix

Jardell User

The red exclamation mark with text "Research needs updating" i have been watching each research area but the status wont change. Also the column on the left with plus sign (+) as a header, it is empty, I guess it should tell how much people is coming in ?

Jardell User

The red exclamation mark with text "Research needs updating", went a way by clicking the first view which is open by default, (seafaring ?) So you need to go and select it once, even it is open.

SiCoTiC Script's Author

I believe this could be todo with serverside latency, i will investigate.
The column you mention has no data yet

Im currently conducting quite a big overhaul of the resource table dynamic rendering as it was prety horrible, next update wont be for a few days.

Jardell User

OK, no probs, As the script is going fine even as it is :D
And I'm currently running on weeeryyy slooow PC, if that makes any difference.

SiCoTiC Script's Author

Someone asked for an image of a fully working board.

This is a pic of the next release complete with working shipping statuses (2 cells above the tooltip), shipping has full tooltips showing shipping times etc, theres a fair few other tooltips added also.

As you can tell, i borrowed most of the colour/layout scheme from oliezekat's empire board (because thats what i used), which as awesome as it is, is no longer in development.

starkwiz User

Hi SiCoTiC,

I found few bugs in my new 10th town:
1. While the constructing Governor's Residence for first time, it is showing NaN¬ĽNaN under GR/Palace column.
2. It is showing "Infinity h" for the new town in the place where it shows current consumption/production of wine in the table.
The new town is on wine island. I have built tavern but its not set to consume wine nor I have assigned any workers for the vineyard.
But when I assign workers it shows the infinity symbol correctly.

Also, I think you are doing really awesome with this script and Oliezkat will be happy with it. It's good that you are following his script.