PDA

View Full Version : Building a Library module for SW - need help



sondermann
November 2nd, 2009, 18:53
Hi.

I'm currently working on a library module for Savage Worlds (v3). This module will include npcs of various types (animals, named npcs, generic npcs, monsters).

I used the SWEX GM Guide as a base for my module, and I've got the basics sorted out i.e. I can click on the npc entry in the library and an npc sheet opens. :)

Now, I want to have a token assigned to each character. This token should be included in the library file. What path do I use for the <token type="token"> command?

Also, I noticed that the SWEX GM Guide doesn't use the full functionality the npc sheet provides. Is there a way to find out how to access the different fields not used by the template I use?

sondermann
November 2nd, 2009, 19:02
Follow-up question: How do I incorporate pictures into a library module, and how would I access them from an NPC sheet?

Doswelk
November 2nd, 2009, 22:51
Hi.

Now, I want to have a token assigned to each character. This token should be included in the library file. What path do I use for the <token type="token"> command?

Also, I noticed that the SWEX GM Guide doesn't use the full functionality the npc sheet provides. Is there a way to find out how to access the different fields not used by the template I use?

Do what I do....

Create an NPC and fill it out add the token etc.

Then /save all in the chat box (to be sure)

Exit FGII and open the db.xml in the campaign folder.

Find the npc and copy it to the module you are building (adding the extra link lines at the top)

Doswelk
November 2nd, 2009, 22:53
Follow-up question: How do I incorporate pictures into a library module, and how would I access them from an NPC sheet?

Most of the SW rulesets have pictures included with them...

You just save them in the zip file (mod) and ensure that if you put them in a sub-folder you include that in the image entry in the common/client/db.xml file.

In the npc sheet you would just have to add an image link on the text tab.

ddavison
November 2nd, 2009, 22:55
Do what I do....

Create an NPC and fill it out add the token etc.

Then /save all in the chat box (to be sure)

Exit FGII and open the db.xml in the campaign folder.

Find the npc and copy it to the module you are building (adding the extra link lines at the top)

That's cheating.



Good suggestion.

sondermann
November 3rd, 2009, 13:56
Thanks for the suggestions.

Entering NPCs ingame and then copy/pasting it might be the way to do it . at least until I have a better grasp on the XML tags. :)

But, this doesn't solve the token problem, as I want my tokens to be contained in the library module itself. I was hoping to be able to have a token folder inside my module. Is this possible and what path would I have to code into my <token type="token"> command?

Concering images: I know that other rulesets have them. But I didn't know that I simply could add an image link in the npc window. :bandit: Still, I have no clue how the path should look like.

Tenian
November 3rd, 2009, 14:27
First you'll need to know the internal name of your module. I'm going to call it "My Module" in this example. This is what you find in the <name></name> of the definition.xml file. In this example assume your definition.xml looks like:



<?xml version="1.0" encoding="iso-8859-1"?>
<root version="2.01">
<name>My Module</name>
<author>Tenian makes too many modules</author>
</root>


For simplicity sake, let's assume your output module will have 2 subfolders:
tokens
images

Assuming you want to link a token named foo.png to an npc:



<token type="token">tokens/foo.png@My Module</token>


Images are a bit more complex depending if you want them to show up in Maps/Images or if you just want them to be used as reference. Assuming you have a bar.jpg and want it create an image named "This is Bar" in a category "My Images" in Maps/Images:



<image>
<category name="My Images" mergeid="" baseicon="1" decalicon="0">
<image-bar_jpg>
<image type="image">
<bitmap>bar.jpg</bitmap>
</image>
<name type="string">This is Bar</name>
</image-bar_jpg>
</image>


You could then link to it in any formatted text field with the following:



<linklist>
<link class="imagewindow" recordname="image.image-bar_jpg@My Module">A link to bar.jpg</link>
</linklist>

sondermann
November 3rd, 2009, 15:02
Thank you very much.

Althought my images don't need to show up under the image button, this will work too.

Tenian
November 3rd, 2009, 15:23
If you don't want to see them under maps/images you need to create your own node under root, in this example I use <hiddenimage>:




<hiddenimage>
<image-bar_jpg>
<image type="image">
<bitmap>bar.jpg</bitmap>
</image>
<name type="string">This is Bar</name>
</image-bar_jpg>
</hiddenimage>


Linking would then be:



<linklist>
<link class="imagewindow" recordname="hiddenimage.image-bar_jpg@My Module">A link to bar.jpg</link>
</linklist>

sondermann
November 3rd, 2009, 15:32
Perfect. You sir, made my day.