#3395 closed enhancement (fixed)
[PATCH] Improve unit actions tooltip
Reported by: | bb | Owned by: | elexis |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 20 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description (last modified by )
The unit actions tooltip should improve like the stances in ticket #3385.
Attachments (10)
Change History (28)
by , 9 years ago
Attachment: | ticket3394unitactions_1.diff added |
---|
comment:1 by , 9 years ago
Component: | Core engine → UI & Simulation |
---|---|
Description: | modified (diff) |
Keywords: | patch added |
Milestone: | Backlog → Alpha 19 |
Summary: | Improve unit actions tooltip → [PATCH] Improve unit actions tooltip |
I agree that some of those things could use some explanation. Especially the guard tooltip.
But there should be a newline between the title and the description. Also the title should have a different font size, similar to the unit stance tooltip patch mentioned above:
'[font="sans-bold-16"]' + translate("title") + "[/font]\n" + translate("tooltip")
I'm not sure about the phrasing of the tooltips, someone who can commit it should review them.
Guarding has some special behavior, see UnitAI.js
: http://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
// if the attacker is a building and we can repair the guarded, repair it rather than attacking ... "IDLE": { "enter": function() { // If the unit is guarding/escorting, go back to its duty ... // if nothing better to do, check if the guarded needs to be healed or repaired ... UnitAI.prototype.ShouldAbandonChase // If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker ... UnitAI.prototype.ShouldChaseTargetedEntity // If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker ...
Repairing: See #633, you can now repair ships faster than other buildings, as only a few units actually reach the ship. We shouldn't mention the actual repair rates, but at least mention that ships are being repaired faster. Maybe we should mention the exact repair rate in the tooltip of the selected structure (where also attack damage / range etc. are displayed.).
by , 9 years ago
Attachment: | ticket3394unitactions_2.diff added |
---|
Improved tooltips and added the repair rate in the attack and armor stats.
comment:2 by , 9 years ago
Keywords: | review added |
---|
follow-up: 4 comment:3 by , 9 years ago
Keywords: | review removed |
---|
getRepairTimeRatioTooltip
:
- the first three variables are not used
- please quote object keys
- "Repair Rate" instead of "Repair rate"
- "Health" instead of "hp"
- spaces before and after the slash
rate
should be calledunit
, especially in that translated string.detail
is the actual rate.
Tooltips in unit_actions.js
:
- "faster for ships then for buildings" => "repair rate depends on structure" (as the behavior might change. also use "than" when comparing)
- The repair rate could be listed in the structure tree too. Maybe not, as it could become crowded.
- "Make the selected units idle" => "Cancel all existing orders"
- "Lock selected units inside" => "Lock selected units inside and shoot arrows from warships and defensive buildings"
- The guard tooltip should be sufficient.
selection_details.js
:
if ("repairTimeRatio" in entState && entState.repairTimeRatio)
=>if (entState.repairTimeRatio)
. The check above that should also be reducible, but didn't test yet.
Thanks for the work, besides those small stylefixes, I think we could commit it this way.
Does the "Unload" button, that seemingly releases one unit actually exist anywhere? If so tell me. If not, we should remove it in another ticket. [The garrisson button for ships is also currently useless (#3412)]
by , 9 years ago
Attachment: | ticket3394unitactions_3.diff added |
---|
Some more improvements (thanks elexis) and added a tooltip for "focus on rally point". I can;t
by , 9 years ago
Attachment: | ticket3394unitactions_3.2.diff added |
---|
Some more improvements (thanks elexis) and added a tooltip for "focus on rally point".
comment:4 by , 9 years ago
Replying to elexis:
getRepairTimeRatioTooltip
:
- the first three variables are not used
- etc.
Tooltips in
unit_actions.js
:
- "faster for ships then for buildings" => "repair rate depends on structure" (as the behavior might change. also use "than" when comparing)
- etc.
selection_details.js
:
if ("repairTimeRatio" in entState && entState.repairTimeRatio)
=>if (entState.repairTimeRatio)
. The check above that should also be reducible, but didn't test yet.
These things should be changed in the new patch.
Does the "Unload" button, that seemingly releases one unit actually exist anywhere? If so tell me. If not, we should remove it in another ticket.
I can't find a button towards this piece of code, did found some functions only called here. By removing the code nothing seems to crash but I only tried with one soldier in a cc. Also the alert tooltips needs to improve, that will be another ticket.
comment:5 by , 9 years ago
Keywords: | review added |
---|
comment:6 by , 9 years ago
Milestone: | Alpha 19 → Alpha 20 |
---|
We are now in Feature Freeze for the A19 version, so we will look at this patch after it is out. Thanks for your work ;)
by , 8 years ago
Attachment: | ticket3395unitactions_4.diff added |
---|
The repairRatio was messed up in previous patch (printing completly wrong number, should have looked at code better :P). This is printing correct one.
comment:9 by , 8 years ago
Keywords: | simple review removed |
---|
The problem with the unit action tooltips is that most of them don't add information and use words that are not used anywhere else, so they shouldn't actually be added.
However I think the guard function could use a tooltip, as UnitAI does some specific things in that case and that we might have the tooltip for defensive arrows. Not sure if it'd be good to have only some actions have tooltips. Maybe ask leper for advice.
I don't see a problem with the repair ratio.
Also I committed some of the cleanups, so the next version of the patch will be smaller.
comment:11 by , 8 years ago
Besides checking the UnitAI tooltips, can you also check if you can display the repair rate of foundations?
by , 8 years ago
Attachment: | ticket3395unitactions_6.diff added |
---|
display build rate for foundations in tooltip (and renaming "repairtime" to "repairratio" in cleanup of last commit, since that is the correct name)
comment:12 by , 8 years ago
Keywords: | review added |
---|
by , 8 years ago
Attachment: | ticket3395unitactions_7.diff added |
---|
ratio --> rate, cleanup from previous commit. Last patch needs to be rebased after this one.
comment:14 by , 8 years ago
Keywords: | review removed |
---|
attachment:ticket3395unitactions_6.diff which implements the buildrate tooltip needs the same cleanup.
comment:15 by , 8 years ago
Keywords: | review added |
---|
Changes tooltips in unit_action.js