External Publication
Visit Post

OpenTTD AIs and Game Scripts • Extracting Bank Balance Each Day

Transport Tycoon Forums - Index page [Unofficial] April 13, 2026
Source

Hi All! First post - I've tried and tried by using ChatGPT etc. but going around in circles!!

I'd like to be able to ultimately save an entry to a MySQL database with my openTTD bank balance each game day. I know that I'll need to do something to read the output from the console etc... as openTTD can't directly access the database / php scripts. That's fine.

I've made a game script with the help of AI which should output the balance but it doesn't run. I was wondering if anyone with more knowledge could help me.

I am using version 15.3

Hopefully I've attached my info and main nut files to this post.

The script appears in the game settings fine, I can select it and start a game no problem, but it won't run and output the bank balance.

TIA

main.nut

info.nut

Statistics: Posted by haverer — 13 Apr 2026 09:56


Discussion in the ATmosphere

Loading comments...