List of ships

Bug #1358880 reported by fuchur
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Wishlist
Unassigned

Bug Description

Recently I was trying to find out how many ships I had and did not find the information in the statistics. So I want to suggest the implementation of a list of ships. This list could look similar to the list of buildings, with some exceptions.

1. Show number of built ships (including on expedition)
2. Show number of ships currently under construction
3. Show number of ships on expedition
4. Make it possible to jump to all ships, just like to the buildings, categorized by owned, in build, on expedition
5. As wl-zocker mentioned in the forum the name of the ship should be shown, if there is a final decision on the topic, see bug 963842
6. List each ship in one line with name or just a number, its status and the possibility to jump to that ship

Maybe it is possible to integrate this list into the building statistics, but I'd find it better to have a separate ship statistics window. Ships are not the same as buildings and the information needed for them is different.

As it is possible to have ships in different and unconnected oceans maybe the list could be grouped into oceans. Or at least an index of the ocean could be added to the list.

I'm not sure about productivity information (maybe the relation time in travel <-> total game time)

Tags: seafaring ui

Related branches

Revision history for this message
Nathan Tuggy (tuggyne) wrote :

Sounds good.

I'd suggest having a productivity % based on a slightly amended figure: travel time with non-empty cargo per period.

I'm not sure how you'd distinguish oceans programmatically, since they aren't likely to have names; instead, the ability to jump (and hopefully name ships) would have to do. However, adding a jump to the home port of that ship might work if needed.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Sounds like a good idea to get some overview on what the different ships are doing. Names would of course be nice to easier tell them apart.

We should probably draw up some sketches or rough drafts of how this window would look before someone starts implementing it to find out what we really want and what gives the best result.

(As a technical detail; I don't know whether ships being built count as ships so it might be tricky to get them in the list)

Changed in widelands:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
fuchur (fuchur77) wrote :

Ok, I'll think about a sketch for that window. But I don't know how fast I can provide it.

@#1:
I assume with period you mean total elapsed time including idle times (ships just waiting near a port to get something to transport). Yes, that's the best productivity index.

Home port: do ships have a home port assigned? And what's the use of a home port?. I see them travelling or waiting, but I always assumed that there is some logic to distribute ships to several ports. Even if I sometimes see several of them just waiting beneath the same port...

To the oceans: maybe you can distinguish them, or better said the game logic can. At least it should be possible to tell which ports are reachable by a ship. And then the oceans can be distinguished. Of course I can't tell how difficult it would be to implement. At least in this forum post (https://wl.widelands.org/forum/post/8486/) a possible target quantity for the shipwright per ocean was mentioned.

@#2:
As I'm just a widelands player I can't tell how tricky it might me to get ships being built into the list, too. I just thought that for normal buildings the ones under construction appear in the statistics. So why not the ships, too?

Revision history for this message
fuchur (fuchur77) wrote :

I created 2 drafts for the statistic window. The reason for that is that I don't know if it is possible to have clickable buttons in a list. Both are just simple tables without graphical features, but the intent should be clear.

Draft 1 looks very similar to the building statistics window. In the upper part there is a table/list with ship number (or name if this feature will be implemented) in the first column. The productivity is shown the second column (known from buildings). The new parts are the Status and Ocean columns. The possible status are shown in the draft (idle, on expedition, travelling, in build). I don't know if the game logic makes a difference between "on expedition" and "ready for expedition". If yes, that would be another status value. As oceans don't have names I'd just number them to tell them apart. In the last two columns I'd like to see buttons to jump to the current ship and open the ship window.

If it's not possible to have buttons in the table -> draft 2

Remark:
The possibility to open the ship window would help with bug 990655 (ships can be at the same spot). In comment 7 _aD mentioned a problem to start an expedition because of another ship too close to click the right one.

Revision history for this message
fuchur (fuchur77) wrote :

As it's not possible to add two attachments to one comment:

Draft 2:
In case it's not possible (or not wanted) to add the buttons in the table in the row of each ship I added 4 buttons below the table. They all work with the currently selected ship and should be disabled if no ship is selected or the specific function is not possible (for example destination with in build ships). I thought it would be nice to have the additional possibilites of the ship window here, too. Therefore I added the button "Go to ship destination". And the button "Rename" is only needed if that feature will be implemented.

Below that part is (just like in draft 1) the same as for buildings: total productivity and the jump buttons to cycle through the ships in different categories.

As I don't know what's the matter with the home port of a ship I didn't include that in the drafts.

Personally I favor draft 1 (slightly) because one needs just one singe click to jump to different ships.

To the window size: I'd prefer to see at least 8-10 ships together without the need to scroll the list.

What I didn't mention yet is that I assume the list header to be clickable. This will sort the list according to the clicked column header, just like in the building statistics.

Revision history for this message
fuchur (fuchur77) wrote :

Now that I sucessfully managed to compile widelands I thought that I will have a look at the source code. Maybe I can develop a basic implementation of a ship statistics window. That is if nobody else is already working on it. But I don't promise anything. I've never done much with C++.

Revision history for this message
SirVer (sirver) wrote :

Nobody is working on that and feel free to take it on. We have a code review process in place, so do not worry about that too - we will help you wip your code in style :)

