[NoGo] CityDomination

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

User avatar
3iff
Tycoon
Tycoon
Posts: 1094
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: [NoGo] CityDomination

Post by 3iff »

What is the owner rating you were talking about above the HQ 3iff?
That's the score achieved by the owner for that town. So a player has say 6 stations and gets a score of 235. Below the town name you report "Owner: 235 AI Transporters"

It should then help a human player know how close/far away he is from getting ownership for himself... A display of current rating for each city would be great but I suspect that's not possible within the script but maybe in the script debug page?

Bugville: -25 (showing that the player rating for Bugville is 25 below the current owner)
Ratville: Owned (showing an owned town - maybe not necessary to show this.)

I appreciate it will be a severe problem for large maps with dozens of towns so you may not want to do this even if you can...

That earlier problem? You may have already fixed it...I'll check the new version again, now I understand more about how it works. I do know about the 3 month delay.

Ok, I'll test the new script soon. Thanks.

=============================

Only had time to test a solo game but it appears to work fine. Got to 5k then 10k population and now have a 15k target.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [NoGo] CityDomination

Post by Zuu »

3iff wrote:Bugville: -25 (showing that the player rating for Bugville is 25 below the current owner)
Ratville: Owned (showing an owned town - maybe not necessary to show this.)
And nothing in multiplayer?
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
3iff
Tycoon
Tycoon
Posts: 1094
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: [NoGo] CityDomination

Post by 3iff »

Sorry...never ever play multiplayer and so didn't give it a thought...
CrazySquirrel
Engineer
Engineer
Posts: 3
Joined: 03 Apr 2012 20:58

Re: [NoGo] CityDomination

Post by CrazySquirrel »

using version 9

every so often it just stops updating the population total and have to save & load to make it work again.

same for adding new towns, wont show the ownership until done save & load

also when AI companies go bust, the "population dominated" text stays on screen where the HQ used to be.

Thanks.
User avatar
3iff
Tycoon
Tycoon
Posts: 1094
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: [NoGo] CityDomination

Post by 3iff »

Another slight problem...

I lowered the town down to level 1 (it was height level 3 or 4 I think), but it now means the "Owner" sign is too high and crosses the town name. It's mainly a display annoyance and it's likely to affect very few people (probably just me!).

Not sure if it's an easy fix. If not, don't worry about it.
Attachments
Preshaw Transport, 30th Sep 2035.png
Preshaw Transport, 30th Sep 2035.png (105.69 KiB) Viewed 8170 times
User avatar
XfrankX
Engineer
Engineer
Posts: 19
Joined: 08 Aug 2011 09:56
Location: The Netherlands
Contact:

Re: [NoGo] CityDomination

Post by XfrankX »

EDIT...
Last edited by XfrankX on 24 Apr 2012 20:03, edited 1 time in total.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [NoGo] CityDomination

Post by Zuu »

Hello. Note that CityDomination is not my work.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
XfrankX
Engineer
Engineer
Posts: 19
Joined: 08 Aug 2011 09:56
Location: The Netherlands
Contact:

Re: [NoGo] CityDomination

Post by XfrankX »

oops, my apologies 11Runner... Great work ;-)
netwerkkabel
Engineer
Engineer
Posts: 1
Joined: 26 Apr 2012 08:16

Re: [NoGo] CityDomination

Post by netwerkkabel »

Morning all,

I am running CityDomination at the moment.
I'm only encountering one major problem.
When somebody is owner of a town, it cant be ghanged anymore?
If I removed all my busses and somebody else, or me with a new company comes and get ratings of 80%+ it wont change.
Somebody has a suggestion why it doesnt change owner?
Treid to set PendingTime at all different numbers, but no result.

Well thanks in advance,

Netwerk
fredbull
Engineer
Engineer
Posts: 10
Joined: 12 May 2012 13:54

Re: [NoGo] CityDomination

Post by fredbull »

Hi all,
i got a stupid question,but i ve never touched the files in openttd,
so before doing something wrong,i d like to know where do i have to unzip the files?

