PDA

View Full Version : Almost there, but not quite (trouble with .mods)



DrClarke
June 14th, 2007, 22:06
Okay, I'm finally delving in FG2 (I own two copies I like it so much!) I didn't have any real problems with FG1, especially with the tutorial located at: https://www.fantasygrounds.com/forums/showthread.php?t=4493

That walkthrough opened up all the doors I need for FG1.

Now I'm partially stuck in FG2. I've been 'searching' but I'm not finding the exact 'door opening vault of information' that will give me that "Ah Ha!" moment.

I've looked through the documentation located: https://www.fantasygrounds.com/forums/showthread.php?t=6294 and this has taught me how to get my own ruleset started by utilizing the d20unpack.exe file.

I've also seen a lot of posts on using /export on the command line, but this isn't appearingly answering my needs.

What I'm curious on doing is making, obviously, my own set of rules/data. Like hos I notice in the \Application Data\Fantasy Grounds II\modules directory. I see a few d20[some_name_here].mod files. I understand what these are and how to manipulate them by unpacking the .mod file.

One point of confusion, from the searches are it seems there are .mod files and then there are .mod files? :) Some folk refer to .mod files as, lets say for example, DM Joe created a .mod file called d20MonsterManual2 (for his own personal use and not to share) and it's populated with only MM2 data. This makes it for quick easy searching. Other folk refer to a .mod file as a module, in the sense of a D&D Game Module. I understand this is created by utilizing the /export command on the command line in FG2.

I'm more interested in how to create the .mod files that seem to come stock with FG2, all the ones that start with d20. Also, how come I can't load this in my generic created ruleset? If I do use the /export command, it seems I just get one singular file called [some_name].mod. What if I wanted to have many books available in my personal library?

This was easy to me in FG1, but it's like I'm completely missing something important here in FG2... the fabled Rosetta Stone ... if you will.

Can someone point me to my "Ah Ha!" moment while I continue tinkering and reading?

Thanks!

Legba
June 14th, 2007, 22:29
I'm having pretty much exactly the same problem. I've created my own .mod file, filled with Kingdoms of Kalamar-specific information, by modifying the d20basicrules.mod file, and placed it in the modules folder... now how do I get it to show up within the program?

EDIT: Duh. I need to make it


<ruleset>d20</ruleset>

But while it now shows up in the Module Activation box, it still won't show up in the Library box. But hey, it's progress.

Second EDIT: Found the typo that was stopping things from showing up. Getting there, getting there.

DrClarke
June 14th, 2007, 22:33
Or even better (for me at least) is how do I simple create my own, several, .mods that can be read by my module/ruleset?

So, for example, I wanted to have: KoKMonsters, KoKItems, KoKRules, KoKClasses, KoKRaces.

The only thing I get right now is just ... KoK.mod :/

DrClarke
June 15th, 2007, 00:03
Ya, I think I figured it out also. I'm not sure if it's the right way, but it does work.

I'll kinda try and document this for future searches:


Follow the instructions located here: https://www.fantasygrounds.com/modguide/introduction.xcp specifically the d20unpak.exe portion.
For this quick example, we'll name our ruleset folder: d20test
Now, here's the Ah Ha! moment. Access, or make copies, any of the .mod files located in C:\Documents and Settings\some_name\Application Data\Fantasy Grounds II\modules
Use winrar. I noticed winrar will extract the data just fine with the .mod extension. If you don't have winrar installed, then just rename the file to "filename.zip" and then extract it.
Locate the definition.xml file and open it in your editor of choice. (My weapons are Notepad++, Dreamweaver CS3, and Visual Studio 2005. I work at a campus so I have access to the last two mentioned, but to be quite honest, for FG2 .xml & .lau, notepad++ seriously rocks!!! and it's free!)
After your definition.xml file is opened, you're looking for a line that looks like this: <ruleset>d20</ruleset>.
Rename the "d20" to the name of your ruleset and then save it.
zip those files back up and make sure you rename it back to the .mod format if you changed the actual name.
Now when you load FG2 and you start your campaign/module with your ruleset, you should be able to select that/those .mod files(s) from the Library.
This should be enough of a Ah Ha! moment too, to give you a clue how to create .mod files from scratch and not just rename existing ones.


That's what I've figured out. I'm not sure if it's the most accurate and/or professional way to do this, and I hope someone corrects me if I'm wrong.

My previous searches were confusing. I would see people write things like, "Oh, just modify the definition.xml file", but a casual search yields no such file unless one actually extracts a .mod file apart. :)

Griogre
June 15th, 2007, 02:21
There are really either 2 or 4 types of mod files depending on how you count them which can lead to confusion.

There are two types if you count module types as adventure modules and libarary modules. The adventure module are modules like the Sunless Citiadel, Return to the Temple of Elemental Evil or Rappan Athuk Reloaded - basically these are like FG1 modules with storybook and other book entries. The other type is the new library mod files like the d20Magic, d20Spells, ect.

The new "library" modules come in three flavors: client, common and host. As noted you have to built these mod files by hand and can not use the /export which is for adventure modules. Examples of two of these types of files can be examined by deconstructing the d20BasicRules.mod for a client module and the d20Monsters.mod for a host module. I'll get to the common in a moment.

A client module has to be on a computer and has to have the GM's ok before it can be opened on the client (player's) computer. Inside the module zip the xml file is called client.xml. Again the d20BasicRules.mod is an example of this type.

A game master file can only be opened on the host and not on a client. Inside the module zip this type of file is called db.xml. The d20Monsters.mod is an example of this type.

A common file is a file that is on the game master's computer and that is transfered, but not kept on the client. To actually get the data to transfer the game master needs to "force" the module open on the clients. Inside the module zip file this type of file is called common.xml. I originally made a d20CombatCheatSheet module as a client type but now it is a common module type. You can download it and take a look at it on this thread in the Armory: https://www.fantasygrounds.com/forums/showthread.php?t=6399

Finally, all the examples given have only had one type of module data. The developers have said you can have different types of data in a module. I do not know how to do this. But if I need to find out I would probably make a sample demo adventure module using the /export command and check client, shared and host for different parts of the module's data and then open up the xml and look at what tags and attributes showed up.

Valarian
June 15th, 2007, 08:23
This thread may also be of help to you: https://www.fantasygrounds.com/forums/showthread.php?t=6446

DrClarke
June 15th, 2007, 16:14
Griogre
Actually, I had already found your cheat sheet file through my initial searching :) and gleaned some hints through it :)

Valarian
Thanks for that link. That really helped. I saw that Griogre was explaining that, and not to knock you attempt (it was great), but it became real clear with that link! Thanks!