PDA

View Full Version : Deconstructing charsheet_skills



FryCook
April 26th, 2007, 22:35
I thought I was doing pretty good while I reworked charsheet_main for a WFRP2 ruleset. I understand just about everything there. Then I started looking at charsheet_skills... oh boy.

It's obvious that FG2 is an evolutionary leap beyond FG1. Just how far of a leap became quite clear when I started working thorugh charsheet_skills.

It contains so many scripted elements not to mention the .lua skill scripts and not very much of it is commented or documented.

Sure you could always rip out the guts and just have a simple skill list of fill in the blanks, but the way the D20 skill list works is very slick. If only I understood half of what is going on.

I've been able to rework the skill list to contain the WFRP2 skills with their appropriate attributes (a simple edit of charsheet_skilllist.lua), but beyond that I'm somewhat at a loss.

Has anyone else tried to plow through this and could enlighten me on how it really works?

Is this something the Devs are ever going to document besides the Reference documentation?

~Fry

Goblin-King
April 27th, 2007, 08:33
We're going to create a plain text manual for ruleset modifications. That, however, won't go into detail on each script in the d20 ruleset.

A future development plan is to implement a ruleset addon system that would work a bit similar to what modules are to campaigns, and that would require some cleaning up in the d20 ruleset as well, but that's down the road.

One thing I should mention: The templating mechanism allows you to hide most of the complicated script stuff. You could simply post a message here asking if anyone is interested in helping you develop a component that might be more generically useful. It would live in one xml file you could copy into your ruleset and use from there.

The request might be something like "I need a control that keeps track of two numbers, one that says how many check boxes you have in a row, and the other that says how many of them are selected."

If there's interest, ultimately you might be able to use this like:


<checkboxblock>
<slotcountfield>totalcandy</slotcountfield>
<spentcountfield>eatencandy</spentcountfield>
</checkboxblock>

Sorry about the complicated explanation, but I think this might be a bit hard to understand at first for people not used to scripting and such.

DrDeth
April 30th, 2007, 08:47
What the ruleset development community needs is some sort of Wiki where information can be gathered and indexed in one place. Its rough ploughing through all the forums posts to try to find information - a central repository for ruleset information would help a lot - not only the community, but it would also help the developers by allowing the community to do the documentation for them. ;)

FryCook
April 30th, 2007, 19:09
DrDerth,

I'd be all for this.

I'd be more than happy to contribute to a development Wiki. Anyone want to host?

FryCook
April 30th, 2007, 21:53
the templating method seems reasonable. it's just a matter of finding folks who aren't already hard at work on their own rulesets! i'd like to be able to contribute myself.

maybe i could ask some more basic questions to help me understand the structure here.

i'd like to understanding the order that things get done.

when a script is called, for instance

<script file="scripts/charsheet_skilllistitem.lua" />

does the onInit() function in that script immediately get executed?

when does onClose() get called?

thanks,

~Fry

Toadwart
April 30th, 2007, 22:07
Some of what you are after is available in the ruleset reference documentation
https://www.fantasygrounds.com/refdocbeta/script.xcp
(there also a link to it on the right side of the main page)
It isn't a complete reference but covers a fair bit