In the zip is a directory named citydomination-9,do i have to unzip this too or just the files in this directory?
Thanks for the answers :bow:
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: [NoGo] CityDomination

Post by Zuu »

You can find this script in the in-game online content section. Go there, mark it for download and click on the download button.

That is the easiest way to download it to a place where OpenTTD finds it.


If you download it manually, make sure to also get the dependencies that CityDomination needs. Assuming you run Windows Vista/7 put the CityDomination tar file here:
C:\Users\<you>\Documents\OpenTTD\game\

The dependencies (gs libraries) go here:
C:\Users\<you>\Documents\OpenTTD\game\library\

You do not need to unpack downloaded tar files. OpenTTD understands how to read tar files.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
fredbull
Engineer
Engineer
Posts: 10
Joined: 12 May 2012 13:54

Re: [NoGo] CityDomination

Post by fredbull »

Yep,by looking for something else i falled on that in the online content :]

By looking in the zip file,i also saw that there is no french translation.
I can maybe take care of that one.

I am just embarassed by the translation of the word "owner",that in french does not exactly mean what it has to mean in this situation.

I thought about a word meaning something like leader or why not dominator.

Am i right?

If yes,i ll try to translate it this week end :wink:
11Runner
Engineer
Engineer
Posts: 92
Joined: 01 Sep 2011 19:23
Location: Oregon, USA

Re: [NoGo] CityDomination

Post by 11Runner »

I appologise, I must have missed the email notifications of new posts or something... but about 2 months later I finally realize what I have been missing :)

As for all the comments I have missed or have been left unanswered,
I am just embarassed by the translation of the word "owner",that in french does not exactly mean what it has to mean in this situation.

I thought about a word meaning something like leader or why not dominator.
Yes, that would be fine. the dominator of the town would be best, but leader would be acceptable if that is the only way.
Morning all,

I am running CityDomination at the moment.
I'm only encountering one major problem.
When somebody is owner of a town, it cant be ghanged anymore?
If I removed all my busses and somebody else, or me with a new company comes and get ratings of 80%+ it wont change.
Somebody has a suggestion why it doesnt change owner?
Treid to set PendingTime at all different numbers, but no result.

Well thanks in advance,

Netwerk
Yes, they should be able to change. I will perform further investigation.
Image

SynTrans - A Synaptic Networking AI for OpenTTD
11Runner
Engineer
Engineer
Posts: 92
Joined: 01 Sep 2011 19:23
Location: Oregon, USA

Re: [NoGo] CityDomination

Post by 11Runner »

CityDomination v10

A standard release. Here are the improvements

* Admin Socket communication (after working with the BTPro community)

* Fixed owners not changing in towns (thank you netwerkkabel)

* Moved the sign down from the city name so it is more readable (thank you 3iff)

* Code documentation inserted in code (only useful if you are a developer)

Admin Port Instructions

When recieving data from the admin port, it arrives as follows:

action = "population"

company = the companyID of the company we are sending population data for

population = the population dominated for the given company

Note: the data arrives at the beginning of a new year. It will send the population dominated for each company.




Again, I am sorry for the delay. As always, the GS is also available on bananas. I hope you enjoy this release. :D
Attachments
CityDomination-10.tar
(60 KiB) Downloaded 215 times
Image

SynTrans - A Synaptic Networking AI for OpenTTD
User avatar
3iff
Tycoon
Tycoon
Posts: 1094
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: [NoGo] CityDomination

Post by 3iff »

V10...

Playing a small game with 5 towns. Dominated 4 but the 5th won't switch. Also, after setting the last goal, the program hasn't updated itself for more than a year...see picture. I am delivering passengers and just added a second route to the town..

I have the savegame if required. It's a fresh game.
Finport Transport, 8th Feb 1952.png
Finport Transport, 8th Feb 1952.png (72.01 KiB) Viewed 7578 times

