Page 8 of 11

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 26 May 2015 19:21
by Lafiir
You don't really need to download it from the forums.
The best way to install everything correctly is to run OTTD, click CheckOnlineContent, search for renewed and click Download.
After that, open GameScriptSettings, select the script and configure it to your liking.

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 26 May 2015 20:05
by Alberth
Reichsbahn wrote:I dont know at all what I must do with this " Renewed_City_Growth-5.tar.gz " file !
Throw it into your archive unpacker program. You can convert it either to a .tar file, or unfold it fully to a directory ( .tar is easier, as it's a single file, instead of a directory with a lot of stuff in it).
That result must be put in your 'script' directory for game scripts. Consult the 'readme.txt' file that you got with OpenTTD where that is (I don't know where Windows stores that, so I cannot tell you.)

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 27 May 2015 16:57
by Reichsbahn
Thanks to Lafiir for the answer, this helped me! :bow:

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 28 May 2015 17:19
by Eli Barracuda
Hello, Im new to the fourms and I just wanted to ask if it would be feesable to add industry labels to each industry. I've seen this in other scripts and it helps with finding industries amongs other ground scatter. Such as FIRS's stores(grocery store is the biggest offender) Which can be hidden behind buildings a such.

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 24 Jun 2015 19:46
by Wahazar
Hello, seems that there is bug:
sometimes city is shrinking despite of huge amounts of cargo delivered - town sign claims high growth rate, but instead this, population slowly drops and more and more empty spaces appears.
For example:
Image
and 30 years later:
Image

I suspect, that there is counter overflow, if large amount of cargo is supplied to the town.

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 25 Jun 2015 00:16
by supermop
I've had the same thing happen in a recent game with manpower industries and RCG. One city is getting 1000s of units every month and says grows every 9 days, but is being surpassed by other cities receiving 10s of units...

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 25 Jun 2015 12:47
by Wahazar
supermop, this city is Jarvela?

Interestingly, town is stuck even without game script (I checked local save from network game).

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 25 Jun 2015 22:48
by supermop
Yes, Jarvela, It grew very briefly in first few years of the game but since then has not expanded along any provided road stumps, whereas Salo grows voraciously.

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 27 Jun 2015 00:45
by keoz
Looks there's some stuff to solve.

Sorry guys, I was completely stuck with my work and somehow forgot OTTD for a while.

Summer being here, I'll try to come back on this. Step by step. :wink:

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 26 Jul 2015 12:08
by paulicus25
I have a couple of questions I would like to ask about how the intricacies of this script work for game play reasons.

Firstly, i congratulate you on such an amazing script. I am playing with this script for the first time whilst also making my début foray into FIRS as well as Cargo Destinations (passengers and mail only) and the combination of the three completely redefine and refresh playing openttd.

The main question I wish to ask is how to work out whether or not delivering a cargo will count towards the towns limits before actually trying to deliver it. I.e. how does the town define whether or not it counts the cargo as growth benefiting.

Take for example a small town with a FIRS brewery nearby. This brewery accepts fruit, which counts as 'general food', and makes food. How do I know whether the brewery/station I build is close enough to the town for the fruit which would be delivered to the industry to count towards the towns general food requirements and therefore not need to link the town up with a food route from the brewery? And is this distance fixed? Do I just have to deliver to an industry named after the town? Do I need to be in catchment area of a minimum of one house from the town? Do I need to be in catchment area of the square with the town name on? Is there a set number of squares distance? If so does this change as the town grows? Does it work by having the station on land owned by the town? How does this work?

Secondly, when a town gets big enough to accept a new category of cargo, does all town growth cease until this category is fulfilled or is this simply an extra opportunity to fuel growth even further? Is maximum town population capped unless you deliver specific cargoes or can it continue to grow at the same rate no matter if you fail to deliver the new categories?

If you could give guidance on how to make judgements on this that would be great, as it makes a difference on the decisions that I make during the course of the game. Thanks

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 15 Aug 2015 07:29
by arikover
Amazing Game Script, I always play with it.

I'd like to report a bug, even though it's not the script's fault: with recent updates of FIRS, a lot of cargos changed in Basic Economies (Beans instead of Grain in Tropic climate, for instance). Of course Renewed City Growth doesn't recognize those cargos, so they don't help grow the cities anymore. It's not really a big problem, because there are a lot of cargo in FIRS, so the script is playable, but it is still a bug, isn't it?

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 23 Aug 2015 00:58
by keoz
arikover wrote:Amazing Game Script, I always play with it.

I'd like to report a bug, even though it's not the script's fault: with recent updates of FIRS, a lot of cargos changed in Basic Economies (Beans instead of Grain in Tropic climate, for instance). Of course Renewed City Growth doesn't recognize those cargos, so they don't help grow the cities anymore. It's not really a big problem, because there are a lot of cargo in FIRS, so the script is playable, but it is still a bug, isn't it?
Well, I would more speak of a sort of "missconduct" (does this word exists in english ?) or "compatibility problem". RCG is built against some industry sets, in the state they are at some point of their development. If the sets changes their cargo labels, RCG should theorically be updated. And since I can't find time ATM to work on this, the script maybee sticks on some old versions.

Though, it's not a big deal to change the code to adapt to industry sets changes. It just needs some looks in the code and minor changes. Maybee I find time to that.

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 23 Aug 2015 01:12
by keoz
paulicus25 wrote:Firstly, i congratulate you on such an amazing script. I am playing with this script for the first time whilst also making my début foray into FIRS as well as Cargo Destinations (passengers and mail only) and the combination of the three completely redefine and refresh playing openttd.
Glad you like it. :D
paulicus25 wrote:The main question I wish to ask is how to work out whether or not delivering a cargo will count towards the towns limits before actually trying to deliver it. I.e. how does the town define whether or not it counts the cargo as growth benefiting.
Each town has requirements for each cargo category. If the cargo you bring there fits to the requirements, it counts for growth. If the cargo exceeds requirements, the exceeding part is not taken in count.
paulicus25 wrote:Take for example a small town with a FIRS brewery nearby. This brewery accepts fruit, which counts as 'general food', and makes food. How do I know whether the brewery/station I build is close enough to the town for the fruit which would be delivered to the industry to count towards the towns general food requirements and therefore not need to link the town up with a food route from the brewery?
Actually, I never asked myself the question that way. For what I understand the code, each industry "belongs" to a town, which can be known by just cheking its name, like: "Paris brewery", "London's Livestock yard". I assume that this is enough to consider that the deliveries to such industry can be considered as a delivery to the town, and when I were working on the code, this conception was never contradicted by my observation. That's the best I can tell on this.
paulicus25 wrote:And is this distance fixed? Do I just have to deliver to an industry named after the town? Do I need to be in catchment area of a minimum of one house from the town? Do I need to be in catchment area of the square with the town name on? Is there a set number of squares distance? If so does this change as the town grows? Does it work by having the station on land owned by the town? How does this work?
That's to many questions, which let's me think you're to nervous. Did you have observations that contradicted the intuitive way of playing ? ;)

paulicus25 wrote:Secondly, when a town gets big enough to accept a new category of cargo, does all town growth cease until this category is fulfilled or is this simply an extra opportunity to fuel growth even further? Is maximum town population capped unless you deliver specific cargoes or can it continue to grow at the same rate no matter if you fail to deliver the new categories?
No, growth doesn't stop. Each cargo category counts only for a part of growing potential, so that if a new cargo category type is needed, and you don't deliver it, growth will just start decreasing in respect to its best potential growth rate, but still grow. But, more it grows, more the new cargo type is needed, and so with time ongoing and the town growing, grow will finally stop (which means: be extremely low).
paulicus25 wrote:If you could give guidance on how to make judgements on this that would be great, as it makes a difference on the decisions that I make during the course of the game. Thanks
[/quote]

I hope I answered to most of your questions. If something still isn't clear, just tell me. ;)

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 28 Aug 2015 17:14
by paulicus25
Thanks for the info. Its rather useful.

However the main thing I really wanted to know most out of the whole list of questions was the bit about how whether or not delivering something to a specific location is determined to be delivering it to the town.

Since posting I have taken a risk in my game (something which my instinctive gut feeling tells me never to do - risks are bad!) and decided to terminate the food supply to the town adjacent to the brewery in the hope that the fruit being dropped off at the brewery counts towards the food count. To my surprise after a long while, it does, even though said fruit is not consumed by the town but is turned into food which I can subsequently take somewhere else...which I did. My surprise is mainly since the brewery is a whopping 26 squares way from the town centre square (y'know the one with the name over it) and the station is 28! That's quite a distance! See Below! Sorry about the image. Still havent perfected turning it into a link yet. Please advise.

Image

The overall picture is clear in this case - delivering to that station was enough. BUT by that point the town had expanded so that it had almost encompassed the brewery. So is the acceptance due to the fruit being supplied to the brewery, the nearness of the station to the town centre, by delivering within catchment range of a house which was built and owned by the town, or simply by the station being on a square of land owned by the town? Or is it some other reason that I have yet to notice? Summary: I still have not worked out how the game works out whether a delivery counts to the target or not.

Which, considering I play Openttd with a 'plan the entire network out before laying any pieces of track' agenda (normally pretty easy since I've been playing since OTT), is somewhat of an unwanted unknown factor. Kind of like rolling a dice to find out whether you make a profit or not.

Guess atm I just have to take those risks and hope the rest of my network can prop up my wild unrestrained spending! Now I just have to somehow figure out how to get a company rating of more than 900 whilst using cargo destinations without scrapping all my road vehicles, but that's not really a question for this thread!

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 29 Aug 2015 11:00
by bvoice360
Industries effectively 'belong' to the closest town and, if cargo is delivered to an industry 'belonging' to a specific town, then it counts. It does not matter how far it is from the town centre as long as it is the closest town. Even delivering something to an industry at the opposite corner of a 4096x4096 map will count if there is only one town

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 11 Dec 2015 19:29
by bouchacha
McZapkie wrote:Hello, seems that there is bug:
sometimes city is shrinking despite of huge amounts of cargo delivered - town sign claims high growth rate, but instead this, population slowly drops and more and more empty spaces appears.
For example:
[snip]
I suspect, that there is counter overflow, if large amount of cargo is supplied to the town.
Does anyone know which version of FIRS this overflow bug happens on?

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 11 Dec 2015 20:18
by Sylf
bouchacha wrote:Does anyone know which version of FIRS this overflow bug happens on?
I don't think this is related to FIRS. If it's an integer overflow in the supplies made to towns, that would be a game script issue.
And I think I see ECS industries in the screen shots in the quoted post.

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 07 Mar 2016 10:23
by German_RLI
Since v2.0 FIRS economies use dynamic cargo id assigment.

To avoid supplying cities with wood as food :) and other oddly behaviour, I modified code like this:
[+] Spoiler
/* returns integer id of cargo with given tag. If no such cargo tag in (0..31 range) returns 0 and writes to log. */
function CargoIdByLabel(label)
{
local i=0;
while ((GSCargo.GetCargoLabel(i)!=label)&&(i<32))
++i;
if (i<32)
return i;
else
{
Log.Info("Warning: game's cargo list differ from settings.", Log.LVL_INFO);
return 0;
}
}
function DefineCargosBySettings()
{
[skipped]
case(5): // FIRS - Firs Economy
::CargoCat <- [
// Pass&Mail
[
CargoIdByLabel("PASS"),
CargoIdByLabel("MAIL")
],
// Generic Food
[
CargoIdByLabel("BEER"),
CargoIdByLabel("FOOD"),
CargoIdByLabel("FRUT")
],
// Generic Goods
[
CargoIdByLabel("BDMT"),
CargoIdByLabel("GOOD"),
CargoIdByLabel("PETR")
],
// Raw Materials
[
CargoIdByLabel("AORE"),
CargoIdByLabel("CLAY"),
CargoIdByLabel("COAL"),
CargoIdByLabel("FISH"),
CargoIdByLabel("GRAI"),
CargoIdByLabel("IORE"),
CargoIdByLabel("LVST"),
CargoIdByLabel("MILK"),
CargoIdByLabel("OIL_"),
CargoIdByLabel("SCMT"),
CargoIdByLabel("FICR"),
CargoIdByLabel("SAND"),
CargoIdByLabel("GRVL"),
CargoIdByLabel("SGBT"),
CargoIdByLabel("WOOD"),
CargoIdByLabel("WOOL")
],
// Transformed Materials
[
CargoIdByLabel("RFPR"),
CargoIdByLabel("ENSP"),
CargoIdByLabel("FMSP"),
CargoIdByLabel("MNSP"),
CargoIdByLabel("STEL"),
CargoIdByLabel("RCYC"),
CargoIdByLabel("WDPR")
]];
This absolutely isn't a programming masterpiece, everythig done in a very straightforward way, and definitly there should be some way to do it right. But it looks to work fine :)

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 10 Mar 2016 12:08
by Lechuza
My cities keep shrinking no matter what I do, is there an easy way to make it so towns never lose population? even if you stop supplying them?

Re: [GS] RCG - A city growth GameScript for OTTD

Posted: 11 Mar 2016 18:48
by Matze!
good Work
German Version Please :bow: