Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Thu Oct 18, 2018 11:27 pm

All times are UTC




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
 Post subject: City Founder Gamescript
PostPosted: Mon Mar 12, 2018 5:59 pm 
Offline
Engineer
Engineer

Joined: Fri Apr 14, 2017 3:51 pm
Posts: 110
Location: Czech Republic
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:
http://binaries.openttd.org/bananas/gamescript/City_Founder_GS-2.tar.gz

Or downloading it here:
Attachment:
City_Founder_GS-2.tar.gz [10.47 KiB]
Downloaded 44 times




Attachment:
City_Founder_GS.png
City_Founder_GS.png [ 8.87 KiB | Viewed 1555 times ]


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

Changelog.txt:
--------------------------------------------------------------------------------------------------
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)

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

_________________
Owner and admin of servers:
Experimental games 01 (92.63.57.152:3979), Experimental games 02 (92.63.57.152:3879), Experimental games 03 (92.63.57.152:3779).
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My newGRFs: ---


Last edited by agentw4b on Sat Mar 31, 2018 9:03 am, edited 9 times in total.

Top
   
PostPosted: Mon Mar 12, 2018 8:04 pm 
Offline
Engineer
Engineer

Joined: Fri Apr 14, 2017 3:51 pm
Posts: 110
Location: Czech Republic
Attachment:
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:

Quote:
[difficulty]
number_towns = 4

[game_creation]
custom_town_number = 1

_________________
Owner and admin of servers:
Experimental games 01 (92.63.57.152:3979), Experimental games 02 (92.63.57.152:3879), Experimental games 03 (92.63.57.152:3779).
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My newGRFs: ---


Top
   
PostPosted: Fri Mar 30, 2018 8:34 pm 
Offline
Engineer
Engineer

Joined: Tue Dec 29, 2015 8:06 pm
Posts: 99
Location: Scunthorpe
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:
Attachment:
File comment: Error: index 'Log' is non-existent
Hawthorn Transport Ltd, 01-01-2019.png [188.9 KiB]
Not downloaded yet

_________________
My screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=74993


Top
   
PostPosted: Sat Mar 31, 2018 6:24 am 
Offline
Engineer
Engineer

Joined: Fri Apr 14, 2017 3:51 pm
Posts: 110
Location: Czech Republic
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.

_________________
Owner and admin of servers:
Experimental games 01 (92.63.57.152:3979), Experimental games 02 (92.63.57.152:3879), Experimental games 03 (92.63.57.152:3779).
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My newGRFs: ---


Top
   
PostPosted: Sat Mar 31, 2018 7:15 am 
Offline
Engineer
Engineer

Joined: Fri Apr 14, 2017 3:51 pm
Posts: 110
Location: Czech Republic
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.

_________________
Owner and admin of servers:
Experimental games 01 (92.63.57.152:3979), Experimental games 02 (92.63.57.152:3879), Experimental games 03 (92.63.57.152:3779).
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My newGRFs: ---


Top
   
PostPosted: Sat Mar 31, 2018 8:17 am 
Offline
Engineer
Engineer

Joined: Fri Apr 14, 2017 3:51 pm
Posts: 110
Location: Czech Republic
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

_________________
Owner and admin of servers:
Experimental games 01 (92.63.57.152:3979), Experimental games 02 (92.63.57.152:3879), Experimental games 03 (92.63.57.152:3779).
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My newGRFs: ---


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.