PDA

View Full Version : Character Sheet Modification Question



bmathis
March 8th, 2005, 04:18
Hi, I'm fairly new here but I've been lurking for a few weeks. I've recently run a game of FG but we came up with some things we wanted to add to the character sheet to keep track of. I do web development and am familiar with XML so I took a look at the xml data and tried a few things. I've managed to get it to load up but I'm having some problems.

I created a new ruleset and in the base.xml pointed it to my modified charsheet. It downloads to the players so I think this part is right.

1> I'm trying to add a new tab/window to the character sheet to store the extra info we want. I added a new <windowclass> node and put in a datasource, default size and sheet data entry. in the sheetdata i put in a stringcontrol.
I then went to the area with <subwindow> and added an entry there (added 94 to the position) and put in a windowchangecontrol entry.

I then loaded up FG but I didn't notice any change. Doesn't give me any errors though either.


2> I was looking to see where the monster reference sheet definition is located but I can't seem to find it. I found the monster db, but I wanted to edit the sheet definition to reference a new piece of data for each monster.


Here is the code I used in the Charsheet:


<windowclass name="charsheet_background">
<frame name="charsheet_background" />
<datasource name="charsheet" />
<defaultsize width="550" height="685" />
<sheetdata>
<stringcontrol name="backgroundnotes">
<bounds rect="245,5,268,20" />
</stringcontrol>
</sheetdata>
</windowclass>

and then in the area with the subwindows i put in:


<subwindow name="5background">
<class name="charsheet_background" />
</subwindow>
<windowchangecontrol>
<bounds rect="530,386,15,89" />
<target name="5background" />
</windowchangecontrol>


I'm wondering if there is another place to define the side tabs or images that go with them?

I was also just trying to get the tab/window to show up, I imagine I have the wrong stringcontrol definition/size in there to get a list of lines like the inventory box.

Thanks for any assistance,
Brandon

Bagpuss2
March 8th, 2005, 09:51
Have you added the graphic information about the new page?

In the d20_graphics.xml page (or whatever you've named yours) you need to discribe any new frames you've added. Here's an example entry for the spells page.



<framedef name="charsheet_spells">
<bitmap file="rulesets\d20\frames\charsheet_spells.png" />
<topleft rect="0,0,0,0" />
<top rect="0,0,0,0" />
<topright rect="0,0,0,0" />
<left rect="0,0,0,0" />
<middle rect="0,0,550,685" />
<right rect="0,0,0,0" />
<bottomleft rect="0,0,0,0" />
<bottom rect="0,0,0,0" />
<bottomright rect="0,0,0,0" />
</framedef>


The co-ordinates discribe the rectangles that make up your sheet. X, Y, L, H.

X = start point on the X axis. (horizontal)
Y = start point on the Y axis. (vertical)
L = length along the X axis.
H = length along the Y axis.

Since the page is fixed in size all the entries except the "middle rect" are 0,0,0,0. The "middle rect" starts in the top left corner, and is a long and wide as the actual graphic itself.

The Spells mini_sheet is somewhat different.



<framedef name="mini_spellsheet">
<bitmap file="rulesets\d20\frames\mini_spellsheet.png" />
<topleft rect="0,0,9,24" />
<top rect="9,0,149,24" />
<topright rect="158,0,11,24" />
<left rect="0,24,9,120" />
<middle rect="9,24,149,120" />
<right rect="158,24,11,120" />
<bottomleft rect="0,144,9,23" />
<bottom rect="9,144,149,23" />
<bottomright rect="158,144,11,23" />
</framedef>


Because this sheet can be adjusted in size, stretched using the Ctrl drag method. It is actually made up of several boxes. Hence the more complex co-ordinates.

bmathis
March 9th, 2005, 17:49
Thanks, that got me moving in the right direction. We are now heavily customizing the character sheet.


Thanks,
Brandon

richvalle
March 9th, 2005, 18:55
Make sure to check out Dalken's char sheet mod:
http://forums.fantasygrounds.com/viewtopic.php?t=408
Hopfully we'll get it posted somewhere soon.

rv