Jump to content

Viewer


wowgetoffyourcellphone
 Share

Recommended Posts

Good job on the entity viewer @s0600204! Here are a few things I've come across after its implementation:

 

1. Error when trying to view a paired tech:

ERROR: JavaScript error: globalscripts/Templates.js line 539 TypeError: templateName.split is not a function removeFiltersFromTemplateName@globalscripts/Templates.js:539:9 init@gui/reference/viewer/viewer.js:66:21 showTemplateDetails@gui/session/selection_panels.js:1181:1 g_SelectionPanels.Research.setupButton/button.onPressRight@gui/session/selection_panels.js:804:5

ERROR: GUI page 'page_viewer.xml': Failed to call init() function

There is no error when right-clicking erstwhile paired techs in the Struct Tree, only while in-game from the UI

.

2. I think right-clicking an 'Upgrade' option, as for the Defense Tower upgrade for Sentry Towers [Stone Towers from Wooden Towers in DE], the viewer should load the information for the upgrade entity, not the source entity. You probably agree.

 

3. Bug: After 'Upgrading' a unit or building, right-clicking that new unit or building loads the original unit or building's information, not the new information for the Upgraded entity. So, for instance, if I upgrade a tower from Wooden to Stone, right-clicking the new Stone Tower's portrait gives me the viewer panel of the Wooden Tower, not the new Stone Tower and all the stats are for the Wooden Tower.

 

 

Again though, it's great to see the viewer finally in the game. It'll help a lot of players. Plus, when all the History information is added back in people will enjoy reading about the items in the game. I would suggest a few extended features for the viewer, but I think items 1-3 above suffice for now.

Edited by wowgetoffyourcellphone
  • Like 3
Link to comment
Share on other sites

On 2/22/2018 at 3:31 PM, s0600204 said:

2 - Unable to duplicate (or I'm misunderstanding you).

3 - Unable to duplicate. (In vanilla 0AD) Building a "Sentry Tower", upgrading it to "Defence Tower", then right-clicking the big entity icon: Template Viewer appears displaying stats of the "Defence Tower".

2 and 3 seem to be the same issue just manifesting in different ways. I have found out what is happening. If the 'Upgraded' entity inherits from the original entity, then the Viewer only gets the information from the original entity--it doesn't see the upgrade entity as a new entity. If the 'Upgrade' entity parent is a new parent [template_structure_xxx] then the viewer updates the information accordingly. hmm. Can test this in DE by viewing the upgrade units for the Maiden Archer. The Maiden Fire Archer's parent is the Maiden Archer, and thus the viewer does not display the new information. The Maiden Swordsman's parent is a new base template [swordsman instead of archer], and thus the viewer displays the Maiden Swordsman correctly.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...