Difference between revisions of "Revise Summary Panels (Savage)"

From HLKitWiki
Jump to: navigation, search
Line 119: Line 119:
  
 
   </layout>
 
   </layout>
 +
</pre>
 +
 +
We can now reload everything and see the results. The first thing we see is that the list of attributes includes our hidden attribute for super powers. We also see that the list of derived traits include various traits that should be hidden. So we need to add a suitable List tag expression to the two tables that limits the items that are shown. We can refer to the tables used on the Basics tab for how to handle this, at which point we'll determine that the two List tag expressions should be the ones shown below.
 +
 +
<pre>
 +
<list>!Hide.Attribute</list>
 +
 +
<list>!Hide.Trait</list>
 
</pre>
 
</pre>

Revision as of 15:07, 14 January 2009

Context: HL KitAuthoring Examples … Savage Worlds Walk-Through 

Overview

Everything is finally coming together nicely with our data files. At this point, it's probably a good idea to switch our focus over to the various summary panels that are displayed.

Assess the Contents

When is comes to the summary panels, the first thing we need to do is assess what information needs to be shown within the panels. This is most easily accomplished by simply making a list of the various pieces of information that should be included. A useful approach is to look at each of the main tabs within the interface and identify items that the user will likely want to refer to while looking at other tabs. After giving it some thought, the following list probably makes the most sense.

  • Attributes
  • Derived Attributes
  • Status Info (e.g. Encumbrance)
  • Skills
  • Edges
  • Hindrances
  • Racial Abilities
  • Armor
  • Hand Weapons
  • Ranged Weapons
  • Special Weapons

Organize the Information

The next step is to break the above list into logic groupings that will generally fit into a single summary panel. An important consideration during this step is that you need to create your data files with a small 800x600 display in mind. Even if you are using a huge display and keep the HL application at maximum size, your data files will also be used by some people on a small 800x600 display. So it's important that you keep each summary panel reasonably compact, if at all possible.

After you break things up, you can then decide on the appropriate sequence in which to show each set of information. For example, should hand weapons go above ranged weapons, or vice versa? When looking at the list of contents we identified above, there are a variety of suitable organizations, and the final determination really comes down to what you think works best. For our purposes, we'll settle on three separate summary panels that are organized as shown below.

  • Basics
    • Attributes
    • Derived Attributes
    • Status Info (e.g. Encumbrance)
  • Abilities
    • Edges
    • Hindrances
    • Racial Abilities
    • Skills
  • Armory
    • Armor
    • Hand Weapons
    • Ranged Weapons
    • Special Weapons

The First Panel

We can now set about configuring the first summary panel. We'll use the existing "Basics" panel, which can be found in the file "summ_basics.dat". There is already a table of attributes and another table of derived traits, so we don't need to add those. However, we do need a table in which to display the encumbrance and other status information.

Adding the new table starts with cloning one of the existing two tables. Once we clone it, we can then modify it for showing status information. We can look at the "baStatus" table used on the Basics tab for guidance regarding how to setup the new table. Since the format of the output will be different from standard traits, we'll also need to create a new template, which we'll name appropriately. The new table portal should look similar to the one below.

<portal
  id="smStatus"
  style="tblInvisSm">
  <table_fixed
    component="Resource"
    showtemplate="smResource"
    showsortset="explicit"
    scrollable="no">
    <list>Helper.Status</list>
    </table_fixed>
  </portal>

With the table in place, we now need to define a suitable template. We can clone the "smTrait" template and adapt it for our needs. We need to change the component set reference and the field which shows the value. We also need to give ourselves significantly more space for the value field, which can be done within the Position script. This yields a new template that looks like the following.

<template
  id="smResource"
  name="Summary Resource Pick"
  compset="Resource">

  <portal
    id="value"
    style="lblSummary">
    <label
      field="resShort">
      </label>
    </portal>

  <portal
    id="name"
    style="lblSummary">
    <label
      field="name">
      </label>
    </portal>

  <position><![CDATA[
    ~set up our height based on our tallest portal
    height = portal[name].height

    ~if this is a "sizing" calculation, we're done
    if (issizing <> 0) then
      done
      endif

    ~position the value on the left in a limited span and the name on the right
    portal[value].width = 55
    perform portal[name].alignrel[ltor,value,5]
    ]]></position>
  </template>

The final step is to add the new table portal into the layout. We'll place it beneath the existing two tables, so all we need to do is add the portal reference to the layout and then add an appropriate placement statement to the Position script. The resulting layout should look like the following.

<layout
  id="smBasics">
  <portalref portal="smAttrib"/>
  <portalref portal="smDerived"/>
  <portalref portal="smStatus"/>

  <position><![CDATA[
    ~position and size the tables to span the full layout
    perform portal[smAttrib].autoplace
    perform portal[smDerived].autoplace[20]
    perform portal[smStatus].autoplace[20]
    ]]></position>

  </layout>

We can now reload everything and see the results. The first thing we see is that the list of attributes includes our hidden attribute for super powers. We also see that the list of derived traits include various traits that should be hidden. So we need to add a suitable List tag expression to the two tables that limits the items that are shown. We can refer to the tables used on the Basics tab for how to handle this, at which point we'll determine that the two List tag expressions should be the ones shown below.

<list>!Hide.Attribute</list>

<list>!Hide.Trait</list>