[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

Ozgarb
Engineer
Engineer
Posts: 4
Joined: 15 May 2014 13:57

Re: [GS] Simple City Builder game script

Post by Ozgarb »

Novapolis Citybuilder Client 1.2.3 is generate good map but its version is low :cry:. I could not find lates version.
tnx for help.
User avatar
dirace
Engineer
Engineer
Posts: 27
Joined: 29 Jan 2010 11:39

Re: [GS] Simple City Builder game script

Post by dirace »

unfortunately,I meet the same problem. in the newest version 2014.05.11, I pasted the simplifed_chinese.txt to lang folder, the GS crashed as you describe. but, the txt file works fine in the last version, it's strange.
do author fix this?

fabca2 wrote:Hello,
I translated this nice script into french.
I could not perform any test, once I place french.txt on lang folder I have a message telling me that STR_GLOBAL_GOAL_CB does not exist, which is wrong of course.

This is well known when translated file is not in UTF8 format (see for example http://www.tt-forums.net/viewtopic.php? ... e#p1069046)

But this is not the case, file is UTF8 encoded.
And even worth, if I just copy english.txt into whatever.txt without even opening the file, I got exactly the same message!

It looks strange to me, I suppose it's not a bug (I'm using stable 1.3.2) it's probably something I didn't understood...
That's a little bit frustrating, it's my first translation attempt, if someone can help me.
Thank you.

whatever, I attached the file, it may works for you ?
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

Ask the author of the translation to fix it.

Currently only english and czech are shipped with the script. If you want to add another language to it, no problem, send me working translation and I will add it in next release.
User avatar
dirace
Engineer
Engineer
Posts: 27
Joined: 29 Jan 2010 11:39

Re: [GS] Simple City Builder game script

Post by dirace »

Honza_ wrote:Ask the author of the translation to fix it.

Currently only english and czech are shipped with the script. If you want to add another language to it, no problem, send me working translation and I will add it in next release.
attachment is the simplified chinese txt. please test it.
Attachments
simplified_chinese.txt
(7.26 KiB) Downloaded 277 times
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

I said, give me working translation. Why did you post here a file that crashes script immediately after start? Can't you test that yourself?

Just from the look at the file, you have some basic trasnlation errors here. I recommend you to study how to properly translate certain OpenTTD string codes. You can use czech language file and compare it with english to see how some OpenTTD string codes should look like.

That's the same problem as with the french translation before.
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 »

You could make it easier for the translators (no downloads, integrated syntax check) and yourself (no syntactically wrong translations) by starting to use the web translator. Independent of that, a description of the lang file formats is found here
User avatar
dirace
Engineer
Engineer
Posts: 27
Joined: 29 Jan 2010 11:39

Re: [GS] Simple City Builder game script

Post by dirace »

Honza_ wrote:I said, give me working translation. Why did you post here a file that crashes script immediately after start? Can't you test that yourself?

Just from the look at the file, you have some basic trasnlation errors here. I recommend you to study how to properly translate certain OpenTTD string codes. You can use czech language file and compare it with english to see how some OpenTTD string codes should look like.

That's the same problem as with the french translation before.
In my last post, I have describe that the same txt work well in the last version of Simple City Builder GS, but crash in the newest 2014.5.11 version.
Since you assert that the the reason of error is the uncorrect form of Openttd string codes, I compare the czech language file and english file, at the same time, I checked the openttd starting log, I find more cues to show it's something wrong with the script or the origin lang file, maybe the cues can help you to fix the bug.
First, the openttd starting log show that there are some error for STRING define,
dbg: [script] english:126: error: Undefined command 'SKIP'
dbg: [script] english:126: error: Undefined command 'SKIP'
dbg: [script] english:46: error: Undefined command 'SKIP'
dbg: [script] english:46: error: Undefined command 'SKIP'
dbg: [script] czech:102: error: Undefined command 'SKIP'
dbg: [script] czech:46: error: Undefined command 'SKIP'
dbg: [script] czech:46: error: Undefined command 'SKIP'
dbg: [script] simplified_chinese:76: warning: STR_TOWNGUI: Param idx #1 'STRING'
doesn't match with template command 'STRING2'
dbg: [script] simplified_chinese:76: warning: STR_TOWNGUI: Param idx #2 'STRING'
doesn't match with template command 'STRING2'
dbg: [script] simplified_chinese:76: warning: STR_TOWNGUI: Param idx #3 'STRING'
doesn't match with template command 'STRING2'
dbg: [script] simplified_chinese:76: warning: STR_TOWNGUI: Param idx #4 'STRING'
doesn't match with template command 'STRING2'
dbg: [script] simplified_chinese:76: warning: STR_TOWNGUI: Param idx #5 'STRING'
doesn't match with template command 'STRING2'
dbg: [script] simplified_chinese:76: warning: STR_TOWNGUI: Param idx #6 'STRING'
doesn't match with template command 'STRING2'
dbg: [script] simplified_chinese:126: error: Undefined command 'SKIP'
dbg: [script] simplified_chinese:46: error: Undefined command 'SKIP'
dbg: [script] simplified_chinese:46: error: Undefined command 'SKIP'
dbg: [net] Map generation percentage complete: 95
dbg: [net] Map generated, starting game
Second, the different of czech lang file and english lang file is the section of
#dummy
STR_EMPTY0 :
STR_EMPTY1 :{SKIP}
STR_EMPTY2 :{STRING}{STRING}
STR_EMPTY3 :{STRING}{STRING}{STRING}
STR_PLUS :+
in the czech lang file ,this section is deleted, and this section is the reason cause the waring alarm in the openttd starting log. if I delete this section in simplified_chinese.txt, the txt lang file will work well. @fabca2,you can try this way in your french lang txt.
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

Hi, yes, the czech and english language file differs, because there are some trasnlation rules for secondary languages as you can read in link from planetmaker or another post before.

I do not see a problem in my script right now, it crashed, because your translation contained seomething, what should not be there.

I guess I will setup the web translator project to make translations easier, since there is some demand for it.
Thank to you , planetmaker, for your suggestion.
bolemeus
Engineer
Engineer
Posts: 3
Joined: 09 Jun 2014 00:29

Re: [GS] Simple City Builder game script

Post by bolemeus »

Hey Honza,

I love it that you guys took the effort to create this city builder mod. Great work. ;)

