Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Dec 13, 2017 3:32 am

All times are UTC




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Apr 18, 2013 1:19 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Fri Dec 16, 2011 5:08 pm
Posts: 166
I wish to not receive an effectively 'free' house whenever 'Fund new Buildings' is used in the Town menu.

Fund new buildings sets the house timer of a town to one day from whatever value it was manually set to, even if the town is not growing.

There's multiple ways in which it 'could' be done, but I believe most would require some kind of change to OpenTTD.

Method:

1) Add to configure patches.

- It would be a Somewhat obscure setting that has minimal impact on most games.

2) Allow scripts to override this functionality.

- E.g. if a script sets a town growth rate to be once every 200 days it will plant a house every 200 days, no matter if someone presses the fund town button.

3) Allow newGRF to override this functionality.

Also, I've noticed:

The classes GSTown and AITown have no way of providing AI or script with the information if/when a town is funded or not. Nor is the secondary way of verifying this (using the TownZone of a square, as a human player would be able to do it) possible.


Top
   
PostPosted: Thu Apr 18, 2013 1:26 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9025
Location: Sol d
Sorry... I'm left puzzled: what's the actual issue or problem?

You want the "fund new buildings" action to NOT work?

Oh, and as GS being the entitiy to steer global gameplay, they have the ability to drive town growth. Thus that's a thing of global nature which should not be exposed to NewGRFs.

_________________
Image
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


Top
   
PostPosted: Thu Apr 18, 2013 2:11 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Fri Dec 16, 2011 5:08 pm
Posts: 166
Well, the actual issue/problem should be obvious:

Suppose I have a GS or situation limiting town growth. I then can't play with the fund town button enabled as that disables/overrides the functionality of the former for any company with sufficient money. And obtaining sufficient money isn't hard at all. One house does not seem like a big deal until someone presses the button a hundred times.

Town growth does three things:

1) Build a house immediately
2) Expand town zones
3) Increase house building tempo.

I want to be able to get just [2], and 'forward' the information about [3] to a script and AI even and especially if the former overrides the house building tempo. For example the script could increase the growth tempo of a funded town with the goals met somewhat. As of now a script has no way to know the user pressed this button/did this action. Worse still, an AI has no way to know a human player is doing this apart from doing so in a roundabout manner, e.g. using the town's house count. Even then this is no 'guarantee' of giving the right answer (is the town funded or not?) as the build speed can be a number low enough (<= 5 days) that there's no real New-GRF proof way of certainly knowing.

Wanting to disable [1] is fairly natural. Novapolis solves it, for example, by changing the house build function in openTTD itself to build an empty tile if the goals are not met. But try the following; simply start a game in a desert map and give yourself a billion. You'll be able to significantly increase the size of a town in the desert without bringing this town water and food. Without effect [1] the only effect that happens in a game with script is [2] because [3] is overridden.

Example script way of doing it would be:

Code:
bool GSTown::IsFunded(int TownID)


We already have GSTown::GetRoadReworkDuration() for a script which is of questionable usefulness. The above however would be very useful.

Even better would be:

Code:
 bool GSTown::EnableFunding(int TownID, int CompanyID, bool Enable = true)


Supply (id,true), turns on the fund town button. Supply COMPANY_INVALID to do all companies, and some ID to do a particular company to enable/disable.
I have a distinct feeling this may fall under Area Control as one of the actions though.

Example setting way of doing it would be:

Replace the 'Economy.towns.allow fund buildings' setting with a dropbox setting, including 'off' 'without free house' and 'with free house' options, or whatever would be a descriptive name.


Top
   
PostPosted: Sun Apr 28, 2013 9:11 pm 
Offline
Engineer
Engineer

Joined: Sun Aug 29, 2010 10:29 am
Posts: 109
planetmaker wrote:
Sorry... I'm left puzzled: what's the actual issue or problem?
You want the "fund new buildings" action to NOT work?
.


What Aphid means, is that with GS, when coding citybuilder style goal and cargo delivery is not met for a period of time, you can still grow town with Fund building button, if that is enabled, making GS useless.

A little more intelligent would be, it GS had priority over Fund buildings, and that button would only steer building when cargo requirements are fulfilled. Practically, Fund Buildings would only build something if GS is not stopping growth rate (currently to stop growth one has to set some high GR, which is in my opinion obscure solution).


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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.