[GS] Simple City Builder game script

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

Well, no idea.
You'd better provide more detailed description, if you want some solution.
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Re: [GS] Simple City Builder game script

Post by Gigigonzalez »

Honza_ wrote:Well, no idea.
You'd better provide more detailed description, if you want some solution.
I will, ill try experimenting a bit more before I do though. Thanks.

I think i fixed it after increasing storage to 40 from default and put all decays on 1

Not sure what the optimum values are or what they exactly do, i got an idea though.
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

There are no optimal values, you can choose what you want.

I don't really know, what you did or what exactly is unwanted behaviour. Best would be if you'd post script settings and savegame.
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

Note for all generous translators:

I finally enabled global translations in openttdcoop Wb translator. You can start uploading your translation here

https://translator.openttdcoop.org/proj ... builder-gs

If it does not let you, you will probably need to sign up as traslator here

https://translator.openttdcoop.org/
krinn
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 29 Dec 2010 19:36

Re: [GS] Simple City Builder game script

Post by krinn »

Sorry, for whatever reason, translator is sick, here's the file that should overwrite fr_FR one.
in english.txt
STR_TOWN_POPLIMIT_INFO
(Correct) STR_TOWN_POPLIMIT_INFO :{YELLOW}{TOWN} {BLACK}has too high population to be claimed. Maximum population allowed is {YELLOW}{COMMA}
Attachments
fr_FR.txt
(7.48 KiB) Downloaded 183 times
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

Hi, thanks for the fix.

Translator seems quite fine. I have learned it only yesterday, and it's quite easy. Just sign up as translator in your language and upload language file. It will then check the file and accept it or tell you what needs to be edited.

For me as a developer of the script is easier and wanted way to include languages only via translator, as it will tell me if the file syntax is OK.

Just from the brief look at your file, I see a problem. {STRING2} pattern cannot be in translate file.

If you manage to work with translator I will gladly add beautiful french language into my scipt.
krinn
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 29 Dec 2010 19:36

Re: [GS] Simple City Builder game script

Post by krinn »

Honza_ wrote:Just sign up as translator in your language and upload language file. It will then check the file and accept it or tell you what needs to be edited
That is part of the disease, it doesn't grant me access to upload it.
for the story: i start it, fix some strings, than it kept bugging on a string to a point i get bore and download the english.txt file, but i couldn't upload the result (access denied), so the result is in my previous post.
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

What do you mean?

The french translation is in repository thanks to you, so you did upload it.

You can't of course upload base english.txt, but why would you do that? If I don't count mispellings in english, the file format is correct.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [GS] Simple City Builder game script

Post by planetmaker »

krinn wrote:
Honza_ wrote:Just sign up as translator in your language and upload language file. It will then check the file and accept it or tell you what needs to be edited
That is part of the disease, it doesn't grant me access to upload it.
for the story: i start it, fix some strings, than it kept bugging on a string to a point i get bore and download the english.txt file, but i couldn't upload the result (access denied), so the result is in my previous post.
Translators of course have no right to change the base language file. That's only up to the project developers.

IIRC, no-one can use the translation service in order to upload a whole language file. The eints translation service validates each string for syntactical correctness and keeps a record of what was changed during the day since the last translation commit and presents you always with the latest translation (if any). Upload of complete language files would circumvent many of the checks and introduce a lot of potential bear traps; it is a web translator.
krinn
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 29 Dec 2010 19:36

Re: [GS] Simple City Builder game script

Post by krinn »

Honza_ wrote:What do you mean?

The french translation is in repository thanks to you, so you did upload it.

You can't of course upload base english.txt, but why would you do that? If I don't count mispellings in english, the file format is correct.
I didn't touch the english.txt, i have start using the webtranslator to translate in french, at a point, translator keep bugging on an entry. Once bore after x trys, i download the english.txt and translate this one.
I then try upload the fr_FR.txt (the full translate file) but i'm not allow.

