5E Character Create Playlist
Page 2 of 2 First 12
  1. #11
    Quote Originally Posted by Aramasz
    Here it ist, i hope it´s helpful - my english isn´t the best.
    https://bit.ly/youtubelibrarymodule
    I hope the link will work, if not, search for:
    Exporting Library modules in Fantasy Ground without XML
    in youtube.
    Nice!

    I barely can understand any spoken English but anyway I've been able to follow the steps that you are showing in the video.

    BTW, there is a related procedure for creating library mods starting with Story entries from within the FG2 app, using it as a near full fledged WYSIWYG editor -and in this case, too, almost without using any XML besides a few uses of Find/Replace for substituting a few tags*, avoiding thus the annoying and unintended duplication of the module's contents as entries inside the Story window after its creation and activation.

    * Maybe a simple extension could even remove this small editing step -making things even more straightforward; however I don't know how to do one.
    "We adore chaos because we love to produce order."
    M.C. Escher

    "Let's face it: for some people, roleplaying is a serious challenge, a life-or-death struggle."
    J. M. Caparula / Scott Haring

    "It emerges that physics is basic but inessential; that is the crucial fact."
    Wolfgang Smith



  2. #12

    Thank you - perhaps i will add subtitles... :-)

    BTW, there is a related procedure for creating library mods starting with Story entries from within the FG2 app, using it as a near full fledged WYSIWYG editor
    where is the related procedure? I´m curious & can´t find it.

  3. #13
    Quote Originally Posted by Aramasz
    where is the related procedure? I´m curious & can´t find it.
    Please give me a bit of time and I'll explain it.

    BTW, the Documentation for FG Modules.PDF could be updated with this, but I don't know if SoulOfTheReaver is available or active right now.
    "We adore chaos because we love to produce order."
    M.C. Escher

    "Let's face it: for some people, roleplaying is a serious challenge, a life-or-death struggle."
    J. M. Caparula / Scott Haring

    "It emerges that physics is basic but inessential; that is the crucial fact."
    Wolfgang Smith



  4. #14
    Aramasz,

    Finally I wrote the steps for turning FG2 Story entries into Library Modules in a text file and then recorded a video showing how Fantasy Grounds 2 contains a near full fledged WYSIWYG library module creator within its Story making features. (Since it shows some very basic steps, experienced users may want to skip ahead to minute 5.)

    The video features the creation of a simple library module in this way without incurring into entries duplication in the Story tab. It's possible to arrange much more complex modules, though! Yet, I almost forget that tables still need to be created manually.

    The video link: Fantasy Grounds 2 WYSIWYG Library Module Creator

    And this is the content of the shown text file with the steps:

    1- Launch FG2 and create a new campaign called "Library Module Creation" (it's just a sample)

    2- Click on the Story icon and create a few Story entries with stuff intended, for instance from copying and pasting from a PDF document. Format the text for arranging the lines correctly and specify which words are headers, bold or italic. Summarizing: just use the FG2 Story editing tools here.

    3- Write /export and fill the following fields: Name, File Name, Author and Index Group -you'll add the thumbnail later.

    4- Under "Exported Data" click on 'Story' and on the "I" option.

    5- Right click and select "Export": it will say "Module exported successfully".

    6- You can close or minimize FG2 for now; although it's not really needed.

    7- Go to your FG2 AppData folder, open the Modules folder and look for the .mod file that you just created. Select it and open with WinRar.

    8- Double click on the db.xml file for opening it in an XML editor -you can use even Notepad.

    9- Find/Replace the following tags and words in all its instances:
    <encounter> for <data>
    </encounter> for </data>
    encounter.id for data.id
    encounterid for dataid

    10- Save the modified XML file and confirm changes in the rar file.

    11- Drag and drop into the Winrar window a suitable thumbnail file.

    12- Reopen or return to FG2 and launch the same campaign, "Library Module Creation", click on the Story icon and delete/kill all the story entries.

    13- Open the Module Activation Window and look for your just created library module: you are done, open it and check your Library! There are no duplication in the Story entries!
    Arrived to this point, I think that the following section of SoulOfTheReaver's PDF has been answered, and thus the file could be updated with additional information:

    Making library modules without XMLs
    I've recently noticed you can make library modules using FG2's built in exporter and not touch an XML file once. What you do is create your library data as story entries, personalities and items, format and link them up with the in-game editor, then hit the /export command.
    In the window that pops up, check the relevant data, and also check the I for each, which will make them indexable as a library. Define a thumbnail file in the field above, and also select an index group which is basically the same as the <categoryname> tag and you should be good to go.
    The obvious disadvantages to this are that you cannot specify window classes on your own, which consequentially means that you cannot make feat or skill windows or whatever else you can't do from within the game itself, and you can not make tables either for that matter. Moreover, your library entries will still show up as story entries which is not that big of a deal but it's still annoying.
    Unless you're in a real hurry or completely unwilling to learn the manual way of making modules, the only real use this method has is to make a basic skeleton for your module which you then go in an edit and refine further. Who knows perhaps in the future the software will come with a library editor's mode which allows you to customize the kind of data you build more (are you reading this developers?☺).
    (bold letters are mine)

    Of course is possible to create the modules within FG2 and then, if it's needed, make further refinements by editing the XML files in the usual way; for instance, when you want referencetextwide entries and instead just get referencetext ones.

    -

    I wonder if these small editing steps in the XML can be automatized -by means of an extension- with the use of the /export command and the addition of a new button for signaling library module creation in the Module Export window.

    -

    And I need to thank unerwünscht, that significantly helped me to figure how to achieve this thanks to his shared interest and technical skills.
    "We adore chaos because we love to produce order."
    M.C. Escher

    "Let's face it: for some people, roleplaying is a serious challenge, a life-or-death struggle."
    J. M. Caparula / Scott Haring

    "It emerges that physics is basic but inessential; that is the crucial fact."
    Wolfgang Smith



  5. #15

    Thanks!

    Hi Demonsbane, thank you for the steps and the video! It´s great!

  6. #16

    Fantasy Grounds 2 WYSIWYG Library Module Creator (part 2)

    You're welcome Aramasz,

    But I want to expand the information provided in the already described steps and in the video:

    • In some cases and under certain rulesets, after the /export action the new library module doesn't appear at all in the Module Activation window. Then is necessary to reload the ruleset (/reload ruleset) or to close and reopen the FG2 app for seeing it displayed.


    • The video that I recorded is centered into how to unlink the library module entries from the Story tab for avoiding duplication, and only secondarily on how to use FG2 as a WYSIWYG editor; thus, the sample module that is created in the video is extremely simple and I think that is necessary to add something more for actually creating more complex library modules within Fantasy Grounds 2.


    One of the issues that messes this goal can be seen in the library module created in the video is the following one:


    Yes, probably you already noticed it . . . Anyway:


    The problem of redundant library entries

    In the case of this sample module, we want to get rid of the secondary entries at the index level, because the whole number of the module entries are shown in a single column (imagine the mess with larger modules), and instead that, it's necessary to arrange and display them in a tree-like structure.

    The redundant entries here are:

    • Founding

    • The Order Grows

    • Dissolution


    Then we need to "trim" these redundant entries for achieving the desired result: a clean index with a main "Templars" entry containing the other three:



    "Trimming" the redundant entries


    This does involve a bit of XML editing, but it's not a daunting task even if it requires a bit of thought. I'm putting here the XML code involved with this sample module for making easier to see what is the required code modification.

    Steps:

    1- Open the module file again with WinRAR and double-click on the db.xml file for opening it in an XML editor. Now go to the end of the file, finding the final chunk of code:

    <library>
    <templars static="true">
    <categoryname type="string">Middle Ages</categoryname>
    <name type="string">Templars</name>
    <entries>
    <dataid-00001>
    <librarylink type="windowreference">
    <class>encounter</class>
    <recordname>data.id-00001@Templars</recordname>
    </librarylink>
    <name type="string">Templars</name>
    </dataid-00001>
    <dataid-00002>
    <librarylink type="windowreference">
    <class>encounter</class>
    <recordname>data.id-00002@Templars</recordname>
    </librarylink>
    <name type="string">Founding</name>
    </dataid-00002>
    <dataid-00003>
    <librarylink type="windowreference">
    <class>encounter</class>
    <recordname>data.id-00003@Templars</recordname>
    </librarylink>
    <name type="string">The Order Grows</name>
    </dataid-00003>
    <dataid-00004>
    <librarylink type="windowreference">
    <class>encounter</class>
    <recordname>data.id-00004@Templars</recordname>
    </librarylink>
    <name type="string">Dissolution</name>
    </dataid-00004>
    </entries>
    </templars>
    </library>
    </root>
    In this case -remember that I'm using the particular code of a sample module-, all the dataid-0000... tags and its contents beyond dataid-00001 (the index) are causing the appearance of the unwanted and redundant entries at the root - index level of the library mod.

    2- With this understood, select and delete all the dataid entries in the shown piece of code excepting the first one: dataid-00001. Keep in mind that you aren't actually deleting the entries, but preventing them from appearing at the root - index level.

    The resulting XML code is this:

    <library>
    <templars static="true">
    <categoryname type="string">Middle Ages</categoryname>
    <name type="string">Templars</name>
    <entries>
    <dataid-00001>
    <librarylink type="windowreference">
    <class>encounter</class>
    <recordname>data.id-00001@Templars</recordname>
    </librarylink>
    <name type="string">Templars</name>
    </dataid-00001>

    </entries>
    </templars>
    </library>
    </root>
    3- Now, save this modified db.xml file and the library module is finally done.


    A further note

    For avoiding to complicate the video, I didn't mention this detail: any module created in that way will display it's entries exactly with the same graphical outlook of FG2 Story windows:


    If you want, you can switch this by means of very simple XML substitutions in the db.xml file. Open it in your editor and look for this:

    <link class="encounter" recordname="data.id-00002">Founding</link>
    <link class="encounter" recordname="data.id-00003">The Order Grows</link>
    <link class="encounter" recordname="data.id-00004">Dissolution</link>
    <dataid-00001>
    <librarylink type="windowreference">
    <class>encounter</class>
    <recordname>data.id-00001@Templars</recordname>
    </librarylink>
    <name type="string">Templars</name>
    </dataid-00001>
    The class content ("encounter") is the key here. By substituting this word for "referencetext" -the Find/Replace feature is always good- you'll get this result instead, more in line with the usual look of FG2 library module entries:


    The modified XML for this, then, would be:

    <link class="referencetext" recordname="data.id-00002">Founding</link>
    <link class="referencetext" recordname="data.id-00003">The Order Grows</link>
    <link class="referencetext" recordname="data.id-00004">Dissolution</link>
    <dataid-00001>
    <librarylink type="windowreference">
    <class>referencetext</class>
    <recordname>data.id-00001@Templars</recordname>
    </librarylink>
    <name type="string">Templars</name>
    </dataid-00001>
    Besides "referencetext", you can substitute "encounter" inside class with "referencetextwide" and "referenceindex" for getting different graphics.
    "We adore chaos because we love to produce order."
    M.C. Escher

    "Let's face it: for some people, roleplaying is a serious challenge, a life-or-death struggle."
    J. M. Caparula / Scott Haring

    "It emerges that physics is basic but inessential; that is the crucial fact."
    Wolfgang Smith



  7. #17

    Short message

    Hi Demonsbane, thank you for all the details and the easy step by step.
    This week i´m not at home, so i will have to try it next week - but then i will answer you how it works for me. i have another question, you will sur be able to answer... but however: Thank you very much!

  8. #18

    Klick!

    Hi Demonsbane, i´m back @home and trying to export and export and export... :-) and now i understand the problem you solved with the "data"-replacing...
    furthermore i tryed the deleting of the "entries" - it works! THANX!!!

  9. #19
    Oh man . . . glad to be useful, but please keep in mind that I'm not an expert here!
    "We adore chaos because we love to produce order."
    M.C. Escher

    "Let's face it: for some people, roleplaying is a serious challenge, a life-or-death struggle."
    J. M. Caparula / Scott Haring

    "It emerges that physics is basic but inessential; that is the crucial fact."
    Wolfgang Smith



  10. #20
    Why isn't the Category Name working?
    Last edited by JMOxx75; October 23rd, 2011 at 05:10.
    FG2 Ultimate License
    EST -5

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in