Infrastructure sharing 2.1.1

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

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

Re: Infrastructure sharing 2.1.1

Post by planetmaker »

neob wrote:does 'Infrastructure sharing' allows single player gameplay with bot's?
In principle yes. But you'll confuse the hell out of the poor AI players if you force it on them. They don't know about infrastructure sharing.
User avatar
neob
Chief Executive
Chief Executive
Posts: 687
Joined: 29 Dec 2009 02:56

Re: Infrastructure sharing 2.1.1

Post by neob »

planetmaker wrote:
neob wrote:does 'Infrastructure sharing' allows single player gameplay with bot's?
In principle yes. But you'll confuse the hell out of the poor AI players if you force it on them. They don't know about infrastructure sharing.
i would love to have a little sandbox game with bots managing things i dont like road & sea transportation for example.
but i was thinking about city owned infrastructure and with few newgrf can look very nice, like:
http://www.tt-forums.net/download/file.php?id=117211
http://www.tt-forums.net/download/file.php?id=89311
Image
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

Re: Infrastructure sharing 2.1.1

Post by Zutty »

planetmaker wrote:
neob wrote:does 'Infrastructure sharing' allows single player gameplay with bot's?
In principle yes. But you'll confuse the hell out of the poor AI players if you force it on them. They don't know about infrastructure sharing.
If someone could add some functions to the NoAI API, then AI developers might be able to make a start.
PathZilla - A networking AI - Now with tram support.
Tvel
Engineer
Engineer
Posts: 77
Joined: 29 Mar 2008 22:42
Skype: tvel___
Location: Bulgaria

Re: Infrastructure sharing 2.1.1

Post by Tvel »

I was thinking of trying to make an AI that copies profitable trains in IS game, but I have no time now to try.
Anyone knows if this is possible without API changes?
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Infrastructure sharing 2.1.1

Post by Zuu »

IIRC you can't get information about vehicles of other companies in the current NoAI API. So that at least would need to be made possible. An AIList for stations, depots of other companies would also be nice to have. Though, if you just can get hold of trains and then copy their orders and hope that they contain at least one depot then you just need the vehicle index of the vehicle as well as a change to make non-own vehicles valid.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Infrastructure sharing 2.1.1

Post by petert »

neob wrote:does 'Infrastructure sharing' allows single player gameplay with bot's?
There isn't an AI that is made for Infrastructure Sharing (eg Connects to your tracks, leaves open spaces on tracks), but you could probably use the move company cheat to move between companies and use the AI's track.
Tvel
Engineer
Engineer
Posts: 77
Joined: 29 Mar 2008 22:42
Skype: tvel___
Location: Bulgaria

Re: Infrastructure sharing 2.1.1

Post by Tvel »

Thanks, Zuu. I reached the same conclusion, but I was not sure.
Hirundo
Transport Coordinator
Transport Coordinator
Posts: 298
Joined: 27 Jan 2008 13:02

Re: Infrastructure sharing 2.1.1

Post by Hirundo »

Zuu wrote:IIRC you can't get information about vehicles of other companies in the current NoAI API. So that at least would need to be made possible. An AIList for stations, depots of other companies would also be nice to have. Though, if you just can get hold of trains and then copy their orders and hope that they contain at least one depot then you just need the vehicle index of the vehicle as well as a change to make non-own vehicles valid.
I do not expect AI writers to make their AIs compatible with a patch that is used mostly in multiplayer, without any AIs. Writing and improving AIs is already hard enough, without having to support ever-changing patches.

On my side, to make InfraSharing work for AIs I'd have to do a lot of patching to the AI code, which takes precious coding time. Also, it may break assumptions of other AIs and their compatibility with trunk. Therefore I have decided to leave out any specific AI support. See also http://dev.openttdcoop.org/issues/6

However, if you wish to make your AI somewhat compatible, it's possible to read the values of the advanced settings related to sharing (sharing.sharing_rail etc) You can use these values to do whatever you want, basically.
Create your own NewGRF? Check out this tutorial!
Segment
Engineer
Engineer
Posts: 2
Joined: 13 Jan 2010 11:40

Re: Infrastructure sharing 2.1.1

Post by Segment »

Is it possible to implement block construction of stations and bus stops in cities that already have stopped another user? When I first built a stop or station in the city or at the source of resources, other users can only use only my stations and bus stops and as a result of paying rent :twisted: :roll:
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure sharing 2.1.1

Post by planetmaker »

Segment wrote:Is it possible to implement block construction of stations and bus stops in cities that already have stopped another user? When I first built a stop or station in the city or at the source of resources, other users can only use only my stations and bus stops and as a result of paying rent :twisted: :roll:
That's neither possible nor intended to implement and would be totally out of scope. Both towns and industries are not owned by any player - you're offering transport services only.