Seems like the program crashed somehow (or entered an infinite loop?) I quit the game and reloaded it and the script is now recognising that I'm controlling all the towns. I'll keep watching things.
11Runner
Engineer
Engineer
Posts: 92
Joined: 01 Sep 2011 19:23
Location: Oregon, USA

Re: [NoGo] CityDomination

Post by 11Runner »

V10...

Playing a small game with 5 towns. Dominated 4 but the 5th won't switch. Also, after setting the last goal, the program hasn't updated itself for more than a year...see picture. I am delivering passengers and just added a second route to the town..

I have the savegame if required. It's a fresh game.

Attachment:

Finport Transport, 8th Feb 1952.png [ 72.01 KiB | Viewed 20 times ]



Seems like the program crashed somehow (or entered an infinite loop?) I quit the game and reloaded it and the script is now recognising that I'm controlling all the towns. I'll keep watching things.
Are you sure you are transporting cargo to and from that 5th town (the GS requires cargo to actually be transported before the station is counted)? I dont see any cars in that picture.
Image

SynTrans - A Synaptic Networking AI for OpenTTD
User avatar
3iff
Tycoon
Tycoon
Posts: 1094
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: [NoGo] CityDomination

Post by 3iff »

I'm of the impression that the script was probably in a loop. It didn't appear to have crashed. When I reloaded the save file, it reported me as owner of the town...see screenshot. This is exactly the same date as the original report.

I had 4 buses running to two stations in the town from/to nearby towns. Even running a couple of years on from my original report, I still hadn't 'won' Penley...but a restart showed me as owner immediately on a reload. That strongly suggests a script loop somewhere.
Finport Transport, 8th Feb 1952#1.png
Finport Transport, 8th Feb 1952#1.png (71.58 KiB) Viewed 7530 times
11Runner
Engineer
Engineer
Posts: 92
Joined: 01 Sep 2011 19:23
Location: Oregon, USA

Re: [NoGo] CityDomination

Post by 11Runner »

I'm of the impression that the script was probably in a loop. It didn't appear to have crashed. When I reloaded the save file, it reported me as owner of the town...see screenshot. This is exactly the same date as the original report.

I had 4 buses running to two stations in the town from/to nearby towns. Even running a couple of years on from my original report, I still hadn't 'won' Penley...but a restart showed me as owner immediately on a reload. That strongly suggests a script loop somewhere.

Attachment:

Finport Transport, 8th Feb 1952#1.png [ 71.58 KiB | Viewed 20 times ]
OK. I will see what I can do. Thanks for the report :)
Image

SynTrans - A Synaptic Networking AI for OpenTTD
User avatar
3iff
Tycoon
Tycoon
Posts: 1094
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: [NoGo] CityDomination

Post by 3iff »

That's what I do...find bugs (unfortunately).

Note that in the first report, the script was finding a new goal on 6/7/50 and then didn't report anything after that...and it was 8/2/52 when I saved the picture...so it's hunting around trying to find a new goal and getting confused.

Reloading the game does clear the confusion though so it'll be trickier to trace...sorry.
11Runner
Engineer
Engineer
Posts: 92
Joined: 01 Sep 2011 19:23
Location: Oregon, USA

Re: [NoGo] CityDomination

Post by 11Runner »

That's what I do...find bugs (unfortunately).

Note that in the first report, the script was finding a new goal on 6/7/50 and then didn't report anything after that...and it was 8/2/52 when I saved the picture...so it's hunting around trying to find a new goal and getting confused.

Reloading the game does clear the confusion though so it'll be trickier to trace...sorry.
This information helps A LOT... because I finally looked at the picture of the bug and the log and noticed the date it started finding the new goal and the actual date.

So in short, you just pointed out what the problem was! And when you reloaded the game, that took it out of its loop, and it probobly reentered it after it acknowledged you own the 5th town (that or its making goals of owning towns you already own). So overall, the solution is to not create a new goal.
Image

SynTrans - A Synaptic Networking AI for OpenTTD
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 9 guests