Page 2 of 3

Re: Awards GS

Posted: 26 Mar 2014 22:02
by Zuu
krinn wrote:Zuu speak about that too, i use it myself to update Zuu script language file, but i wasn't sure anyone have interest in that (with my script i mean).
I will look into adding that.

edit: Add it thru eints, there : https://translator.openttdcoop.org/project/gs-awards
Great!

However, some of your native strings show up as "invalid". When trying to translate any of those the web translator throws an fatal error on you. The invalid strings are shown at the bottom of this page:
https://translator.openttdcoop.org/tran ... ards/en_GB

If you want to make it more translator-friendly, try to move your OPT-strings out of the translation system and put these configuration options elsewhere so that a translator do not need to go through everyone of these empty strings that don't need any translation.

Re: Awards GS

Posted: 27 Mar 2014 00:13
by planetmaker
You should try to add the proper and required plurals definition to the lang files. It might fix all the validation errors.

Re: Awards GS

Posted: 05 Aug 2014 09:30
by Mtlbss
Hi, thanks a lot for this funy script, I put it on my server, I played it, and we like it too much really good job....^^
I use it too when my scenario script is bugged, bcse awards script work even on bugged scenario, that is really good bcse sometimes i passe long momment to create a scenario, then i can played it no more when some script is bugged, but with this one that can work once more, only a bug appear in the console but not kill the game the famous "dbg: [misc] String too long for destination buffer" i'm not reporting this bug bcse it's my fault and that's not really important game work good with it thx thx thx^^

Re: Awards GS

Posted: 05 Aug 2014 14:08
by krinn
Thank you for the message, always a pleasure to see someone happy using it.
I'll update to a new version this week to add latest language files update (nothing really new).

Re: Awards GS

Posted: 06 Aug 2014 07:33
by krinn
Ok added version 3 with some langages update and new languages (wow, good work translators!)
It actually fix a bug that prevent periodicmonth settings to work.

Re: Awards GS

Posted: 06 Aug 2014 08:38
by te_lanus
Thanx. Will test it a bt tonight

Re: Awards GS

Posted: 08 Aug 2014 11:18
by te_lanus
Found a bug

It runs up to 2kx2k but I tried it at 4kx2k (and 2kx4k) it crashes with an error (didn't get time to test 4kx4k)

PS. Tested with 4kx4k and same crash happens

Re: Awards GS

Posted: 09 Aug 2014 14:15
by krinn
Found the reason, script is running too early and start checking awards while no company exists yet.
I'm thinking of way howto solve that (wait for map generation to end, check if any company exists before starting...)

Thanks for reporting that ;)

Re: Awards GS

Posted: 12 Aug 2014 11:41
by te_lanus
Hi

Tested the new one, and couldn't reproduce the crash.

But I found this: seems it's not "save friendly". I get that on the reward page's text seems to get "doubled" upon saving and loading (see screenshot)

Re: Awards GS

Posted: 12 Aug 2014 13:43
by krinn
When saved, companies record where awards are in their own pages, that's something i've done to fix this times ago (because openttd always record the company page infos and restore them itself when loading, so you must rewrite what was done to fix it).
So this time, i really don't know how it could happen without the savegame, as i'm unable to reproduce it when i save/load a game here.

Re: Awards GS

Posted: 12 Aug 2014 15:33
by te_lanus
Here is a small savegame that also display the error

Re: Awards GS

Posted: 12 Aug 2014 16:04
by Zuu
FYI: Using GSStoryPageList (added shortly before 1.4 was branched off), it is now possible to choose to upon load delete all pages and re-build the book if you wish to take that path.

Re: Awards GS

Posted: 13 Aug 2014 13:53
by krinn
Thank you Zuu, going to look at it and see if i can do something with that :)
te_lanus: thx for the savegame, will see if i can find the cause.

Re: Awards GS

