Page MenuHomeWildfire Games

Combine the "time to completion" and "time speed-up" tooltips
ClosedPublic

Authored by temple on May 29 2017, 5:33 AM.

Details

Summary

Here's the new summary:

The build time tooltip math was fixed in rP19966, so now we can consider the GUI part.
The production queue shows a countdown timer since rP19657, and I think the same would be useful here.

Here's the old summary:

Currently when constructing a building, the time to completion is displayed in a tooltip on the health bar, shown in the first picture below. Meanwhile, the time speed-up (how much time we'd save if we added another builder) is displayed in a tooltip on the hammer icon, shown in the second picture below.

I think it would make more sense to show these two numbers on the same tooltip, shown in the third picture above.

The formulas used for the times are wrong (they only work if you don't have any buffed units, like an elephant or a man with the +10% building rate from "female inspiration"), and I'm fixing the math in D522. But the GUI is a separate consideration, so I thought I should offer a separate patch for that. Of course I can combine the two if both are approved.

Also, it might be nice to make the tooltip slightly wider (there's plenty of room, my screenshot is cropped), so that the "This foundation..." string always fits on one line. Actually, it seems like using "The foundation..." instead of "This foundation..." does the trick. So maybe we can leave that alone.

Test Plan

Please comment if you like my proposal or if you prefer the current setup, or if you have another idea.

Diff Detail

Event Timeline

temple created this revision.May 29 2017, 5:33 AM
temple abandoned this revision.May 30 2017, 9:58 PM

I've incorporated this into D522.

temple reclaimed this revision.May 30 2017, 10:19 PM

I guess it's better to keep the GUI change separate.

temple updated this revision to Diff 2323.May 30 2017, 10:27 PM
temple added a reviewer: wraitii.

It looks like "time to completion" was added in rP16429 and "time speed up" was added in rP15502. I think it'd be better to have them on the same tooltip.

wraitii requested changes to this revision.Jun 24 2017, 11:43 AM

Maybe have both show the complete tooltip ? Or maybe not, don't feel strongly;

Would be nice to change "Number of Builders" to something actually telling you the current number of builders because it looks weird right now I think.

This revision now requires changes to proceed.Jun 24 2017, 11:43 AM
In D572#26982, @wraitii wrote:

Would be nice to change "Number of Builders" to something actually telling you the current number of builders because it looks weird right now I think.

The number of builders is shown next to the hammer icon, if that wasn't clear.

To me, the most important information is the time it will take to finish creating the building. Similar to how the production queue now shows the time it will take to finish creating a unit (D542).

I think my ideal solution would to put the time remaining next to the hammer or somewhere else where we can see it immediately (rather than in a tooltip), and then move the number of builders to a tooltip (or maybe even remove it entirely since it's easy to count the builders by selecting all of them).

But I'm going to wait until after a22 to make any changes. If people love the production queue timer then I think it makes sense to make the building timer more visible (and add a repair timer too).

temple updated this revision to Diff 3096.Aug 13 2017, 2:15 AM
temple edited edge metadata.
temple edited the summary of this revision. (Show Details)
temple added reviewers: bb, elexis.

Moved the time remaining to the caption (made it a countdown, like the production queue) and moved the number of builders to the tooltip, since the more important thing for players is how soon the building will be finished. Also added some bolding to match the format of other tooltips.

no short? :

Number of builders.
+1 worker: -10 seconds construction time

,

+1 worker: 10 seconds less construction time

,

+1 worker: 54 seconds construction time

actualy i like long also but its faster seen

If there's a nice way to say it in the compact "A: B" format that'd be great, but I couldn't think of one.
Something like "Build time speed-up: xx seconds / Worker" looks okay, but it's misleading since the speed-up value is only for the first additional worker.
(I plan on nuking the build rate in the stats tooltip because it says a similar thing.)

Here's a slight improvement: "Add another worker to speed up the construction by %(speedup)s seconds."

bb requested changes to this revision.Aug 17 2017, 11:54 AM
bb added inline comments.
binaries/data/mods/public/gui/session/selection_details.js
243–244

when one doesn't care about the value being 0, one should use Math.round

244

why are there 2 spaces before the number? and why is the "number of builders:" in headerFont?

246–256

this tooltip should be as much similar to the (not implemented yet) repair tooltip, but the a repairable building has no builder icon when it is not under repair (and adding one seems odd), thus imo the tooltip should be added to the healthbar aswell (so make a function in tooltips.js and use that in both places)

248

times > 1h are not displayed correctly (imo we should support that at least)

250–251

not a native, but shouldn't "would" -> "will"?

250–251

not a really strong opinion but should we use a date string here too (instead of showing the number of seconds)?

266–267

maybe add a different string here, like "With 1 worker the construction would be finished in {time}"

This revision now requires changes to proceed.Aug 17 2017, 11:54 AM
temple updated this revision to Diff 3778.Sep 25 2017, 11:32 PM

Moved the tooltip to tooltips.js.
Used it on both the hammer icon and the health bar. (I don't think people even know about the health bar tooltip, but it doesn't hurt.)
I'm not convinced we need both timeLeft and timeRemaining. Maybe instead we could set rate = 1 if there's no builders, so then timeRemaining = timeLeft / 1 = time for one builder to finish it, instead of timeLeft / 0 = infinity.

This requires D795 for durationToString(), but I don't know how to do stacks or whatever.

Imarok added a subscriber: Imarok.Sep 25 2017, 11:47 PM
In D572#36418, @temple wrote:

This requires D795 for durationToString(), but I don't know how to do stacks or whatever.

In the box on the top right: "Edit related revisions" -> "Edit parent revision"

In D572#36423, @Imarok wrote:
In D572#36418, @temple wrote:

This requires D795 for durationToString(), but I don't know how to do stacks or whatever.

In the box on the top right: "Edit related revisions" -> "Edit parent revision"

Thanks.

temple updated this revision to Diff 3782.Sep 27 2017, 5:21 PM

Use timeRemainingNew (= time remaining if we add another worker) rather than timeSpeedup so that when we have zero builders we can get the time to finish with one builder.

We need to get this, when building especialy long time building structures. Please make decision in D1116, then this.

temple updated this revision to Diff 5349.Jan 17 2018, 1:15 AM
temple set the repository for this revision to rP 0 A.D. Public Repository.

Remove dependence on D1116.

temple added inline comments.
binaries/data/mods/public/gui/session/selection_details.js
248

That's covered in D1116.

wraitii accepted this revision.Jan 21 2018, 4:06 PM
temple updated this revision to Diff 5450.Jan 23 2018, 5:32 PM

In D1230 it was decided to show the number of builders in the fog of war too, so that's included here.
My intent was to remove the build rate tooltip after this patch was implemented, but it seems easier to just include that change here. The point is that players care about how long it takes to finish building the foundation, not how many hitpoints they add to it each second.
foundation.progress wasn't used since rP19966, it should've been removed then.

I'd like to remove the health tooltip, it's repeated information and anyway no one knows the tooltip exists.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 30 2018, 1:02 AM
This revision was automatically updated to reflect the committed changes.
Owners added a subscriber: Restricted Owners Package.Jan 30 2018, 1:02 AM