Opened 9 years ago

Closed 8 years ago

Last modified 3 years ago

#3213 closed defect (fixed)

[PATCH] Structure Tree - units made from other units are not displayed

Reported by: elexis Owned by: s0600204
Priority: Should Have Milestone: Alpha 20
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description (last modified by s0600204)

Currently the structure tree does not show units that can be produced from other units. For example the mauryan hero elephant can do maiden archers, which are basically the same as scythian archers. Almost noone knew about this unit... The tooltip also doesn't say anything about this ability. Another example is the athenian tireme which can produce sword champions and archers. Here the tooltip is also missing! To solve the problem, those units which can produce other units should be displayed along with the other buildings. The building list will be bigger than the screensize, it should be scrollable then. So (1) display those units (2) fix the tooltips and (3) make the list scrollable.

Attachments (5)

unitTrainingUnits.patch (5.8 KB ) - added by s0600204 9 years ago.
Patch to place units that train other units on same level as structures.
screenshot_persian.png (1.0 MB ) - added by elexis 9 years ago.
Thanks for the patch, works great! I didn't know that one of the persian heroes can train champions, and that their ship can produce sword cav.
screenshot_downTheSide.png (908.4 KB ) - added by s0600204 9 years ago.
Possible alternate placement of the trainer units. Thoughts?
rh-side.patch (7.6 KB ) - added by s0600204 9 years ago.
Patch to place units that train other units in a bar down the right-hand side of the UI.
rh-side_updated.patch (7.2 KB ) - added by s0600204 9 years ago.
Updated to work with current SVN state

Download all attachments as: .zip

Change History (14)

comment:1 by elexis, 9 years ago

(1) see #3212 (2) Also the boats need a tooltip that states that the number of arrows fired increases with the number of units garrissoned, and that one can lookup the number of arrows fired in the tooltip of the boat. (3) see #3038

by s0600204, 9 years ago

Attachment: unitTrainingUnits.patch added

Patch to place units that train other units on same level as structures.

comment:2 by s0600204, 9 years ago

Description: modified (diff)
Keywords: review patch added
Milestone: BacklogAlpha 19
Owner: set to s0600204
Status: newassigned
Summary: Structure Tree - units made from other units are not displayed[PATCH] Structure Tree - units made from other units are not displayed

I suppose a secondary tree, available in a separate tab, is a possibility. Until then, the attached patch places units that train other units alongside structures.

(2) Everything that appears in a tooltip is lifted straight from the entity templates, and are run through the tooltips.js file in globalscripts. (3) That is relying on someone who knows how the GUI system works (such as leper) to find time to code that. It is also outside the purview of this ticket.

by elexis, 9 years ago

Attachment: screenshot_persian.png added

Thanks for the patch, works great! I didn't know that one of the persian heroes can train champions, and that their ship can produce sword cav.

comment:3 by sanderd17, 9 years ago

I'm not a real fan of putting it on the same line as the buildings. It relies on a clear unit icon to avoid confusion, which isn't good enough.

I'd personally prefer a separate tab for all units, but I'd also accept if you could just put the units on a separate line (after the city phase line).

comment:4 by leper, 9 years ago

What about adding some colour tint to the unit icons that are listed next to the buildings? I didn't know how to nicely solve this back when we included it at first and well, that didn't really change. Another tab would be a bit strange IMO.

by s0600204, 9 years ago

Attachment: screenshot_downTheSide.png added

Possible alternate placement of the trainer units. Thoughts?

comment:5 by elexis, 9 years ago

I think the solution from the last screenshot is the best so far. You display all information on one screen without introducing tabs.

One possible problem might be the width of the screen elements. 1024x768 is the lowest supported resultion. On linux you can resize the window with

wmctrl -r "0 A.D." -e 0,0,0,1024,768

However #3038 should solve that isssue.

-> Looks nice, can you upload the code?

by s0600204, 9 years ago

Attachment: rh-side.patch added

Patch to place units that train other units in a bar down the right-hand side of the UI.

comment:6 by s0600204, 9 years ago

From #0ad-dev, 2015-07-02:

18:27 < WildfireBot> News from 0adsvn: screenshot_downTheSide.png attached to Ticket #3213 <http://trac.wildfiregames.com/attachment/ticket/3213/screenshot_downTheSide.png>

18:30 < Itms> s0600204: looks nice to me!

18:38 < s0600204> Itms, Thanks! It does suffer on lower resolutions as it gets covered up by the village_phase structures. Though that should be resolved when scrolling is properly implemented.

18:39 < Itms> ah, scrolling :)

Why do you think I created the screenshot so wide? ;P (Also, wmctrl doesn't exist on all linux distros.)

Last edited 3 years ago by s0600204 (previous) (diff)

by s0600204, 9 years ago

Attachment: rh-side_updated.patch added

Updated to work with current SVN state

comment:7 by Itms, 9 years ago

Milestone: Alpha 19Alpha 20

It's too late to include that, because we froze the strings for translation.

comment:8 by wraitii, 8 years ago

Resolution: fixed
Status: assignedclosed

In 17328:

Show units that can train other units (trainer units) in the structure tree. Patch by s0600204. Fixes #3213 .

comment:9 by sanderd17, 8 years ago

Keywords: review removed
Note: See TracTickets for help on using tickets.