How to detect which cargo needs to be transported to towns

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
zetrax
Engineer
Engineer
Posts: 4
Joined: 09 Nov 2014 10:04

How to detect which cargo needs to be transported to towns

Post by zetrax »

Hi

Are there any API calls that tells you which cargo need to go to towns like in the in-game 'industry chains'.

I have tried by making a special rule that all EXPRESS cargo type should be transported to 'sufficiently' large towns.
But in candyland only Fizzy Drinks are EXPRESS cargo, so I cant find a way to detect Candy also need to go there.

Best Regards
Kim
krinn
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 29 Dec 2010 19:36

Re: How to detect which cargo needs to be transported to tow

Post by krinn »

zetrax
Engineer
Engineer
Posts: 4
Joined: 09 Nov 2014 10:04

Re: How to detect which cargo needs to be transported to tow

Post by zetrax »

Thanks, that looks like what I have been missing.

If Cargo has a TownEffect then towns will accept that cargo type.

I will try and play around with that.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 33 guests