PDA

View Full Version : ?? How to create an Active table in FG



Christopher Matherne
June 14th, 2009, 23:08
:confused:
I would like to know how to create an active table. I know how to create a mod to place the info in the library for 4E ruleset, but would like to highlight things and add a clickable die roll for the table. Does anyone have an example of this; or can help me by answering a few questions?:)

Moon Wizard
June 15th, 2009, 00:41
I don't understand your question. Can you give me an example?

Also, we have most of the conversations about the 4E_JPG ruleset, including bugs and additions, over on the Four Ugly Monsters website.

Cheers,
JPG

Lithl
June 15th, 2009, 00:42
I'm not extremely familiar with D&D, and less so with 4E. By "active table", do you mean "roll a die and pick an effect from this list based on the result"?

If that is what you're looking for, you could probably make a window for your table, listing the resulting effects, and a button to roll the die. Click the button and call chatwindow.throwDice (https://www.fantasygrounds.com/refdoc/chatwindow.xcp#throwDice). In onDiceLanded, you could use deliverMessage to send the result to chat (eg, rather than saying "rolled a 1", you could send "Rocks fall, everyone dies" to chat)

Christopher Matherne
June 15th, 2009, 13:33
I'm not extremely familiar with D&D, and less so with 4E. By "active table", do you mean "roll a die and pick an effect from this list based on the result"?

If that is what you're looking for, you could probably make a window for your table, listing the resulting effects, and a button to roll the die. Click the button and call chatwindow.throwDice (https://www.fantasygrounds.com/refdoc/chatwindow.xcp#throwDice). In onDiceLanded, you could use deliverMessage to send the result to chat (eg, rather than saying "rolled a 1", you could send "Rocks fall, everyone dies" to chat)


This is what I am looking for, I want to create a table using the table info on page 42 of DMG.. Thank you

Tenian
June 15th, 2009, 15:08
You would have to create a new window class (possibly 2) for that.
The 4E ruleset has a number of template fields you could use for dice rolls.

It would still be a lot of work spacing everything, and it wouldn't be dynamic unless you built it as 2 classes....which would be even more work.

Christopher Matherne
June 15th, 2009, 19:11
I do not mind the work if I can accomplish my goal.

I have started my learning process by creating a .mod with 4Eparser then examining the xml output. The example I started with was making a library addition with a link for conditions. I wanted to change the link name condition and the heading name condition, but can not find its location in the xml file created? If I could get an example of a complete .mod not made with 4Eparser; maybe that would help, I have a long way to go with understanding xml, but I am learning.

Tenian
June 15th, 2009, 19:19
The d20 stuff should contain several d20 module examples.

Christopher Matherne
June 15th, 2009, 19:27
The d20 stuff should contain several d20 module examples.

the fg client i have came with foundation ruleset 3.5, are you refering to that?

Tenian
June 15th, 2009, 19:46
No, the downloads page has a d20 pack that adds a d20 extension and some modules.

Christopher Matherne
June 15th, 2009, 20:32
No, the downloads page has a d20 pack that adds a d20 extension and some modules.


ok ty

here is one of my failures LOL

<?xml version="1.0" encoding="iso-8859-1"?>
<root version="2.03">
<windowclass name="tables">
<datasource>tables</datasource>
<frame>storybox</frame>
<placement>
<size>
<width>400</width>
<height>650</height>
</size>
</placement>
<sizelimits>
<dynamic />
</sizelimits>
<minimize>minimized_tables</minimize>
<sharable />
<tooltip>
<field>name</field>
</tooltip>
<sheetdata>
<windowreferencecontrol>
<bounds>15,11,20,20</bounds>
<icon>
<normal>button_openwindow</normal>
</icon>
<class>tables</class>
<description>
<field>name</field>
</description>
</windowreferencecontrol>
<stringfield name="name">
<bounds>40,13,-15,20</bounds>
<empty>« New Story »</empty>
<font>sheettext</font>
</stringfield>
<formattedtextfield name="text">
<bounds>25,44,-28,-23</bounds>
<font>
<normal>chatfont</normal>
<bold>narratorfont</bold>
<italic>chatitalicfont</italic>
<bolditalic>chatbolditalicfont</bolditalic>
<title>sheetlabel</title>
</font>
<linkicon>
<link>button_openwindow</link>
<emptylink>button_emptytarget</emptylink>
</linkicon>
<footer>footer_wide</footer>
<selectioncolor>#FFD296</selectioncolor>
<empty>Click to enter text</empty>
</formattedtextfield>
<viewerlist>
<anchored>
<left>
<anchor>left</anchor>
<offset>11</offset>
</left>
<bottom>
<anchor>bottom</anchor>
<offset>-43</offset>
</bottom>
</anchored>
</viewerlist>
<scrollercontrol>
<bounds>-53,-35,45,27</bounds>
<target>text</target>
<button>
<normal>button_scroller</normal>
<pressed>button_scroller_down</pressed>
</button>
</scrollercontrol>

