PDA

View Full Version : Creating Tables and Library Entry only



TheMetal1
April 14th, 2010, 04:13
Ok, so I've been tinkering around with modules and then exporting them. I can get them to show up in both the module activation and the library.

The question I have for you all out there is really two-fold.

Can I create a Library entry only - using Client or common shared data when exporting?

I've created a couple of Tables just typing text and data into the story section entry. I get the tables set and looking good, but when I export it comes in all jumbled. Is there anyway to do this without having to resort to xml editing (as I don't even know where to begin there or where to even look to find the data to start editing.)

Thanks for you help in advance. :)

TheMetal1
April 16th, 2010, 16:25
Ok, so after searching some on the boards, I stumbled across one of the answers to my two questions.

How to create Library References.

It is found in this thread (https://www.fantasygrounds.com/forums/showthread.php?t=12068&highlight=Library)



No problem :), I was a little confused on how it all worked as well. But its pretty simple if you know a little html/xml.

All library modules are coded in xml and zipped together, as a ".mod" file. You can up zip these mod files by using a zip program. I use winrar to do this.

1. So first, if you wanted to make your own library, I usually copy one of the other library modules to do this. So first, you'd go to your library module and right click on, d20 monsters, then right click and click paste on your desktop.

2.Open the .mod file, by right click on it--->open with--->winrar (you might have to search for the winrar.exe file)

3.Once winrar opens it, it will show you the files that are inside. For the Monsters modules, it will show a, "db.xml" file, a "definition.xml" and a "thumbnail.png". Now tell extract those files to a folder like "d20monsters" or what ever it prompts you.

4. Now you are able to edit any of the xml information that you want. This is helpful, for like the monster module, if you have some custom monsters you want to include in your monster module, and also you can just copy the whole file and start making your own.

db.xml example



Thats what it looks like, so if you wanted to change any of it, it will later change the information that you want in your game.


5. After you have changed everything you wanted to do, etc, you need to repack the xml files. Window over all the files, "db.xml","definations.xml", and "thumbnail.png" and then right click. Click on "Send To:", then click "Compressed (Zipped) Folder". This will create a zip file of your .mod file. All you need to do now, is change the .zip to .mod.

Once that happens you should put the module back in the module folder.


Thats a short mans version of what you need to do, to actually use the library modules to their full extent. There are other links on the forum that might prove a little bit more indepth.

https://www.fantasygrounds.com/forums/showthread.php?t=11322&highlight=module

cpbs
April 16th, 2010, 16:47
What else are you looking for exactly? I'm kind of lost on what you want to make lol

TheMetal1
April 16th, 2010, 17:02
Basically, I'm trying to create my own Library References. For example, I own some Dark Sun stuff, so I wanted to add to the OSRIC ruleset the Dark Sun Boxed set for use at the my Digital Table. So that would be created and added as a Library Reference for each of the books from the boxed set.

I've figured out how to pretty much do that as an export adding the images, etc. for creating a module and can get it to show up in my library with the cover. The problem I run into is trying to get is to only show up in the library and Open/Close section for the GM. Additionally, when I do it that way, any table I create gets all messed up. I figure I need to do XML for that. For example if I wanted to create a table for Defiler experience level it never shows up clear it ends up looking like this:

Level Defiler Experience Hit die (d4)
10 80001-121,000 7

Hope this helps to clarify things. Thanks!

Tenian
April 16th, 2010, 18:59
In the XML you'd have something like:



<table>
<tr><td><b>Level</b></td><td><b>Defiler</b></td><td><b>Experience</b></td><td><b>Hit die (d4)</b></td></tr>
<tr><td>10</td><td>80001</td><td>121,000</td><td>7</td></tr>
</table>


At least I think that's how you want the columns broken up...not familiar with your source material.

cpbs
April 16th, 2010, 19:06
To create a table, it does take a little bit of know how in html/xml to get it to work. I am very very limited in my knowledge on how it all works, but typically I can look at a finished xml script and know see how it all fits together.

Also, who do you want to see the information when it is formed into a library folder? Here is some information to keep in mind.


H = Host data = db,xml. These modules can only be opened by the host. The client does not even see an option for them in the module activation window.

S = Common shared data = common.xml. Modules built with this option are stored on the host and transferred to the client when they are needed (similar to the way maps, tokens, rulesets, etc are transferred). In my experience large common modules will choke off the transfer of other items (such as tokens and maps).

