5E Product Walkthrough Playlist
  1. #1
    GMBazUK's Avatar
    Join Date
    May 2006
    Location
    Gloucestershire, England
    Posts
    148

    Default windowlist entry woes.

    This ruleset creation game is a lot of fun, but Im still not out of the woods as far as LUA is concerned, and sometimes the wood for the trees, with xml.

    Brief description:
    On the main page of my character sheet I have a frame called Injuries, which contains information on two types of injuries: Lethal - those that are simply a value (so contained in a numberfield) and Critical, those that have a numerical value and a description.
    I have set up a numberfield for the Lethal damage.
    I have set up a window list on the charsheet_main that is referenced to a windowclass on the charsheet_listclass.xml and includes everything for the Critical damage windowlist. I have referenced a datasource and the class in the windowlist.So far so good.

    Problem:
    When I open a new character sheet, the windowlist (for criticals) already has an entry (albeit blank) waiting to be filled in. I thought the windowlist default behaviour was to not generate an entry until requested to do so?
    This entry reappears if after deletion, the character sheet is closed and reopened.

    My confusion is further confounded...
    If I fill out this blank default entry with information, and save the campaign it doesnt show up in the database., and whilst it is remembered on the character sheet for the session, it is lost if the session is closed and the campaign file reloaded.
    If I add a second entry to the windowlist on the character sheet the information is stored in the database tree where I would expect it to be, and is remembered between sessions etc...

    I have edited out all scripting and so have, what I would consider a fairly simple series of xml controls.


    Thank you in advance.

    Baz.

  2. #2
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,658
    Blog Entries
    2
    Try adding the <skipempty /> tag to the definition of the windowlist. <skipempty /> tells FGII not to display empty windowlist entries and should stop the default creation of an empty entry when the list is empty.
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  3. #3
    GMBazUK's Avatar
    Join Date
    May 2006
    Location
    Gloucestershire, England
    Posts
    148
    Thank you Doc.
    I will give it a go.

    Baz.

    Edited: Excellent. Worked like a charm. Thank you.
    Last edited by GMBazUK; June 9th, 2011 at 10:04.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in