PDA

View Full Version : DungeonDraft LOS



JesterOC
October 23rd, 2020, 06:27
I tried using a 3rd party utility to pull LOS data to XML files from DungeonDraft VTT files. The files appear to be generated but I can't seem to get FGU to use them. Is this no longer a feature? I notice that FGU natively does not appear to use .xml files for LOS any idea how to make this work, or perhaps we need to wait until it all settles.

Thanks

LordEntrails
October 23rd, 2020, 16:46
Where did you put the LOS file? What was it named? What is the module name? What about the image name?

Not sure, I do know their is a LOS utility that was recently updated, Might you need to use it? Just don't know because I've never done this. Here's teh utility; https://fantasygroundsunity.atlassian.net/wiki/spaces/FGU/pages/260440084/Developer+Guide+-+Extracting+LOS+Data+for+Modules

JesterOC
October 23rd, 2020, 17:39
I made a file called GraveYardLOS.dd2vtt used their extractor and it produced GraveYardLOS.png and GraveYardLOS.xml. I placed them both in a temp folder.

Then I just imported the .png and I had assumed it would find the XML.

Then I tried placing them first in the campaign folder but I got an error saying it could not import it as it was already in the campaign.

It looks from the documentation you provided that it needs to be embedded in a module. Is this always needed? I am just doing this for my home game, not for a external use.

Moon Wizard
October 23rd, 2020, 18:33
If the XML is the same name as the PNG (except for the extension), then that is what FGU looks for. They are side-loaded when the image is added to a map.

If you are not seeing the data, then I would guess that the XML format is not correct.

Regards,
JPG

JesterOC
October 23rd, 2020, 18:48
OK, perhaps that is the case. The utility is 3 months old so perhaps the format changed since it was built.

LordEntrails
October 23rd, 2020, 19:13
I don't think that when you import the image that it imports the xml as well. You need to place the xml file into your campaign, but I'm not exactly sure where.

I would load a different image, add a few LOS segments to it, exit your campaign and see where the file is. Then place the xml the same path/structure.

pindercarl
October 23rd, 2020, 19:32
I don't think that when you import the image that it imports the xml as well. You need to place the xml file into your campaign, but I'm not exactly sure where.

I would load a different image, add a few LOS segments to it, exit your campaign and see where the file is. Then place the xml the same path/structure.

LOS added to image if saved in the db.xml. As Moonwizard said, if an XML file with the same name as an image exists in the directory with the image, FGU attempts to side-load that data and apply it to the asset when it is added to an image. In the OP's example, the file GraveYardLOS.png and GraveYardLOS.xml would be placed in the campaign's image folder. Dragging the asset from the asset window to the image window will create a new image from the asset and apply the XML data. Following those steps, if the data is not applied the XML is likely formatted wrong.

@JesterOC - Can you post the XML file generated by DungeonDraft?

JesterOC
October 24th, 2020, 02:56
LOS added to image if saved in the db.xml.

Thanks I just now found that out by doing a Find in Files for the word <occluders>! Brute force works I guess. ;)

I notice the the LOS files that where generated did not have the <closedpolygon> tag.

When finding the replacement I made in the session db.xml file I noticed that all entrants for occlusions had this

<closedpolygon>true</closedpolygon>

pindercarl
October 24th, 2020, 05:21
Thanks I just now found that out by doing a Find in Files for the word <occluders>! Brute force works I guess. ;)

I notice the the LOS files that where generated did not have the <closedpolygon> tag.

When finding the replacement I made in the session db.xml file I noticed that all entrants for occlusions had this

<closedpolygon>true</closedpolygon>

I put your XML file in my <campaign>/images/ directory along with an image named xGraveYardLOS.jpg and the LOS data imported with the asset.

The <closedpolygon> tag just indicates that the first an last point of the occluder are implicitly connected.

Daso
October 24th, 2020, 22:00
So does this actually work? What's the 3rd party tool that extracted the LOS data?

I'd love to be able to grab my Dungeondraft maps and be able to build LOS data directly from the image! That would be amazing and such a time saver!!

DevildrummerX
October 24th, 2020, 22:55
So does this actually work? What's the 3rd party tool that extracted the LOS data?

I'd love to be able to grab my Dungeondraft maps and be able to build LOS data directly from the image! That would be amazing and such a time saver!!

If you go to the Dungeondraft subreddit and search for Fantasy Grounds you should find it. It has not been updated in a few months so it does not include the new occluder types added in the recent update but it will do walls and doors I believe.

ColinBuckler
October 24th, 2020, 23:29
I have used the utility several times and it does work well.

Basically its a python script you run - so you will need a copy of python on your machine to use it.

JesterOC
October 25th, 2020, 03:13
I have used the utility several times and it does work well.

Basically its a python script you run - so you will need a copy of python on your machine to use it.

I'm using the exe and it did generate the files. Can you briefly go over what steps you take to import them into FGU?

EDIT:
Nevermind I figured it out. I was adding the .xml file after importing it. Move the .xml to the images file first.. then import it. I had assumed it sideloaded the .xml when it was pulling it up to the user. But it must be during the import process.

Thanks everyone for the info.