<closebutton_storybox />
</sheetdata>
</windowclass>

<windowclass name="tablessmall">
<sizelimits>
<minimum>
<height>10</height>
</minimum>
</sizelimits>
<sheetdata>
<windowreferencecontrol name="open">
<bounds>0,0,20,20</bounds>
<icon>
<normal>button_openwindow</normal>
<pressed>button_emptytarget</pressed>
</icon>
<class>tables</class>
<description>
<field>name</field>
</description>
<script file="scripts/adventurelistshortcut.lua" />
</windowreferencecontrol>
<linkstringfield name="name">
<bounds>25,1,-1,20</bounds>
<empty>« New Story »</empty>
<selectioncolor>#90ffffff</selectioncolor>
<font>sheettext</font>
<linktarget>open</linktarget>
</linkstringfield>
</sheetdata>
</windowclass>

<windowclass name="tableslist">
<frame>scrollboxfortabs</frame>
<softclose />
<placement>
<size>
<width>275</width>
<height>350</height>
</size>
</placement>
<sizelimits>
<dynamic />
<minimum>
<width>200</width>
<height>290</height>
</minimum>
</sizelimits>
<nodelete />
<sheetdata>
<genericcontrol>
<bounds>16,21,30,177</bounds>
<icon>title_story</icon>
</genericcontrol>
<windowlist name="list">
<bounds>50,25,-30,-34</bounds>
<datasource>.</datasource>
<class>tablessmall</class>
<sortfields>name</sortfields>
<footer>footer_narrow</footer>
<allowcreate />
<allowdelete />
<script>
function onSortCompare(w1, w2)
return w1.name.getValue() &gt; w2.name.getValue();
end;

function onFilter(w)
local f = string.lower(window.filter.getValue());

if f == "" then
return true;
end

if string.find(string.lower(w.name.getValue()), f, 0, true) then
return true;
end

return false;
end
</script>
</windowlist>
<scrollercontrol>
<bounds>-105,-61,45,27</bounds>
<target>list</target>
<button>
<normal>button_scroller</normal>
<pressed>button_scroller_down</pressed>
</button>
</scrollercontrol>
<buttoncontrol>
<bounds>-55,-58,34,25</bounds>
<icon>
<normal>button_newwindow</normal>
<pressed>button_newwindowdown</pressed>
</icon>
<class>Tables</class>
<script>
function onButtonPress()
local node = NodeManager.createSafeChild(window.getDatabaseNode ());
if node then
Interface.openWindow(class[1], node.getNodeName());
end
end
</script>
</buttoncontrol>
<categoryselectioncontrol>
<bounds>24,-39,-24,-1</bounds>
<targetcontrol>list</targetcontrol>
</categoryselectioncontrol>

<filter name="filter">
<bounds>55,-70,-50,20</bounds>
<target>list</target>
<trigger>filtertrigger</trigger>
</filter>
<filtertrigger name="filtertrigger">
<bounds>20,-85,21,41</bounds>
<target>filter</target>
</filtertrigger>

<closebutton_scrollbox />
</sheetdata>
</windowclass>
<tables>
<category name="" mergeid="" baseicon="0" decalicon="0">
<id-00001>
<name type="string">DC Class and Damage by Level</name>
<text type="formattedtext">
<h><b><u>Difficulty Class(DC) Values Normal Damage Expressions Limited Damage Expressions</u></b></h>
</text>
</id-00001>
</category>
</tables>
<library>
<dcdbl static="true">
<categoryname type="string">DMG</categoryname>
<name type="string">DCDBL</name>
<entries>
<tablesid-00001>
<librarylink type="windowreference">
<class>encounter</class>
<recordname>tables.id-00001@DCDBL</recordname>
</librarylink>
<name type="string">DC Class and Damage by Level</name>
</tablesid-00001>
</entries>
</dcdbl>
</library>
</root>