Posted: 13 Aug 2014 15:50
by krinn
Ok te_lanus found out what is was :
When running without the "HiddenAwards" option, the game when loading re-display all awards. I have indeed record the awards element position in the savegame, just that i didn't catch that when the option is turn off, the awards were display before i have loaded their position.
So browsing thru page, my script found out it must display an award and no element exists (erf didn't load the datas with element value at that time) for it, display it and record where it is display.

The good news : so it is fixed and it should stop creating awards again and again but update the ones that are already shown. The problem is that it will not remove any and just update the latest ones in the savegame. It mean i'm sorry your savegame will stay as-is, no new awards will be create when loading, but old unused ones will stay and will not be update.
Zuu suggestion can help, i could remove all elements and clean up all pages, but i will lost medals info as well. That's something i cannot do, because i record medals owner, as if a company own a medal, even if the company collapse the medal has been own and cannot be own again and the display will never get update to keep the medal own, it allow also the game running with hidden awards to not display the award to a company create after it has been found by someone else.
So i just prefer keep like i made it and newer game won't (shouldn't) get affected. But it mean yours will stay corrupt.
I will look at one more stuff i need to change and release the v4 with the fixes for the errors you've found.
Thank you for trying and reporting them. Here's a new v4 with both fixes in it.

Re: Awards GS

Posted: 13 Aug 2014 18:46
by te_lanus
Thanx krinn

Just tested it with a quick game and seems the problem has been fixed

Re: Awards GS

Posted: 13 Aug 2014 19:04
by krinn
Thank you, i have update awards to disable date display (thanks Zuu for API update!), will push the v4 update with a few more awards (i plan to add 2-3 more).

Re: Awards GS

Posted: 22 Aug 2014 16:28
by J0anJosep
This string doesn't sound good to me:
str_news.png
str_news.png (42.98 KiB) Viewed 6009 times
Instead of a normal space between number and points you can use the {NBSP} (non-breaking space) to make it look better. That is just a suggestion, but not a problem.
As for the other things I marked, I am not a native speaker to help you on those.

Anyway, there are three (invalid) strings that contain CROSS, RIGHT_ARROW and CHECKMARK commands. I wouldn't use them, as they are strongly GUI related.

Re: Awards GS

Posted: 22 Aug 2014 17:01
by krinn
Juanjo wrote:This string doesn't sound good to me:
str_news.png
Instead of a normal space between number and points you can use the {NBSP} (non-breaking space) to make it look better. That is just a suggestion, but not a problem.
As for the other things I marked, I am not a native speaker to help you on those.

Anyway, there are three (invalid) strings that contain CROSS, RIGHT_ARROW and CHECKMARK commands. I wouldn't use them, as they are strongly GUI related.

I know for the invalid strings but they are not invalid : http://hg.openttd.org/openttd/trunk.hg/ ... bles.h#l39 they are just dislike by the translator, but the script is not made for the translator but for openttd, so as long as openttd is happy with it. I know some newGRF may change that, but a newGRF that would change a checkmark sign with a cat would be the one that is making mistake. They are CROSS, RIGHT_ARROW... so any newGRF should replace them with CROSS, RIGHT_ARROW... but not something unreleated to their GUI nature.

But you can adapt to your language any changes you wish, i'm not really picky with that, if you add {NBSP} ... in your own language file, fine for me, as long as other speakers of that language doesn't complain. You can even alter the CROSS... stuff with something different. As long as the file remain "valid" for openttd (because an invalid spanish.txt would prevent the script to load for any users, even not spanish ones) and that nobody complains about your changes (do not change them all, only in your own native language). Really fine for me! I will keep them and next release your default language will display your changes. Any language i don't handle myself, i'm not looking if anything is right or wrong or any changes in them, still as long as openttd is able to start the script).
The only changes i have made to someone translatation is : http://dev.openttdcoop.org/projects/gs- ... f504182c6f

for the "has gain" trouble, i'm also not english speaker, and i made that english.txt, so it might be an error, but if i wrote it like that it's because i was thinking it was right. So i'm not really able to fix it, english or better english speaker could tell.

And thank you for your efforts at translating the script Juanjo and other translators. I appreciate it.

Re: Awards GS

Posted: 22 Aug 2014 18:08
by J0anJosep
The developers of the translator tool only accepted these commands: http://bundles.openttdcoop.org/eints/ni ... g-commands

You can ask them to add CROSS and the others. In my opinion, these weren't accepted because they are related to GUI and better not to be used by scripts.

GS Awards and BigGUI:
biggui.png
biggui.png (25.27 KiB) Viewed 5992 times

Re: Awards GS

Posted: 01 Sep 2014 10:07
by krinn
Update awards to v5 with a new setting for BigGUI users to disable special signs output, merge latest language update and throw a warning if you use an openttd version with bug when handling list (only show in console).
Juanjo : the new setting can be change in game to fix older savegame, but it doesn't redraw all awards, so you must wait for it to propagate to all awards. And it will never be applied to medals already earn.