[GS] Villages Is Villages

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

Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: [GS] Villages Is Villages

Post by Timberwolf »

What is mods32.grf? OpenTTD can't seem to find that on BaNaNaS...
Stanley Cooper
Engineer
Engineer
Posts: 8
Joined: 15 Jul 2007 11:46
Location: Russia

Re: [GS] Villages Is Villages

Post by Stanley Cooper »

Sorry, my fault. I've download it here viewtopic.php?t=76780
LaChupacabra
Transport Coordinator
Transport Coordinator
Posts: 379
Joined: 08 Nov 2019 23:54

Re: [GS] Villages Is Villages

Post by LaChupacabra »

Ok, I downloaded, checked and... you have no highways.
But anyway this is still a road problem. In this case, CZ Roads. The script doesn't matter here.

Quick test without script
CZ Roads bug.PNG
CZ Roads bug.PNG (642.52 KiB) Viewed 4498 times
The problem concerns the option that prevents buildings from being built near some (selected) roads. The mistake is that the player should not be able to rebuild city roads into this type of road.
Edit: or actually even build or rebuild this type of road even own roads when there is a building next to it
I am sorry for may English. I know is bed.
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: [GS] Villages Is Villages

Post by Timberwolf »

LaChupacabra wrote: 09 May 2020 00:19
Stanley Cooper wrote: 07 May 2020 19:22 ...and cities started to die slowly.
Without downloading Your saves, I guess You have rebuilt city roads into highways. :)
This is a good guess - I've taken a look at the game and it seems to be a road type problem. If I convert all the roads to the cobbled type which has houses alongside it even in the shrunken cities, they start growing again.
Stanley Cooper
Engineer
Engineer
Posts: 8
Joined: 15 Jul 2007 11:46
Location: Russia

Re: [GS] Villages Is Villages

Post by Stanley Cooper »

Timberwolf wrote: 09 May 2020 15:38
LaChupacabra wrote: 09 May 2020 00:19
Stanley Cooper wrote: 07 May 2020 19:22 ...and cities started to die slowly.
Without downloading Your saves, I guess You have rebuilt city roads into highways. :)
This is a good guess - I've taken a look at the game and it seems to be a road type problem. If I convert all the roads to the cobbled type which has houses alongside it even in the shrunken cities, they start growing again.
Thank both of you for your help and clarification, the problem was in CZTR road set, definitely. I turned off/on it and upgraded all roads to one of those insane numbers of road type and now all the cities started to grow again as its should.

Timberwolf, Last updates were great! (economic part) I hope you will keep bringing more features in the future.
Thank you one more time.
d0mi3l
Engineer
Engineer
Posts: 23
Joined: 16 Aug 2013 18:04
Location: Poland

Re: [GS] Villages Is Villages

Post by d0mi3l »

Problem with your script, when I load game.
Attachments
TraGo, 1705-01-24.png
(771.76 KiB) Not downloaded yet
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: [GS] Villages Is Villages

Post by Timberwolf »

What size map are you using, and what industry/town density? Do you have a save game I could look at?
d0mi3l
Engineer
Engineer
Posts: 23
Joined: 16 Aug 2013 18:04
Location: Poland

Re: [GS] Villages Is Villages

Post by d0mi3l »

I play on Huge map 8kx2k. ECS 1.2 with some others GRF. JGRPP pack 0.34.4.
Attachments
TraGo, 1705-01-24.sav
(12.66 MiB) Downloaded 179 times
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: [GS] Villages Is Villages

Post by Timberwolf »

Well, I found the problem. I haven't tested a file with that many towns recently, and it was taking too long trying to load them all.

I've split things up so initialising town processing takes place during the game rather than when Villages is trying to load. This means there might be a slight delay when loading a huge map before towns start getting processed, but not noticeable in most cases. Version 14 with the fix is now on BaNaNaS.
d0mi3l
Engineer
Engineer
Posts: 23
Joined: 16 Aug 2013 18:04
Location: Poland

Re: [GS] Villages Is Villages

Post by d0mi3l »

:bow:
Save works now.
THX bro.
gravelpit
Traffic Manager
Traffic Manager
Posts: 200
Joined: 26 Feb 2015 14:49
Location: Poland

Re: [GS] Villages Is Villages

Post by gravelpit »

I wanted to ask if it is safe to fund new cities in the game, and if all types of cities, i.e. small, large and metropolitan areas, I have been playing GS reneval village grow recently and it can be different.
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: [GS] Villages Is Villages

Post by Timberwolf »

Yes, it's safe to add new towns and cities - the town array is periodically rebuilt so even if the script misses the town creation event it will eventually be added to the list of towns to process. (It's very unlikely this takes long enough for the town to grow out of control unless you have 2000+ towns and a very low script opcodes-allowed setting)
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: [GS] Villages Is Villages

Post by Timberwolf »

A new update for Villages Is Villages. Fixing bugs took a lot longer than expected, so not much time to do an announcement post, but there's some interesting new economic behaviour to make use of the taxes and dividends functionality. I also added longtomjr's suggestion to show tax and dividends on the company story pages.

Quoth the readme:
== Taxation, Dividends and Population ==

[Applies when "Economic settings" are set to "on"]

Local authorities require income from taxation to provide services and support local businesses. Cities require stock market profits or a successful local company to grow.

