Page 1 of 1

City Founder Gamescript

Posted: 12 Mar 2018 17:59
by agentw4b
This new gamescript creates new cities.
You can change the number of cities, the speed of city establishing, the size of cities and the shape of roads in the city.

Downloading last version from official Bananas server via game GUI.


Or downloading it here:
City_Founder_GS-3.tar.gz
(10.66 KiB) Downloaded 48 times




This is my first gamescript
--------------------------------------------------------------------------------------------------

Changelog.txt:
--------------------------------------------------------------------------------------------------
Version 3:
- Feature: Extracting existing cities to the script log is also performed when the game is loaded. Previously, this was only done at the start of the game.
- Fixed bug: If the list of city names does not offer next city name, script is now finished.

Version 2:
- Fixed bug: Blocked "Log" feature from Superlib library, occurring when saving game.
- Fixed info in Readme.txt
- Added URL in info.nut

Version 1:
- Initial release

---------------------------------------------------------------------------------------------------

Parameters:
---------------------------------------------------------------------------------------------------

- This gamescript will end
(on/off, developer only)

- Logging
(on/off, default on)

- Logging level :
1: Small (default)
2: Medium
3: Large

- How many cities do you want to add ?
(1 - 100000, default 200, not configurable in running game)

- How many days to wait for a new city to be established ?
(1-36500, default 15)

- City size :
1: Random (default)
2: Small
3: Medium
4: Large

- Road Layout
1: Random (default)
2: Original
3: Better Roads
4: 2x2
5: 3x3

- City
1: Random (default)
2: Yes
3: No

- The probability that the village will turn into a city (%)
(1 - 100, default 50)

- Viewport of the new city
(on/off, default off)

- Should a welcome message appear for new companies ?
(on/off, default on)

----------------------------------------------------------------------------------------------

Re: City Founder Gamescript

Posted: 12 Mar 2018 20:04
by agentw4b
City_Founder_GS_example.png
(433.24 KiB) Not downloaded yet

To test the script I recommend very few existing cities after start game, at least 1 city.

Openttd.cfg for 1 town:
[difficulty]
number_towns = 4

[game_creation]
custom_town_number = 1

Re: City Founder Gamescript

Posted: 30 Mar 2018 20:34
by dol422
Nice to see a game script which actually founds towns for you. Turns out to be useful when you start with hardly any towns and want to add more without splurging out money. I actually found a bug when playing with this script. It looks like it doesn't support save/load:
Hawthorn Transport Ltd, 01-01-2019.png
Error: index 'Log' is non-existent
(188.9 KiB) Not downloaded yet

Re: City Founder Gamescript

Posted: 31 Mar 2018 06:24
by agentw4b
dol422 wrote:Nice to see a game script which actually founds towns for you. Turns out to be useful when you start with hardly any towns and want to add more without splurging out money. I actually found a bug when playing with this script. It looks like it doesn't support save/load:Hawthorn Transport Ltd, 01-01-2019.png

I've taken the "save" feature from the MinimalGS project. I did not test it, but I'll look at it.

Re: City Founder Gamescript

Posted: 31 Mar 2018 07:15
by agentw4b
This is probably because I blocked unused features before releasing and I mistakenly blocked the Log function from the "Superlib" library.

on line 5 in the main.nut:

"// Log <- SuperLib.Log;"

I will try to unblock it and continue to test it.

Re: City Founder Gamescript

Posted: 31 Mar 2018 08:17
by agentw4b
dol422 wrote:Nice to see a game script which actually founds towns for you. Turns out to be useful when you start with hardly any towns and want to add more without splurging out money. I actually found a bug when playing with this script. It looks like it doesn't support save/load:Hawthorn Transport Ltd, 01-01-2019.png
Fixed, Version 2 released

Re: City Founder Gamescript

Posted: 02 Mar 2020 12:34
by graphicnano
I try this even with 1 city to found, it just makes my game load continuously and letting me not play :(

Re: City Founder Gamescript

Posted: 02 Mar 2020 15:37
by agentw4b
I do not understand your problem. This script is funkcional. I use it.

Re: City Founder Gamescript

Posted: 02 Mar 2020 15:53
by agentw4b
Set "Viewport of the new cities?": off .

Re: City Founder Gamescript

Posted: 16 Apr 2020 00:23
by agentw4b
Version 3 has been created to fix some bugs. See Changelog.