Christopher Matherne
June 15th, 2009, 21:24
this is what I am working on

<?xml version="1.0" encoding="ISO-8859-1"?>
<root version="2.0">
<!-- Modified from existing reference guide by JMnITup -->

<reference static="true">
<weapon>
</weapon>
<armor>
</armor>
<equipment>
</equipment>
<skills>
<parsing>
<name type="string">Parsing</name>
<ability type="string">Int</ability>
<text type="formattedtext"><p>You can transform craploads of statblocks into <b>XML</b> data</p><list><li><b>You can make lists</b></li><li><b>1</b>:bar</li><li><b>2</b>:foo</li></list><table><tr><td>You . . . </td><td>..can do tables</td></tr><tr><td>tables</td><td>of</td></tr><tr><td>random</td><td>crap</td></tr></table></text>
<armorcheckpenalty type=" 1">1</armorcheckpenalty>
</parsing>
</skills>
</reference>
<powerdesc>







</powerdesc>
<magicitemdesc>

</magicitemdesc>
<ritualdesc>
</ritualdesc>
<templatedata>
</templatedata>
<Trapdata>
</Trapdata>
<familiar>
</familiar>
<library>
<libdmg4>
<name type="string">DMG4</name>
<categoryname type="string">Core Rules</categoryname>
<entries>
<a0013skills>
<librarylink type="windowreference">
<class>referenceindex</class>
<recordname>..</recordname>
</librarylink>
<name type="string">Skills</name>
<index>
<parsing>
<listlink type="windowreference">
<class>referenceskill</class>
<recordname>reference.skills.parsing@DMG4</recordname>
</listlink>
<name type="string">Parsing</name>
</parsing>
</index>
</a0013skills>
</entries>
</libdmg4>
</library>
<refpowerlists>
</refpowerlists>
<powerlists>
<zzzAlpha>
<description type="string">Power/Feature/Paragon/Epic Power Index</description>
<groups>
<zzzAlpha00>

<powers>
</powers>
</zzzAlpha00>
</groups>
</zzzAlpha>
</powerlists>
<weaponlists>
<core>
<description type="string">Weapons Table</description>
<groups>
</groups>
</core>
</weaponlists>
<armorlists>
<core>
<description type="string">Armor Table</description>
<groups>
</groups>
</core>
</armorlists>
<equipmentlists>
<core>
<description type="string">Equipment Table</description>
<groups>
</groups>
</core>
</equipmentlists>
<Vehiclelists>
<ccletter>
<description type="string">Vehicles</description>
<groups>
</groups>
</ccletter>
</Vehiclelists>
<monsterlists>
<aalevel>
<description type="string">NPCs By Level</description>
<groups>
</groups>
</aalevel>
<ffgroup>
<description type="string">NPCs By Group</description>
<groups>
</groups>
</ffgroup>
<ccletter>
<description type="string">NPCs By Letter</description>
<groups>
</groups>
</ccletter>
<hhlevel>
<description type="string">NPCs By Level and Role</description>
<groups>
</groups>
</hhlevel>
<hilevel>
<description type="string">NPCs By Role and Level</description>
<groups>
</groups>
</hilevel>
</monsterlists>
<TrapLists>
<aalevel>
<description type="string">By Level</description>
<groups>
</groups>
</aalevel>
<ffgroup>
<description type="string">By Issue</description>
<groups>
</groups>
</ffgroup>
<ccletter>
<description type="string">By Name</description>
<groups>
</groups>
</ccletter>
</TrapLists>
<magicitemlists>
</magicitemlists>
<rituallists>
<description type="string">Ritual Table</description>
<groups>
</groups>
</rituallists>
<alchemylists>
<description type="string">Alchemy Table</description>
<groups>
</groups>
</alchemylists>
<skillchallengedesc>
</skillchallengedesc>
</root>

some one help,, I want to change the link name "Skills" to read "Tables"
aswell as change the heading on the opening page to "Tables"
and change the labled link "Parsing" to "DC Damage by Level" etc.

I have made severl attemps and have failed
tried replacing all the words in the xml to the words i want the to be and fail
would also link to clean it up and only have the info I need in the xml to produce the single out put, example to not need "<description type="string">Alchemy Table</description>" but when i deleted the lines I thought, it failed again...

ME <-----total noob:mad: