[GS] Simple City Builder game script

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

bolemeus
Engineer
Engineer
Posts: 3
Joined: 09 Jun 2014 00:29

Re: [GS] Simple City Builder game script

Post by bolemeus »

Hey planetmaker,

It's been a while since I translated this to Dutch, and I got stuck on the part of uploading it to devzone at the time.
When I finally could I was too busy to do it (my apologies), and I kinda forgot about it altogether.

Now that I'm trying again I can see it's become a bit easier to upload translations, but the server is telling me 'Access denied' when I'm trying to upload the translation.
Do you have to authorize me first?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [GS] Simple City Builder game script

Post by planetmaker »

bolemeus wrote:Hey planetmaker,

It's been a while since I translated this to Dutch, and I got stuck on the part of uploading it to devzone at the time.
When I finally could I was too busy to do it (my apologies), and I kinda forgot about it altogether.

Now that I'm trying again I can see it's become a bit easier to upload translations, but the server is telling me 'Access denied' when I'm trying to upload the translation.
Do you have to authorize me first?
Upload of complete language files via eints web translator is not possible.
Entering single strings allows to verify each, giving feedback when and how something is wrong and it also ensures that the language file format, especially the header, is correct.
Helyx
Engineer
Engineer
Posts: 1
Joined: 25 Oct 2015 15:19

Re: [GS] Simple City Builder game script

Post by Helyx »

Hello everyone,
i have a problem with this mod.

My claimed village is pretty close to some other citys/towns etc and thus it doesnt have all industries in its influence area.
Currenty my town wants farm supplies but there is no industry that accepts them and my town wont grow? And the problem will also occur with other cargo.

Am i doing something wrong or am i stuck so I cant continue anymore?
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [GS] Simple City Builder game script

Post by Zuu »

Try funding an industry that accepts farm supplies in your town. If it is a raw industry that you need, then you may need to tweak raw industry funding settings in OpenTTD settings dialog if it is set to none or prospect.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
_dp_
Transport Coordinator
Transport Coordinator
Posts: 276
Joined: 18 Dec 2013 12:32

Re: [GS] Simple City Builder game script

Post by _dp_ »

You can also use station-walking trick. Create station near your town and then move it to where it accepts required cargo (but keeps your town in its name).
Altaree
Engineer
Engineer
Posts: 11
Joined: 14 May 2007 13:32

Re: [GS] Simple City Builder game script

Post by Altaree »

Does this mod work with FIRS2?
fumantsu
Engineer
Engineer
Posts: 12
Joined: 26 Jul 2008 12:24

Re: [GS] Simple City Builder game script

Post by fumantsu »

Weird. Someone put in a scenario and is paused. According to the notes this is normal to a multiplayer game but what about a single player?
User avatar
pankratz
Engineer
Engineer
Posts: 20
Joined: 15 Sep 2017 07:46

Re: [GS] Simple City Builder game script

Post by pankratz »

Image

Any idea what is wrong here? The next goal is not triggered...
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

Not sure. Does script console threw any error? Maybe upload savegame and I will look at it.
User avatar
MightyGooga
Engineer
Engineer
Posts: 11
Joined: 26 Jan 2009 14:52
Location: Brasil

Re: [GS] Simple City Builder game script

Post by MightyGooga »

Hi Guys,

Im trying to setup a citybuilder game with this script for Firs 3 Extreme Economy. While I can set this up in the configs, I cant customize the cargos for this particular economy. Is there a way to customize cargos for Extreme Econoy that Im not seeing?

Lets say, I want the city initial demand to be building materials.
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

Yes, it is possible to set customized cargo requirements.
User avatar
pankratz
Engineer
Engineer
Posts: 20
Joined: 15 Sep 2017 07:46

Re: [GS] Simple City Builder game script

Post by pankratz »