You might try to buy the exclusive transport rights; then goods and pax would only be transported to your stations; mind that it is considered bad behaviour on a number of hosts.
Segment
Engineer
Engineer
Posts: 2
Joined: 13 Jan 2010 11:40

Re: Infrastructure sharing 2.1.1

Post by Segment »

The idea is good when you play with friends and people who will not conduct an aggressive policy, and are configured to share resources. In general, the idea was born when I was thinking about how you can divide the map into sections (areas) where in each plot your boss (mini-state).
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Infrastructure sharing 2.1.1

Post by planetmaker »

Segment wrote:The idea is good when you play with friends and people who will not conduct an aggressive policy, and are configured to share resources. In general, the idea was born when I was thinking about how you can divide the map into sections (areas) where in each plot your boss (mini-state).
Well, I consider this one of the principle admin tasks: setting house rules, making sure scenario rules are obeyed. Social problems cannot be overcome by technical means.
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Infrastructure sharing 2.1.1

Post by Wasila »

How do you actually get to the Infrastructure Sharing window in-game?
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Infrastructure sharing 2.1.1

Post by petert »

It was taken out in the latest version(s), 2.1 and on. Now you should use the Infrastructure Sharing settings in Advanced Settings -> Competitors -> Infrastructure Sharing.
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Infrastructure sharing 2.1.1

Post by Wasila »

So there's no longer an ability to have fare wars where people compete to have the cheapest networks to run on?
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Infrastructure sharing 2.1.1

Post by petert »

No, it's globally set by the server. I think Hirundo might re-implement it later, but it was a lot of code to take care of before.
User avatar
WWTBAM
Moderator
Moderator
Posts: 3689
Joined: 02 Apr 2005 07:01
Location: Sydney NSW Antipodea
Contact:

Re: Infrastructure sharing 2.1.1

Post by WWTBAM »

I am just posting to say that the latest SVN patch on the devzone does not apply to current trunk.
Formerly known as r0b0t_b0y2003, robotboy, roboboy and beclawat. The best place to get the most recent nightly builds of TTDPatch is: http://roboboy.users.tt-forums.net/TTDPatch/nightlies/
User avatar
jonty-comp
Tycoon
Tycoon
Posts: 2542
Joined: 22 Oct 2005 16:05
Location: Chesterfield, England
Contact:

Re: Infrastructure sharing 2.1.1

Post by jonty-comp »

Well that's hardly surprising, otherwise they wouldn't need to update it to match trunk revisions!

I had a crash on my server the other day, but it doesn't look all that related to IS2 (disclaimer: it could well be, I have no idea about this stuff):

Code: Select all

Crash reason:
 Signal:  Aborted (6)
 Message: Assertion failed at line 1177 of /home/openttd/is2/2.1.1/src/openttd.cpp: memcmp(&v->cargo, buff, sizeof(VehicleCargoList)) == 0

OpenTTD version:
 Version:    IS2.1.1 (1)
 NewGRF ver: 100048eb
 Bits:       32
 Endian:     little
 Dedicated:  yes
 Build date: Dec 31 2009 09:41:19

Stacktrace:
 [00] /home/openttd/is2/2.1.1/bin/openttd(_ZNK12CrashLogUnix13LogStacktraceEPcPKc+0x43) [0x82511d3]
 [01] /home/openttd/is2/2.1.1/bin/openttd(_ZNK8CrashLog12FillCrashLogEPcPKc+0xaf) [0x8193fdf]
 [02] /home/openttd/is2/2.1.1/bin/openttd(_ZNK8CrashLog12MakeCrashLogEv+0x9c) [0x81940ec]
 [03] /home/openttd/is2/2.1.1/bin/openttd [0x825112b]
 [04] /lib/libc.so.6 [0xb7d1c5f8]
 [05] /lib/libc.so.6(gsignal+0x46) [0xb7d1c556]
 [06] /lib/libc.so.6(abort+0x188) [0xb7d1dd78]
 [07] /home/openttd/is2/2.1.1/bin/openttd [0x8241f9e]
More info available on demand!
Hirundo
Transport Coordinator
Transport Coordinator
Posts: 298
Joined: 27 Jan 2008 13:02

Re: Infrastructure sharing 2.1.1

Post by Hirundo »

Could you provide an (auto)savegame that causes this crash within a finite amount of time? Also, if it was created, crash.sav would be appreciated.

I tend to agree that it is not IS-related, but taking a look shouldn't hurt.
Create your own NewGRF? Check out this tutorial!
User avatar
jonty-comp
Tycoon
Tycoon
Posts: 2542
Joined: 22 Oct 2005 16:05
Location: Chesterfield, England
Contact:

Re: Infrastructure sharing 2.1.1

Post by jonty-comp »

It would seem that the most recent autosave I have doesn't reproduce the error, but here's the crash.sav.
Attachments
crash.sav
(911.55 KiB) Downloaded 109 times
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 9 guests