#3385 closed enhancement (fixed)
[PATCH] Improve stance descriptions
Reported by: | fabio | Owned by: | elexis |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 20 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description
It would be nice to improve stances descriptions on tooltips. It may be not very clear to everyone what are the differences between the different stances.
Attachments (6)
Change History (21)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Both good ideas.
For the loading screen tooltips we should probably also mention that violent, aggressive and defensive women will automatically attack siege and opponent women. You can find the tips shown in loading screens in binaries/data/mods/public/gui/text/tips
The differences of the unit stances can be found in UnitAI.js
:
// Unit stances. // There some targeting options: // targetVisibleEnemies: anything in vision range is a viable target // targetAttackersAlways: anything that hurts us is a viable target, // possibly overriding user orders! // targetAttackersPassive: anything that hurts us is a viable target, // if we're on a passive/unforced order (e.g. gathering/building) // There are some response options, triggered when targets are detected: // respondFlee: run away // respondChase: start chasing after the enemy // respondChaseBeyondVision: start chasing, and don't stop even if it's out // of this unit's vision range (though still visible to the player) // respondStandGround: attack enemy but don't move at all // respondHoldGround: attack enemy but don't move far from current position var g_Stances = { "violent": { targetVisibleEnemies: true, targetAttackersAlways: true, targetAttackersPassive: true, respondFlee: false, respondChase: true, respondChaseBeyondVision: true, respondStandGround: false, respondHoldGround: false, }, "aggressive": { targetVisibleEnemies: true, targetAttackersAlways: false, targetAttackersPassive: true, respondFlee: false, respondChase: true, respondChaseBeyondVision: false, respondStandGround: false, respondHoldGround: false, }, "defensive": { targetVisibleEnemies: true, targetAttackersAlways: false, targetAttackersPassive: true, respondFlee: false, respondChase: false, respondChaseBeyondVision: false, respondStandGround: false, respondHoldGround: true, }, "passive": { targetVisibleEnemies: false, targetAttackersAlways: false, targetAttackersPassive: true, respondFlee: true, respondChase: false, respondChaseBeyondVision: false, respondStandGround: false, respondHoldGround: false, }, "standground": { targetVisibleEnemies: true, targetAttackersAlways: false, targetAttackersPassive: true, respondFlee: false, respondChase: false, respondChaseBeyondVision: false, respondStandGround: true, respondHoldGround: false, }, };
comment:3 by , 9 years ago
Summary: | Improve stances descritpions → Improve stance descriptions |
---|
comment:5 by , 9 years ago
Component: | Art & Animation → UI & Simulation |
---|---|
Keywords: | simple added |
Milestone: | Alpha 19 → Backlog |
The tooltips are assigned in binaries/data/mods/public/gui/session/selection_panels.js
:
"setTooltip": function(data) { data.button.tooltip = getStanceDisplayName(data.item); },
That function getStanceDisplayName
is defined in binaries/data/mods/public/gui/session/selection_panels_helpers.js
. Besides simplifying, we shouldn't change it. Rather we should have something like this:
data.button.tooltip = getStanceDisplayName(data.item) + "\n" + getStanceTooltip(data.item);
The only thing that needs to be done now is the writeup of some useful tooltips, I can do the coding if necessary.
by , 9 years ago
Attachment: | ticket3385unitstances_1.diff added |
---|
Added some tooltips found in the UnitAI.js like elexis proposed. All remarks are welcome.
comment:6 by , 9 years ago
Keywords: | review patch added |
---|---|
Milestone: | Backlog → Alpha 20 |
Summary: | Improve stance descriptions → [PATCH] Improve stance descriptions |
by , 9 years ago
Attachment: | ticket3385unitstances_2.diff added |
---|
Changed the tooltips a bit and updated coding style.
comment:7 by , 9 years ago
Keywords: | simple, review patch → simple review patch |
---|---|
Milestone: | Alpha 20 → Alpha 19 |
Changed Tooltips:
Took a closer look at UnitAI.js
and the variable names mentioned in the stance code. Also briefly tried the actual behaviour in a testgame. Hit Alt+D, click on change-perspective and select an enemy player at the top to control all units.
After that I changed the tooltips a bit. There should be as few words as possible so that it can be read and understood as fast as possible. Also I think not all relevant differences were mentioned.
It wasn't an exhaustive search for facts, so maybe you can also take a look and see if I overlooked something?
Code style changes:
- Added a different font size for the name
- Indented the switch according to the http://trac.wildfiregames.com/wiki/Coding_Conventions
- Reordered the switch according to the actual order
- Removed the variable and just return immediately
- Added quotes for the warning in
getStanceDisplayName
We should also make tooltips for the Unload All / Rallypoint / Delete / Stop / Garrison / Repair / Guard panel found in binaries/data/mods/public/gui/session/unit_actions.js
, but in a new ticket please.
by , 9 years ago
Attachment: | ticket3385unitstances_3.diff added |
---|
Patch looks good in my opinion, besides the violent tooltip: "Chase all opponents that any of your units see, but focus on attackers" This indicates that an idle unit will attack all visible enemy units. This is not the actual behaviour: the unit only attacks the enemy units in HIS vision range but chases them also outside the vision range (when they have been inside the vision range). So I would propose another tooltip like: "Attack nearby opponents and chase them to death" This is changed in the new patch. When I have some spare time I will take a look at the other buttons.
comment:8 by , 9 years ago
Re Violent Stance:
You are right about the fact that they currently chase until one of them dies. But this is not the way it should work:
(1) see the comment in UnitAI.js
:
respondChaseBeyondVision: start chasing, and don't stop even if it's out of this unit's vision range (though still visible to the player)
(2) if the enemy unit is not visible to the player, how should they know where the enemy is hiding
This bug has been reported in #3394.
We should probably write the tooltip for the desired unit behaviour, so that we don't need to change it later. Maybe we could phrase it: "Attack nearby opponents, focus on attackers and chase as far as possible"
by , 9 years ago
Attachment: | ticket3385unitstances_3.2.diff added |
---|
The tip: "as far as possible" could still be interpret as the whole map, I would change that part to "chase if visible". So we get: "Attack nearby opponents, focus on attackers and chase if visible". This also makes the tip a bit shorter. Sorry for having these command via the attachment command but the spamfilter is blocking everything.
comment:9 by , 9 years ago
How about
Attack nearby opponents, focus on attackers and chase while visible to the player
comment:10 by , 9 years ago
I would remove "to the player" since it should be already implied (elsewhere the term nearby is used when relative to the unit) and I feel it a bit like breaking the fourth wall.
comment:12 by , 9 years ago
Because we have returns (no code execution in functions after a return statement).
comment:13 by , 9 years ago
Milestone: | Alpha 19 → Alpha 20 |
---|
comment:15 by , 8 years ago
Keywords: | simple review removed |
---|
Thanks for the patch. I also reduced the font-size to be more in line with the other tooltips and changed the defensive stance to mention that the chase is aborted at some point.
And if it's possible have the own "loading screen tip info"