So just check french you will see that only 26 are correct, that's where i drop my attempts.
If you don't upload the file i gave you upper, french will remain unfinish. (sorry i forget it, but STRING2 is STRING in trasnlate file, something you should fix before uploading it).
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [GS] Simple City Builder game script

Post by planetmaker »

krinn wrote:...at a point, translator keep bugging on an entry...

If you don't upload the file i gave you upper, french will remain unfinish. (sorry i forget it, but STRING2 is STRING in trasnlate file, something you should fix before uploading it).
And stuff like this, that's exactly why you should use the web translator. It makes sure that the language files are and remain syntactically correct.

I know, such situation is frustrating. However, at current you just complain about "doesn't work" without giving constructive feedback on what didn't work - thus there's nothing which anyone can learn from, less improve. Nor tell whether it's an error you made or a bug in the translator or in its documentation. Honestly, if you encounter such problems, I would have hoped from you for a more substantial complaint and report than"doesn't work and now eat this" - especially as you're a developer yourself.
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

Planetmaker is right. If you posted what the problem exactly was, me or anyone could fix it.

I played with translator a bit and I got this error

Code: Select all

Error: 404 Not Found

Sorry, the requested URL 'http://translator.openttdcoop.org, translator.openttdcoop.org/string/citybuilder-gs/fr_FR/STR_GAME_LENGTH' caused an error:
String cannot be translated, its base language version is incorrect
Is that the same as you got?


I searched a bit and it does that for all strings using plural {P "" s}. I guess the translator requires some pragma in language header. I'll try to check that at evening to see, if this solves that issue.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [GS] Simple City Builder game script

Post by planetmaker »

Stabbing a bit in the dark: is it always {NUM} but not with {COMMA}?
krinn
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 29 Dec 2010 19:36

Re: [GS] Simple City Builder game script

Post by krinn »

planetmaker wrote: I know, such situation is frustrating. However, at current you just complain about "doesn't work" without giving constructive feedback on what didn't work - thus there's nothing which anyone can learn from, less improve. Nor tell whether it's an error you made or a bug in the translator or in its documentation. Honestly, if you encounter such problems, I would have hoped from you for a more substantial complaint and report than"doesn't work and now eat this" - especially as you're a developer yourself.
No i got kindof error database error... an http error so, something with the design or the server workload. I made some attempts and got bore as it is kind of bug that should autofix itself if you wait or need a real deeper code review to fix it.
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

Adding plural pragma to english base file helped to remove the error I mentioned.

Maybe it will solve it for french too. I uploaded the file you posted here to repo, but please check it there.
User avatar
TechNoir
Engineer
Engineer
Posts: 2
Joined: 10 Jan 2015 17:54

Re: [GS] Simple City Builder game script

Post by TechNoir »

Greetings there

I translated into Polish and I want to test it however i have problem. How to add this translation into the scrypt? Where should I place this language file to check if everythng is fine?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [GS] Simple City Builder game script

Post by planetmaker »

TechNoir wrote:Greetings there

I translated into Polish and I want to test it however i have problem. How to add this translation into the scrypt? Where should I place this language file to check if everythng is fine?
It's done via the web translator of the DevZone.

You apply as translator here: http://dev.openttdcoop.org/projects/home and after confirmation you can go to https://translator.openttdcoop.org/proj ... builder-gs and start translating. It automatically does check input for correctness.

Translations are committed once a day and you can download the current state of the repository of the script from https://hg.openttdcoop.org/citybuilder-gs as a zip. unzip that download into a separate dir in your OpenTTD's 'game' directory and you can test the complete GS.
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

TechNoir, find the script in your OpenTTD folder and add the translated file into its lang folder.
User avatar
TechNoir
Engineer
Engineer
Posts: 2
Joined: 10 Jan 2015 17:54

Re: [GS] Simple City Builder game script

Post by TechNoir »

Ok thank you I managed :)
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

New version released.
See first post.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 3 guests