Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some way to find and recover crashed vehicles #8498

Closed
James103 opened this issue Jan 5, 2021 · 7 comments
Closed

Add some way to find and recover crashed vehicles #8498

James103 opened this issue Jan 5, 2021 · 7 comments
Labels
enhancement Issue would be a good enhancement; we accept Pull Requests!

Comments

@James103
Copy link
Contributor

James103 commented Jan 5, 2021

Version of OpenTTD

1.10.3~

Expected result

[Edit by @TrueBrain]: you should be able to find crashed vehicles and recover them. If possible, not only for the short window they are crashed, but also afterwards.

You should be able to sort vehicles in such a way that vehicles that have crashed show up on the top of the list, allowing you to more easily clone and replace the vehicles. This could be accomplished either by (in rough order of difficulty and flexibility):

  • Set vehicle's reliability to 0 on vehicle crash. This allows sorting by reliability ASC to show crashed vehicles first.
  • Adding a new sort that shows crashed vehicles first, then regular vehicles.
  • Implement a vehicle list filtering system and add "vehicle is (not) crashed" as one of the filter criteria.

Actual result

There is no way (that I know of) to sort the vehicles such that crashed vehicles are shown first in many common situations (e.g. aircraft crashes). If #8497 is merged, then some players may need to resort to scrolling through the vehicle list to find crashed vehicles, which can take extra time. Having crashed vehicles be at the top of the list reduces the added time overhead.

Steps to reproduce

  1. Open a vehicle list.
  2. Look for a way to sort by vehicles such that all crashed vehicles show up at the top of the list.
  3. Crash a vehicle, e.g. by flooding it.
  4. Check the vehicle's reliability.
@Eddi-z
Copy link
Contributor

Eddi-z commented Jan 5, 2021

Well, technically, #8497 doesn't have anything to do with this, as it only applies to news messages when the vehicle was already cleared from any vehicle list, so there is nothing left to sort or filter for.

what is really needed is some way to keep the vehicle reference in vehicle lists, once the vehicle is cleared from the map, to give the player a decision whether to rebuild the vehicle in an appropriate depot, or just scrap it.

@TrueBrain
Copy link
Member

TrueBrain commented Jan 5, 2021

From #7611:

@TrueBrain:

Doesn't have to be a real depot, but you can hide a vehicle completely, while keeping it around. Details I have not thought out, tbh, but I guess hiding the vehicle completely, and allowing some way to list crashed vehicles and "rebuild at nearest depot" or something like that. It seems #8498 already discusses this a bit :)

@JGRennison:

Having vehicle instances which are "off-map" such that Vehicle::tile does not necessarily point to a valid sensible tile for that vehicle type requires changing a surprisingly large number of places in the code.

e.g. if a road vehicle was destroyed on a level crossing, later put into a "hidden" state, and then the crossing was removed to prevent further carnage, many parts of the code would encounter issues trying to get the road/tram type of the road vehicle's current tile, even if the vehicle was crashed and not moving.

This is certainly doable (it is done for trains in my branch), but it requires a non-trivial amount of combing through the code.

@Eddi-z:

my train of thought would be to teleport the vehicle into the nearest appropriate depot (hoping there is one).
that would avoid all the stuff about querying the tile the vehicle is on.

@TrueBrain TrueBrain changed the title Add some way to sort or filter the vehicle list such that crashed vehicles are shown first. Add some way to find and recover crashed vehicles Jan 5, 2021
@TrueBrain
Copy link
Member

TrueBrain commented Jan 5, 2021

I made this issue a bit broader, as how it was worded, it might only solve one part of the equation. To avoid us looking too narrow, I made it a bit more clear that a more generic solution might also be viable.

@2TallTyler
Copy link
Member

If I recall correctly, Railroad Tycoon 3 opens a dialog box when a train crashes and asks the user whether they want to purchase a replacement train.

I find this a very convenient feature in RT3, although in OpenTTD it may be problematic if you crash many vehicles at once or if your depot doesn't have a universal connection to your network. There's a high chance of lost trains unless there's a way to only clone the train at a depot which has a path to the first station in the orders, or at a depot in the train's order list.

@TrueBrain TrueBrain added the enhancement Issue would be a good enhancement; we accept Pull Requests! label Jan 8, 2021
@LC-Zorg
Copy link

LC-Zorg commented Jan 16, 2021

If I recall correctly, Railroad Tycoon 3 opens a dialog box when a train crashes and asks the user whether they want to purchase a replacement train.

I find this a very convenient feature in RT3, although in OpenTTD it may be problematic (...)

The question of whether you want to buy an accident vehicle would be a nuisance if someone in the online game intentionally, especially massively, destroyed your vehicles, or even if you did it yourself (intentionally or not).

From #7611:
@Eddi-z:

my train of thought would be to teleport the vehicle into the nearest appropriate depot (hoping there is one).
that would avoid all the stuff about querying the tile the vehicle is on.

A solution close to what Eddi-z proposed seems to be the best.

However, in this topic, I would see several solutions:

  1. The text of the message (in the previous message window) would have a different color depending on what they refer to.
  2. Displaying up to 5 news icons in the bottom bar with links to recent news. The icons could be of different colors (see point 1) and would disappear after ~60 seconds regardless of the pace of the game.
    Colored news
  3. A damaged vehicle, after a month (or even less) of staying on the map as a wreck, would go to the nearest depot (also as a wreck), where it would stay for the next year - the vehicle could be sold like others, but without profit.
  4. There could be a setting that would determine how long the vehicle is to be stored after an accident.
  5. On any vehicle list, regardless of the sort you choose, destroyed vehicles would always as first - usually this is rare enough not to be a problem, but almost always would be helpful.
  6. If any vehicles were damaged, there would be an additional, usually invisible sorting option marked with a different font color - here the disadvantage of the solution would be that the player would have to know that there was an accident at all. Alternatively, the list would change the sorting method each time a vehicle is destroyed and revert to the previous sort when the company no longer has such vehicles. The player could also change the order, but each subsequent accident (usually very rare) would cause the change to occur again to give the player the opportunity to spot the problem.

@RIS2000
Copy link

RIS2000 commented Sep 18, 2021

  • On any vehicle list, regardless of the sort you choose, destroyed vehicles would always as first - usually this is rare enough not to be a problem, but almost always would be helpful.

  • If any vehicles were damaged, there would be an additional, usually invisible sorting option marked with a different font color - here the disadvantage of the solution would be that the player would have to know that there was an accident at all. Alternatively, the list would change the sorting method each time a vehicle is destroyed and revert to the previous sort when the company no longer has such vehicles. The player could also change the order, but each subsequent accident (usually very rare) would cause the change to occur again to give the player the opportunity to spot the problem.

👍👍

@thecannons
Copy link

This is a great idea, Mashinky has a similar feature where you can rebuy the train and it will basically set it on route again.

@OpenTTD OpenTTD locked and limited conversation to collaborators Jan 9, 2024
@2TallTyler 2TallTyler converted this issue into discussion #11727 Jan 9, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement Issue would be a good enhancement; we accept Pull Requests!
Projects
None yet
Development

No branches or pull requests

7 participants