News:

Want to praise Simutrans?
Your feedback is important for us ;D.

Insolvency and takeovers in multi-player games

Started by jamespetts, January 05, 2020, 05:02:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

For some time, the current development projects thread has had a section on mergers and insolvent administration in the following terms:
QuoteAlthough I don't think that implementing a stock market is a good idea (Simutrans has a different focus to Railroad Tycoon), allowing a simplified form of takeovers and mergers is a good idea for multi-player games, I think.
A merger should simply be when two players mutually decide that they wish their transport companies to merge into one, controlled by both players (just as multiple players can simultaneously control a transport company now if they both use the same password, or the account is not password protected). If one player requests a merger with another player, and the other player accepts, then all the assets of both players should become owned by the player with the lowest player number, the higher number player should be reset to a neutral state, and either password used to access either of the two previous companies should be useable for the new company (or, alternatively, if it is not feasible to have two passwords for one company, all clients playing as both merging companies should be sent a game message showing a new password which will in future apply to the new, merged company).

A takeover should occur either by mutual agreement, in the same way as a merger (except that whichever player is taking over the other player retains its identity even if it has the higher player number, and there is no change of password), or when a company is in insolvent administration.

A company should be in insolvent administration for a fixed period set in simuconf.tab (default: one year) instead of being liquidated whenever it is insolvent ("bankrupt" in Simutrans-Standard terminology). Within that time, it can be taken over as a going concern by any player (who will take on all of its assets and liabilities), or liquidated at the end of the period. There should be multiple options for liquidation, selectable in simuconf.tab: full liquidation, in which all infrastructure simply disappears, but vehicles are placed on the secondhand market (see the feature description above) for a fixed period (default: 1 year), after which they will be withdrawn, presumed scrapped; mothballing liquidation, in which vehicles are placed on the secondhand market as before, but the infrastructure is replaced by mothballed equivalents (see the mothballing feature above - some consideration will need to be given to what to do with stations - have a system for mothballing them, perhaps; preserve them as they are, or remove them?); and nationalisation, where the infrastructure is taken over by the public player (vehicles again are sold on the secondhand market).
Recently, I have modified the planned feature as follows:

QuoteCurrently, no transport company can take over another. When a company becomes insolvent, its assets are liquidated after a set period; there is no option for another player to rescue the insolvent company. A solvent company cannot be liquidated. This leads to anomalies in multi-player games when players abandon the game or their companies fail.

A better system would be to allow takeovers. A takeover of a transport company should be possible either where (1) the player has elected to allow a takeover; or (2) the company is in a state of insolvent administration (see below). The company taking over the other company should be able to do so at the cost of the net book value of the assets of the company to be taken over, unless that value is negative, in which case the company pays nothing. In either case, the company taking over would take control of all the assets of the company taken over (apart from its headquarters, which would be destroyed), but would also take on responsibility for all its liabilities. A company should only be able to take over another company if it has the cash to pay the price of doing so and would not immediately itself be insolvent by taking over the other company's liabilities.

A player might voluntarily elect to put a company up for takeover in a multi-player game if he/she no longer wishes to play on that server, or no longer has time to do so; or alternatively, if he/she realises that her/his company is in trouble and would prefer to start afresh, leaving a more successful company to rescue what is left. Alternatively, two players might wish to co-operate and play one company, in which case, one player may take over the other's company, and then give the other player the first player's password so that they can both play the same company. In both cases, a player slot will have been freed for a new player to join.

Whenever a company becomes insolvent, it should continue to operate for a period of time (default 1 year, configurable in simuconf.tab) in administration. During this period, the player would continue to be able to control the company, but it would be liable for takeover by any other player. If at any end of month during that time the company ceased to be insolvent, it would leave insolvent administration and full control would continue to rest with the player, the company no longer being able to be taken over (unless the player subsequently voluntarily permits this as above). If at the end of the specified period the company has neither been taken over nor ceased to be insolvent, the company should revert to a dormant state for a further specified period (default 1 year, configurable in simuconf.tab): all convoys should be automatically ordered to return to their depots and be put up for sale (see above on a second-hand market in vehicles), the company should cease to be playable, but remain available for takeover. On takeover, all vehicles would automatically be withdrawn from sale. Any takeover of a company in this state would have to pay only the value of its assets and would not have to take over its liabilities. If at the end of the further period, an insolvent company were not taken over, it should then be liquidated in the same way as at present, and all the company's vehicles would be scrapped.
The principal change is to abolish the idea of mergers, which would be tricky to implement because of the need to combine passwords, and I suspect would not be used a great deal based on the fact that I have not ever seen two players co-operate to control a single company in a network game to date.