I've made a Dutch translation myself. Can you add it to the next release? Thanks.
Attachments
dutch.txt
dutch translation by Benne Otten
(6.75 KiB) Downloaded 251 times
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

Thanks, that is the first translation that looks ok.

As planetmaker suggested I registered this script at openttdcoop devzone, so if you want to add your translation to it, add it via that web.
It will check if it is correct, and if yes, it will ask me to include it in script, which I will of course do :-)

Some guide/info is here http://dev.openttdcoop.org/projects/hom ... agingEints

You need to sign up as translator and then select city builder gs project, from there it should be easy.
bolemeus
Engineer
Engineer
Posts: 3
Joined: 09 Jun 2014 00:29

Re: [GS] Simple City Builder game script

Post by bolemeus »

Hey Honza,

I registered an account at openttdcoop devzone, but I guess it's still pending.

Can't login yet, can't use the forgot my pass option, and I can't register again.

Anyway, when I receive a confirmation email that my account has been created I'll set up a translator account, so I can pass my translation to the validator and see if it validates. :p

If so I'll guess you'll receive notification. ;)
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 »

bolemeus wrote:Hey Honza,

I registered an account at openttdcoop devzone, but I guess it's still pending.

Can't login yet, can't use the forgot my pass option, and I can't register again.

Anyway, when I receive a confirmation email that my account has been created I'll set up a translator account, so I can pass my translation to the validator and see if it validates. :p

If so I'll guess you'll receive notification. ;)
Sorry, our mail server currently has some issues and is a bit slow. I activated your account manually. When the confirmation e-mail arrives you can thus ignore it.
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Re: [GS] Simple City Builder game script

Post by Gigigonzalez »

Hi seems like a great script.

Is there any documentation on the options?
Or some default values where i can base my tweaking on?
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Re: [GS] Simple City Builder game script

Post by Gigigonzalez »

And a request to be able to configure city behavior too would be great, and additional town/city grow speed multiplier,
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 »

Gigigonzalez wrote:And a request to be able to configure city behavior too would be great, and additional town/city grow speed multiplier,
I don't know whether it does or whether it can (but I think so, if not it's a very valid feature request): it could simply read and (re)use the city growth setting so that it maintains about the same functionality when using this script.
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

Hi,
Gigigonzalez, I'd add a request to read readme, settings description and playing some games with the script, please ;-)

That will give you answer to your question and you'll see there is setting to configure town growth, which is also dependant on the OpenTTD setting Town Growth speed.
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Re: [GS] Simple City Builder game script

Post by Gigigonzalez »

planetmaker wrote:
Gigigonzalez wrote:And a request to be able to configure city behavior too would be great, and additional town/city grow speed multiplier,
I don't know whether it does or whether it can (but I think so, if not it's a very valid feature request): it could simply read and (re)use the city growth setting so that it maintains about the same functionality when using this script.
Yeah. I used to use City Builder script from Aphid i believe his name, though the script is very complex, i believe it is a little bit too complex and uses quite some resources. also it starts to bug out with huge maps, even if the town/city number isnt all that high. Also it doesnt seem to be able to replace buildings, it just expands and thats about it. He says there is no reliable way to demolish buildings and replace it with new stuff. Simple city builder seems to be able to mimic about the exact original TT town build algorithm, or it actually uses the built-in openttd city expand functionality and base the requirements on that instead.
Honza_ wrote:Hi,
Gigigonzalez, I'd add a request to read readme, settings description and playing some games with the script, please ;-)

That will give you answer to your question and you'll see there is setting to configure town growth, which is also dependant on the OpenTTD setting Town Growth speed.
Sorry my bad, i will do just that :)

My request still stands though about the seperate city functionality, would be great to only let towns have city builder requirements and for instance let cities just grow on pax/mail, so they are kind of acting like feeders.
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

Aphid is correct about demolishing houses, but rebuilding happens normally when growth is not set to none.

Simple CB has currently two growth styles, Normal, which is the same as original (when supplied) and Expand, which uses custom growth and expand function, but rebuilding should be possible too (I guess).


I see, you meant cities to have some cargo dependancy. Well, I might consider that for future, but the script is supposed to be simple actually :-)
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Re: [GS] Simple City Builder game script

Post by Gigigonzalez »

Btw i was a bit baffled to see the highest possible setting for town requirements is at 50k population, could this be torched up a bit? I know it is possible. Aphids can go to 200,000 i believe. I doubt it would affect the aspect of simplicity :p

Eh i could just scourge thru the .nut files i guess, it was just a suggestion as having those kind of limits dont make much sense imho.
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Re: [GS] Simple City Builder game script

Post by Gigigonzalez »

Also stumbled on somethng, i configured the script with all the goals, i put the next goal on 5000 but suddenly the town abruptlty stopw growing? on like 4,700

It says i need to deliver passengers, but im already doing so. :/ from 0 to 5000 = passengers
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 10 guests