PDA

View Full Version : A great journey...



Czarisyn
June 18th, 2010, 01:02
...begins with a single step.

What is your first step in creating a ruleset?

Whenever I look at the directory of the example, I get a little overwhelmed and don't know where to begin.

drahkar
June 18th, 2010, 09:27
A lot of people have their first step in building out a character sheet. Once you have that, then you just focus on one task at a time. Character sheet, graphics, tying character sheet into combat tracker, and verifying all of the functions on the most basic sort work. Once all of those steps are there. Then you can work on adding features, customizing how things work, giving it a more complete and unique feel.

That's sort of the steps I've been going from. When you break it into smaller segments, it really reduces the 'Wow, there is so much to do' overwhelming feeling.

Moon Wizard
June 18th, 2010, 20:23
Or alternatively, people will try adding features to existing rulesets in order to focus on a smaller goal first and to learn how rulesets work.

Cheers,
JPG

Czarisyn
June 19th, 2010, 12:09
I printed out a character sheet and made some notes to separate what should go where. It is a derivative of D20 so I am modifying the one I downloaded from this site.

Looking through the xml files and reading the guides, I am still unsure on database nodes (i.e. abilities.dexterity.score).

Am I right when saying that the database nodes defined in the source tags are created as they are defined and not polled from another file?

Also, even though it is D20, I still want to at least comment out all the prewritten fields in the character sheet and gradually modify -> and uncomment as I go, but it seems when I comment out everything besides the
templates and main file from the character.xml, it doesn't like that at one bit.

Any suggestions are appreciated, and thank you for the help so far.

Moon Wizard
June 20th, 2010, 02:07
When I first started, I found it easier to slowly remove pieces from the character sheet, rather than try to clear it all out and re-add pieces. It will make it easier for you to identify where the problem is.

Any "field" types (i.e. numberfield, stringfield, diefield, etc.) will automatically create the underlying database node to store their data. By default, the name of the control will be used as the name of the database node, and it will be created in the current database context for the sheet (i.e. character, npc, ...). If a "source" attribute is specified for the field tag, it will be used as the relative path to create the underlying database node instead. The "source" path will be relative to the current database context for the sheet you are working on.

Try creating a character in the default d20 result, set some values, and then look at the db.xml file to see how the values are mapped from the XML into the database.

Cheers,
JPG

Czarisyn
June 21st, 2010, 20:30
ah so when source is defined as abilities.strength.score, it saves it in the db.xml as:


<abilities>
<strength>
<score></score>
</strength>
</abilities>

Right now, I've got the first tab done and after looking at it, I thought I was putting too much data on one page. So now, I'm thinking of just showing static numbers and have them edited in other pages. Also, I'm thinking of just build it with fields with no automation and then put in the scripts and tweaks. Final part would be the custom graphics.

Czarisyn
June 21st, 2010, 22:30
I can't seem to find the control for the tabs on the side of the character sheet. No matter what I comment out, the tabs are still there.

Moon Wizard
June 22nd, 2010, 07:38
Make sure you find a text editor that can search over multiple files for a string, then look for "tabcontrol". That is the template used to create and manage the tabs on the side of the sheets.

Cheers,
JPG

Czarisyn
July 19th, 2010, 00:24
found the tabs, but when I take them out, the sheet is blank.
What would need to be set to replace <subwindow> so tabs are not needed?

Moon Wizard
July 19th, 2010, 01:54
The subwindow control is essentially a control that is a scrollable view to another windowinstance with its own windowclass. Subwindows are used to create tabbed windows where you want to be able to display different control sets within a single window.

If you want to remove the subwindow/tabcontrol completely, you will need to migrate all of the controls and script code from the subwindow windowclass definition into the main window windowclass definition.

Cheers,
JPG

Czarisyn
July 20th, 2010, 21:10
ah, got it working now.

Is there a frame size limit? it seems to not want to take the full size of my frame and it crops the bottom part