C = Client data = client.xml. Modules built with this option are available to the client but are not distributed via FGII. The client must have a copy of the module on their machine. These are normally distributed via FTP/email. The advantage of this type of module is you can transfer it while you are not playing (good if the module is large). The disadvantage is all your players have to keep the modules synced manually...which can be a challenge if you have some players who are not technically inclined.

Module activation:
H:
None of these settings matter

S:
Block from players = Players can not open the module.
Allow for Players = Players can open the module.
Force load for players = When a player connects the module is automatically loaded (and transferred)
Blank = When the player attempts to open it the host is sent a request message.

C:
Block from players = Players can not open the module.
Allow for Players = Players can open the module.
Force load for players = When a player connects the module is automatically loaded if present on the client machine.
Blank = When the player attempts to open it the host is sent a request message.


In short:
H is usually for host only materials (adventures, monster manuals, etc)
S and C hold the same type of content but the mechanism for getting that content to the players is different. S uses FGII to transfer the data, C requires some other means of transfer.

C is sometimes used to transfer map content over low speed connections (since the maps can be sent to the player in advance of the session). However, the module is just a renamed zip file, so players can easily explore it and view maps without any sort of masking. It can be very useful for large world maps, pictures of cities, and other "reference" content.

I am guessing you are wanting to make it a common file so that everyone will have this information when they log on. I can script you some generic xml tables if you want and package them into a .mod library file. It should not take that long.

cpbs
April 16th, 2010, 19:06
Tenian is faster then I am with the xml :D

TheMetal1
April 16th, 2010, 19:16
Thanks for that, it should help. I found a couple of others in the Castles & Crusades and Labyrinth Lord stuff now that I can look at the XML programing.

Is there a way to simply do a Table in Fantasy Grounds without having to resort to XML?

cpbs
April 16th, 2010, 19:21
<root version="2.0">
<library>
<darksun static="true">
<name type="string">Dark Sun</name>
<categoryname type="string">Dark Sun</categoryname>
<entries>
<defiler>
<librarylink type="windowreference">
<class>referencetextwide</class>
<recordname>..</recordname>
</librarylink>
<name type="string">Defiler</name>
<text type="formattedtext">
<table>
<tr decoration="underline"><td><b>Level</b></td><td><b>Defiler</b></td><td><b>Experience</b></td><td><b>Hit die (d4)</b></td></tr>
<tr><td>10</td><td>80001</td><td>121,000</td><td>7</td></tr>
</table>
</text>
</defiler>
</entries>
</darksun>
</library>
</root>

I placed that inside the "common.xml" file.


<root>
<name>Dark Sun</name>
<author>-</author>
<ruleset>OSRIC</ruleset>
</root>

I placed that in the "definitions.xml" file. Placing it as the OSRIC ruleset.

The end result looks like this.

https://www.abacusforge.com/download/gallery/defiler.png

As far as I know, that is the best way to make a table. You could try to use the "story" icon, creating a new entry and just try typing it out as best you can. Then sharing it with the party by right clicking and clicking share.

TheMetal1
April 16th, 2010, 20:19
Thanks again! :)


As far as I know, that is the best way to make a table. You could try to use the "story" icon, creating a new entry and just try typing it out as best you can. Then sharing it with the party by right clicking and clicking share.

That's what I actually started with when I created a test module/Library reference. Everything came out fine except the Tables. They came out all jumbled.

I'll just go back and look at the .mod file and now and see if I can fix it using the XML.

TheMetal1
April 17th, 2010, 01:25
Awesome. Thanks to all of you I've been able to create tables using the XML editor. It only took about 10 to 15 minutes. I'm sure it will get quicker. Anyway. Here are couple of more questions,

1. Anyway to create Tables and save them to come out looking normal within Fantasy Grounds II without having to resort to XML. Not too big a deal, but having this function would be helpful for development.

2. Now that I've created this Library Reference it shows up like it should in the Module Activation Screen and the Library Screen. But for some reason it also shows up in the Story and the Maps & Images section. Not too big a deal but how do I elminate the entries from showing up in these other sections (Story and Maps & Images)?

Thanks again for all your help!

Tenian
April 17th, 2010, 02:48
1) Nope

2)
Those are controlled by the nodes located under the <root> level.

Story shows up when you have an <encounter> </encounter> section in your module.

Maps and Images shows up when you have an <image> </image>

TheMetal1
April 18th, 2010, 00:08
So if I just remove the (<encounter> </encounter> and the (<image> </image> ) from the XML will that work? Or do I need to specify as it seems everything starts out in the <root> anyway.