PDA

View Full Version : Making an Effects Module



Zacchaeus
February 24th, 2015, 20:04
This subject has been discussed for other rulesets according to my extensive search of the forums but I haven't seen anything specific to the 5e ruleset.

When you create a module from FG it does not include any effects. It would be useful to be able to transport effects between campaigns and I'm pretty sure that there will be a method that would enable this to be done. It probably means footering (Scottish word meaning mucking about) around with xml files. However, before I start doing such footering can anyone point me in the right direction?

Griogre
February 24th, 2015, 20:24
Its pretty straight forward:


Open the old campaign's db.xml file in an editor of some sort, Notepad will do in a pinch.
Find the area of the file that starts: <effects> and ends </effects>
copy the information
Create a new campaign in FG if you haven't already, by starting FG creating a new campaign and then quitting out of FG
Open the new campaign's db.xml file and look for the part of the file that starts <effects> and ends </effects>, it should be empty
Paste in the information you copied earlier.



Note: you need to have only one starting element <effects> and one ending element </effects>

Trenloe
February 24th, 2015, 21:12
To make a module you can re-use again and again, do steps 1-3 above and then paste into a module that has an skeleton db.xml file in it. See the 3.5e example here: https://www.fantasygrounds.com/forums/showthread.php?15453-Applying-pathfinder-effects&p=115496#post115496

Then change definition.xml to be for the 5E <ruleset>.

Zacchaeus
February 25th, 2015, 11:06
Thanks chaps. I knew there would be a way.

Now, Trenloe. That link goes to a file called conditions and the db.xml file in that isn't empty. It is full of conditions which are relevant to 3.5. You suggest that I copy/paste the code as mentioned by Griogre. So do you mean delete the original stuff in the conditions module and then paste in the new stuff. Or do you mean copy and add to the original. Does it matter what the "<id-xxxxx>" codes are?

damned
February 25th, 2015, 12:48
I think Trenloes instructions are about packaging it up as an Extension.

Basically you have the following:

definition.xml - which contains things like Name, Ruleset and Included Files
common.xml - this will contain all your effect info you copy as per above

You zip up these files (but not the parent folder) and you rename it Effects5E.mod (yes you change the .zip to .mod) and you place it in your Modules subfolder.

Examples below - check what the 5E ruleset actually uses....

definition.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<root version="3.0">
<name>5E Effects Library</name>
<ruleset>5E</ruleset>
<author>Zacchaeus</author>
</root>

common.xml

<?xml version="1.0" encoding="iso-8859-1"?>
<root version="3.0" release="1">
<effects>
<id-00001>
<adjustment type="number">0</adjustment>
<duration type="number">0</duration>
<isgmonly type="number">0</isgmonly>
<label type="string">Climbing</label>
</id-00001>
</effects>
</root>

Locate your db.xml file from your current campaign in which you have created your effects.

You will create common.xml with the following info:


<?xml version="1.0" encoding="iso-8859-1"?>
<root version="3.0" release="1">
</root>

You will copy all the Effects from <effects> thru to and including </effects> from your db.xml and paste it in between the <root> tags in your file above.


http://www.fg-con.com/wp-content/uploads/2015/01/fg-con-6-150-11.jpg (http://www.fg-con.com/events/)
FG Con 6 – April 17-19th 2015 - register at www.fg-con.com (http://www.fg-con.com/) for all the latest info.

Zacchaeus
February 25th, 2015, 13:29
Now, then Mr damned, I believe that you are endowing me with far too much knowledge here. :)

Within my FG folder I have a mod called Keep on the Shadowfell which I have created. When I unzip this there is a db.xml file as well as a definition.xml file. However there are no effects in the db.xml file (as expected) and there is no common.xml file. If I then look in the campaign folder for the same module I can see the db.xml file and buried in all of that there are effects. However there isn't a common.xml file in this folder either. I had a browse through the 5e ruleset folder (without doing anything other than looking since I didn't want to mess with those files) and again I can't see a common.xml file there. So where is this mysterious file?

damned
February 25th, 2015, 13:34
You will create common.xml with the following info:


<?xml version="1.0" encoding="iso-8859-1"?>
<root version="3.0" release="1">
</root>

you will copy all the Effects from <effects> thru to and including </effects>
and paste it in between the <root> tags in your file above.

damned
February 25th, 2015, 13:51
Within my FG folder I have a mod called Keep on the Shadowfell which I have created. When I unzip this there is a db.xml file as well as a definition.xml file. However there are no effects in the db.xml file (as expected) and there is no common.xml file. If I then look in the campaign folder for the same module I can see the db.xml file and buried in all of that there are effects. However there isn't a common.xml file in this folder either. I had a browse through the 5e ruleset folder (without doing anything other than looking since I didn't want to mess with those files) and again I can't see a common.xml file there. So where is this mysterious file?

Your keepshadowfell.mod contains all the Story, Images, NPCs, Encounters, Items, Parcels, Tables and Tokens that were in the Campaign when you exported it.
Your campaign folder also contains the db.xml which has things like Modifiers, Effects, Notes, PCs, Combat Tracker Actors, Calendar, Party Sheet and probably a few other things. This other stuff is generally specific to the group that ran through the campaign at that time.


