PDA

View Full Version : Where to put tokens for a Module?



Tailz Silver Paws
November 27th, 2016, 05:38
Hello folks,

I'm experimenting with exporting my first mini-adventure Module and I am having trouble getting the tokens to show up where I want them in the exported module.

I want all the tokens for the module to appear in a token bag with the same name as the module. In this case: Gnome crystal Mine.

I've tried exporting with the tokens in "host" and in the "campaign" folders, but in the module the tokens up up in "Gnome Crystal Mine / Host / folders" or "Gnome Crystal Mine / Campaign / folders" which is not what I want.

Where should I put the tokens so they just export as "Gnome Crystal Mine / folders"

Zacchaeus
November 27th, 2016, 11:13
Put the tokens in a folder called 'tokens' in the Campaign directory and they'll get exported just like you want them to.

Tailz Silver Paws
November 28th, 2016, 03:32
Put the tokens in a folder called 'tokens' in the Campaign directory and they'll get exported just like you want them to.
hhmmm... when I tried that it ended up as "Gnome Crystal Mine / Gnome Crystal Mine / Folders" instead of "Gnome Crystal Mine / Folders"

I'll try again tonight... most frustrating...

Zacchaeus
November 28th, 2016, 11:51
I may not have been specific enough.

The path should be

Fantasy Grounds/campaigns/Gnome Crystal Mine/tokens

In the tokens library it will appear as Gnome Crystal Mine/campaign

Tailz Silver Paws
November 28th, 2016, 11:57
When I put the tokens into a folder titled Tokens inside the Campaign folder (called: Gnome crystal Mine), the tokens come up being inside a folder called "Campaign"

When I export the module, the tokens end up inside "Gnome Crystal Mine / Campaign / Token Folders /"

Which is not a clean structure in my opinion....

Tailz Silver Paws
November 28th, 2016, 11:59
I may not have been specific enough.

The path should be

Fantasy Grounds/campaigns/Gnome Crystal Mine/tokens

In the tokens library it will appear as Gnome Crystal Mine/campaign
Yup, that is what I am getting. Is there no way to get the structure to just be "Gnome Crystal Mine/Folders" in the token bag?

As I don't like the Campaign folder... call it a pet hate...

Zacchaeus
November 28th, 2016, 12:11
Yup, that is what I am getting. Is there no way to get the structure to just be "Gnome Crystal Mine/Folders" in the token bag?

As I don't like the Campaign folder... call it a pet hate...

Not that I'm aware of.

Trenloe
November 28th, 2016, 18:38
You can get the module tokens to the "Gnome Crystal Mine" in the tokens bag by manually adding a "tokens" directory containing the token files into the module file itself. However, you then have issues with linking these tokens back into your NPC/Encounter entries in the module which require manual edits - so you have two approaches:

1) Build the module as normal (export from a campaign), then move the tokens from the module \tokens\campaignname\whatever directory to just \tokens within the module and manually do a find\replace in the module XML to change old token references to the new.
2) Create a token module called "Gnome Crystal Mine" in the <name> field of the module definition.xml file (but with the module filename something like gnome_crystal_mine_tokens_temp.mod) before you start building your main module in your module making campaign. Use tokens from this "Gnome Crystal Mine" temporary token module within your campaign. Then when you come to export, export with a name of "Gnome Crystal Mine" and a filename different from the tokens file - this will mean the tokens are referenced as /tokens/<token name>.png@Gone Crstal Mine which now refer to the main module you've just exported. Delete/remove the temporary module file - as this has the same FG name (but different filename).

Tailz Silver Paws
November 28th, 2016, 22:12
You can get the module tokens to the "Gnome Crystal Mine" in the tokens bag by manually adding a "tokens" directory containing the token files into the module file itself. However, you then have issues with linking these tokens back into your NPC/Encounter entries in the module which require manual edits - so you have two approaches:

1) Build the module as normal (export from a campaign), then move the tokens from the module \tokens\campaignname\whatever directory to just \tokens within the module and manually do a find\replace in the module XML to change old token references to the new.
2) Create a token module called "Gnome Crystal Mine" in the <name> field of the module definition.xml file (but with the module filename something like gnome_crystal_mine_tokens_temp.mod) before you start building your main module in your module making campaign. Use tokens from this "Gnome Crystal Mine" temporary token module within your campaign. Then when you come to export, export with a name of "Gnome Crystal Mine" and a filename different from the tokens file - this will mean the tokens are referenced as /tokens/<token name>.png@Gone Crstal Mine which now refer to the main module you've just exported. Delete/remove the temporary module file - as this has the same FG name (but different filename).
I was guessing it might require some manual edits to get the file structure to be the way I want it. Oh well, more experimenting to come.

I'll see what method works the best...

Trenloe
November 28th, 2016, 22:16
I'd got with option 1 - a lot less faffing around, just do a find/replace in the module XML. It will be much less work as long as you're comfortable extracting a module, basic XML editing, and re-packaging the module.

Tailz Silver Paws
November 29th, 2016, 00:35
I'd got with option 1 - a lot less faffing around, just do a find/replace in the module XML. It will be much less work as long as you're comfortable extracting a module, basic XML editing, and re-packaging the module.

I'll see how I go tonight, who knows I might fapf it up completely! :p

Tailz Silver Paws
November 30th, 2016, 10:17
I have had success changing the file path and folder structure. But I am now having trouble with tokens placed on maps not having the map placement info exported in the module as well as the map mask not being exported. Any hints or tips about how to resolve those problems?

Nickademus
November 30th, 2016, 11:09
FG only exports the tokens tied to NPCs. There is a way to achieve this though, but it requires a little work.

First place the tokens, save the campaign and export the module. Then open the campaign db.xml file and highlight only the <image> section. Copy it and paste it somewhere for safekeeping. Now open the module's common.xml or client.xml file. Highlight the <image> section and delete it. Paste the <image> section from db file in its place.

Now highlight just the <image> section and do a Find/Replace action. Make sure that the 'In Selection' option is active so you only are changing the <image> section. Only do a find/replace of the following, using the name of the module for the word 'Module':

replace: campaign/tokens
with: tokens/campaign

replace: png</prototype>
with: png@Module</prototype>

replace: jpg</prototype>
with: jpg@Module</prototype>

replace: >images/
with: >

Trenloe
November 30th, 2016, 16:05
But I am now having trouble with tokens placed on maps not having the map placement info exported in the module as well as the map mask not being exported. Any hints or tips about how to resolve those problems?
You can't export masks.

For token placement, use the Encounter functionality that allows the specification of the token locations in the encounter record. Then, when the encounter is added to the combat tracker, the token pre-placement will be used on the map.

Tailz Silver Paws
November 30th, 2016, 23:15
FG only exports the tokens tied to NPCs. There is a way to achieve this though, but it requires a little work.

First place the tokens, save the campaign and export the module. Then open the campaign db.xml file and highlight only the <image> section. Copy it and paste it somewhere for safekeeping. Now open the module's common.xml or client.xml file. Highlight the <image> section and delete it. Paste the <image> section from db file in its place.

Now highlight just the <image> section and do a Find/Replace action. Make sure that the 'In Selection' option is active so you only are changing the <image> section. Only do a find/replace of the following, using the name of the module for the word 'Module':

replace: campaign/tokens
with: tokens/campaign

replace: png</prototype>
with: png@Module</prototype>

replace: jpg</prototype>
with: jpg@Module</prototype>

replace: >images/
with: >
I was wondering if this was possible, I just didn't know what code to cut and paste from the campaign db.xml to the module .xml. I'll have an experiment with this...

Can this work for Masks?


You can't export masks.

For token placement, use the Encounter functionality that allows the specification of the token locations in the encounter record. Then, when the encounter is added to the combat tracker, the token pre-placement will be used on the map.
Well that is a bit odd that masks are not exported or the placement of tokens on a map. That is a bit poopy.

Is it possible to manually export a mask and placed tokens? Or would that be too much stuffing around?

I'm not keen on doing the setup as an encounter as I am placing a lot more than just monsters (eg: room furniture, dropped items, etc).

Moon Wizard
November 30th, 2016, 23:48
Masks can't be exported, they are campaign specific.

Preplacement of tokens should already be handled as long as both the image and the encounter are both exported to the module.

Regards,
JPG

Nickademus
November 30th, 2016, 23:49
Can this work for Masks?

Masks and drawings are stored in the campaign folder itself (subfolders /drawings and /maskedimages), not the db.xml and thus not specific to the campaign that they are being used in. Because of this, no module can store masks or drawings since there would be no way for it to put the image files in the folder. All module assets are loaded into the database in memory; nothing is placed on the hard drive.

Nickademus
November 30th, 2016, 23:51
Preplacement of tokens should already be handled as long as both the image and the encounter are both exported to the module.

Considering this is the artist that made, among others, a token pack of furniture, I'm guessing he is referring to tokens that have nothing to do with encounters (you know, furniture).

... room furniture, dropped items, etc...

Moon Wizard
December 1st, 2016, 00:03
Only masks, drawings, pointers and client views are excluded during exports. So, you can place tokens on the map, and they should be exported in place too.

Regards,
JPG

Nickademus
December 1st, 2016, 05:19
So, you can place tokens on the map, and they should be exported in place too.

I have not found this ever to be the case. And in the following thread I was told it wasn't the case:
https://www.fantasygrounds.com/forums/showthread.php?24276-Image-Export-Issue

Tailz Silver Paws
December 1st, 2016, 10:28
FG only exports the tokens tied to NPCs. There is a way to achieve this though, but it requires a little work.

First place the tokens, save the campaign and export the module. Then open the campaign db.xml file and highlight only the <image> section. Copy it and paste it somewhere for safekeeping. Now open the module's common.xml or client.xml file. Highlight the <image> section and delete it. Paste the <image> section from db file in its place.

Now highlight just the <image> section and do a Find/Replace action. Make sure that the 'In Selection' option is active so you only are changing the <image> section. Only do a find/replace of the following, using the name of the module for the word 'Module':

replace: campaign/tokens
with: tokens/campaign

replace: png</prototype>
with: png@Module</prototype>

replace: jpg</prototype>
with: jpg@Module</prototype>

replace: >images/
with: >
That did the job perfectly!

I tried to manually import the map mask, but it didn't work, boo-hooo!


Considering this is the artist that made, among others, a token pack of furniture, I'm guessing he is referring to tokens that have nothing to do with encounters (you know, furniture).
Yup, that is me. In fact that token pack sells quite well.

Nickademus
December 1st, 2016, 11:06
I figured. It was the first of your packs I ever bought.

Tailz Silver Paws
December 1st, 2016, 12:09
I figured. It was the first of your packs I ever bought.
Yeah? Had lots of fun with it? I need to get my tail into gear and make the module for that pack too.

Nickademus
December 1st, 2016, 19:25
I should have taken a screenshot of the game where the party invaded a goblin clan cavern that had stolen several wooden dining sets. When the party finally made it to the dining hall (after making enough noise to adequately alert them), the 7 tables and 30-some chairs where all moved to form a barricade. Of course, it was the players' idea to set it all on fire... inside a cave... with allies fighting in the room...

Tailz Silver Paws
December 1st, 2016, 22:53
I should have taken a screenshot of the game where the party invaded a goblin clan cavern that had stolen several wooden dining sets. When the party finally made it to the dining hall (after making enough noise to adequately alert them), the 7 tables and 30-some chairs where all moved to form a barricade. Of course, it was the players' idea to set it all on fire... inside a cave... with allies fighting in the room...
LOL, that sounds so funny. I can just imagine it.

Why were the Goblins stealing dining sets?

Bidmaron
December 1st, 2016, 23:31
Ok how about a link to your set or a name or something?

Nickademus
December 1st, 2016, 23:44
LOL, that sounds so funny. I can just imagine it.

Why were the Goblins stealing dining sets?
They took over a small dwarven outpost and were trying to raise the standard of their living to be more dwarven by implementing crude carpentry and masonry. (This was a pre-made module, not mine.) Made for a great mix of natural cavern elements, nicely worked rooms and wtf sloppy additions to the dungeon.

Ok how about a link to your set or a name or something?
https://www.drivethrurpg.com/product/113691/Fantasy-Furniture-Tokens

Bidmaron
December 2nd, 2016, 04:29
Just bought them.

Nickademus
December 2nd, 2016, 05:02
(I should get a commission for that sale.) :P

Tailz Silver Paws
December 2nd, 2016, 21:55
Just bought them.
Thank-you very much, your support helps me make more goodies.


(I should get a commission for that sale.) :P
Send my your email address and I'll shoot you a Beta copy of the Gnome Crystal Mine Module I am working on.