Moon Wizard
July 20th, 2010, 23:18
Are you talking the bitmap frames from the frame tag? If so, you will need to specify offsets in order to get your frame displaying the way you want, depending on how the framedef is defined.

Cheers,
JPG

Czarisyn
July 20th, 2010, 23:28
<framedef name="my_charsheet">
<bitmap file="frames/charsheet_parchment.png" />
<topleft rect="0,0,60,60" />
<top rect="60,0,648,60" />
<topright rect="708,0,60,60" />
<left rect="0,60,60,887" />
<middle rect="60,60,648,887" />
<right rect="708,60,60,887" />
<bottomleft rect="0,947,60,60" />
<bottom rect="60,947,648,60" />
<bottomright rect="708,947,60,60" />
</framedef>


The image is 768 x 1007, the width of the image is working fine, but the height seems like it took the bottom of the image and pushed it up, over lapping some of the bottom-middle section.

Moon Wizard
July 21st, 2010, 02:54
The thing to remember with frames is that the corners will always be displayed, then the edges, then the center. If there is no remaining height/width after the corners/edges, then the center will not be displayed. For example, if you tried to use the frame you defined with a height or width of 120 or less, you would never see the center graphics.

The thing to double-check is the pixel counts on your image to make sure that 60 is the number you want for the corners/edges in all scenarios. It sounds like you may want a smaller number for the bottom edge.

Regards,
JPG

Czarisyn
July 21st, 2010, 12:34
I've attached a pdf version of the OpenOffice Calc spreadsheet to figure out the frame sizes.

The math adds up to be able to show the entire center using 60x60 corners but yet it doesn't. I'll try smaller corners but I don't want to get to close to the edge of the image due to the graphic (it has rough edges like old paper)

Czarisyn
July 22nd, 2010, 22:24
On the bottom sections, does it get the image from the bottom -> up or does it display it from where it left off on the other boxes?

Moon Wizard
July 22nd, 2010, 23:54
Consider each portion of the frame as a separate image (such as the bottom edge), where each image is defined as the section defined in the frame definition cut from the original image.

For your example, if your window is 200x200, then:
* Upper Left: 60x60 corner from topleft
* Upper Edge: 80x60 edge from top (using first 80 pixels horizontally from topleft of subimage)
* Upper Right: 60x60 corner from topright
* Left Edge: 60x80 edge from left (using first 80 pixels vertically from topleft of subimage)
* Right Edge: 60x80 edge from right (using first 80 pixels vertically from topleft of subimage)
* Bottom Left: 60x60 corner from bottomleft
* Bottom Edge: 80x60 edge from bottom (using first 80 pixels horizontally from topleft of subimage)
* Bottom Right: 60x60 corner from bottomright

The center will then be whatever is remaining. In this case, the center graphic will be used to fill whatever space is left. In this scenario, the space remaining will be an 80x80 square in the center of the window. The application will use the 80x80 topleft square of the center subimage to draw that area.

Hope that helps,
JPG

Czarisyn
July 23rd, 2010, 00:44
First, thanks for all the help so far, I'm getting there.

I've attached the image I'm working with. The size is 768 x 1007

I defined the frame with the following code:



<framedef name="my_charsheet">
<bitmap file="frames/charsheet_parchment.png" />
<topleft rect="0,0,60,60" />
<top rect="60,0,648,60" />
<topright rect="708,0,60,60" />
<left rect="0,60,60,887" />
<middle rect="60,60,648,887" />
<right rect="708,60,60,887" />
<bottomleft rect="0,947,60,60" />
<bottom rect="60,947,648,60" />
<bottomright rect="708,947,60,60" />
</framedef>


The edge of the image is perfect, but its not going the full height which is causing an overlap at the bottom. I've tried increasing the frame def to go over the actual size and it still doesn't get any longer.

Czarisyn
July 25th, 2010, 21:26
defining a new frame with a new image...

why would the bottom show up on the top when I view the frame?

odd...

Czarisyn
July 25th, 2010, 22:01
oh, I figured out how to get the full image displayed on my other one. I had to add the minimum size properties to the windowclass

thanks for the help