[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

11Runner
Engineer
Engineer
Posts: 92
Joined: 01 Sep 2011 19:23
Location: Oregon, USA

Re: [NoGo] CityDomination

Post by 11Runner »

11Runner wrote:
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.
OK, I am pretty sure I have fixed the bug, but could you test it and double check 3iff? You would probobly be able to give it a more complete test anyway...

Just add the .tar file to your "<openttd dir>/game" folder. (your openttd dir is ~/.openttd on linux or My Documents->OpenTTD in windows)
Attachments
CityDomination-11BETA.tar
(60 KiB) Downloaded 109 times
Image

SynTrans - A Synaptic Networking AI for OpenTTD

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

Re: [NoGo] CityDomination

Post by 3iff »

Will do...

Another small 5-town game. Got goals to dominate 3 towns and easily dominated all 5 within a few months. This time, the script recognised that I already had the 2 other towns and didn't try to raise new goals.

As it's quick to test, I'll try a different approach...but it looks ok so far. Thanks.
Lesbourne Transport, 16th Jun 1950.png
Lesbourne Transport, 16th Jun 1950.png (24.95 KiB) Viewed 3504 times

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

Re: [NoGo] CityDomination

Post by 3iff »

Game 2 , small with 6 towns. This time, I only dominated towns when requested via a goal. No problems, and once I had all 6 towns the goals stopped.

Added an AI player who rapidly took ownership of 2 towns. I was expecting new goals telling me to regain ownership of these towns but nothing appeared (after 6 months+ of waiting). However, the script kept ticking away without locking up so that part seems fine.

Here MEGA transport have control but I haven't been set a new goal to re-dominate it.
Menstable Park Transport, 11th Jan 1952.png
Menstable Park Transport, 11th Jan 1952.png (71.34 KiB) Viewed 3502 times

11Runner
Engineer
Engineer
Posts: 92
Joined: 01 Sep 2011 19:23
Location: Oregon, USA

Re: [NoGo] CityDomination

Post by 11Runner »

OK. Thanks for the testing. Glad its working out!

I will go ahead and call it a release, but I will have to examine the goal system again. I dont know why it is not trying to goal you to domainate the new toans.

You are very good at testing programs, I just dont know how you do it. Keep it up :)
Image

SynTrans - A Synaptic Networking AI for OpenTTD

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

Re: [NoGo] CityDomination

Post by 3iff »

Thanks. I just play and sometimes notice that things don't work as expected.

I did used to write my own programs (in basic) and debugging these gave me experience.

Bug analysis and reporting is my very tiny contribution to the ottd scene.

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9394
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [NoGo] CityDomination

Post by planetmaker »

3iff wrote:Bug analysis and reporting is my very tiny contribution to the ottd scene.
It may seem tiny. But it's worth a lot; it needs people like you who report the quirks, bugs and oddities. Especially if as well described (and unagitated) as you do here.

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

Re: [NoGo] CityDomination

Post by 3iff »

I know...and I'm glad to make my contribution. Thanks.

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

Re: [NoGo] CityDomination

Post by fredbull »

Hi,i didnt see any answer at my last question'about french translation) than i became overbooked.
I still have many work but will try to find a few minutes to finally do this french translation.
"stay tuned" :lol:

Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4754
Joined: 09 Sep 2007 05:03
Location: home

Re: [NoGo] CityDomination

Post by Alberth »

Normally there is no need to ask or announce that you're doing it. Just do it and post the result.
Most authors are happy to integrate such data.

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

Re: [NoGo] CityDomination

Post by fredbull »

Ok here we go,here is the french translation :wink:
french.txt
french translation
(1.26 KiB) Downloaded 84 times

Ok Alberth it s noticed :bow:

I got a question,are the script updates applied on savedgames or a new game is needed to have the last bug fixes?

11Runner
Engineer
Engineer
Posts: 92
Joined: 01 Sep 2011 19:23
Location: Oregon, USA

Re: [NoGo] CityDomination

Post by 11Runner »

3iff wrote:
Bug analysis and reporting is my very tiny contribution to the ottd scene.


It may seem tiny. But it's worth a lot; it needs people like you who report the quirks, bugs and oddities. Especially if as well described (and unagitated) as you do here.
I very much appreciate your reports :) Please dont consider your help "tiny", because it has helped me out very much!
Ok here we go,here is the french translation

