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

dromer20
Engineer
Engineer
Posts: 9
Joined: 19 Feb 2016 16:19

Re: Infrastructure sharing 2.1.1

Post by dromer20 » 30 Mar 2016 14:34

I figured it out, you can not make a switch into another network, you have to connect at an "open end" or station.

ksora
Engineer
Engineer
Posts: 11
Joined: 28 Oct 2014 16:49
Location: Osaka, Japan
Contact:

Re: Infrastructure sharing 2.1.1

Post by ksora » 26 Jun 2016 19:12

This is a version that leave bankrupt company's rail related infrastructure. Just really tiny patch.

diff: https://github.com/koreapyj/openttd-1.5 ... 2ff25.diff
Code: https://github.com/koreapyj/openttd-1.5.3/tree/IS2.2

User avatar
kamnet
Moderator
Moderator
Posts: 6892
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Infrastructure sharing 2.1.1

Post by kamnet » 26 Jun 2016 19:21

ksora wrote:This is a version that leave bankrupt company's rail related infrastructure. Just really tiny patch.

diff: https://github.com/koreapyj/openttd-1.5 ... 2ff25.diff
Code: https://github.com/koreapyj/openttd-1.5.3/tree/IS2.2
Some questions:
1) Once the company is removed from the game, is there any owner to the rail?
2) Is there any way for an active company to take ownership?
3) If not, how do you you handle removal of track?
4) If it remains unowned, do other companies continue to pay to use the track? If so, where does that money go?

ksora
Engineer
Engineer
Posts: 11
Joined: 28 Oct 2014 16:49
Location: Osaka, Japan
Contact:

Re: Infrastructure sharing 2.1.1

Post by ksora » 26 Jun 2016 20:25

kamnet wrote:1) Once the company is removed from the game, is there any owner to the rail?
Like roads, OWNER_NONE will own rails.
kamnet wrote:2) Is there any way for an active company to take ownership?
Currently that is impossible. I have some plans about that.
kamnet wrote:3) If not, how do you you handle removal of track?
You can't. I can make them removable but that makes possibility of sabotage. Maybe we can make "buy unowned assets" feature to avoid it.
kamnet wrote:4) If it remains unowned, do other companies continue to pay to use the track? If so, where does that money go?
Currently unowned track is free to use. I know that will make abuse in network games. Should I make options about unowned track fee?

User avatar
kamnet
Moderator
Moderator
Posts: 6892
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Infrastructure sharing 2.1.1

Post by kamnet » 27 Jun 2016 07:45

ksora wrote:
kamnet wrote:
kamnet wrote:3) If not, how do you you handle removal of track?
You can't. I can make them removable but that makes possibility of sabotage. Maybe we can make "buy unowned assets" feature to avoid it.
kamnet wrote:4) If it remains unowned, do other companies continue to pay to use the track? If so, where does that money go?
Currently unowned track is free to use. I know that will make abuse in network games. Should I make options about unowned track fee?
3) Is going to be your problem for abuse. Some jackhole comes in, runs rails everywhere and then bankrupts his company and leaves, with no way to remove his infrastructure? If the rail is marked unowned, then just like with roads, anybody should be able to remove it.

4) Isn't an issue, since the same case exists with roads - nobody owns it, it's free to use.

User avatar
supermop
Tycoon
Tycoon
Posts: 1047
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: Infrastructure sharing 2.1.1

Post by supermop » 27 Jun 2016 13:47

Nearest town inherits ownership of track? Players can then remove track according to same means they can remove town owned roads?

ksora
Engineer
Engineer
Posts: 11
Joined: 28 Oct 2014 16:49
Location: Osaka, Japan
Contact:

Re: Infrastructure sharing 2.1.1

Post by ksora » 27 Jun 2016 18:27

supermop wrote:Nearest town inherits ownership of track? Players can then remove track according to same means they can remove town owned roads?
Nope, Nobody owns like roads. I'll make it removable very soon.

Patagonicus
Engineer
Engineer
Posts: 25
Joined: 24 Oct 2011 20:42

Re: Infrastructure sharing 2.1.1

Post by Patagonicus » 30 Jul 2016 21:06

ksora wrote:I fixed some annoyances.

- Can be set sharing settings individually. Settings are stored by company.
- Can be crashed with trains belong to other company.
You sure that "is2.1.2_r27462_160124.diff [70.24 KiB]" applies well to OpenTTD r27462?

Right now I'm getting game crashes in the settings dialog, when I apply the file to the OpenTTD svn r27462 and compile/run it. The full source code from ksora's github works fine, but I need to apply it to a repository with other patches as well.

Will probably have a more thorough look later, but would be nice if anyone could confirm if it worked for them.

Eddi
Tycoon
Tycoon
Posts: 7424
Joined: 17 Jan 2007 00:14

Re: Infrastructure sharing 2.1.1

Post by Eddi » 31 Jul 2016 02:16

crashing in the settings window is usually due to incompatible settings strings. some parameters got shuffled around, and this shuffling must be done in the patch as well.
You might not exactly be interested in Ferion, but if you are, have fun :)

Patagonicus
Engineer
Engineer
Posts: 25
Joined: 24 Oct 2011 20:42

Re: Infrastructure sharing 2.1.1

Post by Patagonicus » 31 Jul 2016 09:24

I looked a little further into it this morning and noticed that the patch has been built on the 1.5 branch of the svn and not trunk. Trying to get around this right now...

Update 1: The deciding difference seems to be config.lib:

Code: Select all

60,61c60,61
< 	enable_assert="1"
< 	enable_strip="0"
---
> 	enable_assert="0"
> 	enable_strip="1"
Which also fits well that it crashes with the assert error: "Assertion failed at line 59 of src/strings_func.h: size <= parent.GetDataLeft()". So I guess the error have been in IS all the time but never found because asserts are turned off in the OpenTTD releases...

Let me see if I have the same error in Linux (this being Windows, compiled from Linux), so I can get a proper stack trace for it.

Update 2: Eddi was right, settings_fix.diff seems to be the fix for this problem.
Attachments
settings_fix.diff
(2.73 KiB) Downloaded 53 times

User avatar
FLHerne
Tycoon
Tycoon
Posts: 1538
Joined: 12 Jul 2011 12:09
Location: St Ives, Cambs, UK

Re: Infrastructure sharing 2.1.1

Post by FLHerne » 01 Aug 2016 17:46

kamnet wrote:4) Isn't an issue, since the same case exists with roads - nobody owns it, it's free to use.
Fairly exploitable, I can use it to build most infrastructure for free:
  • Start a second company.
  • Use the starting loan to build all the roads and track I need.
  • Connect those to my existing network.
  • Let the company go bankrupt.
  • Repeat when convenient.
Hey, free infrastructure with no maintenance costs! :)

If you avoid leaving unconnected ends, no other players can gain access to share it.

I wonder why this isn't commonly used for roads already. Maybe it's just not worthwhile - long roads aren't very competitive.
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have had a screenshot thread.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
Author of an incredibly boring stickied post about NewGRFs.

Eddi
Tycoon
Tycoon
Posts: 7424
Joined: 17 Jan 2007 00:14

Re: Infrastructure sharing 2.1.1

Post by Eddi » 01 Aug 2016 18:40

FLHerne wrote:Fairly exploitable, I can use it to build most infrastructure for free
there are server admins who can combat that kind of abuse by banning players.

also, this "unowned" property is free to alter and remove by all players, so that exploit is fairly dangerous

and if you're talking about single player, you might just disable infrastructure costs instead.

i see this as a fairly weak issue.
You might not exactly be interested in Ferion, but if you are, have fun :)

McZapkie
Tycoon
Tycoon
Posts: 1176
Joined: 18 Jan 2014 18:10

Re: Infrastructure sharing 2.1.1

Post by McZapkie » 02 Aug 2016 12:26

Maybe maximum velocity of 'abandoned' infrastructure should be decreased, because no maintenance is paid?
By the way, similar should apply to roads.

TheAmir259
Engineer
Engineer
Posts: 122
Joined: 30 May 2016 05:27
Location: Malaysia
Contact:

Re: Infrastructure sharing 2.1.1

Post by TheAmir259 » 03 Aug 2016 11:52

I've yet to try this. First of all, will this work with OTTD 1.6.1? Next, how do I install this thing?
Check out my OpenTTD Screenshots & Savefiles!

User avatar
Sylf
President
President
Posts: 958
Joined: 23 Nov 2010 21:25
Location: ::1

Re: Infrastructure sharing 2.1.1

Post by Sylf » 03 Aug 2016 20:39

TheAmir259 wrote:will this work with OTTD 1.6.1? Next, how do I install this thing?
No, it will not work with 1.6.1. In fact, it is a completely separate version.
Go to the very first post in this thread, follow the first link in that post, download the pre-compiled version that matches your system, and unzip the file somewhere. You'll find openttd executable file in the unzipped location.

WarbonnetDASH9
Engineer
Engineer
Posts: 6
Joined: 23 Oct 2016 07:10
Location: Green Bay Wisconsin

Re: Infrastructure sharing 2.1.1

Post by WarbonnetDASH9 » 18 Jan 2017 01:59

If a player has not put a password on their company, anyone can join it, so if the company bankrupts, and the player leaves, just join the company, remove the track, and switch back to your company, then let server admin remove that company. Or if you are the server admin, do it yourself.

User avatar
ir1n1o57
Traffic Manager
Traffic Manager
Posts: 209
Joined: 01 Jun 2017 10:03

Re: Infrastructure sharing 2.1.1

Post by ir1n1o57 » 05 Jul 2017 08:43

So, using this patch, it mean I could crush AI owned trains on the shared track?
That's not good, I think.
Sent from my Ubuntu 16.04 LTS

User avatar
kamnet
Moderator
Moderator
Posts: 6892
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Infrastructure sharing 2.1.1

Post by kamnet » 06 Jul 2017 03:01

ir1n1o57 wrote:So, using this patch, it mean I could crush AI owned trains on the shared track?
That's not good, I think.
You could. But if that was your goal, why would you be playing with IS?

User avatar
ir1n1o57
Traffic Manager
Traffic Manager
Posts: 209
Joined: 01 Jun 2017 10:03

Re: Infrastructure sharing 2.1.1

Post by ir1n1o57 » 06 Jul 2017 11:00

That's not my goal.

Definitely I want to prevent things like this.
Sent from my Ubuntu 16.04 LTS

User avatar
ir1n1o57
Traffic Manager
Traffic Manager
Posts: 209
Joined: 01 Jun 2017 10:03

Re: Infrastructure sharing 2.1.1

Post by ir1n1o57 » 06 Jul 2017 11:01

Crush AI's rv could bankrupt them, but train couldn't
Sent from my Ubuntu 16.04 LTS

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Bing [Bot] and 6 guests