Given that abandoned companies, which eventually become insolvent and are liquidated, are a common occurrence in multi-player games, and such dormant companies can often clog up the player list and game world to the exclusion of new players who want to join, and also that the liquidation of a company can be disruptive to other players who rely on the liquidated company's networks, expediting this to some extent seems potentially worthwhile. This version of the set of features is likely to be easier to implement than that originally planned and probably easier for players to understand.
I should be interested in constructive feedback on the revised proposal.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Mariculous

Quote from: jamespetts on January 05, 2020, 05:02:49 PMother players who rely on the liquidated company's networks
A liquidated player does not have a network anymore as the network becomes mothballed. At least as far as I observed.
However, the idea of takeovers instead of liquidation is great.

wlindley

Support.

This should greatly improve long-lasting games.

CK

I support this, although I would prefer to have the option of only taking over a company's rights of way as opposed to all their assets (including possibly dated vehicles which would have to be replaced en masse)

Mariculous

You could withdraw these lines if you don't want them. I don't think this should be a takeover related feature.

However, I guess overview about used vehicle types is a more general issue that could be solved by a vehicle type grouping in the vehicle list but that's off topic here.

jamespetts

Thank you all for your feedback. I suspect that Ves's vehicle manager project may well help to increase the usability in dealing with dated vehicles in taken over companies.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ves

Quote from: jamespetts on January 06, 2020, 11:26:58 AM
Thank you all for your feedback. I suspect that Ves's vehicle manager project may well help to increase the usability in dealing with dated vehicles in taken over companies.
Hopefully, very much yes! ;D

And, I support the changes!

On the whishlist I would like to be able to sell off parts of a network, meaning both infrastructure, vehicles, maybe even the schedules it self.
If the suggested implementation could perhaps bed for such features in the future (for instance by making it easy in the code to switch owner of objects) such features could be added on later. And of course that would need a new window.... 8)

jamespetts

Quote from: Ves on January 06, 2020, 08:38:44 PM
Hopefully, very much yes! ;D

And, I support the changes!

On the whishlist I would like to be able to sell off parts of a network, meaning both infrastructure, vehicles, maybe even the schedules it self.
If the suggested implementation could perhaps bed for such features in the future (for instance by making it easy in the code to switch owner of objects) such features could be added on later. And of course that would need a new window.... 8)

I anticipate that the latter feature would be much more difficult to code (by quite a long way - many times more difficult than the rest of the features combined), but I can try to take into account the possibility of doing this in the future when designing the code for this.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

I have now started work on an implementation of this in the "insolvency" branch on Github. I have so far implemented a basic takeover algorithm; I have not yet started work on any of the insolvency features.

I have not yet implemented a UI for this to allow it to be tested, however. Would any of our usual UI designers (Ranran? Ves?) be interested in setting up a basic UI for (1) allowing a company in the game to toggle the "voluntary takeover" setting to allow itself to be taken over; and (2) allowing a company in the game to take over another company (call the can_take_over() method to check whether a takeover is allowed, and the take_over() method to do the actual work)?

There may be more things to be done with company/insolvency UI in due course, but it would be very helpful to have a basic UI for this at this stage to allow me to test. Thank you in advance.

