Greasy Fork is available in English.

Empire Overview

Script for Ikariam 0.7.x, Overview tables for resources, buildings and military inspired by Ikariam Empire Board

< Feedback on Empire Overview

Question/comment

e41
§
Posted: 2017-02-11

Recommendations

Hallo,
Thanks, Germano, for continuing the development.
I want to suggest some things, in case you would like to implement them in the code of this very useful script.
1. The Greek language should be impoved and corrected (I can help on that, as I am a native speaker).
2. When the script calculates the end time the display is a bit treaky while it produces a format like this:
Tue Feb 14, 9:08:15 π.μ.
This format has nothing to do either with the default format of my local settings or the format of the server where I login.
My suggestion is to provide a default format and if someone wants to change it, he could do it from settings. I would like to use for example: Weekdayname, Monthdaynum suffix MonthinGenitive Fullyear. The strftime rules don't support the genitive format.
Also regarding the date format, it would be nice if the end date is today or tomorrow to inform the user like:
Today at 10:00:11.
3. The names of the building receive their tooltip for the name the server give them. As long as we have choosen a different language than the one the server uses, the table of the script will use two different languages.
4. The building settings section would be better if it has radio buttons instead of checkboxs.
5. The toast text in most cases is not yet translated.
6. The expenses column in the Troops tab is always full of zeros, does this counts anything?
7. When the script counts the duration that sth needs to finish, it would be nice if it could also count months.
8. When the warehouses and dumps are completely full, the counters on the table continue to count. It would be nice if the counter stopped counting and probably stop the production.
That's all I have in mind for now.
If in any case I am not clear enough, don't hesitate to ask.
Thanks again!
:-)

germanoAuthor
§
Posted: 2017-02-12

Hi panos78,

Thank you for your suggestions and I apologize for my bad english.

To 1.) You may like to make translation proposals, which I would then paste.

To 2.) I look times. Chrome is probably something special

To 3.) jo, I have thought this also to change as with the military units

To 4.) will also come, because it also annoys me a bit: D, just like other queries

To 5.) sorry missing translation, gladly make suggestions for a translation

To 6.) is on the toDo list, but at the moment not primarily

To 7.) here I do not know exactly how you mean that. An example would be good or Screen

To 8.) here I do not know exactly how you mean that. An example would be good or Screen

Note: At the moment, I just have little time. The primary goal is once again to make EO work for the FF. Some test looked good, but then did not run under Chrome.

e41
§
Posted: 2017-02-13

1. I will translate the currect untranslated and mistranslated string and send them to you.
7. I.e.: when the duration is 35d 3h 20m, it can become 1M 5d 3h 20m. Instead of 35d we can have 1M 5d. That's what I mean with counting months.
8. I.e: when the full capacity of a town 1442500 material units and is completely full, the counter continues to count (see image).

e41
§
Posted: 2017-02-13

I just updated the translation for Greek.

§
Posted: 2017-02-16

7. I don't mind that the counter just has days, not months
8. This is a good suggestion. It annoys me when the table shows more resources than is possible because of the warehouse maximum.

germanoAuthor
§
Posted: 2017-02-17

to 7. I look times, which I can change there
to 8. the feature will not be available in the next version, or I fixe the problems. It makes problems in the FF.

germanoAuthor
§
Posted: 2017-02-22

Hello panos78,
Can you translate the text for the buildings? The other translation I have already taken over.

germanoAuthor
§
Posted: 2017-02-22

8. I.e: when the full capacity of a town 1442500 material units and is completely full, the counter continues to count (see image).

Sorry, I had misunderstood it. I'll see if I can teach the counter this stops him :smile

germanoAuthor
§
Posted: 2017-02-22

7. I.e.: when the duration is 35d 3h 20m, it can become 1M 5d 3h 20m. Instead of 35d we can have 1M 5d. That's what I mean with counting months.
.

Do you have an example? With me everything is actually displayed correctly

e41
§
Posted: 2017-02-22

In the attached file you will find the translated names of the buildings in Greek.
For your last comment, the format 1M 5d 3h 20m will be displayed when and if you add the "month" the format (M is for month) because 35d equals to 1M 5d.
:)

germanoAuthor
§
Posted: 2017-02-22

Thanks for the translation, is for the building tooltips.

Do you mean this? (Screen)

e41
§
Posted: 2017-02-22

If "T" means days yes.
It can become 1M 12T (meaning 1Month 12days)
:smile:

germanoAuthor
§
Posted: 2017-02-27

I'll look next day. Want to pack something more in the update

e41
§
Posted: 2017-03-02

