PDA

View Full Version : Links and Dragging



nezzir
March 2nd, 2006, 17:46
I'm working on a custom rule set and I'm doing the crit charts.

Essentially, there is a link in the reference window. It opens up my crit chart. I currently have everything typed in to tables and it displays properly.

My problem is, it is very large and you have to scroll down.

The first thing I'd like to do is create a linked index at the top so that it jumps down in the document.

The second thing I'd like to do is make the descriptions draggable to the chat window.

I've looked through the forums and found some examples, but I just can't seem to make it work. I'm starting from scratch.

1. How to you make an item linkable so that it jumps down in the document?

2. How do you make text in a table draggable?

Thanks,
Nez

nezzir
March 4th, 2006, 15:56
This is still frustrating me. Here is my code:



<table>
<h>Index</h>
<linklist>
<link class="2critchart" recordname="00001">[Head]</link><link class="2critchart" recordname="00002">[Arms]</link><link class="2critchart" recordname="00003">[Body]</link><link class="2critchart" recordname="00004">[Legs]</link>
</linklist>
</table>
</node>

<node name="00001">
<table>
<tr><td...


I think I need to define something in the reference.xml, but I can't find it...

nezzir
March 8th, 2006, 01:57
I was able to reverse engineer the "D20_Modern" mod and solve my sub-window and linking issues.

Still trying to figure out how to make text "draggable" to the chat window.

Ram Tyr
March 8th, 2006, 15:05
I am not the person to help with technical XML issues, however, if you didn't get a response it may be that you have graduated from "grasshopper" to "master"! :) Possibly, nobody here can provide the "answers you seek". You might want to do some digging through XML resources. Possibly post your question somewhere with folks knowledgeable in XML regardless of their familiarity with Fantasy Grounds.

Anyway, that is just a suggestion that might bear some fruit.

Take care.
Ramza

joeru
March 8th, 2006, 17:07
I was able to reverse engineer the "D20_Modern" mod and solve my sub-window and linking issues.

Still trying to figure out how to make text "draggable" to the chat window.

Might be worth it to try adding <acceptdrop class="yourclass" field="yourfield" /> under <chatwindow>, in data\gameelements.xml. Haven't tried it.

nezzir
March 8th, 2006, 23:27
Might be worth it to try adding <acceptdrop class="yourclass" field="yourfield" /> under <chatwindow>, in data\gameelements.xml. Haven't tried it.

That look very promising... It's didn't work though.

It's not a big deal I suppose, it just bugs me.

Toadwart
March 8th, 2006, 23:55
Can you post a bit more of the xml (showing one full row of data from the table)

nezzir
March 9th, 2006, 15:31
Can you post a bit more of the xml (showing one full row of data from the table)

It's gone through a few changes since I first posted, but here's an example. I would like to be able to drag the text from the crit result to the chat window (the text beginning with "Disoriented by blow."):



<root>
<node name="whcritchart">

<node name="head">
<formattedtext name="text">
<table>
<tr><td colspan="5"></td><td colspan="9"><b>Critical Effects - Head</b></td></tr>
<tr><td></td></tr>
<tr><td colspan="2"><b>Roll D10</b></td> <td colspan="10"><b>Effect</b></td></tr>
<tr><td></td></tr>
<tr><td colspan="2"><b>1</b></td> <td colspan="10">Disoriented by blow. Half actions only next turn."</td></tr>
</table>
</formattedtext>
</node>
</node>
</root>


There are several other entries to this table, and several other tables in this set.

Toadwart
March 10th, 2006, 00:15
Hmm...a bit out of my depth here.
I've only seen draggable text where it had been defined in a <stringvalue> node.
Don't think it's possible to embed a stringvalue node inside a formattedtext node. :confused:

Sorry can't be more helpful but I'm at work and won't get a chance to play with FG for a few days . . .:(

kalmarjan
March 10th, 2006, 00:47
Draggable text can be accomplished by adding the tag <frame> in the story book editor. Try this out for the text and see what happens: Unfortunately, you need to choose between two formats, the frame or the table, you cannot have both.


<node name="head">
<formattedtext name="text">
<p>Critical Effects - Head </p>
<p></p>
Roll D10 - Effect
<frame>1 Disoriented by blow. Half actions only next turn."</frame>


</formattedtext>
</node>
</node>

It is ugly, but it may work...

Sandeman