Revision history for this message
SirVer (sirver) wrote :

I think we should have ~ 30 names for ships per tribe and just randomly pick one. We can also make the names user editable if desired.

Should we start brainstorming ideas? I think the antlanteans should use their gods names - the first scenario only establishes two names, the rest we need to come up with. For the barbarians I could image that they always use an adjective and an animal for the ships: Swift Duck, Strong Ox... No idea for the empire right now.

Revision history for this message
TiborB (tiborb95) wrote :

I was thinking about a simple counter (1,2,3....), but names would do as well. Also it should be trivial to get status of ship (TRANSPORT,EXP_WAITING,EXP_SCOUTING,EXP_FOUNDPORTSPACE.....) and also there are fleets so this info can be used as well.

Revision history for this message
SirVer (sirver) wrote :

There is only one fleet per ocean - no need to surface that concept to the user. I think names is a better solution than strings since ti feels more gamelike. Also emperors always knew the names of their ships.

Revision history for this message
TiborB (tiborb95) wrote :

above they wanted to distinguish oceans, fleets could be used for this, with one exemption/problem - the fact that a ship on expedition is taken out of fleets (I think)

fuchur (fuchur77)
Changed in widelands:
assignee: nobody → fuchur (fuchur77)
Revision history for this message
fuchur (fuchur77) wrote :

I didn't work much up to now because in a Virtual Box Ubuntu with only 2 GB RAM the build process takes awfully long (due to swapping). But now I have upgraded memory and it is much better.

Surely names are better suited to distinguish ships. The initial "value" can be discussed later when the ship struct is prepared for that.

To show the ocean a ship belongs to would help to decide if there are already enough ships in that particular ocean. But let's see if that will work. TiborB, you're right, the source code comment mentions that a ship on expedition is taken out of the fleet it belonged to.

Revision history for this message
TiborB (tiborb95) wrote :

I had an idea that ship will get by default a number (1,2,3...), but internally saved as string, and user will be able to edit it. But just do it as it suits you.

Revision history for this message
GunChleoc (gunchleoc) wrote :

staustelladam suggested on the forum to add the number of ships to the statistics as well (just like wares and workers).

GunChleoc (gunchleoc)
Changed in widelands:
milestone: none → build20-rc1
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fuchur, are you still working on this? If not, I'd be interested in taking on this bug.

Revision history for this message
fuchur (fuchur77) wrote :

I'm sorry, but I don't think I have enough time to implement this feature. So I unassigned myself. Thanks for your interest in doing the work.

Changed in widelands:
assignee: fuchur (fuchur77) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

No worries - the documents you created are already a help to us :)

Changed in widelands:
assignee: nobody → GunChleoc (gunchleoc)
GunChleoc (gunchleoc)
Changed in widelands:
status: Confirmed → In Progress
Revision history for this message
GunChleoc (gunchleoc) wrote :

We have a first screenshot :)

The upper buttons are filter buttons, just like in the messages window:

1. Idle
2. Shipping
3. Waiting
4. Scouting
5. Port Space Found
6. Founding a Colony

Contributions for prettier icons are welcome. Especially the idle icon bugs me.

The lower buttons are for accessing the ships:

1. Open a watch window and follow
2. Center map on ship and open ship window (this should help especially with multiple ships stacked on the same coordinates)
3. Center Map on location

Revision history for this message
kaputtnik (franku) wrote :

Just compiled and tested the linked branch, really nice feature.

Don't know if it is too soon, but maybe i found a bug:

Playing an old savegame with this branch sometimes the list of ships get added with ships from the opponent player. Save game attached.

Revision history for this message
GunChleoc (gunchleoc) wrote :

That's definitely a bug! Thanks for testing :)

Revision history for this message
kaputtnik (franku) wrote :

I encountered this mostly when a new expedition is ready, but not always.

Revision history for this message
GunChleoc (gunchleoc) wrote :

That bug should be fixed now - I didn't check who owns new ships.

New screenshot. I have pushed the icon source files to

http://bazaar.launchpad.net/~widelands-media-dev/widelands-media/widelands-media/files/head:/graphics/user_interface/seafaring_pics/

I'm still not entirely happy with the anchor, but it's the best I can do for now.

Revision history for this message
kaputtnik (franku) wrote :
Revision history for this message
kaputtnik (franku) wrote :
Revision history for this message
kaputtnik (franku) wrote :

I tried to merge trunk into the linked branch, but got some text conflicts. GunChleoc, can you please take a look at this?

Revision history for this message
GunChleoc (gunchleoc) wrote :

Done. I didn't get any conflicts though.

Note that we can expect this to happen again, as one of the branches that's waiting fore review has a conflict with this branch.

Revision history for this message
kaputtnik (franku) wrote :

Thanks :-)

GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
assignee: GunChleoc (gunchleoc) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.