To help you out a bit, to add the month division in the duration you can change the code:
FormatTimeLengthToStr : function(timeString, precision, spacer) {
var lang = database.settings.languageChange.value;
timeString = timeString || 0;
precision = precision || 2;
spacer = spacer || " ";
if(!isFinite(timeString)) {
return ' \u221E ';
}
if(timeString < 0) timeString *= -1;
var factors = [];
var locStr = [];
factors.day = 86400;
factors.hour = 3600;
factors.minute = 60;
factors.second = 1;
locStr.day = Constant.LanguageData[lang].day;
locStr.hour = Constant.LanguageData[lang].hour;
locStr.minute = Constant.LanguageData[lang].minute;
locStr.second = Constant.LanguageData[lang].second;
timeString = Math.ceil(timeString / 1000);
var retString = "";
for(var fact in factors) {
var timeInSecs = Math.floor(timeString / factors[fact]);
if(isNaN(timeInSecs)) {
return retString;
}
if(precision > 0 && (timeInSecs > 0 || retString !== "")) {
timeString = timeString - timeInSecs * factors[fact];
if(retString !== "") {
retString += spacer;
}
retString += timeInSecs + locStr[fact];
precision--;
}
}
return retString;
},

to

FormatTimeLengthToStr : function(timeString, precision, spacer) {
var lang = database.settings.languageChange.value;
timeString = timeString || 0;
precision = precision || 2;
spacer = spacer || ' ';
if(!isFinite(timeString)) {
return ' \u221E ';
}
var factors = [];
var locStr = [];
factors.year = 31536000;
factors.month = 2520000;
factors.day = 86400;
factors.hour = 3600;
factors.minute = 60;
factors.second = 1;
locStr.year = Constant.LanguageData[lang].year;
locStr.month = Constant.LanguageData[lang].month;
locStr.day = Constant.LanguageData[lang].day;
locStr.hour = Constant.LanguageData[lang].hour;
locStr.minute = Constant.LanguageData[lang].minute;
locStr.second = Constant.LanguageData[lang].second;
timeString = Math.ceil(Math.abs(timeString) / 1000);
var retString = "";
for(var fact in factors) {
var timeInSecs = Math.floor(timeString / factors[fact]);
if(isNaN(timeInSecs)) {
return retString;
}
if(precision > 0 && (timeInSecs > 0 || retString != "")) {
timeString = timeString - timeInSecs * factors[fact];
if(retString != "") {
retString += spacer;
}
retString += timeInSecs==0 ? '' : timeInSecs + locStr[fact];
precision = timeInSecs==0 ? precision : (precision-1);
}
}
return retString;
},

:smile:

e41
§
Posted: 2017-03-02

Also for the check updates toaster you can change this code:

CheckForUpdates: function(forced) {
var lang = database.settings.languageChange.value;
if((forced) || ((database.getGlobalData.LastUpdateCheck + 86400000 <= $.now()) && database.settings.autoUpdates.value))
{
try {
GM_xmlhttpRequest({
method : 'GET',
url : 'https://greasyfork.org/scripts/' + empire.scriptId + '-empire-overview/code/Empire_Overview.meta.js', // + $.now(),
headers: {'Cache-Control': 'no-cache'},
onload : function(resp) {
var remote_version, rt;
rt = resp.responseText;
database.getGlobalData.LastUpdateCheck = $.now();
remote_version = parseFloat(/@version\s*(.*?)\s*$/m.exec(rt)[1]);
if(empire.version != -1) {
if(remote_version > empire.version) {
if(confirm(Constant.LanguageData[lang].alert_update + empire.scriptName + '". \n' + Constant.LanguageData[lang].alert_update1)) {
GM_openInTab('https://greasyfork.org/scripts/' + empire.scriptId + '-empire-overview');
}
} else if(forced)
render.toast(Constant.LanguageData[lang].alert_noUpdate + empire.scriptName + '".');
}
database.getGlobalData.latestVersion = remote_version;
}
});
} catch(err) {
if(forced)
render.toast(Constant.LanguageData[lang].alert_error +'\n' + err);
}
}
},

to

CheckForUpdates: function(forced) {
var lang = database.settings.languageChange.value;
if((forced) || ((database.getGlobalData.LastUpdateCheck + 86400000 <= $.now()) && database.settings.autoUpdates.value))
{
try {
GM_xmlhttpRequest({
method : 'GET',
url : 'https://greasyfork.org/scripts/' + empire.scriptId + '-empire-overview/code/Empire_Overview.meta.js', // + $.now(),
headers: {'Cache-Control': 'no-cache'},
onload : function(resp) {
var remote_version, rt;
rt = resp.responseText;
database.getGlobalData.LastUpdateCheck = $.now();
remote_version = parseFloat(/@version\s*(.*?)\s*$/m.exec(rt)[1]);
if(empire.version != -1) {
if(remote_version > empire.version) {
if(confirm(Utils.format(Constant.LanguageData[lang].alert_update,[empire.scriptName]))) {
GM_openInTab('https://greasyfork.org/scripts/' + empire.scriptId + '-empire-overview');
}
} else if(forced)
render.toast(Utils.format(Constant.LanguageData[lang].alert_noUpdate,[empire.scriptName]));
}
database.getGlobalData.latestVersion = remote_version;
}
});
} catch(err) {
if(forced)
render.toast(Constant.LanguageData[lang].alert_error +'\n' + err);
}
}
},

:smiley:

Post reply

Sign in to post a reply.