FS#6381 - Game Script: method to change company rating in town

Attached to Project: OpenTTD
Opened by dP (_dp_) - Wednesday, 21 October 2015, 00:20 GMT
Last edited by andythenorth (andythenorth) - Sunday, 03 September 2017, 07:10 GMT
Type Feature Request
Category Script → Goal/Game script
Status With patch
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version 1.5.2
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


GSTown.SetRating(town_id, company_id, rating) method as a complement for GetRating. Changes local authority rating of company in town to one of predefined values. Can only be executed as deity.

Will be useful in situations where local authority doesn't work well with gameplay like in claimed city in citybuilder. Also will allow GS to freely build stuff as a company, for example, destroy houses to shape up city.
This task depends upon

Comment by andythenorth (andythenorth) - Saturday, 02 September 2017, 07:21 GMT
Applied fine to r27908.

Set up a test 64x64 map with just two towns. Using the provided test GS (appears as "MinimalGS" in list), both towns alternate ratings between "Outstanding" and "Appalling". As expected.

IMHO, this is a useful feature in GS.