[GS] CityController v8

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

Brumi
President
President
Posts: 920
Joined: 18 Jul 2009 17:54

Re: [GS] CityController v7

Post by Brumi »

I'm no expert at all, but I guess that it's compatibile with 1.7.1 if it was good with 1.6. Just try it and report any problems if you happen to encounter them :)
Taurus
Engineer
Engineer
Posts: 3
Joined: 18 Apr 2019 14:11

Re: [GS] CityController v7

Post by Taurus »

Dear All,
just one basic question: how do I check thresholds for unlocking next cargo, in the mode of few (unlocking) and normal (progressivity)?

Thanks is advance!
kuhlyus
Engineer
Engineer
Posts: 1
Joined: 09 Sep 2021 22:36

Re: [GS] CityController v7

Post by kuhlyus »

I geht this error when i try to place down my HQ

Image
HQ error.png
(80.92 KiB) Not downloaded yet
Taurus
Engineer
Engineer
Posts: 3
Joined: 18 Apr 2019 14:11

After the 12.0 Update, cities don't recognise any deliveries

Post by Taurus »

Hi Everyone!
I'm using OpenTTD on Steam and recently I've observed an issue after the update. I'm using City Controller game script, and new cities to which I start delivering (new, as connected after the update to 12.0) completely does not recognise any deliveries. Ergo, I can't grow them.

I will be grateful for all the help!

Thanks!
baronjutter
Engineer
Engineer
Posts: 8
Joined: 28 Aug 2014 06:49

Re: [GS] CityController v7

Post by baronjutter »

hello! I know this mod is perhaps abandoned but I was hoping someone who uses it could help me out.

I love the idea of the mod, very simple growth caps based on delivered cargo. The caps are fine and good (although I wish I could fine tune them a little per cargo) its the growth speed. If a city is under its population cap it will nearly instantly build enough houses to reach the cap. We're talking 20-50 houses in a day. It then nearly instantly reaches the cap and stops. Is there any way to slow down growth with the mod? I have difficulty on the highest setting in the script, and in my game settings I have town growth on the very slowest. I don't know how else to slow this down.
_dp_
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 18 Dec 2013 12:32

Re: After the 12.0 Update, cities don't recognise any deliveries

Post by _dp_ »

Taurus wrote: 18 Oct 2021 10:12 Hi Everyone!
I'm using OpenTTD on Steam and recently I've observed an issue after the update. I'm using City Controller game script, and new cities to which I start delivering (new, as connected after the update to 12.0) completely does not recognise any deliveries. Ergo, I can't grow them.

I will be grateful for all the help!

Thanks!
FWIW it's a bug in 12.0 that is already fixed and hopefully will be included in the next release.
https://github.com/OpenTTD/OpenTTD/issues/9626
Taurus
Engineer
Engineer
Posts: 3
Joined: 18 Apr 2019 14:11

Re: [GS] CityController v7

Post by Taurus »

Thank you!
hpfx
Engineer
Engineer
Posts: 43
Joined: 09 Nov 2013 00:19

Re: [GS] CityController v8

Post by hpfx »

Dears,
after 7 years without playing this game, I discover the great features from version 13, which I therefore tried, and I remembered that I had made a script in the past :)
City Controller v7 was still available, but it has a lot of flaws with recent cargos.
I decided I had to fix it.
I spent my whole week-end to learn all what I forgot about Game Scripts, that was not easy :)

Now I have to find how to upload in game repository, to allow every one to download it from the game interface,
I don't remember the process.(any tips?)
so for now, I am attaching here the script itself if anyone want to give a try.
under windows 10+ copy tar file into C:\Users\<user>\Documents\OpenTTD\content_download\game\ folder
I know it's not the right way,

Here are changes I made :
VERSION 8:
- fix crash when no cargo recognized for unlocking, prevent future cases.
- fix do not rely on old cargo id anymore to recognize cargo
- town effect is not used by FIRS and ECS, better use cargo code
- recognize 2 new cargos : vehicle and farm supply
- display completion year for cargo unlock goals
- add "quick Achievement" option to make goals faster to achieve (divide goals quantities from 2 to 5)

I plan also to implement suggested features,
also I plan to rebuild settings to made them simpler to understand, and remove cumbersome options.
but this will be for a future release.
for version 8 I simply wanted to keep script in the same spirit as v7.
Attachments
43544354-City_Controller-8.tar
CityController_v8
(83.5 KiB) Downloaded 77 times
Seriphyn
Engineer
Engineer
Posts: 65
Joined: 25 Oct 2004 16:06
Location: Uh, where am I?
Contact:

Re: [GS] CityController v8

Post by Seriphyn »

I like this a lot! I switch between Villages is Villages (which grows cities too fast with no limitation) and Renewed Village Growth (which never completely stops growth). This is exactly what I'm looking for! Progressing through cargo tiers :)

Glad to see it revived!
Image
cnww
Engineer
Engineer
Posts: 17
Joined: 07 Sep 2008 02:38

Re: [GS] CityController v8

Post by cnww »

First of all let me say that I love the script, and I thank you for your work.

I'm afraid I managed to get it to crash while play-testing a scenario I'm working on. A screenshot of the error message, along with the town it relates to, should show up below.

A few things that may be relevant:
  • I fairly sure that I am using the latest version of CityController, I downloaded it from BaNaNas a few days ago.
  • The crash occurred during my second play-testing attempt for this scenario, in my first attempt the CityController script worked perfectly (AFAICT) for over 30 in-game years.
  • The town involved in the crash is one of two new towns I created in the scenario editor while making changes to the scenario after my first play-test.
  • The game started in January 1860. The crash occurred at the end of the first month/beginning of February. At the time of the script crash, no cargo had been delivered at all, but I did have a few trains loading.
My guess is that this is the first time the script attempted to update cargo delivery information, and it encountered a problem because (for some reason) the two towns I added to the scenario were not added to the script's array of towns (when selected in the scenario editor, does the game script perform array initialization while the editor is still open?).
crash.jpg
Script Crash Screenshot
(210.47 KiB) Not downloaded yet
On a hunch I started a new game (random map) with founding towns allowed and the CityController script and founded two towns. This did not cause a script crash.
I also tried enabling town-founding in my last pre-crash saved game (late January), and that did not prevent the crash from happening at the start of February.

Is there anything else I can do to help fix whatever is happening to trigger this crash?

On another note, I've spent hours building infrastructure for my play-test, is there any chance of repairing that game? Do I need to remove the gamescript from the scenario and start over?

Thank you for your time.

Edit: Holy crap that was fast.... :shock: I downloaded version 9, deleted CityController v8 from my content_download directory and suddenly it doesn't crash.
klote
Engineer
Engineer
Posts: 2
Joined: 09 Mar 2023 23:20

Re: [GS] CityController v8

Post by klote »

Hi im having trouble with this script.

One of my players was able to reach endgame in my server but the script doesn't allow for city growth beyond 54000 people?
Also global goals are met but wont give new goals

Is that endgame? or does the script allow for bigger goals?
If it does then this is a bug?
Image
Last edited by kamnet on 17 Mar 2024 20:18, edited 1 time in total.
Reason: Edited image link to properly display
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 5 guests