Loading ...
Sorry, an error occurred while loading the content.
 

Re: [OS] party sheet options

Expand Messages
  • herzogaldilkassach
    Ok, I forgot one problem I ran into: because the main loop uses the inline-for loop, only one (additional) for loop can be implemented. Which means parts of
    Message 1 of 10 , Aug 12, 2013
      Ok, I forgot one problem I ran into:
      because the main loop uses the inline-for loop, only one (additional) for loop can be implemented.
      Which means parts of the block that require nested for loops can't be implemented (like spellbooks)

      Which leads me to (for a moment disregarding the 'alternative parser' option) the question:

      Why doesn't the party output support the normal for-loop format for looping over characters?
      It would make life so much simpler.......

      Jasper Spaans

      --- In pcgen@yahoogroups.com, "herzogaldilkassach" <herzogaldilkassach@...> wrote:
      >
      > I've had limited success implementing what I wanted.
      > I couldn't get IIF to work either, nor OIF (although my results with OIF were inconclusive. sometimes it works, but using COUNT>0 etc. doesn't...)
      >
      > I have created a party sheet containing most of the information from the statblock4 output. (if you're interested, I could upload it somewhere?)
      >
      > My current problems:
      > -because I can't get IIF or OIF to work, beginning prompts are always shown (even if the list after it is empty.)
      > -I am uncertain about the ABILITYALLLIST and FEATALLLIST. which one should be used? Can I use ABILITYALL.ALL to get both Feats and Special Ability?
      > -I added temporary bonuses to my characters in the list. They are added when I output as single character, but not when I output a party.
      >
      >
      > Regarding other templating engines:
      > Unless I am mistaken, the complete character contents is stored in Java as objects.
      >
      > Why not directly create a set of xml files based on the objects?
      > (instead of through the use of the current base.xml template-construction)
      >
      > That way, you can use xslt to create any output format you want.
      >
      >
      >
      > --- In pcgen@yahoogroups.com, James Dempsey <jdempsey@> wrote:
      > >
      > > Hi Jasper,
      > >
      > > Party sheets are a lot more limited than character sheets. In
      > > particular, I could not get IIF working inside the character loop and
      > > looking at the code, I don't think it is possible.
      > >
      > > Looping through the party is done using the second, inline, FOR syntax:
      > > http://pcgen.org/autobuilds/pcgen-docs/outputsheetpages/tokens/outputsheettokensmisc.html#FOR
      > > (scroll to second FOR)
      > >
      > > The syntax is generally something like
      > >
      > > |FOR.0,50,1,
      > > <td>\\%.NAME\\</td>
      > > ,<tr>,</tr>,1|
      > >
      > > Which will loop through the current party outputting a row for each
      > > character containing the character's name. Note that the second line
      > > contains the entire output for that character for the loop.
      > >
      > > Also note the \\%.NAME\\ syntax. The \\ replace the | used to designate
      > > normal output tags. The %. is indicating the tag following should be
      > > applied to the current character in the loop. So in the first run
      > > through the loop it will be translated as for the first character,
      > > insert the output of the NAME tag.
      > >
      > > Now the catch is that the IIF parsing checks for the |IIF format
      > > directly, which means that the \\ substitution cannot be used, but the
      > > extra | marks the end of the FOR loop.
      > >
      > > This type of limitation is the reason why we are looking at using a
      > > robust third party templating library like freemarker.
      > >
      > > Cheers,
      > > James.
      > >
      > >
      > > On 7/08/2013 8:24 PM herzogaldilkassach wrote
      > > > Hi,
      > > >
      > > > I'm trying my hand on creating a custome partysheet, and am running into some frustrating trouble.
      > > >
      > > > My goal: to create a 'party' output containing the standard statblock4 entries.
      > > >
      > > > Problem: the statblock4 code contains a lot of for loops, if statements, etc. that won't work if I just copy/paste the contents into a party file loop.
      > > >
      > > > Question: is it possible to use the following tags within a party for loop, and if so, how?
      > > >
      > > > IIF
      > > > COUNT
      > > >
      > > > An example of what I am trying to convert to the party format:
      > > >
      > > > |IIF(RACETYPE:None)|
      > > > |TEXT.LOWER.TYPE|
      > > > |ELSE|
      > > > |TEXT.LOWER.RACETYPE|
      > > > |ENDIF|
      > > > |MANUALWHITESPACE|
      > > > |IIF(VAR.IF(var("COUNT[RACESUBTYPES]")==0;1;0):1)|
      > > > |ELSE|
      > > > (
      > > > |FOR,%subtype,0,COUNT[RACESUBTYPES]-2,1,1|
      > > > |TEXT.LOWER.RACESUBTYPE.%subtype|,|SPACE|
      > > > |ENDFOR|
      > > > |FOR,%subtype,COUNT[RACESUBTYPES]-1,COUNT[RACESUBTYPES]-1,1,1|
      > > > |TEXT.LOWER.RACESUBTYPE.%subtype|
      > > > |ENDFOR|
      > > > )
      > > > |ENDIF|
      > > >
      > > > Is this even possible?
      > > >
      > > > Thanks in advance.
      > > >
      > > > Jasper Spaans
      > > >
      > > >
      > > >
      > > > ------------------------------------
      > > >
      > > > Related Lists
      > > > PCGen's release site: http://pcgen.sourceforge.net
      > > > PCGen's Mailing Lists and Links: http://wiki.pcgen.org/Mailing_Lists_and_PCGen_Links
      > > > PCGen's alpha build: http://pcgen.sourceforge.net/07_autobuilds.php
      > > > PCGen's JIRA Tracker: http://jira.pcgen.org
      > > >
      > > >
      > > > PCGen List File Help: http://tech.groups.yahoo.com/group/PCGenListFileHelp/
      > > > (for assistance in creating new homebrew or official list files)
      > > >
      > > > PCGen Experimental: http://tech.groups.yahoo.com/group/pcgen_experimental/
      > > > (for new official data source development)
      > > > Yahoo! Groups Links
      > > >
      > > >
      > > >
      > > >
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.