Villages Is Villages assumes that when you generate a world, it is already self-sufficient with a little room for growth (we're not that evil). However to grow larger it will need to generate taxes from economic activity. As your company and competitors pay larger amounts of corporation tax, the maximum world population at which towns can still grow increases.

Beware, though! If tax receipts fall over a long enough period, town growth will stall. You'll see a reminder of this on the town window. To help your towns become bustling metropolises, either make more profit or increase the rate of corporation tax in the script settings. There's also a setting to change the population limit increase per 1,000 tax paid if you want an easier (or harder) time growing towns.

Changes in tax receipts don't affect growth instantly; it takes time for local authorities to make their investment plans. This works both ways, so while it takes a while to see the positive results from your record tax bills you can also have a bad year or two without housebuilding coming to a halt.

Cities are not affected by this limit - they grow based on dividend income. To start growing cities, you'll need to build your company's cash reserves up to the point you start paying dividends. Bigger dividends mean larger cities, but if they shrink so will the cities. Unlike tax the cities react much faster to changes in dividend income, and it only takes a couple of bad years for the skyscrapers to stop going up.

Note that while cities are not affected by the tax-influenced world population limit, their population still counts toward it. If you pay large dividends while minimising your tax bill, vibrant cities will be offset by moribund towns.

Finally, the town closest to your HQ will benefit from *immediate* growth when your company pays a large enough dividend. Think of it as a mini-boom from all those employee bonuses being spent locally. While good early on, this can be a hindrance if your erstwhile home village has become a concrete jungle full of overloaded trains and wheezing buses. You may need to block further expansion... or perhaps relocate your HQ to provide an economic stimulus for a neglected backwater?
Hopefully I've squashed all the bugs, but if anything seems amiss this was a big update so there's always the risk something failed.
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: [GS] Villages Is Villages

Post by Timberwolf »

I was kindly donated a Polish translation via Github, so a minor version bump and new release for that.
lugo
Engineer
Engineer
Posts: 100
Joined: 12 Oct 2010 13:55

Re: [GS] Villages Is Villages

Post by lugo »

Hi Timberwolf,

i'm using your script in a longtime game.
I first had the default dividends setting. But since it for some reason never "activated" - as in i never had to pay dividends - i turned them "off" by setting dividends maximum to 0%.
Still, after quite some years in game (5+), citys need "larger shareholder dividends" to grow.
Do you have any idea how i could go about turning dividends completely off and / or make them work?
Attachments
GBT Pro Ltd., 12. Jan 1951.sav
(6.74 MiB) Downloaded 134 times
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: [GS] Villages Is Villages

Post by Timberwolf »

Ah... to disable the dividend requirement you'd need "Economic settings" to be off, but that's a new game variable (you can't change it for existing games, I have a feeling stuff breaks when it gets enabled or disabled mid-game so I made it new games only)

To pay dividends, a company needs an enormous cash pile (the setting was originally implemented to stop players building up unassailable amounts of money in multiplayer games)

I ran the game through to the end of 1952. With your current settings, you need £50,000 (DM 200.000) plus 1 year's running costs. Currently GBT Pro's running costs are DM 88.096.722; this means GBT Pro will start paying dividends once it has DM 88.296.722 in the bank. With only DM 34.956.552 on hand, the board haven't authorised a dividend.

In all of our test games, companies were seeing profits many multiples of running costs, so we never ran into the problem of having a huge network but a cash reserve relatively small in comparison to cost of operation. I wonder if I should update the "years of costs to reserve" to "quarters of costs to reserve" to allow more aggressive dividend payouts.

Edit: I've changed the cost-reserve variable to be quarters of a year, rather than whole years. If you can get v21 into your game (usually deleting all existing copies and downloading only the newest one works) you should be able to drop the cost reservation to 1 or even 0 quarters, and start paying dividends.
lugo
Engineer
Engineer
Posts: 100
Joined: 12 Oct 2010 13:55

Re: [GS] Villages Is Villages

Post by lugo »

Timberwolf wrote: 20 Nov 2020 21:52 I ran the game through to the end of 1952. With your current settings, you need £50,000 (DM 200.000) plus 1 year's running costs. Currently GBT Pro's running costs are DM 88.096.722; this means GBT Pro will start paying dividends once it has DM 88.296.722 in the bank. With only DM 34.956.552 on hand, the board haven't authorised a dividend.
Thanks for clarifying that. Maybe this could be explained in the gs company goals?
Timberwolf wrote: 20 Nov 2020 21:52 Edit: I've changed the cost-reserve variable to be quarters of a year, rather than whole years. If you can get v21 into your game (usually deleting all existing copies and downloading only the newest one works) you should be able to drop the cost reservation to 1 or even 0 quarters, and start paying dividends.
Ok, i´ll try that out!
Argus
Tycoon
Tycoon
Posts: 1203
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: [GS] Villages Is Villages

Post by Argus »

I have a problem similar to that described here viewtopic.php?f=65&t=87241. I changed the computer, transferred the games, downloaded the scripts and everything else again. The script does not load in old games.
Timberwolf
Transport Coordinator
Transport Coordinator
Posts: 318
Joined: 22 May 2006 18:25
Location: London-ish.
Contact:

Re: [GS] Villages Is Villages

Post by Timberwolf »

I've run into this from time to time, in my experience it happens if you don't have exactly the same version available locally as the one the game was created with.
Argus
Tycoon
Tycoon
Posts: 1203
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: [GS] Villages Is Villages

Post by Argus »

It didn't happen to me with other scripts, maybe they haven't been updated since? It's a pity, now I don't want to develop cities in many games. Is it possible to try to download an older version somewhere?
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 6 guests