Honza_ wrote: 09 May 2021 20:36 Not sure. Does script console threw any error? Maybe upload savegame and I will look at it.
Thank you. I realised that (I don't know why) I used not the last version of the script. :roll:
Sab3rr
Engineer
Engineer
Posts: 6
Joined: 16 May 2021 01:32

Re: [GS] Simple City Builder game script

Post by Sab3rr »

I'm very new to OTTD, so bear with me:
I'm confused by this script's storage mechanic. Is it recommended to have storage set to 100% for cargo? The latest version of the script sets storage to a default of 0%. And I'm really struggling to grow cities and didn't notice this.

The previous version of the script (based on old videos and screenshots I've seen) had a DECAY setting for each cargo instead of a STORAGE setting. And the default of decay was 0%.
And if I understand this correctly, a decay of 0% = storage of 100%?

So my main question is, when changing decay setting to storage in the 2021 update, was it intended to keep its default of 0%? It feels to me the default for storage settings for each cargo should be a 100%?
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

Yes, quite so. I changed decay to storage and it is as you say, decay 0%=storage 100% and vice versa. It made more sense to have the setting named storage, as it stores cargo and is more clear, than decay.

Default is 0%, but that is not meant to be the value to play with. You can set it to whatever you like. Or if you use the new presets, it is almost always 100% for everyting except passengers and mail.
Sab3rr
Engineer
Engineer
Posts: 6
Joined: 16 May 2021 01:32

Re: [GS] Simple City Builder game script

Post by Sab3rr »

Honza_ wrote: 16 May 2021 22:49 Yes, quite so. I changed decay to storage and it is as you say, decay 0%=storage 100% and vice versa. It made more sense to have the setting named storage, as it stores cargo and is more clear, than decay.

Default is 0%, but that is not meant to be the value to play with. You can set it to whatever you like. Or if you use the new presets, it is almost always 100% for everyting except passengers and mail.
Thanks so much for clarifying. Thought I was going crazy XD
The other thing that got me was food was a requirement for the Vanilla Arctic preset, but only towns in snow accept food. So you are forced to pick a town in the snow?
But like you said I can just set it to what I want. Because I'm new I didn't expect to have issues with the presets.
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

Is it really so, that only snow towns accept food? Food acceptance depends on houses, so it should be possible for any towns.

Well, all the presets requirements are based on citybuilder games from former Novapolis citybuilder server and there was non-vanilla town generation where towns were only spawned under the snow.

I recommend to experiment with settings and find what you like :wink:
Sab3rr
Engineer
Engineer
Posts: 6
Joined: 16 May 2021 01:32

Re: [GS] Simple City Builder game script

Post by Sab3rr »

Yes, in Vanilla Artic only towns in the snow require food.
With OpenGFX+ Industries newGRF it changes to all towns in arctic require food, at least for the Japanese Town Replacement Set.

Anyway, yes I'll definitely experiment with my own settings! Thanks!
Lucas79
Engineer
Engineer
Posts: 4
Joined: 17 Nov 2012 15:26

Re: [GS] Simple City Builder game script

Post by Lucas79 »

Hi Honza,

I'm relative new to using NewGRF and Scripts in OpenTTD and really love your city-builder. We've started playing with some colleagues on a private server and your City Builder gives a whole new dimension to the game, so thanks for very late Tuesday evenings. :wink:

When I create a New Game with random towns and industry everything works well, but when I create a scenario (I've created a very detailed map of The Netherlands on 4096×4096) with over 200 Dutch Cities in it. When I build my HQ it says that "City name is already claimed by Company name" (The City name is the town I just claimed and company name is my Company name). Also, and this is a bit anoying, each month after that I get an information message saying "Place your HQ in a town with less than 800 population to claim it, cities cannot be claimed!" I'm very sure the Towns I select are towns and not cities and the population is well below 800 and the City Builder script works, I can see al what is required and when I meet the required passengers or goods, the town progresses to the next resource.

I've tried with a clear scenario map and randomly created towns and industries and that gives the same result. When I create a new game, the City Builder script works without the extra messages, so it seems only a problem while using a scenario. I've tried the above with both my list of NewGRF's like FIRS, Total Town Replacement and some Dutch trains and trams, and without any NewGRF's for testing. The result is the same with or without the NewGRF's. I also tried on a server and on a local game, also the same results.

I'm using Open TTD 1.11.2

Thanks in advance for any reply.
There is no spoon...
Lucas79
Engineer
Engineer
Posts: 4
Joined: 17 Nov 2012 15:26

Re: [GS] Simple City Builder game script

Post by Lucas79 »

Ok, So I've been testing the above behavior further, and this only happens to the company that is created when you start a game on a server. If you join that specific company, you get the above repeated messages. If you just leave that company alone and start a new one, that won't give the repeating messages. For now we just leave that company 'empty' and named it server and put a password one it, so nobody can join it. This is a workable work around, but I still would like to know if there is something I can do to avoid this extra 'server' user, or if it can be fixed in some update. :-)

Hope the above helps and kind regards,
There is no spoon...
Honza_
Engineer
Engineer
Posts: 120
Joined: 29 Aug 2010 10:29

Re: [GS] Simple City Builder game script

Post by Honza_ »

Hi,
this is some strange behaviour happening with game scripts in scenarios, which I have not been aware of. Apparently the game starts with company and then it is registered again as new, so there are duplicate companies in game script data when one claimed town and the other generates false messages.

It is easy fix, it will be ok in next release.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 6 guests