(Incidentally, the current plan is to implement this and the private car routes, and then switch back to the longer-term project of vehicle maintenance and convoy re-combination (including Ves's vehicle manager UI), the idea being to get high impact, relatively lightweight features, of which this is the last, completed before turning to a long-term feature that requires a great deal of work uninterrupted).
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ves

This is great news, and shouldn't be very difficult. It mostly depends on how you would like to be able to perform the task: inside an existing window (eg the player window) or as a new window with a button to reach it from somewhere?

Perhaps the easiest solution would be if there where a combobox and a button benieth the player list.

Mariculous

I guess for an "all or nothing" takeover, simply addding an "allow takeover" button to the own finance window being a "takeover" button in other players finance window would be the easiest.
I don't like the idea of adding a tiny checkbox to the player list as one could quickly missclick such a checkbox when sharing permissions to other players.

In any event, this will be a pretty useful feature.

jamespetts

Eventually, I should like to see a new UI created for companies that will give some company history, allow takeovers (and taking over other players) and borrowing money other than by way of overdrafts. Perhaps it will be necessary to have a headquarters to allow access to this, which will finally give the headquarters some function.

However, for now, a simple and basic implementation will suffice - the finance window might be the best place given the issue raised by Freahk.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ves

Am I right in the idea that a leaving player can set his own network to be taken over by anyone? He doesnt have to target a specific player?

I would still think the player list is better:

1) We make the window taller
2) Below the list of players, we add a button called "make your company available for takeover" or similar and mark it with red or something.
3) Below the button (or above it), the list of companies currently available for take over, as well as an accompaning "take over company" button and the price doing so.

This should make it fairly fail proof, since all buttons should be clearly labeled, and you can even open up the target players finance window from that window, or switch to it if you want to check other things.
Does it make sense?

Mariculous

That's fine I guess and has the huge advantage that this part of the UI can easily be moved to its own window or tab if the takeover UI grows large.
It is just important to ensure we don't accidently click a tiny checkbox close to some other checkboxes.

jamespetts

Ves - yes, indeed, that is one of the main purposes of allowing voluntary takeovers. Another is if a player's company is struggling and the player would like to start a new company to start afresh, but is playing on a server where each individual is permitted to run only one company at once; allowing oneself to be taken over would in those circumstances allow the player to rejoin the game with a new company more quickly than might otherwise be the case.

As to the UI, at the moment, it is useful to have a basic UI for testing; it may be that this can be developed to something more sophisticated later. I will leave it to Ves's discretion as to the implementation details. As to the text, "Allow takeover" is more precise, I think, with perhaps a longer tooltip text.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ves

I have made a (somewhat hacky) list in the player window. However, I have noted that the game crashes when I try to take over one of the companies in the default savegame. I tried again in another, very sparse savegame, but that did not work either. It complaints about line 96 in simline.cc, being the line: assert(count_convoys() == 0); in the below code:

simline_t::~simline_t()
{
DBG_DEBUG("simline_t::~simline_t()", "deleting schedule=%p", schedule);

if (!welt->is_destroying())
{
assert(count_convoys() == 0);
unregister_stops();
}


delete schedule;
self.detach();
DBG_MESSAGE("simline_t::~simline_t()", "line %d (%p) destroyed", self.get_id(), this);
}


Anyway, the GUI is available here:
https://github.com/VictorErik/Simutrans-Experimental-Ves/tree/insolvency-gui

jamespetts

Excellent, thank you very much. That is very helpful. I can find and fix the crashes now that I can test the code!
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

I have pushed a number of fixes/changes and the basic mechanism for taking over other players is now working, aside from some issues with private way signs, which have impenetrable code which is difficult to reverse engineer to modify.

One small issue with the UI, however, is that the player list window does not update when one sets a company to be allowed to be taken over, so it is necessary to close and re-open the player list in order to see the changes that one has just made, which can make testing a little cumbersome.

In any event, splendid work on this in such a short time - thank you. Any testing of the basic takeover mechanism in the meantime would be appreciated.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ves

Yes, that is a limitation in how the window is initially coded. It bugs me as well, so I will see if I can do some improvements on that, as well as some other small improvements here and there.

Ves

#19
DOUBLE POST!  ;D

I have now looked into it and fixed the following bigger issues (as well as some smaller too):

Fix: Money didnt display properly
Fix: Window now resizes itself dependent on the entries. You dont have to close the window in order to "update" it.
Fix: Dont allow overtaking of other companies if you are allowing overtaking your self.
Fix: Dont allow overtaking of your own company (however the entry will be visible to you).