http://www.fg-con.com/wp-content/uploads/2015/01/fg-con-6-150-9.jpg (http://www.fg-con.com/events/)
FG Con 6 – April 17-19th 2015 - register at www.fg-con.com (http://www.fg-con.com/) for all the latest info.

Trenloe
February 25th, 2015, 14:17
Thanks chaps. I knew there would be a way.

Now, Trenloe. That link goes to a file called conditions and the db.xml file in that isn't empty. It is full of conditions which are relevant to 3.5. You suggest that I copy/paste the code as mentioned by Griogre. So do you mean delete the original stuff in the conditions module and then paste in the new stuff. Or do you mean copy and add to the original. Does it matter what the "<id-xxxxx>" codes are?
Sorry, I should have said more. Yes, remove the 3.5e effects section and copy in your 5e effects section.

Don't use a common.xml file as damned is mentioning, use a DB.xml file as I mentioned above. Keep everything the same in the example I linked, other than replacing the <effects> section in DB.xml and changing the <ruleset> property in definition.xml. You can also change the file name and the name/description in definition.xml.

damned
February 25th, 2015, 14:22
Don't use a common.xml file as damned is mentioning, use a DB.xml file as I mentioned above.

Hey Trenloe - what is the difference between the two: db.xml vs common.xml?

Trenloe
February 25th, 2015, 14:29
Only DB.xml is used now moving forwards with FG 3.0+. FG still supports common.xml and client.xml for backwards compatibility, but you should use DB.xml for new modules.

damned
February 25th, 2015, 14:32
Only DB.xml is used now moving forwards with FG 3.0+. FG still supports common.xml and client.xml for backwards compatibility, but you should use DB.xml for new modules.

Thank you.

Zacchaeus
February 25th, 2015, 15:21
Excellent stuff chaps. I will have a go at this sometime soon.

Oh, and nice to see two colossi of these forums go head to head :)

damned
February 26th, 2015, 00:09
Excellent stuff chaps. I will have a go at this sometime soon.

Dont procrastinate. This will take you 5mins once you try it.


Oh, and nice to see two colossi of these forums go head to head :)

Only 1 colossi here. And it aint me. Check this thread to see my ignorance and stupidity!
https://www.fantasygrounds.com/forums/showthread.php?23296-Retrieving-and-Using-Options

Zacchaeus
February 26th, 2015, 22:37
Only 1 colossi here. And it aint me. Check this thread to see my ignorance and stupidity!
https://www.fantasygrounds.com/forums/showthread.php?23296-Retrieving-and-Using-Options

Haha, good one.

Actually I can't get it to work, I was going to post another time but I may as well do it now. I've written the xml files ok (at least I think they are ok) but I can't get the mod to appear in my library. I suspect that I may be doing something wrong with the zipping. As far as I can determine the zipping is done in the same way as it would be for an extension. In other words select all of the files within the folder (there are three, the db.xml, definition.xml and a thumnail.png). This gives me a zipped file with the title of the folder. I change the extension to .mod and drag into my module folder in FG. However as I say it doesn't show up.

Any ideas why this might be the case greatly appreciated.

Trenloe
February 26th, 2015, 23:07
Sounds like you're doing it the right way. Have you:

Changed the <ruleset> tag in definition.xml to 5E? (Captial E).
Restarted FG after copying the .mod file to the \modules folder?

damned
February 27th, 2015, 05:05
Also make sure that your OS isnt hiding the .zip extension and you are in effect calling it Effects5e.mod.zip which wont work....

Zacchaeus
February 27th, 2015, 19:53
Aaannnd the winner is .... Trenloe!

Well, partly anyway :)

I had a little baby "e" rather than a capital "E" but I was also using WinRar to zip up the files rather than zipping them from the send to... option. (The reason I was doing this was that doing the send to thing seemed to just zip one file whilst WinRar zipped them all. It wasn't until I thought to look inside the zipped file that I discovered that Winzip was actually zipping all the files but it just chose one of them, seemingly at random, as the file name.).

So, I'll get on and tidy it all up.

Would there be any interest in me putting up a copy of the mod, or would that infringe copyright?

damned
February 27th, 2015, 20:06
If your effects are for things like Stunned, Barbarian Rage etc you should be able to post it.

Zacchaeus
February 27th, 2015, 20:47
They are mainly the effects from the PHB, along with a few that cropped up in the campaign related to monsters, such as the Hobgoblin Leaders Leadership ability and stuff like that. Player effects, such as barbarian Rage I have on the players sheet so that they do some of the work :)

This is just a little project I wanted to do to save me a few minutes having to retype the effects into a new module. There are probably hundreds of effects that could crop up - most of them won't do anything; they'll just be reminders that there is an effect in place. I wasn't intending to trawl through the manuals to list them all. I guess that there would be some copyright issues so it's probably safer that I don't publish. :)