DICE PACKS BUNDLE
Page 1 of 2 12 Last
  1. #1

    Two Columns for NPC sheet

    I've been messing with my ruleset again recently and one of the things that annoys me about it is the length of the combat tab for NPCs. I've got 18 number fields that I'd like to put into two columns of 9 instead of how it currently appears. I've attached a screen capture of how it currently appears.

    Since I'm modifying the adventure_npcs.xml file I'm wondering if I'm just missing some other template reference to be able to use a second column. If anyone has a quick pointer to do what I want here that would be great, though I may just be asking this question to help jump start my brain. If I sort it out before an answer comes I'll update.

  2. #2

    Join Date
    Jun 2007
    Location
    Zeist, Netherlands
    Posts
    286
    In charsheet_skills.xml they use a windowlist with charsheet_skilllistitem entries that has 2 columns. I think that's the only place where the columns are actually created by the code.
    I don't see why you need it though; just don't change the coordinates of the controls in your NPC window to form 2 columns.

  3. #3
    Quote Originally Posted by Hamish
    In charsheet_skills.xml they use a windowlist with charsheet_skilllistitem entries that has 2 columns. I think that's the only place where the columns are actually created by the code.
    I don't see why you need it though; just don't change the coordinates of the controls in your NPC window to form 2 columns.
    I had looked at that a little bit and will keep digging into it, so thanks for that. I suspect part of my problem in figuring this out is that I actually want 3 areas, 2 columns in the upper part of the frame and then a wide bit at the bottom part for dealing with the long strings/text globs.

  4. #4

    Join Date
    Jun 2007
    Location
    Zeist, Netherlands
    Posts
    286
    Either approach I mentioned will work. I still think the easiest way is to just place some controls in the left column, and some others on the right. The windowlist is useful when you must be able to add entries, like on the skill list or the combat tracker, but for mostly static content like your NPC sheets it looks like complete overkill to me.

    So for example, use the following coordinates:
    (10,10).....(120,10)
    (10,20).....(120,20)
    (10,30).....(120,30)
    (10,40).....(120,40)

  5. #5
    Yes, you're right. That certainly works out much easier. I think I was just trying to come up with something I could reuse without too much hard coding. Thanks for the feedback.

  6. #6
    Hacking from the default d20 I managed to get the main window to behave properly taking some cues from charactersheet_main. However I still can't get the combat tab to act right.

    I've plugged in the following code but the formatting still doesn't place things properly.
    Code:
    			<genericcontrol name="attcoloneframe">
    				<anchored>
    					<to>npc_combat</to>
    					<position>above</position>
    				</anchored>
    				<bounds>0,0,165,210</bounds>
    				<frame>
    					<name>sheetgroup</name>
    				</frame>
    			</genericcontrol>
    			<columnnumberfield name="body">
    				<anchored>
    					<to>attcoloneframe</to>
    					<position>insidetopleft</position>
    					<offset>15,10</offset>
    				</anchored>
    				<anchorto>attcoloneframe</anchorto>
    				<tabtarget next="agility" prev="notes" />
    			</columnnumberfield>
    			<columnfieldlabel>
    				<anchor>body</anchor>
    				<static>Body</static>
    			</columnfieldlabel>
    Any ideas on what I'm missing here and why it's not applying the formatting to the control created for the column?

  7. #7

    Join Date
    Jun 2007
    Location
    Zeist, Netherlands
    Posts
    286
    Code:
    <genericcontrol name="attcoloneframe">
      <anchored>
        <to>npc_combat</to>
        <position>above</position>
      </anchored>
      <bounds>0,0,165,210</bounds>
      <frame>
        <name>sheetgroup</name>
      </frame>
    </genericcontrol>
    <columnnumberfield name="body">
      <anchored>
        <to>attcoloneframe</to>
        <position>insidetopleft</position>
        <offset>15,10</offset>
      </anchored>
      <anchorto>attcoloneframe</anchorto>
      <tabtarget next="agility" prev="notes" />
    </columnnumberfield>
    <columnfieldlabel>
      <anchor>body</anchor>
      <static>Body</static>
    </columnfieldlabel>
    Something is wrong with your anchoring. The attcoloneframe control has both <anchored> and <bounds> tags. That's not going to work; either specify an absolute location using <bounds> or give a relative location using <anchored> and <offset>.
    The body numberfield has both <anchored><to> and <anchorto> tags. As far as I know, a windowcontrol does not support the <anchorto> tag.

    Hope this helps!

  8. #8
    Hmm, for those fields I took the examples from charsheet_main and how it handles subwindows, I'll look at it again and play with it some more, thanks for the pointer

  9. #9
    I ended up making a 6x3 grid for the attributes, followed by the handful of text blob areas for skills, powers, spells, gear, etc. I'll post of a screen later to see what the potential SR GMs think. I'm now trying to go through and parse out the npcskills.lua to get it to behave properly, I think I just need to change the regex it's using to parse the string to find the pool modifier.

  10. #10

    SR4 ruleset NPC frame

    Here's what I came up with for the NPC frame. Tried to follow the format of how the npc attribute details are printed in the various rulebooks/adventures.

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
  •  
5E Product Walkthrough Playlist

Log in

Log in