[GS] RCG - A city growth GameScript for OTTD

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

borninussr
Engineer
Engineer
Posts: 6
Joined: 13 Dec 2017 05:48

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

Post by borninussr » 15 Dec 2017 04:21

Does it work with ECS? and I'm not understand how to set up it, can I download it NewGRF Settings?

User avatar
piratescooby
Transport Coordinator
Transport Coordinator
Posts: 297
Joined: 21 Nov 2014 12:39
Location: The Granite City.

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

Post by piratescooby » 15 Dec 2017 08:51

borninussr wrote:Does it work with ECS? and I'm not understand how to set up it, can I download it NewGRF Settings?
viewtopic.php?t=69827 , works well with ECS .Set up and useage well explained in the first part of topic .Agreat script have fun and enjoy .

German_RLI
Engineer
Engineer
Posts: 8
Joined: 07 Apr 2013 16:01

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

Post by German_RLI » 03 Mar 2018 09:29

Hi all!
I have updated the RCG-6 by Monty_Montana to work with FIRS3 economies (this option will probably work for earlier FIRS versions but I didn't test that).
But I get some strange messages in debug.
[+] Spoiler

Code: Select all

dbg: [script] spanish:1: warning: STR_TOWNBOX_0: Param idx #0 'STRING' doesn't match with template command 'STRING3'
dbg: [script] spanish:2: warning: STR_TOWNBOX_1: Param idx #0 'STRING' doesn't match with template command 'STRING3'
dbg: [script] spanish:2: warning: STR_TOWNBOX_1: Param idx #1 'STRING' doesn't match with template command 'STRING3'
dbg: [script] spanish:3: warning: STR_TOWNBOX_2: Param idx #0 'STRING' doesn't match with template command 'STRING3'
dbg: [script] spanish:3: warning: STR_TOWNBOX_2: Param idx #1 'STRING' doesn't match with template command 'STRING3'
dbg: [script] spanish:3: warning: STR_TOWNBOX_2: Param idx #2 'STRING' doesn't match with template command 'STRING3'
dbg: [script] spanish:4: warning: STR_TOWNBOX_3: Param idx #0 'STRING' doesn't match with template command 'STRING3'
dbg: [script] spanish:4: warning: STR_TOWNBOX_3: Param idx #1 'STRING' doesn't match with template command 'STRING3'
dbg: [script] spanish:4: warning: STR_TOWNBOX_3: Param idx #2 'STRING' doesn't match with template command 'STRING3'
dbg: [script] spanish:4: warning: STR_TOWNBOX_3: Param idx #3 'STRING' doesn't match with template command 'STRING3'
dbg: [script] spanish:5: warning: STR_TOWNBOX_4: Param idx #0 'STRING' doesn't match with template command 'STRING3'
dbg: [script] spanish:5: warning: STR_TOWNBOX_4: Param idx #1 'STRING' doesn't match with template command 'STRING3'
dbg: [script] spanish:5: warning: STR_TOWNBOX_4: Param idx #2 'STRING' doesn't match with template command 'STRING3'
dbg: [script] spanish:5: warning: STR_TOWNBOX_4: Param idx #3 'STRING' doesn't match with template command 'STRING3'
dbg: [script] spanish:5: warning: STR_TOWNBOX_4: Param idx #4 'STRING' doesn't match with template command 'STRING3'
And my tar isn't recognized as tar :(
[+] Spoiler

Code: Select all

dbg: [misc] The file '/home/german/.openttd/content_download/game/Renewed_City_Growth-7.tar' isn't a valid tar-file
Attachments
Renewed_City_Growth-7.tar
Renewed City Growth for FIRS3
(93 KiB) Downloaded 81 times

tttron
Engineer
Engineer
Posts: 4
Joined: 19 Jun 2005 15:56
Location: Germany

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

Post by tttron » 23 Apr 2018 17:48

Hi German_RLI,

I think I managed to fix your file. In info.nut, line 46 reads:

Code: Select all

_12 = "FIRS3: All economies", });
But as there are no more entries after this last one, this should read:

Code: Select all

_12 = "FIRS3: All economies"});
After packing all files up into a .tar again with 7-zip, the script seemingly works, i.e. it can be selected in the AI/Game Script Configuration and I can also select "FIRS3: All economies" in the script configuration.

I'm a complete noob with OpenTTD customization, hopefully I did this right. :mrgreen: I attached my fixed version of your archive.
Attachments
Renewed_City_Growth-7.tar
(93 KiB) Downloaded 243 times

lucj@n
Engineer
Engineer
Posts: 10
Joined: 21 Jul 2008 16:11
Location: Polska/Poland

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

Post by lucj@n » 01 Jul 2018 16:14

