Object building?

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Post Reply
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Object building?

Post by Wahazar »

Currently I'm using GSIndustryType.BuildIndustry and GSTown.FoundTown for scripted scenario,
but is it possible to build newgrf objects?
I did not found any functions for such action.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Object building?

Post by Zuu »

As far as I know, noone has implemented NewObjects building for GS yet. From my guess of how NewObject spec works, it could probably only work for GSes targeting specific NewObject NewGRFs. Thus it will work for scripted scenarios but not very good for generic GSes. With that I don't say that I'm against a such API, only that its use cases is more narrow than town and industry construction which is a likely reason why the API doesn't yet exist. Creating that API will require several hours of work, so API methods are usually only added if it seems that they will have a use case.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
krinn
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 29 Dec 2010 19:36

Re: Object building?

Post by krinn »

Zuu wrote:As far as I know, noone has implemented NewObjects building for GS yet
http://nogo.openttd.org/api/trunk/class ... 6c54fe9517
Wonder who add this function, as it seems to contradict you :)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Object building?

Post by planetmaker »

krinn wrote:
Zuu wrote:As far as I know, noone has implemented NewObjects building for GS yet
http://nogo.openttd.org/api/trunk/class ... 6c54fe9517
Wonder who add this function, as it seems to contradict you :)
A NewGRF-changed rail station is not a NewObject; it's still a rail station.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: Google Adsense [Bot] and 7 guests