OpenTTD

Tasklist

FS#5424 - Non-player NewObjects

Attached to Project: OpenTTD
Opened by David Dallaston (Pikka) - Tuesday, 01 January 2013, 16:13 GMT
Last edited by Ingo von Borstel (planetmaker) - Saturday, 10 May 2014, 22:47 GMT
Type Feature Request
Category NewGRF → NewObject
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Currently, NewObjects can be built only by players. I would like a callback, to be run during map generation, which could populate the map with non-player-owned NewObjects, in a similar fashion to the default lighthouse and transmitter. The callback would select a random location to try and build the object, and have four possible results afaict: Build the object and go again; Build the object and finish; Don't build and go again; and Don't build and finish.

Additionally, a NewObject equivalent of callback 143 (Protect building conditionally) would be useful. Some NewObjects (eg rocky outcrops) may be appropriately removable by the players, others (eg ancient monuments) would not.
This task depends upon

Closed by  Ingo von Borstel (planetmaker)
Saturday, 10 May 2014, 22:47 GMT
Reason for closing:  Implemented
Additional comments about closing:  In r25878
Comment by David Dallaston (Pikka) - Tuesday, 01 January 2013, 16:21 GMT
<andythenorth> how does openttd know to try and build this object?
<Pikka> perhaps newobjects have a special "cargo" in action 3 for the map generation callback?
<Pikka> that's for whoever's actually programming it to work out
<Pikka> and that ain't me :)
<Pikka> one per town, one per map, only build on mountains, only build near coastlines, only build etc etc :]
<Pikka> although I don't think we have all the necessary variables yet ;)
Comment by David Dallaston (Pikka) - Tuesday, 01 January 2013, 16:24 GMT
<andythenorth> hrm
<andythenorth> I want a version that runs during game
<Pikka> sure
<andythenorth> it would look for industries :P
<andythenorth> and plant overbuildable fields
<Pikka> maybe it could run at the beginning of the month, or year, or whatever :]

Loading...