CityBuilder 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

Post Reply
freshrebel
Engineer
Engineer
Posts: 6
Joined: 19 Oct 2015 10:30

CityBuilder script

Post by freshrebel »

Hello

i want to start a game with the CityBuilder script. but the script always crashes. I attatched the error in a screen cap
Attachments
Capture.PNG
Capture.PNG (6.35 KiB) Viewed 3403 times
ST2
Engineer
Engineer
Posts: 63
Joined: 07 Apr 2011 14:17

Re: CityBuilder script

Post by ST2 »

hello

it's similar to this, that is on the gamescript topic :)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: CityBuilder script

Post by planetmaker »

Moved to the AI and game script sub-forum as it's an issue with that particular script. In the topic dedicated to this script it seems to be already reported and some solution or workaround proposed: http://www.tt-forums.net/viewtopic.php? ... 6#p1152936 albeit there seems to be no easy-to-download update yet available. I suggest to keep the discussion there (to make it easier for the script author).
freshrebel
Engineer
Engineer
Posts: 6
Joined: 19 Oct 2015 10:30

Re: CityBuilder script

Post by freshrebel »

thanks for the awnsers, i'll look at it when i'm home.

sorry for the misplace of the topic but i'm new here :)
freshrebel
Engineer
Engineer
Posts: 6
Joined: 19 Oct 2015 10:30

Re: CityBuilder script

Post by freshrebel »

is it normal the citybuilder-113 is a rar file?
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: CityBuilder script

Post by Alberth »

More likely, rar attaches its icon to every archive file it recognizes.
Did you really check the file extension?

To use, it should be a .tar file, or you can unpack it to a directory with files.
(and yes, afaik rar also claims to know tar)
Being a retired OpenTTD developer does not mean I know what I am doing.
freshrebel
Engineer
Engineer
Posts: 6
Joined: 19 Oct 2015 10:30

Re: CityBuilder script

Post by freshrebel »

it was a tar file. my bad :)
but how do i change the file i have to change? do i extract it first? because if i change it and save it it jumps back to what it was before.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: CityBuilder script

Post by Alberth »

That question didn't make much sense, but after some decoding, I guess you're talking about changing the script with suggested change.

Indeed, the usual approach is to unpack the tar to a directory with files (although technically, it's hardly unpacking, as tar doesn't compress anything), and change the file you want.
You can put everything back into a tar file if you like, but you can also just move the directory into the game script directory of your openttd (and make any tar with the same version unavailable for openttd, to be on the safe side), then start openttd, and it should pick up the modified version.
Being a retired OpenTTD developer does not mean I know what I am doing.
freshrebel
Engineer
Engineer
Posts: 6
Joined: 19 Oct 2015 10:30

Re: CityBuilder script

Post by freshrebel »

with my question i was refering to the solutions given earlier in this topic.

but thanks for the help, i'll try it
freshrebel
Engineer
Engineer
Posts: 6
Joined: 19 Oct 2015 10:30

Re: CityBuilder script

Post by freshrebel »

ok thank you guys your help solved my problem

so for other people having this problem:
  1. extract the "CityBuilder-113.tar" file
  2. open the file comp.nut with notepad(or something alike)
  3. search for "MoveHQ(hq, towns);"
  4. and change it in MoveHQ(hq);
  5. save the file
  6. get everything into a tar file again
I have no further questions
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 6 guests