View Full Version : Bulk Import Into A Module
MaxAstro
June 13th, 2024, 19:22
I have a collection of a hundred or so feats (not in any FG format, just raw text) that I want to add to a module, and I'm trying to find literally anything to make the process faster.
I know module data is stored as XML; if I write a script to reformat the feats as XML is there then a clean way to add that to an existing module? Or any other method for doing mass-import that people have found?
MrDDT
June 13th, 2024, 19:39
I have a collection of a hundred or so feats (not in any FG format, just raw text) that I want to add to a module, and I'm trying to find literally anything to make the process faster.
I know module data is stored as XML; if I write a script to reformat the feats as XML is there then a clean way to add that to an existing module? Or any other method for doing mass-import that people have found?
Put it right into the DB.xml.
Once it's in a DB.xml, you can then make it exported as a module.
MaxAstro
June 13th, 2024, 19:48
Does the DB.xml require things to be in a certain order or can I just add new items to the end?
Zacchaeus
June 13th, 2024, 20:12
Does the DB.xml require things to be in a certain order or can I just add new items to the end?
If you create a new campaign and add a feat to the feats list and then save you can look at the db.xml to see where the feats go and what the format is. You'll need to then add your feats to the same place in the same format.
MrDDT
June 13th, 2024, 20:31
Does the DB.xml require things to be in a certain order or can I just add new items to the end?
They will have an ordering and numbering system. However if you are doing it in a new campaign I can just keep increasing the numbering as you add.
Then you export to a module and load the module in the campaign you want to use the feats in.
MaxAstro
June 13th, 2024, 21:40
Hm, that sounds a bit tricky although not impossible. I guess I'll just have to take a deep look at the db.xml file from an existing campaign and do what I can. It's going to get complex because I have a bunch of spells to import after I import the feats...
Is it possible to combine modules?
MrDDT
June 13th, 2024, 22:12
Make a new campaign and then export it as a module then load the module where you want the new feats and spells.
Don’t do it in an active campaign.
damned
June 13th, 2024, 23:53
These are listed to the users in alpha sort - the entry order is not important.
LordEntrails
June 14th, 2024, 16:54
Don't look in an existing campaign. There will be too much. Create a new campaign and create 2 feats in it and 2 spells. Then look at the db.xml to see where and how you need to add your stuff.
In D&D 5E Spells will look like this:
<spell>
<category name="(Group 1)">
<id-00001>
<castingtime type="string">1 action</castingtime>
<components type="string">V, S</components>
<description type="formattedtext">
<p>You assume a different form. When you cast the spell, choose one of the following options, the effects of which last for the duration of the spell. While the spell lasts, you can end one option as an action to gain the benefits of a different one.</p>
<p>
<b>Aquatic Adaptation. </b>You adapt your body to an aquatic environment, sprouting gills and growing webbing between your fingers. You can breathe underwater and gain a swimming speed equal to your walking speed.</p>
<p>
<b>Change Appearance. </b>You transform your appearance.</p>
<p>You decide what you look like, including your height, weight, facial features, sound of your voice, hair length, coloration, and distinguishing characteristics, if any. You can make yourself appear as a member of another race, though none of your statistics change. You also can't appear as a creature of a different size than you, and your basic shape stays the same; if you're bipedal, you can't use this spell to become quadrupedal, for instance. At any time for the duration of the spell, you can use your action to change your appearance in this way again.</p>
<p>
<b>Natural Weapons. </b>You grow claws, fangs, spines, horns, or a different natural weapon of your choice. Your unarmed strikes deal 1d6 bludgeoning, piercing, or slashing damage, as appropriate to the natural weapon you chose, and you are proficient with your unarmed strikes. Finally, the natural weapon is magic and you have a +1 bonus to the attack and damage rolls you make using it.</p>
</description>
<duration type="string">Concentration, up to 1 hour</duration>
<level type="number">2</level>
<locked type="number">1</locked>
<name type="string">Alter Self</name>
<range type="string">Self</range>
<school type="string">Transmutation</school>
<source type="string">Eldritch Knight, Eldritch Invocations, Sorcerer, Wizard, Arcane Trickster</source>
</id-00001>
<id-00002>
<castingtime type="string">1 action</castingtime>
<components type="string">V, S</components>
<description type="formattedtext">
<p>You hurl a bubble of acid. Choose one creature you can see within range, or choose two creatures you can see within range that are within 5 feet of each other. A target must succeed on a Dexterity saving throw or take 1d6 acid damage. This spell's damage increases by 1d6 when you reach 5th level (2d6), 11th level (3d6), and 17th level (4d6).</p>
</description>
<duration type="string">Instantaneous</duration>
<level type="number">0</level>
<locked type="number">1</locked>
<name type="string">Acid Splash</name>
<range type="string">60 feet</range>
<ritual type="number">0</ritual>
<school type="string">Conjuration</school>
<source type="string">Eldritch Knight, Sorcerer, Wizard, Arcane Trickster</source>
</id-00002>
</category>
</spell>
Feats will be similar. The order of the elements within the XML should not matter, but I've never tested that.
Laerun
June 14th, 2024, 19:30
I have had some minor success with generative AI, but it's still not 100% when writing out the XML. You have to give it examples of the text output that you desire.
MaxAstro
June 15th, 2024, 01:25
I put a script together today that parses out all the feat information into an array of variables, now I just need the part the formats the XML and I should be good to go.
It will require fairly precise formatting of the input text, since I'm working with what I have, but I'll share it here when it's done in case it's useful to someone.
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.