Attachment:
File comment: french translation
french.txt [1.26 KiB]
Downloaded 6 times
Thanks :) Will be put into next release.
I got a question,are the script updates applied on savedgames or a new game is needed to have the last bug fixes?
Yes, they should be. The script will issue a warning if the save version is older though but it should integrate nicely because I have not made any changes to the save/load part of CityDomination.

I may need to look into making some tune-ups to the save/load though. I am one of those people who forgets about such things.
Image

SynTrans - A Synaptic Networking AI for OpenTTD

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

Re: [NoGo] CityDomination

Post by fredbull »

I think i ve found a bug.

Image

The station is in place allready 8years long.
I was the owner of aurillac,the AI took it over,than i took it back when the AI went bankruptAi took it back once more,than went back bankrupt
Later i saw that.
U can see that the debug file says that the station is not officially part of the city(2 cases from center of the city :lol: )
I joined a second station 6 cases on the right,but nothing changed.

So bug? not bug?

There is no grf in this game.
Attachments
Domination2.sav
saved game
(95.64 KiB) Downloaded 91 times

11Runner
Engineer
Engineer
Posts: 92
Joined: 01 Sep 2011 19:23
Location: Oregon, USA

Re: [NoGo] CityDomination

Post by 11Runner »

The station is in place allready 8years long.
I was the owner of aurillac,the AI took it over,than i took it back when the AI went bankruptAi took it back once more,than went back bankrupt
Later i saw that.
U can see that the debug file says that the station is not officially part of the city(2 cases from center of the city )
I joined a second station 6 cases on the right,but nothing changed.

So bug? not bug?
This is very hard to tell. The reason it may choose not to count it as "not offically part of the city" is if the station is not transporting cargo. For some reason CityDomination thinks that is the case

But when I loaded the savegame, the problem did not appear, which makes this bug very hard to trace :)

So, it is a bug, I just dont know how to fix it at the moment... but you can fix the bug by saving and reloading the game :D
Image

SynTrans - A Synaptic Networking AI for OpenTTD

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

Re: [NoGo] CityDomination

Post by fredbull »

I ve allready seen that 80% of bugs are disappearing after saving and reloading.
Maybe another story of loop?

11Runner
Engineer
Engineer
Posts: 92
Joined: 01 Sep 2011 19:23
Location: Oregon, USA

Re: [NoGo] CityDomination

Post by 11Runner »

Sure.

What would be really helpful is a replay, but as far as I know, OpenTTD does not provide that. :)
Image

SynTrans - A Synaptic Networking AI for OpenTTD

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

Re: [NoGo] CityDomination

Post by fredbull »

FRAPS :wink:

matsydoodles
Engineer
Engineer
Posts: 10
Joined: 22 Jun 2013 13:08

Re: [NoGo] CityDomination

Post by matsydoodles »

Be cool to get this hooked up with the Story Book feature like in the NoCarGoal script!

As it would be nice to see how close you're to taking over a town!

11Runner
Engineer
Engineer
Posts: 92
Joined: 01 Sep 2011 19:23
Location: Oregon, USA

Re: [NoGo] CityDomination

Post by 11Runner »

Be cool to get this hooked up with the Story Book feature like in the NoCarGoal script!

As it would be nice to see how close you're to taking over a town!
I completely agree, I just need to update this script since i have not in a while... I should get back to that :)

I will put this on the list of stuff I have to do, but it may be a little while because I am quite busy right now. Thank you for your suggestion!

lugo
Engineer
Engineer
Posts: 95
Joined: 12 Oct 2010 13:55

Re: [NoGo] CityDomination

Post by lugo »

I'm really sorry if i'm missing something obious here.
But since there is not readme, i have the following question:
What is the goal of this script?
I.e. under what condition is the game ended or a company declared a "winner".

11Runner
Engineer
Engineer
Posts: 92
Joined: 01 Sep 2011 19:23
Location: Oregon, USA

Re: [NoGo] CityDomination

Post by 11Runner »

This gamescript does not end, it just declares a winner every year based on who "owns" the most towns.

It will also help the player expand by setting goals.

At this point, the script would probobly be considered "old" but should still be fun to play with :)

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 4 guests