Playing around with it, it is very satisfying to, for instance, in the default save game, just let one company overtake all the others!
One funny sideeffect, though, is that currently the public player can not only overtake other companies, but it can let it self be overtaken by another company. This generates some interresting situations like public player owned convoys and depots, but also player owned factories, curiosities and such stuff.

Obviously, having the public player allowing other players to take over all that is ridicilus, but what about the other way around? Should that be a feature or not?

edit:
Add: Messages for when a company is available for takeover, not available anymore, and when a company has taken over another company
available at this link:
https://github.com/VictorErik/Simutrans-Experimental-Ves/tree/insolvency-gui

edit2:
There appears to be a bug in the payment, it costs way too much to take over a company...
Generally, the payment appears strange. Why does it show 250.000 for new companies with nothing built yet? And why dont you get that money when you take over? When taking over a company that appears to cost something around 30.000 you get to pay 1,7 milion... :o

Mariculous

Quote from: Ves on February 03, 2020, 06:30:25 PMbut what about the other way around? Should that be a feature or not?
I would argue that it was a design decision to disallow depots and thus vehicles for the public player. So if we want to allow full takeovers by public service, we should first discuss more generally why this decision was made and if we want to allow the public player to operate vehicles.

If not, however, a takeover of infrastructure only by the public player could be a useful feature. That means when the public player takes over a company, it will immediately sell all vehicles and depots.

Ves

Yeah, it was quite strange to see public player vehicles, and even the line management, which was accesed via the convoy goto line button. I think that for now that way around should be disabled, since, as you say, it kinds of break things as they are now.

The other way around, it could be done, quite easily I think by the approach you write. Having given it some thaught (and playing around with it in my build  8)) I lean towards it not being possible, simply because it is a one way valve. What has been given to the public player cannot (easily) be ungiven again, due to that other problem.




I attach my edit2 from my previous post to this one, since it contains a small bug report:

There appears to be a bug in the payment, it costs way too much to take over a company...
Generally, the payment appears strange. Why does it show 250.000 for new companies with nothing built yet? And why dont you get that money when you take over? When taking over a company that appears to cost something around 30.000 you get to pay 1,7 milion... :o

Matthew

James and Ves, it's amazing to see a long-standing goal of Sim-Ex come together in such a short time.  :thumbsup: :thumbsup: :thumbsup: :thumbsup:

Thank you for your efforts. I look forward to testing this out someday soon.

On the public player being able to take over companies: I agree with Freahk and Ves that this risks breaking things. And what would be the purpose? If we want to simulate 'nationalization' of public transport (and I do!  ;D ), then we can just make a 'company' called "British Transport Commission"/"Deutsches Bundesbahn"/"Statens Järnvägar" and take over the rest.

Also, I wonder whether preventing the public player from owning convoys might make it easier to code the intended taxation feature?
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Ves

Thank you Matthew, although I cannot really take any cred for this. It is James who is doing the actual work and creating the possibility in the first place. The GUI (a very small project in this case) is merely just rearranging some code and alter it to interface with James work.

But you are right: It is nice to see long-standing goals being completed!  ;D

edit:
.... and a bug appears to have revealed it self: It appears that it is not saved wether a player has set his network out for take over? When I have played around with it, when closing and start again, the autosave loads which is where I noticed it.

jamespetts

Thank you all for your feedback. I have not had a chance to look at Ves's fixes this evening, but a brief word on the public player.

First of all, it is definitely a bug that the public player can be taken over; I will need to prevent this. It should be simple to do in the can_take_over() method: a single line of code checking whether the target company is the public player and returning false if so will suffice.

More generally on the public player, however, the public player should be able to take over other companies. Nationalisation was an important aspect of transport operations in many countries in the 20th century and remains so in the 21st century. It is then indeed anomalous that the public player cannot build depots or have lines; but the proper solution to that is simply to allow the public player to do so. Although I have not looked into this in any detail, I believe that it only requires very minor alteration to the code to permit this.

