[GS] CityController v16

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

hpfx
Engineer
Engineer
Posts: 65
Joined: 09 Nov 2013 00:19

Re: [GS] CityController v11

Post by hpfx »

McBorer wrote: 12 Jan 2025 11:15 I deleted that save game, but repeated whole process and tested as You instructed me and it works!!! I also try my old method and it also work, script didn't crashed! Thank You very much. So now just waiting for v12 release :lol:
Thank you, that's very helpful.

By the way,
with your screenshot, I can see you have "break on" at bottom of the "AI/Game script" window (with match case/continue), do you know how did you got that ?

also how did your gamescript settings are not disabled while in game ?
McBorer
Engineer
Engineer
Posts: 8
Joined: 12 Mar 2022 10:18

Re: [GS] CityController v11

Post by McBorer »

In both cases it's probably due to one or two of these settings in the openttd.cfg file.

developer = 1
newgrf_developer_tools = true
ai_developer_tools = true
scenario_developer = true
User avatar
jfs
Tycoon
Tycoon
Posts: 1978
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: [GS] CityController v11

Post by jfs »

You can use the in-game console (accessible from the :?: menu) to change the hidden settings, instead of having to dig up a config file and text editor and exit the game.
If you use the console command to change the setting, they take effect right away.
McBorer
Engineer
Engineer
Posts: 8
Joined: 12 Mar 2022 10:18

Re: [GS] CityController v11

Post by McBorer »

I know that, but thx. Just didn't know which setting was responsible for that.
hpfx
Engineer
Engineer
Posts: 65
Joined: 09 Nov 2013 00:19

Re: [GS] CityController v13 beta

Post by hpfx »

Dears,
I worked on a new version, that include a rank leagueTable for competitive mode.
Display it with the Yellow cup button.
new rank
new rank
rank.png (20.03 KiB) Viewed 7592 times

Please find here version 13 BETA.
43544354-City_Controller-13.tar
v31beta
(133.5 KiB) Downloaded 87 times
Please let me know comment or issue you may encounter.

The changelog file isn't uptodate yet,
Discovers a new bonus when you deliver all expected cargos and they are all "High" (or better)
new full throttle
new full throttle
new.png (90.16 KiB) Viewed 7589 times
note: for testing purpose you may try to use it with an older savegame, simply place a sign with "GS:repair", and Buy exclusive right of any town.
csyslldr
Engineer
Engineer
Posts: 1
Joined: 12 Aug 2025 07:52

Re: [GS] CityController v13beta

Post by csyslldr »

hello. does the creator of this GS is active? i like this GS and trying this one to do something new in my gameplay. i just want to know how this one works? i mean, what does "is capped at (number) inhab" mean? why was that? and what else do i need to do to continue my town growing? im playing in competitive mode, very easy difficulty, an assymetrical CargoDist passenger, and symmetrical CargoDist mail.

ps. this is my first time to use this GS and still trying to figure it out how it really works.
Attachments
Screenshot_20250812-125659~2.png
(850.24 KiB) Not downloaded yet
hpfx
Engineer
Engineer
Posts: 65
Joined: 09 Nov 2013 00:19

Re: [GS] CityController v13

Post by hpfx »

New CityControler version 13 is now available in game.
highlight : now 12 languages supported.

on competitive mode,
click on below cup icon to display the league table
cup.png
cup.png (503 Bytes) Viewed 5408 times
.
On the league table, each player are ranked toward owned city population.
leagueexample.png
leagueexample.png (179.56 KiB) Viewed 5407 times
Reros
Engineer
Engineer
Posts: 1
Joined: 05 Sep 2025 18:52

Re: [GS] CityController v13

Post by Reros »

Hey man, love this script. However since Update15Beta 3 I've been getting this error, do you happen to know of a solution?
Image
hpfx
Engineer
Engineer
Posts: 65
Joined: 09 Nov 2013 00:19

Re: [GS] CityController v13

Post by hpfx »

Reros wrote: 05 Sep 2025 18:55 Hey man, love this script. However since Update15Beta 3 I've been getting this error, do you happen to know of a solution?
Image
Hello Repos,
Thank you for your feedback,
Indeed version 13 have a crash issue with 15beta3, I've just release a new version to fix that.
Please update to V14.
have a nice game !
hpfx
Engineer
Engineer
Posts: 65
Joined: 09 Nov 2013 00:19

Re: [GS] CityController v14

Post by hpfx »

csyslldr wrote: 12 Aug 2025 08:03 hello. does the creator of this GS is active? i like this GS and trying this one to do something new in my gameplay. i just want to know how this one works? i mean, what does "is capped at (number) inhab" mean? why was that? and what else do i need to do to continue my town growing? im playing in competitive mode, very easy difficulty, an assymetrical CargoDist passenger, and symmetrical CargoDist mail.

ps. this is my first time to use this GS and still trying to figure it out how it really works.
Hello Sorry for late answer.

Yes this GS is active, and it works.
and "is capped at (number) inhab" means this city cannot grows more than (number)
Why is that -> it add a challenge to the game (new goals to reach) and also it prevent cities to endless grow.

Here is how it works:
your cities/towns are not growing.
you have to deliver them passengers and mails to make them grow
at a certain time delivering more passengers and mail is not enought to make your city grows.
then you must unlock next cargo, for example "food"... to unlock this cargo, you have to reach a number of city with a number of population. you can track this in the goal screen.
Let's says you need to reach 7000 hab for 4 cities, so you need to organize passenger+mail across at least 4 cities (works in both game mode: competitive and cooperative).
Once unlocked, the new cargo also allow cities to grow, you can delivers to cities and chase next cargo goal.
If you play with friend, you can try "competitive mode", just place your HQ in a city to claim it, and you can check leagueTable to see who is the winner :)
if you play alone, "cooperative" allow you to play same mechanism without competition.

I hope it help you to understand.
Bubaaak
Engineer
Engineer
Posts: 1
Joined: 18 Nov 2025 16:39

Re: [GS] CityController v14

Post by Bubaaak »

I am also little confused by the capping mechanism. On my screenshot you can see i had all the cargos oustanding/high, 5/5 bonus yet my city was not growing. I assume the cap is calculated by the amount of cargo delivered and the cap was held down by some cargo, but then it shouldnt have been high. It would be helpful to see exact numbers which are used for the calculation, then you could see what cargo you need to ramp up
ottdu.jpg
ottdu.jpg (53.55 KiB) Viewed 3188 times
hpfx
Engineer
Engineer
Posts: 65
Joined: 09 Nov 2013 00:19

Re: [GS] CityController v14

Post by hpfx »

Hello Bubaaak,

A population of 34k is a "A-tier" town for a 5 cargoes only game, taking into account goal of this gamescript is to limit town growth ;)
indeed towns are not growing endlessly, that's purpose of this gamescript, you need to delivery more to continue.

To reply your question, your town does not grow because it's already at the max regarding delivered cargo.
What cargoes ? to make it simple : ones that are not "outstanding".
So you must increase delivering of cargoes Alcohol, Food and Goods from "High" to "Outstanding", it's as simple as that.

Please note that it's not linear progression, but logarithm one.

If you want to see figures, it can be seen at GS log when you set log level at "3.cargo".
And even all computation details with the level "4. verbose", including cargoes rate, difficulty settings and bonuses.

But for real, cargo level as displayed in the town panel gives you basis information about cargo levels already.
hpfx
Engineer
Engineer
Posts: 65
Joined: 09 Nov 2013 00:19

Re: [GS] CityController v15

Post by hpfx »

New feature in version 15, the CashFlow league table.

You can now compare the cash flow of all your competitors at a glance.
The Cash Flow is income minus expenses, computed every quarters.
cashflow.png
cashflow.png (104.39 KiB) Viewed 2619 times
Enjoy ! ;)
hpfx
Engineer
Engineer
Posts: 65
Joined: 09 Nov 2013 00:19

Re: [GS] CityController v16

Post by hpfx »

Hello,
In this new version 16, I implemented the RealIndustry cargoset:
Real-complete.png
Real-complete.png (678.86 KiB) Viewed 2278 times
It was a funny challenge: 6 cargoes to unlock.

Also shipped these cargosets support: AIRS, CZIS...
lelu0
Engineer
Engineer
Posts: 1
Joined: 03 Apr 2026 10:11

Re: [GS] CityController v16

Post by lelu0 »

I have a problem playing with this great GS. I'm always reaching the point where I am stuck, even before unlocking cargo. I've been playing a map with 6 cities. One is now over 8k, but the rest is stuck. My second biggest city is in the screenshot. Over 5k, fully covered with stations, no problem with the flow. But the city is not growing. It's like that every game for me. What am I doing wrong?
Screenshot_3.png
(997.97 KiB) Not downloaded yet
hpfx
Engineer
Engineer
Posts: 65
Joined: 09 Nov 2013 00:19

Re: [GS] CityController v16

Post by hpfx »

lelu0 wrote: 03 Apr 2026 10:20 I have a problem playing with this great GS. I'm always reaching the point where I am stuck, even before unlocking cargo. I've been playing a map with 6 cities. One is now over 8k, but the rest is stuck. My second biggest city is in the screenshot. Over 5k, fully covered with stations, no problem with the flow. But the city is not growing. It's like that every game for me. What am I doing wrong?
Hello,
thank you for your feedback,
I see you have only passenger and mail cargo, I don't know which cargoset you are playing.
what you can try is to reduce step between each cargo from 5k to 3k.
And you can also change the growing factor (from normal to easy or even very easy)

without changing difficulty, what I usually do, I pick 4 big "cities" and I boost passenger trains with 6 wagons. and same with mail. mail have higher impact than passengers.
To boost your start, remember that only delivered cargoes count, not picked ones. So you can use other city to full-load mails and delivers (without pick) to one of your main cities.
The further the game progress, the less cities you have to take care, at the end only one city is important, but more different cargos to delivers.
Sagi
Engineer
Engineer
Posts: 2
Joined: 13 Jul 2026 09:43

Re: [GS] CityController v16

Post by Sagi »

I am having a problem to reach to goals when i want to play a game starting in a way earlier year as the mod clearly is intended.
I tried adjusting the needed goals but somehow i can't edit the files and i am not a genie in this.
Is it possible to make a very easy mode for the goals if you want to play from the start with al cargo population boosts enabled?
Thx mate
hpfx
Engineer
Engineer
Posts: 65
Joined: 09 Nov 2013 00:19

Re: [GS] CityController v16

Post by hpfx »

Sagi wrote: 13 Jul 2026 09:48 I am having a problem to reach to goals when i want to play a game starting in a way earlier year as the mod clearly is intended.
I tried adjusting the needed goals but somehow i can't edit the files and i am not a genie in this.
Is it possible to make a very easy mode for the goals if you want to play from the start with al cargo population boosts enabled?
Thx mate
Hello, what is the started year you are trying, and what cargo set (FIRS...) ?
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest