Fantasy Grounds Merchandise
Page 1 of 5 123 ... Last
  1. #1

    4E Module Maker - yet another Portable Compendium parser

    Inspired by the original 4E Module Generator by VegaFontana, plus some more recent work by Valkyrion, I have created a new application that can create 'proper' indexed Library Modules from the Portable Compendium data (similar to the original DDI parser by Tenian and EugeneZ).

    It comes as an .exe to put in the Portable Compendium directory, and runs it from a command line to tell it what the filename and Library name should be, and which objects you want exported to the new Module. (If you put a 'thumbnail.png' in the same directory it will include that as the module thumbnail.)

    If you would prefer to keep it separate from the Portable Compendium files, you just need to copy the 'sql' subdirectory containing the Portable Compendium .sql files into the directory containing module_maker.exe (the entire directory, not just the .sql files).


    Usage: module_maker.exe [options]

    Options:
    -h, --help show this help message and exit
    --filename=FILE create library at FILE
    --library=LIBRARY Fantasy Grounds' internal name for the Library
    --min=MIN export items of this level and above. Applies to NPCs,
    Alchemical Items, Rituals, Martial Practices and Powers.
    --max=MAX export items of this level and below. Applies to NPCs,
    Alchemical Items, Rituals, Martial Practices and Powers.
    -s, --static adds "static="true" clause to make objects locked
    -t, --tiers divide Magic Armor, Implements and Weapons, NPCs into
    Tiers
    -n, --npcs export NPCs (Monsters)
    -T, --traps export Traps and Hazards
    -e, --terrain export Terrain information
    -d, --diseases export Disease tracks
    -R, --races export Races information
    -C, --classes export Classes information
    -B, --backgrounds export PC Background information
    -H, --heroic export Heroic Themes
    -P, --paragon export Paragon Paths
    -E, --epic export Epic Destinies
    -F, --familiars export Familiars information
    -D, --deities export Deity information
    -f, --feats export Feats
    -p, --powers export PC Powers
    -b, --basic include Basic Attacks in Power export
    -a, --alchemy export Alchemical Formulas and Items
    -r, --rituals export Rituals
    -m, --martial export Martial Practices
    -o, --poisons export Poisons
    -i, --items export all item types (= --mundane & --magic)
    --mundane export all mundane items
    --magic export all magic items


    If you would prefer to not mess about with command lines I have included a run_all.bat file that will export everything into 3 modules:
    • NPCs/Monsters
    • Traps, Terrain & Diseases
    • PC options (Races, Classes, Powers & Feats)
    • Mundane and Magical Items (including Rituals, Martial Practices & Alchemical Formulas)


    module_maker.exe --filename 4E_Monsters --library "4E Monsters" -n -t -s
    module_maker.exe --filename 4E_Traps_Terrain_Diseases --library "4E Traps, Terrain and Diseases" -T -e -d -s
    module_maker.exe --filename 4E_PC_Options --library "4E PC Options" -R -C -B -H -P -E -F -D -f -p -b -s
    module_maker.exe --filename 4E_Items --library "4E Items" -a -r -m -o -i -t -s


    Looking at each option in turn:

    --filename=FILE

    This is simply the filename of the exported module. Copy this to your Fantasy Grounds\modules directory.


    --library=LIBRARY

    This is the internal name of the FG module. In theory it permits you to have links that go from from one module to another module provided you know the library name, but in practice I'm not really using it for anything.
    It can be somewhat relevant for things like Feats and Rituals, as when you drag and drop them onto a PC sheet, it just adds a link to the Library entry.


    --min=MIN
    --max=MAX


    These provide high level filters that will apply to NPCs/Monsters, Alchemical Formulas, Rituals, Martial Practices and Powers.
    Doesn't apply to Feats as they don't have a level as such.

    Note that some NPCs, Items and Powers are considered level 0, so use --min=0 instead of --min=1 to export these.


    -t, --tiers

    Use this to split the top level library menus for Magic Armor, Magic Weapons, Magic Implements and NPCs/Monsters into Heroic, Paragon and Epic.

    Note that unlike --min & --max this isn't applying a filter to the module contents, this is simply to reduce the size of the second-level menus to try and prevent lagging/crashing of FG.

    If it is not enabled there will be over 1500 items under Magic Armor, over 2000 Magic Weapons and over 2500 Magic Implements.
    Also over 5000 NPCs/Monsters (although the NPC tables seem to struggle less with a large number of entries).


    -n, --npcs

    Use this to include NPCs/Monsters in the export.
    If this option is enabled then the data file will be called 'db.xml' instead of 'client.xml' so it is not Player-loadable by default.

    It creates 4 different top-level menus: by Level, by Name, by Level & Role, by Role & Level. I'm not sure how useful the last 2 are, so I'm open to suggestions to improve the usability.

    I recommend using the -t --tiers option if doing a full NPC export to split the lists into three tiers.


    -r, --races

    Use this to include Races in the export, so that Racial Features can be drag & dropped onto the Abilities PC tab. Any linked Racial Powers will be included in the export, even if the --powers option is not used.


    -c, --classes

    Use this to include Classes in the export, so that Class Features can be drag & dropped onto the Abilities PC tab. Any linked Class Powers will be included in the export, even if the --powers option is not used.


    -f, --feats

    Use this to include Feats in the export. At the top level of the library they will be divided into Heroic, Paragon, Epic and Other, as per how they were listed in the Portable Compendium.

    If a feat grants a power, and this library also contains --powers export, the relevant power will be listed and linked under 'Linked Powers' section of the feat.
    For this reason I recommend exporting Feats and Powers into the same module.
    (It's possible that this link will be broken if you do something like export a subset of powers using --min & --max, and the linked power is then filtered out of the export - that's on you.)


    -p, --powers

    Use this to include Powers in the export.
    At the top level, powers are divided into the various Classes, Races, Paragon Paths, etc. Then within each individual list they are sorted by level and AEDU.

    If a power entry contains more than one power, such as Monk Full Disciplines (and various other powers), all powers spawned from the same Portable Compendium entry will be listed and linked under 'Linked Powers' in each power entry.
    (Sorcerer D29 Wyrm Form includes 4 powers - this is the only power I could find with more than 2.)


    -b, --basic

    Use this to include MBA, RBA, Bull Rush and Grab in the exported powers.
    Only works if also using the -p, --powers option.


    -a, --alchemy

    Use this to include Alchemical Formulas in the export (the ones that appear as Rituals in the Portable Compendium, not the ones under Items).
    You can add them to a PC by dragging them onto the 'Abilities' tab.

    There's a bit to unpack here, because each Alchemical Formula creates one or more Alchemical Items or varying levels, and most Alchemical Items have Alchemical Item Powers.

    e.g. the Acidic Fire alchemical formula lets you create Acidic Fire magic items of levels 5, 10, 15, 20, 25 & 30. And each of those magic items has a different Consumable power with varying attack bonuses and damage expressions.


    -u, --rituals

    Use this to include Rituals in the export.
    You can add them to a PC by dragging them onto the 'Abilities' tab.


    -m, --martial

    Use this to include Martial Practices in the export. I split them out from Rituals, because why not.
    You can add them to a PC by dragging them onto the 'Abilities' tab.


    -i, --items

    Use this to include all Mundane and Magic Items in the export.

    I recommend using the -t --tiers option if doing a full Magic Items export to split Armor, Weapons and Implements into three tiers.


    --mundane

    Use this to include all Mundane in the export.
    This creates entries for Armor, Weapons and Equipment. Basic Implements are listed under Equipment as they have no combat effect. Superior Implements are listed under Weapons as they have Properties like Weapons do.

    Mundane Armor and Weapons are created in such a way that they can be applied to a Magic Armor or Magic Weapon template to create an item with the correct type and powers, as per this video by Braincain007.


    --magic

    Use this to include all Magic Items in the export.

    Note that there is also a 'Magic Items - Alchemical Items' menu that has some crossover with the Alchemical Formulas option. I was going to exclude the option from here and just go with the Alchemical Formulas as the parsing works out better, but I realized there are some items here that are not under the formulas, like Aboleth Slime.

    I recommend using the -t --tiers option if doing a full Magic Items export to split Armor, Weapons and Implements into three tiers.

    You can grab module_maker.exe & run_all.bat from here at the project github - this is all that is required to create the modules.

    Also any suggestions for things to add or improve.
    Last edited by skelekon; November 13th, 2022 at 01:09. Reason: updated with latest command line options

  2. #2
    Here's an example of an Alchemical Formulas chain.

    This is the main list of Alchemical Formulas:
    alchemical_1.JPG

    Which leads to one Ritual entry that can be dragged & dropped onto a PC sheet:
    alchemical_2.JPG

    That contains links to 6 different Alchemical Items of varying level - these can also be reached directly from the 'Alchemical Items' top-level menu:
    alchemical_3.JPG

    Each Alchemical Item links to a Power with the appropriate attack bonus, damage expression, etc.:
    alchemical_4.JPG

  3. #3
    Here's an example of a Feat with linked Power.

    The Feat appears under the 'Feats - Heroic' top-level menu:
    feat_1.JPG

    Which leads to a Feat that can be dragged & dropped onto a PC sheet:
    feat_2.JPG

    The associated power is linked under the 'Linked Powers' section:
    feat_3.JPG

    The power can also be found under the 'Powers - Feat Power' top-level menu:
    feat_4.JPG

  4. #4
    Thanks! Amazing work.

    One issue I'm seeing is that some html code is being generated in the description box when Powers are dragged to character sheets. Specifically, the paragraph "p". I don't see that issue with Feats or Items though.

    The combat tracker HP issue seems resolved as well.

    Edit: I also found that NPC sorted by level is actually sorted by letter.

    2022-05-16 04_52_04-Greenshot.png
    Last edited by RRFG; May 16th, 2022 at 10:54.

  5. #5
    Quote Originally Posted by RRFG View Post
    Thanks! Amazing work.

    One issue I'm seeing is that some html code is being generated in the description box when Powers are dragged to character sheets. Specifically, the paragraph "p". I don't see that issue with Feats or Items though.

    The combat tracker HP issue seems resolved as well.
    Thanks for the feedback - do you have an example of the issue with the Powers description? (Just the power name should suffice.)
    I ran a regex over the Powers module and couldn't find any angle brackets inside a shortdescription field.

    I know it was an issue I encountered fairly early on that any tags in the shortdescription field cause it to be truncated where the tag commences - this is because it is a string and not formattedtext.
    The description field contains the formatted version, but this is only visible when you view the library copy of the Power, and not when you open the copy on the PC sheet.

    When you copy a power to a PC sheet it appears to parse it to get the power actions, and also copy a subset of the power's library fields to the character data.
    Oddly, even though it keeps a reference to the source library power on the PC sheet, it never seems to access the original version, or even care whether the library is loaded. (This is in contrast to Feats and Special Abilities that only store a link to the library source if it came from one, and require the library to be loaded.)

  6. #6
    I misspoke. I meant to say the flavor text area. I did notice that when I disable the "4E Power Card Flavor Text" extension, the flavor text is not visible when the power is on the sheet - which I'm guessing is why the extension was made.

    Here is an example.

    2022-05-16 06_49_33-Greenshot.png

  7. #7
    Quote Originally Posted by RRFG View Post
    I misspoke. I meant to say the flavor text area. I did notice that when I disable the "4E Power Card Flavor Text" extension, the flavor text is not visible when the power is on the sheet - which I'm guessing is why the extension was made.

    Here is an example.

    2022-05-16 06_49_33-Greenshot.png
    OK I think I've fixed it - I changed the flavor nodes from formattedtext to string and it stopped displaying the <p> tags.

    The italics must be inherent to flavor boxes and they don't actually require any text formatting - I checked some of the scraped DDI modules and they had the same problem, which was probably where I got the idea to make them formattedtext in the first place.

    Have released a new version on github - unfortunately you will need to rebuild the module and re-add the powers to PCs (or edit your campaign file).

  8. #8
    Yup. Fixed on my end. Great job.

    One question - the feats are populated in the powers section of the side bar, while the npcs aren't populated at all. Is this intended?

  9. #9
    Quote Originally Posted by RRFG View Post
    Yup. Fixed on my end. Great job.

    One question - the feats are populated in the powers section of the side bar, while the npcs aren't populated at all. Is this intended?
    Funny you should mention that - I just noticed the same thing last night.

    I have loaded up all the DDI modules, and I can see that some of them correctly populate Feats & Monsters into the Feats & NPCs lists (and some of them don't).

    So it should just be a matter of analysing the XML in the 'good' modules and working out what triggers them to be listed correctly.

  10. #10
    New version is up on github that fixes the issue with Items, NPCs and Feats not appearing under the correct sidebar menu.

    Edit: Items only includes mundane items. Looking into adding magic items also.
    Last edited by skelekon; May 17th, 2022 at 12:58.

Page 1 of 5 123 ... Last

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
  •  
Cosmere RPG Beta Launch

Log in

Log in