Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Thu Dec 14, 2017 12:31 am

All times are UTC




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Nov 23, 2017 11:58 pm 
Offline
President
President
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 946
I found interesting script on bananas: Town_and_Industry_Control-3.1, which was created for limiting random growth of industry: it require to serve certain percentage of industry to have chance of new industry to be built.
Very clever idea, I hate map cluttered by insane amount of industries (especially when grfs such FIRS are active and industry is not limited by town number).
Unfortunately, script have some bugs (author forgot to change fraction to percentage) and seems that it is unfinished, no impact of served towns was taken into account, and there was some other issues, for example sharp conditions.

Therefore I decided to rewrote it.

Now there is something like macroeconomic index, which depend on:
[*]ratio of served towns to total number of towns
[*]ratio of served industries to total number of industries
[*]amount of game years.
Both served towns and industries can increase this index, but elapse time make it harder.
New industry would be appear if macroeconomic index is high enough to be considered as indices f wealth economy, or if number of served industries meets predefined criteria.
If option "Try to keep the number of industries on map" is checked, new industries would also replace closed ones, if economy index is not utterly negative.

Additionally, small towns require passenger and mail service for growth, medium (population threshold depend on economy index) require food and/or good cargo delivered, and large towns require fuel and building materials (it is possible to omit this by setting zero requirements). Any grf which use FOOD, GOOD, PETR and BDMT cargo designators should be compatible with this script.
Town growth is very slow, if global economy index is utterly negative.

I uploaded this script to Bananas.

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension.


Top
   
PostPosted: Fri Dec 01, 2017 8:39 am 
Offline
Engineer
Engineer

Joined: Mon Jul 25, 2016 11:44 pm
Posts: 21
Very interesting script! I tested it in a quick game and I have some questions:
1. How the transported percentage is calculated? I can understand it for pass/mail - the town produces passengers and mail so the game calculates amount of produced/transported, but how it calculates percentage of other goods? How much food/goods/etc I need to deliver to a town, does it depend on town size?
2. In my test the town with population of about 1300 had high passenger transport percent so the town window showed 'growing', but the town population was actually decreasing, probably because of low economy index (like -30). Other towns that had no passenger service did not change population.
3. It seems you don't need to deliver mail, just transporting passengers is enough for very high percentage (like 96%), is there a way to change it so the town would need both pass and mail transport, for example 70% pass and 30% mail percentage is taken into account, so to achieve high percentage you will need to transport both high percentages of pass and mail, but pass is more important?
4. Using slow vehicles to transport passengers (like horse busses from PolRoad set) results in pass percentage jumping from very high to very low in some months, probably because travel time is greater than month (like 43 days).
5. You don't need to connect towns, just local service is enough to grow town, is there a way to change it so the town will also/only take into account pass/mail transported from other towns?
6. Amount of game years making game more complex seems too artificial for me, just like inflation that I never use - I don't like that game becomes harder just because time passes and not because something happens in a game world. Is there a way to change it, for example use total number of industries as a limiting factor, so every new industry on the map makes raising economy index a bit harder? I also like to start early like in 1700 or 1800 and don't want the game to became too hard in 1900 or so just because I like to start with horses and sails.
7. Maybe take into account total town population on map, so even if you serve all industries on map and all towns and the economy index is still too low for new industries to open, you can grow population and it will allow new industries.

Thank you!

I am using Spring 2013, ECS, TTRS Early Mod, started test in 1830, started script with default settings.


Top
   
PostPosted: Sun Dec 03, 2017 1:18 pm 
Offline
President
President
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 946
Thanks for review! I want to emphasise, that I'm not a original author, it is just remake of James work.

Some issues were fixed, v.6 is here: http://openttd-polska.pl/attachment.php?aid=1069
The most important change is, that there are now following modes of town growth:
1. below 5k citizens, pass+mail must be fulfilled to enable typical openttd mode of growht,
above 5k, growth depend on pass, mail and consumer goods have impact on town growth rate (the lattero nes with higher weight), above 10k additionally industry goods must to be delivered
(it is still possible to grow without these but much harder).
1.
Quote:
How the transported percentage is calculated?
It was not calculated properly, it is fixed now.
2. Economy mood have no impact on small towns (currently I even removed this feature). Shrinking occurs when one building is replaced by another smaller (or in construction stage), it is openttd feature.
BTW, this script protect small towns, if town is below 35, it will regrow itself.
3. I prefer general categories in contrary to specific cargo, which can be or cannot be accepted.
4. in case of larger towns (above 5k), growth speed is now calculated as an average of current and previous growth value, it should give more smooth model.
5. No idea how to handle this, but maybe it can be done by creating some subsidies from/to given town and checking if they are fulfilled?
6. Original script had hard limit of served industry limit. Feature with economy depend on game years is for give possibility of creating additional industries short after start of the game. It is just easier to fulfil requirements at the start, but don't mind if you can't - requirement is not scaled linearly, but asymptotically to the number defined by script settings.
7. Good idea. Some kind of average town population.

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension.


Top
   
PostPosted: Mon Dec 04, 2017 11:18 pm 
Offline
Engineer
Engineer

Joined: Mon Jul 25, 2016 11:44 pm
Posts: 21
sevenfm wrote:
4. Using slow vehicles to transport passengers (like horse busses from PolRoad set) results in pass percentage jumping from very high to very low in some months, probably because travel time is greater than month (like 43 days).

Found that it was a bug in Spring2013 which incorrectly calculates supplied cargo, and as a result GetLastMonthTransportedPercentage returns garbage if supplied+received cargo exceeds town production last month, so it's not a problem of script.
In OpenTTD 1.6.1 GetLastMonthTransportedPercentage works fine.

McZapkie wrote:
5. No idea how to handle this, but maybe it can be done by creating some subsidies from/to given town and checking if they are fulfilled?

Should be possible using something like GSStationList_CargoPlannedByFrom, by analyzing town stations and cargo flow.
Quote:
Creates a list of origin stations of cargo planned to pass a station, with the monthly amounts of cargo planned for each of those origin stations as values.

https://nogo.openttd.org/docs/trunk/cla ... l#_details


Top
   
PostPosted: Fri Dec 08, 2017 7:17 pm 
Offline
President
President
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 946
New version 7 is available on bananas (and tested on my JGRPP server).

I'd rewritten town growth mechanism, using town goals for smaller towns, rules are now as follows, depending on population
below 25: town will regrow itself
below 250: standard growth
below 2500: standard growth with passenger goal threshold
below 5000: standard growth with passenger and mail threshold (+food if not temperate, regardless of town location)
below 10000: growth depend on passenger and mail transport (above goals still apply)
below 20000: growth depend on passenger, mail and consumer goods transport (ibidem)
above 20000: growth depend on passenger, mail consumer good and industry resources transport (ibidem).

Additionally, if town is well served, there is chance to create subsidy from this town to another one, no matter if other one is already served or not, distance is not limited (but probability is lower). It works fine with cargodist, however I recommend to diminish subsidy announcements (there is lot of them).

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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-2017 phpBB Limited

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