PDA

View Full Version : Links to the spelldesc in the player spell listing



Bumamgar
October 24th, 2005, 06:03
I'm trying to modify the charactersheet so that there is a link box next to each spell that will bring up the spelldesc entry for that spell when clicked.

I've modified the frame, added in the XML, etc. but the link always just brings up an empty spelldesc window.

Here's the relevant code I've added:

charsheet.xml


<windowclass name="charsheet_spellentry">
<frame name="charsheet_spellentry_new" />
<datasource name="spell" />
<defaultsize width="516" height="25" />
<sheetdata>
<windowopencontrol name="open">
<icon normal="button_openwindow" pressed="button_emptytarget" />
<bounds rect="3,5,24,24" />
<class name="spelldesc" />
<description field="name" />
</windowopencontrol>
<stringcontrol name="name">
<bounds rect="27,5,159,20" />
</stringcontrol>
<stringcontrol name="shortdescription">
<bounds rect="269,5,244,20" />
</stringcontrol>
<numbercontrol name="level">
<bounds rect="188,1,34,23" />
<noreset />
</numbercontrol>
<numbercontrol name="prepared">
<bounds rect="229,1,34,23" />
<hideonvalue value="0" />
</numbercontrol>
</sheetdata>
</windowclass>


Here's a screenshot example:
http://www.cyberdeck.org/fantasygrounds/spelldesc.jpg

What it seems to me is that it's trying to find a spelldesc node under the spell section of the charsheet entry in the db.xml for the campaign.

What I'd like it to be is a link to the appropriate spell node under the spelldesc portion of the ruleset.

How would I go about doing that?

I find it odd that the <acceptdrop> entry in the "charsheet_spells" windowclass (with a datasource of "charsheet") doesn't seem to suffer from this problem.

Or am I misunderstanding the meaning of the <description> tag in the <windowopencontrol> ? I am taking it to mean: "Find the node in "class" where the field "name" equals the same as the field "name" in this sheet"

Actually, that doesn't quite seem right now that I think about it.

Anyway, I'm all confused, so any pointers on how to do what I'm trying to do would be great!

Thank you.

Bumamgar
October 25th, 2005, 05:01
Ok, I've discovered some more information.

The code I posted above actually works, if I manually edit the db.xml for the character and change the spell node names from "0001", "0002" to "spellname" to match the node names in spelldesc.xml

So, now the question is, how can I get the node name auto-populated from a drag-n-drop off the spelllist?

Currently you can drag-n-drop a spelldesc to the spellsheet and it adds a new entry, populating name, level and shortdescription.



<windowlist class="charsheet_spellentry" name="spelllist">
<allowcreate />
<allowdelete />
<nestdata />
<bounds rect="7,194,516,450" />
<sort fields="name,level" />
<acceptdrop class="spelldesc" fields="name,level,shortdescription" />
</windowlist>


I tried editing the acceptdrop entry adding "node" to the list of fields, but that didn't do anything :)

Anyone know how to populate the node name instead of having it auto-generate 0001, 0002 etc?

Bumamgar
October 30th, 2005, 19:17
Still haven't had any luck with this. This one issue is pretty much the final sticking point holding up the creation of a complete character sheet :(

Basically, I can get <windowopencontrol> to open up a new spell, feat or skill window as long as I manually edit the db.xml and change the node names away from "00001", "00002" etc to be the same as the node-names in feats.xml, spelldesc.xml etc.

However, I cannot figure out how to grab the node name from a drag-n-drop operation where I drop a spelldesc entry onto my list.

Any help from the devs on this issue (even a simple "no, it's not possible, new nodes will always be named with the lowest available numeric sequence id") would be greatly appreciated.

Graiskye
October 30th, 2005, 21:07
All I can offer is have patience Bumamgar, what you are trying to accomplish I think would be of great value to the FG community so I couldnt see the Devs just 'poopooing' you! Chances are they have yet to see the post, or they may even be working on a solution.
I think its a necessary function, and should be worked into the program if at all possible.
You might also consider joining the Adventuresome Dreams Forum, theres a small group of very FG(any RPG apps actually) knowledgable folk, who are extremely helpful. Might have a bit better luck, communicating with someone who has some expertise, unfortunateley, that aint me ? Good luck tho bud,Im pulling for you. Grai

wavecutter
October 31st, 2005, 13:04
Hang in there Boss!

Bumamgar
October 31st, 2005, 16:02
Ville responded via e-mail. What I am trying to do will be possible with the scripting that is coming with v1.06, but is not currently possible.

This is great news. Although I was hoping it was possible today, at least I know it will be possible eventually, and I can now focus on other aspects of the character sheet instead of spending all my time beating my head against this particular brick wall :)

Snikle
October 31st, 2005, 19:11
Ville didn't happen to let slip when the next version is due out? :lol: