[GS] Simple City Builder game script
Moderator: OpenTTD Developers
[GS] Simple City Builder game script
Novapolis team presenting:
Simple City Builder script
1. Claim a town by placing company headquaters
2. Deliver cargos and grow the town to the biggest population ever seen
Features
- When configured towns will require more cargos to grow
- Displays requirements in Town window and Goal window
- simulates the original OpenTTD growth mechanism
Settings
- spawning of some industries
- storage of delivered cargos
- Requirements, population at which cargo is required and storage decay of each cargo (up to 32 if defined, ECS and FIRS supported of course)
- pausing game on start in multiplayer
- place signs to mark cities
- place signs to mark claimed towns
- dynamic change of town growth
- limiting cities size
Future plans
- add more growth mechanics
== OVERVIEW ==
Available via game content or here for manual install http://bananas.openttd.org/en/gs/
Enjoy
Source code repositories
GITHUB : https://github.com/TheDude-gh/simplecb (active)
OpenTTDcoop devzone : https://dev.openttdcoop.org/projects/citybuilder-gs (deprecated)
== TRANSLATIONS ==
Global access for translations is enabled in openttdcoop Web translator. If anyone wishes kindly to contribute translation in any language, you can do so at:
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/
== UPDATES ==
On 25.08.2021
Version 13
=FIXES=
- Prevent duplicate companies in scores. Could happen playing scenarios.
=CHANGES=
Town skrinking - new optional setting
- When town is not supplied properly, it has a chance of demolishing house and decreasing population
- town will shrink on condition any cargo is supplied less then 25% of requirement and population is less than 500
City Population Limit setting
- now cities can be limited by population percentage of biggest town instead of its multiplication. Range is 0 to 1000% instead of previous multiplier 1 to 10.
Changing settings in running game
- now you can change any setting in running game so no need to start from beggining when you are not happy with some setting.
- You can do this by changing setting in game (SHIFT+F12 or whatever hotkey you set), saving the game and on load the new settings will update.
================
On 17.04.2021
Version 12
=CHANGES=
Languages updated
- industry cargo sets presets
- support new 64 cargo limit
- one change in language file, and project url
- warning messages with WARN flag
- visual code reformatting
- change of default values of some settings
- demolition function preparation
================
On 11.11.2017
Version 11
=CHANGES=
Languages updated
On 04.10.2015 - new version
Language updates.
On 12.01.2015 - new version
Setting for limiting City population to maximum twice the biggest town
Maximum Goal Progress lines limited to 24
New languages
Added YETI cargos description to settings menu
Dynamic growth interval is changeable now and disabling it works
Fixes plural forms in english and czech language
On 11.05.2014 - new version
Fixed missing declaration
Fixed some bad calculations
Fixed some bad conditions
Fixed misspells in czech.lng
On 07.05.2014 - new version
Town::Service function is no more in bad scope, causing troubles.
On 27.04.2014 - new version
On bananas - changelog included
- Fixed save load crash bug
On 26.04.2014 - new version
On bananas - changelog included
- New growth style, funding buildings, storybook and more
On 08.11.2013 - new version
On bananas - changelog included
On 10.11.2013 - new version
Fixes some silly things of previous version
Simple City Builder script
1. Claim a town by placing company headquaters
2. Deliver cargos and grow the town to the biggest population ever seen
Features
- When configured towns will require more cargos to grow
- Displays requirements in Town window and Goal window
- simulates the original OpenTTD growth mechanism
Settings
- spawning of some industries
- storage of delivered cargos
- Requirements, population at which cargo is required and storage decay of each cargo (up to 32 if defined, ECS and FIRS supported of course)
- pausing game on start in multiplayer
- place signs to mark cities
- place signs to mark claimed towns
- dynamic change of town growth
- limiting cities size
Future plans
- add more growth mechanics
== OVERVIEW ==
Available via game content or here for manual install http://bananas.openttd.org/en/gs/
Enjoy
Source code repositories
GITHUB : https://github.com/TheDude-gh/simplecb (active)
OpenTTDcoop devzone : https://dev.openttdcoop.org/projects/citybuilder-gs (deprecated)
== TRANSLATIONS ==
Global access for translations is enabled in openttdcoop Web translator. If anyone wishes kindly to contribute translation in any language, you can do so at:
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/
== UPDATES ==
On 25.08.2021
Version 13
=FIXES=
- Prevent duplicate companies in scores. Could happen playing scenarios.
=CHANGES=
Town skrinking - new optional setting
- When town is not supplied properly, it has a chance of demolishing house and decreasing population
- town will shrink on condition any cargo is supplied less then 25% of requirement and population is less than 500
City Population Limit setting
- now cities can be limited by population percentage of biggest town instead of its multiplication. Range is 0 to 1000% instead of previous multiplier 1 to 10.
Changing settings in running game
- now you can change any setting in running game so no need to start from beggining when you are not happy with some setting.
- You can do this by changing setting in game (SHIFT+F12 or whatever hotkey you set), saving the game and on load the new settings will update.
================
On 17.04.2021
Version 12
=CHANGES=
Languages updated
- industry cargo sets presets
- support new 64 cargo limit
- one change in language file, and project url
- warning messages with WARN flag
- visual code reformatting
- change of default values of some settings
- demolition function preparation
================
On 11.11.2017
Version 11
=CHANGES=
Languages updated
On 04.10.2015 - new version
Language updates.
On 12.01.2015 - new version
Setting for limiting City population to maximum twice the biggest town
Maximum Goal Progress lines limited to 24
New languages
Added YETI cargos description to settings menu
Dynamic growth interval is changeable now and disabling it works
Fixes plural forms in english and czech language
On 11.05.2014 - new version
Fixed missing declaration
Fixed some bad calculations
Fixed some bad conditions
Fixed misspells in czech.lng
On 07.05.2014 - new version
Town::Service function is no more in bad scope, causing troubles.
On 27.04.2014 - new version
On bananas - changelog included
- Fixed save load crash bug
On 26.04.2014 - new version
On bananas - changelog included
- New growth style, funding buildings, storybook and more
On 08.11.2013 - new version
On bananas - changelog included
On 10.11.2013 - new version
Fixes some silly things of previous version
Last edited by Honza_ on 03 Sep 2021 23:11, edited 14 times in total.
Re: [GS] Simple City Builder game script
does it work on single player too ?
(can't test atm, so i'm asking
)
(can't test atm, so i'm asking
![Wink ;)](./images/smilies/icon_wink.gif)
Re: [GS] Simple City Builder game script
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 ?
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 ?
- Attachments
-
- french.txt
- the translated file (utf8)
- (5.67 KiB) Downloaded 989 times
Re: [GS] Simple City Builder game script
hi,
most likely you have some mistake in the file. When you remove the french.txt from lang folder, the script works. Unforunately AI console is not very helpful when looking for language file problem as far as I know.
You can locate the problem by removing some lines randomly and see if the error still appears.
most likely you have some mistake in the file. When you remove the french.txt from lang folder, the script works. Unforunately AI console is not very helpful when looking for language file problem as far as I know.
You can locate the problem by removing some lines randomly and see if the error still appears.
Re: [GS] Simple City Builder game script
hi,
The test I made (after ruining 2 hours) : I totally remove my file, I just copy your english.txt into another file name (give the name you want, italian.txt french.txt dutch.txt or whatever.txt) run the game, create a new game.. crash.
Can you check on our PC if it behave the same ?
Thanks.
it could be, but I think you didn't paid attention to this :Honza_ wrote:hi,
most likely you have some mistake in the file. When you remove the french.txt from lang folder, the script works....
Which means, the file itself is probably not the only one culpit.fabca2 wrote:And even worth, if I just copy english.txt into whatever.txt without even opening the file, I got exactly the same message!
The test I made (after ruining 2 hours) : I totally remove my file, I just copy your english.txt into another file name (give the name you want, italian.txt french.txt dutch.txt or whatever.txt) run the game, create a new game.. crash.
Can you check on our PC if it behave the same ?
Thanks.
Re: [GS] Simple City Builder game script
the script as it is on bananas works well. When I add your french.txt it crashes. => fix your french.txt
If you rename english.txt so there is no english.txt, I guess it wont work since english.txt is likely required always
If you rename english.txt so there is no english.txt, I guess it wont work since english.txt is likely required always
Re: [GS] Simple City Builder game script
But did you try to COPY your english.txt into another language (without even opening it) ?Honza_ wrote:If you rename english.txt so there is no english.txt, I guess it wont work since english.txt is likely required always
Re: [GS] Simple City Builder game script
Problem is in your translation with STRINGx formats.
Study those
http://wiki.openttd.org/OpenTTDDevBlack ... al_strings
http://wiki.openttd.org/Format_of_langfiles
Study those
http://wiki.openttd.org/OpenTTDDevBlack ... al_strings
http://wiki.openttd.org/Format_of_langfiles
Re: [GS] Simple City Builder game script
New version.
See first post.
See first post.
Re: [GS] Simple City Builder game script
HI!
Sorry I'm new to this so these questions might sound stupid.
How can I deliver for example coal to the city (it doesn't accept it).
And what does "ECS and FIRS" mean?
Sorry I'm new to this so these questions might sound stupid.
How can I deliver for example coal to the city (it doesn't accept it).
And what does "ECS and FIRS" mean?
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: [GS] Simple City Builder game script
You deliver coal to a city by delivering it to a power plant (or other industry) in the city's influence area which accepts itjuhawp wrote:HI!
Sorry I'm new to this so these questions might sound stupid.
How can I deliver for example coal to the city (it doesn't accept it).
And what does "ECS and FIRS" mean?
ECS and FIRS are both NewGRFs which change industries (quite a lot).
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: [GS] Simple City Builder game script
New version with new 1.4 features.
See first post.
See first post.
Re: [GS] Simple City Builder game script
hi,
I load the GS in a multiplayer server, and I feed the town all the requirments, but the town did not grow at all, do I miss some configuration?
and at the same time, the storage page shows different info for different player, only the 1st player show complete info for town growing.
I load the GS in a multiplayer server, and I feed the town all the requirments, but the town did not grow at all, do I miss some configuration?
and at the same time, the storage page shows different info for different player, only the 1st player show complete info for town growing.
Re: [GS] Simple City Builder game script
It seems there is something wrong with town.nut:dirace wrote:hi,
I load the GS in a multiplayer server, and I feed the town all the requirments, but the town did not grow at all, do I miss some configuration?
and at the same time, the storage page shows different info for different player, only the 1st player show complete info for town growing.
function Town::Service() is included by function Town::Grow(growmech)
move Service() out from Grow() will fix the problem.
I speak Chinglish...
Re: [GS] Simple City Builder game script
Hi,
thanks for info. The Town::Service definition should indeed be outside the other function.
Even so, there is one known OpenTTD problem, when Normal grow mechanism is selected, in cases when town does not grow because of missing transport service, the script will make false statement that town grows even when town is not, because there is no API in game script to recongnize this.
But I guess this was not your problem.
thanks for info. The Town::Service definition should indeed be outside the other function.
Even so, there is one known OpenTTD problem, when Normal grow mechanism is selected, in cases when town does not grow because of missing transport service, the script will make false statement that town grows even when town is not, because there is no API in game script to recongnize this.
But I guess this was not your problem.
Re: [GS] Simple City Builder game script
There is another bug:
When a player got the goal, the script will hang up at goalprogress.nut:29:
And it should be:
When a player got the goal, the script will hang up at goalprogress.nut:29:
Code: Select all
if(checkgamelength >= this.game_length) txt = GSText.STR_WINNER_TIME;
Code: Select all
local txt;
if(checkgamelength >= this.game_length) txt = GSText.STR_WINNER_TIME;
I speak Chinglish...
Re: [GS] Simple City Builder game script
Thanks. It should be ok. Looking forward for next bug report ![Smile :-)](./images/smilies/icon_smile.gif)
![Smile :-)](./images/smilies/icon_smile.gif)
Re: [GS] Simple City Builder game script
World creator has a problem. Towns are very close together and less populated town is city.
- Attachments
-
- Example...
- Ekran Alıntısı.PNG (386.29 KiB) Viewed 14225 times
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: [GS] Simple City Builder game script
Honestly, I see no issue here, just randomness at work:Ozgarb wrote:World creator has a problem. Towns are very close together and less populated town is city.
Both, placement and size is randomly distributed. Distance to other towns has a minimum value as does the town or city size in terms of houses which are *tried* to be generated. Cities are not necessarily the biggest towns around at the start of map creation, they can have a *tendency* to be bigger, but again, that multiplicator is applied to the random size, thus the end result may still be small. However, cities will grow faster later on, if they receive an equal level of service compared to a 'normal' town.
Also, your issue most likely is unrelated to the game script here most likely.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: [GS] Simple City Builder game script
Indeed, nothing GS can do abou that.
Ozgarb, if you want map generator with more possibilities, suggest new feature on flyspray![Wink ;-)](./images/smilies/icon_wink.gif)
Ozgarb, if you want map generator with more possibilities, suggest new feature on flyspray
![Wink ;-)](./images/smilies/icon_wink.gif)
Who is online
Users browsing this forum: Bing [Bot] and 1 guest