View Single Post
Ian
Senior Member
 
Join Date: May 2017
Posts: 135

Old December 24th, 2017, 06:00 PM
Quote:
Originally Posted by ShadowChemosh View Post
One of the reasons I have been holding off doing a big fix for Path of War is I am hoping to only have to write the new UI tab one time.
One thing to keep in mind here is that we don't have a projected date as to when we'll have this stuff available for third-party devs to work with, so you shouldn't hinge too heavily on expecting it to happen in a useful timeframe. The actual work involved with the HLO templating is much less than with current HL, though, so any "conversion" stuff later from existing HL script should be fairly straightforward once you get the gist of it.

Here's a quick, rough idea of the kind of thing it will look like. All subject to change, some of the stuff here isn't what we're currently doing, etc, but this is generally similar to what the current UI templates for HLO look like.

Code:
// locales/en-US/maneuvers.json
{
  "oManTbl": "Maneuvers",
  "oStanceTbl": "Stances"
}

// templates/manuevers.xml
<?xml version="1.0" encoding="UTF-8"?>
<LayoutContainer>
  <Iterate tagGroup="PWManList">
    <Text align="center">
      {~livename} {~textKey oManTbl} ({~field cIL})
    </Text>
    <LayoutContainer direction="horizontal">
      <Iterate tableIds="oManTbl, oStanceTbl">
        <SheetTable groupByTag="sLevel">
          <template:item>
            <TableCell align="left">
              {~tags Ability} ({~tags ClsCountAs})
            </TableCell>
            <TableCell>{~tags mLevel}</TableCell>
            <TableCell>{~field abSumm}</TableCell>
          </template:item>
        </SheetTable>
      </Iterate>
    </LayoutContainer>
  </Iterate>
</LayoutContainer>
This would result in an arrangement with a "(whatever) Maneuvers (CL X)" header above two tables (arranged in a horizontal split on a large screen or sequentially on a small screen), each of which would have the appropriate header (automatically sourced from the file in the locales folder) and, for each pick, tag names for the ability and its level and the text of the ability summary field. No need to specify layout details, deal with text vs number field details, manually assemble string labels, etc.

The idea is to have something with easy text handling, declarative- rather than imperative-oriented, with minimal hassle dealing with loops and tables, and with anything beyond minimal layout control neither allowed nor needed (because of the need to reflow everything to fit on different screen sizes).

Last edited by Ian; December 24th, 2017 at 06:03 PM.
Ian is offline   #84 Reply With Quote