I am not sure quite what the historical reasons for not allowing the public player to build vehicles was, but at present the greater sense seems to be in permitting the public player to build vehicles; in a single player game, where players can freely choose to use "freeplay" mode, there is no good reason not to allow players to do this if they want. In a multi-player game, the public player is usually played by the server administrator, so there is no reason that the server administrator cannot if he/she chooses use the public player to provide subsidised/nationalised transport of various kinds.

Public player finances are not yet a thing: there is a feature to introduce this somewhere in the list of features to be introduced, along with the public player having normal financial limits on what it can spend, but the ability to raise money by way of tax on other players' profits. That feature might be quite interesting, but is not a priority at present, and is not necessary before allowing the public player to build depots and vehicles. Allowing the public player to own vehicles would not make this feature any harder to code (the most difficult part of this feature would be the UI).

As to one way valves, ideally, one would have a mechanism for transferring partial assets from one player to another: this would either be done voluntarily, or in the second phase of liquidation where a company's assets are simply being sold off individually to raise the maximum amount of money possible for the (imaginary) creditors. The biggest barrier to introducing this is designing an effective UI for it. With such a system, the public player could then privatise parts of its infrastructure without the absurdity of the public player itself being taken over.

In relation to not saving whether a player has set itself to be taken over, this is deliberate (and temporary): the idea is to avoid clashes in the save file format with the lightweight private car routing branch, so I am retaining full compatibility with the master branch for the present. For testing, it does not really matter that this datum cannot be saved.

As to the payments, I will have to look into this and consider the algorithm in more detail when I get a chance. In simple terms, the current algorithm is to charge the player the net wealth plus any overdraft, but this was implemented quickly to test the asset transfer mechanism, and so has not yet been considered in detail. Any suggestions as to how best to value companies to be taken over (both solvent and insolvent, as well as fragments of companies as discussed above if anyone would like to code the UI for this) would be most welcome.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

The finances of the public player is totally screwed, since it has to pay for all maintenance of public stuff. Hence running things as public player was removed (around version 101 or so). I would rather make a new company "National Rail" for nationinalisation, since the national rail mail not be the same that run the national bus service or the national grid ...

Ves

#26
Quote from: jamespetts on February 05, 2020, 12:54:33 AM
Thank you all for your feedback. I have not had a chance to look at Ves's fixes this evening, but a brief word on the public player.

First of all, it is definitely a bug that the public player can be taken over; I will need to prevent this. It should be simple to do in the can_take_over() method: a single line of code checking whether the target company is the public player and returning false if so will suffice.

I did disable it in the GUI already. The buttons are there, but permanently greyed out

Quote
More generally on the public player, however, the public player should be able to take over other companies. Nationalisation was an important aspect of transport operations in many countries in the 20th century and remains so in the 21st century. It is then indeed anomalous that the public player cannot build depots or have lines; but the proper solution to that is simply to allow the public player to do so. Although I have not looked into this in any detail, I believe that it only requires very minor alteration to the code to permit this.

I am not sure quite what the historical reasons for not allowing the public player to build vehicles was, but at present the greater sense seems to be in permitting the public player to build vehicles; in a single player game, where players can freely choose to use "freeplay" mode, there is no good reason not to allow players to do this if they want. In a multi-player game, the public player is usually played by the server administrator, so there is no reason that the server administrator cannot if he/she chooses use the public player to provide subsidised/nationalised transport of various kinds.

Public player finances are not yet a thing: there is a feature to introduce this somewhere in the list of features to be introduced, along with the public player having normal financial limits on what it can spend, but the ability to raise money by way of tax on other players' profits. That feature might be quite interesting, but is not a priority at present, and is not necessary before allowing the public player to build depots and vehicles. Allowing the public player to own vehicles would not make this feature any harder to code (the most difficult part of this feature would be the UI).

As to one way valves, ideally, one would have a mechanism for transferring partial assets from one player to another: this would either be done voluntarily, or in the second phase of liquidation where a company's assets are simply being sold off individually to raise the maximum amount of money possible for the (imaginary) creditors. The biggest barrier to introducing this is designing an effective UI for it. With such a system, the public player could then privatise parts of its infrastructure without the absurdity of the public player itself being taken over.

