How can I check whatever AI is in a test mode?

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
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

How can I check whatever AI is in a test mode?

Post by Kogut »

How can I check whatever AI is in a test mode?
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: How can I check whatever AI is in a test mode?

Post by Zuu »

Unless you have less money than the minimum loan step, you can on before hand know if it is possible to take a loan or repay an amount, then you can try to execute this action. If it succeeds, restore it and note that you are not in test mode. If it fails, you know that you are in test mode.

If you think further, there might be other tests that can be done that will succeed in more cases or have even fewer side effects/costs.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: How can I check whatever AI is in a test mode?

Post by Kogut »

Hm, AICompany::SetPresidentGender + AICompany::GetPresidentGender may be perfect.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 10 guests