I can't get it work with FIRS 3.0.10. I tried the above and still I got a warning that industrial set from GS doesn't match the initial cargo list from the game. The same happened when I tried to do it manually as indicated here.
Does it work for you? Do you guys have any ideas what can I do to make this script work well with the newest FIRS3?

srschacher
Engineer
Engineer
Posts: 33
Joined: 15 May 2017 12:48

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

Post by srschacher » 29 Jul 2018 16:17

If you start the script with debug turned on, then look at the debug log and you will see the order that the commodities were loaded into the array. Make sure the order in your list in the script matches this order in the log.

If you need to change the order, be sure to change the relative position numbers in the lower part of the script that matches the commodities to the groupings.

Steve

User avatar
PET
Engineer
Engineer
Posts: 16
Joined: 12 Jul 2004 19:10
Location: Timisoara/Romania
Contact:

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

Post by PET » 02 Sep 2018 07:43

I have a stupid question. How do I enable this?

I downloaded the script & the dependency ... yet I don't see any target / goals for a city.

Image

EDIT: I'm trying this with no other NewGRF activated.

User avatar
piratescooby
Transport Coordinator
Transport Coordinator
Posts: 297
Joined: 21 Nov 2014 12:39
Location: The Granite City.

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

Post by piratescooby » 02 Sep 2018 08:41

Activating Gamescripts
1. In the main menu, click "AI/Gamescript Settings".

2. Select the text in the box under "Gamescript"

3. Click the top-left-most button in the bottom menu labeled "Select Gamescript"

4. Pick a gamescript of your choice from the pop-up menu.

Setting Gamescript parameters
1. In the main menu, click "AI/Gamescript Settings".

2. Select the text in the box under "Gamescript"

3. Click the 'Configure' button.

4. A row of parameters defined by the gamescript will show up. Change the desired parameters and click the 'Close' button to implement the changes. Use the 'Reset' button to set all parameters back to default values.

I hope this will help you .

User avatar
PET
Engineer
Engineer
Posts: 16
Joined: 12 Jul 2004 19:10
Location: Timisoara/Romania
Contact:

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

Post by PET » 03 Sep 2018 00:49

Ah thanks. So that's how you do it :)

Someone should write that in the readme.txt.


EDIT:

Image

Is this behavior normal? I'm bringing in both Goods & Passengers/Mail.

German_RLI
Engineer
Engineer
Posts: 8
Joined: 07 Apr 2013 16:01

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

Post by German_RLI » 24 Feb 2019 11:43

tttron wrote:Hi German_RLI,

I think I managed to fix your file. In info.nut, line 46 reads:

Code: Select all

_12 = "FIRS3: All economies", });
But as there are no more entries after this last one, this should read:

Code: Select all

_12 = "FIRS3: All economies"});
After packing all files up into a .tar again with 7-zip, the script seemingly works, i.e. it can be selected in the AI/Game Script Configuration and I can also select "FIRS3: All economies" in the script configuration.

I'm a complete noob with OpenTTD customization, hopefully I did this right. :mrgreen: I attached my fixed version of your archive.
Thanks a lot it really works!
Also complete noob for that, and cannot figure why tar generates errors while uncompressed dcript doesn't.

WalenTheBlue
Engineer
Engineer
Posts: 4
Joined: 06 Apr 2017 19:48

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

Post by WalenTheBlue » 25 Apr 2019 09:05

Is there any particular reason the script does not work under 1.9.0/1.9.1 version? It works just fine under 1.8 line.

Running RCGv5 from online content on win32 zip install.

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

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

Post by Brumi » 26 Apr 2019 09:31

What do you mean by the script not working? Are you getting an error message?

WalenTheBlue
Engineer
Engineer
Posts: 4
Joined: 06 Apr 2017 19:48

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

Post by WalenTheBlue » 28 Apr 2019 16:40

Brumi wrote:What do you mean by the script not working? Are you getting an error message?
Well, I kept the game running for an extra year and the growth appears to kick in at last. Its just that there is something fishy with the growth parameters. Minimum TGR of 10000 is ignored and 65535 days is displayed instead on the label under city name. Minimum supply for TGR growth of 50% does not work as expected either (or at least how I am used to it working in previous releases). Now the growth starts way after the destination is overflowed with passengers.

May it be only an information display/communication issue, with all the relevant mechanics under the hood working like they always did? I am running OTTD on what is basicly a toaster.

randomallfront
Engineer
Engineer
Posts: 3
Joined: 29 Jul 2018 17:39

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

Post by randomallfront » 06 May 2019 20:51

Walen, have a look here: viewtopic.php?f=33&t=73469&start=1520#p1210358

I raised this question with JGR who pointed to the change made to set_town_growth. Basically, any growth rates slower than 880 days will result in an integer overflow (65535).

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 2 guests