QuoteAny suggestions as to how best to value companies to be taken over (both solvent and insolvent, as well as fragments of companies as discussed above if anyone would like to code the UI for this) would be most welcome.

Ooooh, another GUI project?  ;D


Quote
In relation to not saving whether a player has set itself to be taken over, this is deliberate (and temporary): the idea is to avoid clashes in the save file format with the lightweight private car routing branch, so I am retaining full compatibility with the master branch for the present. For testing, it does not really matter that this datum cannot be saved.
Ok, that makes sense.

Quote
As to the payments, I will have to look into this and consider the algorithm in more detail when I get a chance. In simple terms, the current algorithm is to charge the player the net wealth plus any overdraft, but this was implemented quickly to test the asset transfer mechanism, and so has not yet been considered in detail.
One could imagine three types of takeover:

1) Liquidation: When a company goes bankrupt, all its assets is up for sale at their resale price, so cost would just be equal to all the assets summed up.

2) Player stops playing and pres the "Volunter take over" button: This is essential the same as the player going out of buisnes, hence selling its company. Now, some return on investment should be payed as well (since we assume the leaving player wants some money) since the lines are assumed to make profit as they are. Perhaps something like asset value + 10% (perhaps even higher) of last years revenue for a complete company and whenever that can be calculated when selling partly (eg by looking at line stats or convoy/vehicle stats).

3) Player sells company, but keep his player: This option would be used by players who wants to sell of their assets (completely or partly) but still want to remain in the game. This could be because they started bad off, and then sells what they created to a bigger player, giving them some money to start fresh again. I think it should be handled the same as in 2), but perhaps with a higher percentage of last years revenue. Also, the player selling would recieve this money, of corse.

edit:
Thinking about it, what about some kind of asset manager? A window similar to the vehicle manager, but just alot simpler, and with fokus on identifying stations and lines between them, as well as listing and acces all player assets.
Dependent on how everything works out, it could perhaps also be used to upgrade and renew certain stuff like ways and signals

Mariculous

#27
Quote from: Ves on February 05, 2020, 06:35:08 AMThinking about it, what about some kind of asset manager? A window similar to the vehicle manager, but just alot simpler, and with fokus on identifying stations and lines between them, as well as listing and acces all player assets.
As an overview of infrasctructure types, it's a good idea. Allowing upgrades like "replace all assets of this type by that type" or "schedule all ways of this types to upgrade to that type" would be quite comfortable.
However, quite often one does not want to replace all of a given type by all of another type, so especially for ways, special consieration is needed. Listing each single tile of track won't be useful, summing these up as "track from station A to station B" will be difficult because there may exist multiple tracks for different types of trains.

I guess such an asset manager would allow for filtering by track types, track speeds and whatever.
Coupling the filtered results or the selection in the asset manager to the minimap would be great. E.g. anything matching the filter (or being part of the selected group) will be displayed in red on the minimap, anything else will be greyed out. The same might apply to the actual map using an overlay like the ownership (shift+o) overlay.
The same goes for infrastructure takeovers:
A "show assets of all players" and "for takeover" filter in the asset manager would then give a great overview of what is for sale currently.

However the action of "flag for sale" and "takeover" should be in the world itself, not in the asset manager.
A new overlay like the "show playercolor" overlay would be useful to visually represent what is for sale by coloring only these asstes in player color.
Flagging ways for sale should work the same way as electrifying a way: drag along, done.
Flagging anything else for sale should work the same way as the general Destroy/remove tool: click on it, done.
Recycling the current "nationalisation tool" imho is not sufficient for ways as it can quickly leave single tile gaps along the track, it would be extremely annoying to flag a whole 500 tile long railway line for sale and it won't allow for selling only the tracks of a level crossing.

The actual takeover of assets should work just the same way, maybe recycling the "flag for sale" tool or adding another one, that does not really matter I guess.

Just my thoughts about this topic...
Maybe we could even implement way usage permissions the same "drag permissions" way and adding a permissions overlay that will show any ways that can be used by the currently active player in green (or normal) and the others in red.

Vladki

Quote from: Ves on February 05, 2020, 06:35:08 AMThinking about it, what about some kind of asset manager? A window similar to the vehicle manager, but just alot simpler, and with fokus on identifying stations and lines between them, as well as listing and acces all player assets.
You can switch to that user (even without password) and look at his station/convoy lists, line management, financials, etc. All cards are open, you just cannot modify anything.

Ves

Quote from: Vladki on February 05, 2020, 03:34:32 PMYou can switch to that user (even without password) and look at his station/convoy lists, line management, financials, etc. All cards are open, you just cannot modify anything.
I think you misunderstood. This is not to get an overview of other players stuff, its about getting an overview of your own stuff, and prepare them for selling. Should then also be easy to take a look at other people's stuff and from there buy them.

Also, I didnt mean a window with a long long long list of all tiles you own, obviously. More like entries such as these:

Ways/tracks:
Cobble stone road: 369 km, x.xxx,xx $ per month, available from: xxxx, available until xxxx (or other usefull facts)   
   Actions:                                                                        
   Set automatic upgrade to this waytype: <drop down list>                        
   Upgrade all immediatedly to this: <drop down list> <upgrade button>            
   (Possibly some more actions) ....                                              

Steel track: 2.589 km, x.xxx,xx $ per month, available from: xxxx, available until xxxx (or other usefull facts!)   
   Actions:                                                                        
   Set automatic upgrade to this waytype: <drop down list>                        
   Upgrade all immediatedly to this: <drop down list> <upgrade button>            
   (Possibly some more actions) ....                                              


Signals and signs:
Three aspect signal: 134 signals, x.xxx,xx $ per month, available from: xxxx, available until xxxx (or other usefull facts)   
   Actions:                                                                        
   Set automatic upgrade to this signal: <drop down list>                        
   replace all immediatedly with this signal: <drop down list> <upgrade button>            
   (Possibly some more actions) ....                                              


Stops and stations
Stations: 57 stations, x.xxx,xx $ per month, smallest: x tiles, biggest: x tiles (or other usefull facts)   
   Actions:                                                                        
   Set automatic upgrade to this signal: <drop down list>                        
   replace all immediatedly with this signal: <drop down list> <upgrade button>            
   (Possibly some more actions) ....                                              


And then to make it much more versatile, we need an easy way to mark alot of tiles at the same time, so we can display the above info for the selection instead of the entire lot.
I had an idea that the player could click on a track, and then all of that track will be marked up to the railway junctions at either end of the click. After all, there is usually no point in selling only half a line, and it is from the junctions that it gets very difficult what the player wants to be selected. Wayobjects, like catenaries, should just follow the selection of the rail underneith. Stations should just be able to be clicked at, and that would select the entire station along with all the track underneith.
For signals, I think this should happen as automatic as possible, since it would otherwise be too cumbersome. In this approach, I would suggest that the signs and signals automatically gets selected when the track (or station) underneith gets selected, but this leaves us with the problem of the signal boxes. Because if you would want to sell one line, but that has signals connected to signalboxes you dont intend to sell, how should the signal/signal box relation then be fixed? It would somehow be interresting if players where able to have signals connected to other players signalbox, but it would create alot of issues, like, what happens if you delete the signalbox? Instead I would have the signalbox automatically selected only if all signals to that box is also selected. The problem of shared signal boxes will have to be dealt with at a later stage.

Now, using this technique, for a selection to be made with two stations and the intermediate line, you would have to click on the first station, click on all junction tiles up to the line, click on the line (or both lines if double track), then click on all the junction tiles in front of the upcoming station, and then on the second station.

For signal boxes, I can see two solutions when selling:
1 - The signals that ends up with another owner than the signalbox, will get "deactivated", that means that they do not work anymore, until they are connected to a signalbox with the same owner as them
2 - The signal box conflict has to be resolved before a sale can be done. This can be difficult when the "selling" company is bankrupt, since it cannot buy another signalbox to resolve the conflict. Perhaps the buyer can build a new signalbox, and then somehow select that as the "replacement" signalbox.
A message will now show if there are signals connected to an unselected signalbox, prompting the player to either select it manually, or take other actions. If selected manually,


Mariculous

Quote from: Ves on February 05, 2020, 04:37:46 PM1 - The signals that ends up with another owner than the signalbox, will get "deactivated", that means that they do not work anymore, until they are connected to a signalbox with the same owner as them
This would be a nice one as long as we get a more or less automatic reconnection of these when we place a new signalbox around.

This would also solve the issue with replace all immediatedly with this signal: <drop down list> <upgrade button> as it makes perfectly sense to e.g. replace absolute block signals with tcb or even tcb two, three and four aspect signals with tvm boards.
In that case the new signals would be deactivated until there is a signalbox in range.

Mariculous

Quote from: Ves on February 05, 2020, 04:37:46 PMAlso, I didnt mean a window with a long long long list of all tiles you own, obviously. More like entries such as these:
That's obvious. The point is knowing only how many of that type exist in the world is often not quite useful. We will somehow need to locate inividual assets of given types in the world to apply the changes.
Highlighting the selection on the minimap seems to be a good way to visually locate these to me.

The area selection and expanding selected tracks to the next junction tools seems to be a good tool, however, a tool behaving like the wayobject placement tool would be even more comfortable as players are already used to it. For sure selecting a way will include wayobjects and signals. Only stations should be seperate but always be selected as a whole station, instead of tile by tile.
Signalboxes can also be explicitly added as to be sold.

AP

Quote from: Ves on February 05, 2020, 04:37:46 PMAlso, I didnt mean a window with a long long long list of all tiles you own, obviously. More like entries such as these:
Just to interject - it sounds like this GUI discussion (particularly the listing/displaying assets) is verging on something that I queried some years ago. That is, when a player can see they've 'got into serious trouble' and wants to engage in a substantial removal of assets - be that vehicles or roads and infrastructure - this is generally speaking a very difficult and tedious thing to do. It's often easier to abandon a company than it is to fix something which is substantially broken hunting down hundreds of depots to demolish etc - especially to do the so before running out of money.

I wonder if a GUI which can do what is being talked about here, might be designed in such a way that it could be available to the player for the other purpose also?

If not, please disregard!

jamespetts

Having a more sophisticated asset management interface is a very interesting idea - but I suggest that this be separate to the basic insolvency/takeover feature so as not to delay the more basic feature writing the more sophisticated feature. So far as I can see, the more sophisticated feature is likely to be a plain superset of the more basic feature, so there should not be any work wasted in developing in this way.

Also, welcome back to the forum, AP!
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ves

Quote from: AP on February 05, 2020, 08:16:33 PM
Just to interject - it sounds like this GUI discussion (particularly the listing/displaying assets) is verging on something that I queried some years ago. That is, when a player can see they've 'got into serious trouble' and wants to engage in a substantial removal of assets - be that vehicles or roads and infrastructure - this is generally speaking a very difficult and tedious thing to do. It's often easier to abandon a company than it is to fix something which is substantially broken hunting down hundreds of depots to demolish etc - especially to do the so before running out of money.

I wonder if a GUI which can do what is being talked about here, might be designed in such a way that it could be available to the player for the other purpose also?

If not, please disregard!
I guess it should be easy enough, and practically not needing any else coding than GUI calling the functions.

Its intriguing with the minimap. I have never worked with that before, so I dont know yet how it works, but surely it should be possible in some way. The only problem with the minimap in my opinion is that it is too small, and you dont see the details unless you zoom way in, and then it is anyway easier to just look at the normal map.
Another way of selecting areas of objects could be by dragging a square on the ground. I believe this function already is used by the climate tool(?)

I forgot about lines and convoys: It could work somehow automatic in so when the GUI senses that two stops and a route between have been selected, it lists all schedules servicing those stops. Then you can select a schedule and mark it and or all or some of its convoys to be sold as well.


Coming back to present day, James, it would be nice to distinguish wether a player has pressed the "allow takeover" button, or wether the player is bankrupt and therefore that players network is available. Do you plan to distinguish that?