endless-sky/Endless-Sky-Delta

[Request] Ways to sort the shipyard by characteristics other than category

Open

#119 opened on 2024年10月31日

GitHub で見る
 (1 comment) (1 reaction) (0 assignees)C++ (2 forks)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (18 stars)
PR merge metrics
 (PR metrics pending)

説明

Problem Description

Currently, there is a problem with ship categories. Depending on who you ask we have too many categories, too few categories, or that the categories aren't well defined and there are ships that are in one that should be in another. We even have categories (Utility) that is basically defined as being a ship that belongs to at least two if not more of the other categories. Then there's the fact that a ship that might be in one category in one faction, might be a better match for a different category when compared to a different faction. What is a heavy freighter for humanity might only be a light freighter for the Wanderers, for instance.

Related Issue Links

https://github.com/endless-sky/Endless-Sky-Delta/pull/95

Desired Solution

One or more ways to sort ships in the shipyard and map ship list that is independent of the category the ship is assigned to. Sorting by major differentiating factors such as cost, total mass, cargo space, free bunks, total hp, total number of weapon hardpoints, and total number of bays are probably the main ones.

Even better would be having a way to round off the values and sort by more than one criteria. By this I mean that most of the above attributes are different for every single ship. No two ships have the same price, no two have the exact same health that I know of. As an example, say I want to buy the toughest ship I can possibly get. Right now, my methodology would be to go find the "Heavy Warships" with the guess that those are the toughest, then go through the list to find the toughest ship, and see if I can afford it. If I can't, go find the next toughest ship. Repeat until I find one that I can afford. Now, if we can sort the list by price, then I can just start at the most expensive and go down until I find a ship that I can afford, and see how tough it is. Then check the next couple ships beneath that, going down the price is as far as I care to go to see if there are any cheaper but tougher ships. Since every ship has a different price, it isn't possible to sort by more than one thing. Now, if for the purposes of sorting we rounded off price to the nearest 500k, then when we do a secondary sort for hp, we'll get blocks of ships still largely sorted by cost, but in small subsets would be sorted by hp. This way, a ship that might be 150k cheaper but has more hp will get sorted obove, while still retaining price as the overall list sorting .

Alternative Approaches

Ability to assign each ship a number of labels or tags, and then be able to limit the shipyard to the presence of desired tags. For instance, the Bactrian might have the combat, heavy, large cargo, bays, and large bunks tags; whereas a Carrier might have just combat, heavy, Navy, and bays.

Another alternative would be to have filters with ranges for a variety of the major attributes. So I could, for instance, look for ships that are between 2 and 3M credits , and have over 20k hp. This could, of course, be combined with the previously described sorting. Being able to sort by hp and limit it to ships under 3M would be effective too.

Additional Context

Ideas are welcome.

コントリビューターガイド