Git Product home page Git Product logo

fvtt-dd-import's People

Contributors

botikis avatar chunklighttuna avatar fmefford avatar gabrieljtaylor avatar hogart avatar m42e avatar moo-man avatar timothy-s-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fvtt-dd-import's Issues

[Feature] Allow adding padding to imported maps

It would be nice if the importer either allowed padding to be added to the maps on import, or used the foundry default ammount of padding. The lack of padding makes using hex and gridless very difficult to work with, and adding padding in the scene options after creation causes the wall to move

Background image path erroniously prefixed with '/'

When importing a map, the background image path gets set to /worlds/<worldname>/<imagename>, and the leading / causes errors generating the scene thumb and loading the scene.

Simply removing the / fixes the issue, allowing everything to work as expected.

Not importing or displaying full map post import

Not sure what is going on, but when I import a pretty typical maps I'm only getting 3rd of it rendered. Exiting imported maps are rendering fine, it's just the new ones since upgrading to .7.5. I deleted, reexported and tried a couple times.
draftexport

maploadfail

Request: A way to add multiple files to one scene.

Having multiple scenes for different layers of the same map is tedious. Having a way to import multiple files which get imported next to each other (above, below or on the sides) would be great for maps where it is likely that PCs are on different layers at the same time (i.e. taverns, ships, etc.).

Allow importing a scene from Foundry User Storage

This may just be me, but I tend to keep all of my data in a git project that i push to my foundry server remotely. It would be nice to have the option to select a dungeondraft map file that is local to the foundry server, rather than uploading it from my PC each time.

Importing doors tends to produce double doors

This becomes especially a problem for players since they can only open the topmost door, but they can sort of see the underlying door.

Here's a screenshot of the double door visible. One door is open while another door is underneath it still closed.
Screenshot 2020-12-10 020929

This seems to happen with (almost) all doors?

create directory if it doesn't exist

the dialog for importing doesn't use a file picker, so you can only specify a directory which already exists.
If you specify a directory that doesn't exist, it should be created.
Alternately, use a file picker which has a "new directory" capability.

Replace instead of adding new scene

Hi there,
thank you for your importer!

Would it be possible if i do an import and a scene with the same name exists, that your importer could replace it as an option?

I find myself tweaking maps a lot after i test it with a player token. For now i delete the current scene and import the dungeondraft file again to have only one scene with the right name.

Cheers

Importer does not use prefix

When the importer is done, the map is stored in the absolute path of example.com/worlds/world-name/file.png, instead of example.com/prefix/worlds/world-name/file.png.

Could be because of not using the prefix, or because it is a absolute path (starting with /)

Downloading the module from foundry downloads a version without the last commit.

I was having the path slashes issue, then saw a fix was already pushed, checked my installed version yet it matched 0.10. Just to be sure i checked the ddimport.js and i did not have the changes. Deleted the module and re downloaded it and its the same. Also tried downloading through the manifest link and the same, version 0.10 without the path slash issue fix nor the compatible version update from the module.json

Nothing happens when I click "Import."

Using FoundryVTT 0.6.6, and DungeonDraft 0.9.4.1.

Absolutely nothing happens when I click "Import" in the dialog box. I've selected the correct file from DungeonDraft, The only thing that seems a little odd is that DD wants to export with a double file extension (.dd2vtt.png), so I tried removing the ".png") portion. Still nothing. Could this be a compatibility issue with mods?

Thanks!

Line of Sight Simplification Improvements

Hello,

I'd like to propose an improvement on the algorithm behind the fidelity slider. Right now, it appears that the algorithm removes points solely based on adjacent line length. This produces results like this:

lowfidelity

It would be much better if the code would check the distance of a line between the two adjacent points and the point itself and remove the shortest ones. That way the simplification wouldn't lose corner points and would be closer to the original shape. To illustrate, I'm talking about the yellow line here:

bettersimplification

Basically, it's a linear approximation with minimized error.

Support for windows

Currently, Dungeon Draft supports two window portals by default. DD-Import is importing them as doors. Could DD-Import import them as regular walls with perception restriction set to 'None' if the portal starts with 'Window'?

Dungeondraft Import button not showing up

Using foundry VTT 0.6.2 the import button is not showing up underneath the create scene/create folder options. Also using pathfinder 2nd edition system version 1.5.2.

Portal Issue

I have noticed that when importing into Foundry VTT, all portals are automatically set as doors, even when the window asset is used in DungeonDraft.

Is this a known issue?

Thanks.

portal

Module is not importing the cave walls at all.

Hello, I was working on my own recreation of the Mountain's Toe Gold Mine from the Dragon of Icespire Peak adventure for D&D 5e. I made the map I was happy with in DungeonDraft and when i used the module to import the vtt file it's not including the outline of the cave. In some instances it will add the walls in for parts of the cave that are inside the larger cave.

Example
image

It also is including any regular walls that I build into the map myself. Just not the cave ones.
image

I am running version 0.5.5 of FoundryVTT and version 0.711 of the module. If it's important my version of dungeondraft is 0.9.1.2.

I also tried increasing the fidelity on the import to the maximum possible and that didn't make a difference.

Issues with uplaoding

I am having issues uploading my dd2vtt file. I am able to upload to foundry but all I am getting are the walls and lights nothing else. I get this error 'BG is null'. Its probably something I am doing on my end but I can't seem to figure it out.

Image not updated when re-importing

Here's the steps to recreate:

  • Create a map in dungeondraft and export to 'Universal VTT'
  • Upload to a scene in foundry, using this addon
  • Delete the scene in foundry
  • Edit the background image in dungeondraft
  • Upload again to a scene in foundry

The new scene will always use the background image from the first upload.

I have not checked if the wall geometry updates or not.

Is there a simple way to work around this?

Would you consider this a behaviour bug, or am I mistaken on the expected behaviour?

Line of Sight Loses Points

When importing the attached document, note how the line of sight doesn't follow the walls. However, if you look at the JSON itself, the points are there.

I think what happens is that something is removing points when one of the associated lines is short, but that tolerance is very high, so not a lot remains of the wall. For example, the upper room has 18 points in the JSON, but only 15 points are imported. The lower room is even more simplified, it has 62 points in the JSON but only 27 are imported (most are lost in the arc walls I guess).
oversimplified

(Had to change the extension of the dd2vtt file to txt to let github accept it as an attachment.)

oversimplified.txt

Dungeondraft Importer doesn't create Scene

I have Foundry on a Raspberry Pi as Server running. When I try to make a scene from my pc using Dungeondraft Importer, it doesn't create the map. I think the problem is that it searches for a file on my pc but foundry is running on my Raspberry. Any idea how to fix this?

Massive amount of overlapping walls

Had to change the extension to a supported format to upload
Paprika_Heart dungeondraft_map

This map, when imported into foundry, has over 2.2k walls, when it should have barely 100 by my estimation. @m42e

Double doors

There are ways to produce double doors, visually, in dungeon draft, however when imported they are imported as two separate side by side doors, I was wondering if it were possible to make it so that if there are two doors side by side that they merge on import. This isn't like a huge deal, just a minor issue. Thanks for the wonderful module either way!

Canvas text shrinks for all imported scenes

When I switch to a scene imported via this module, most of the text on Foundry's canvas shrinks to less than its normal size, including text for the names of tokens, chat bubbles, etc. This is under the Chronicles of Darkness game system with several other mods installed. This problem does not occur for scenes I have created manually from within FoundryVTT.

I went on to further test this module in a clean instance using the Simple World Building system and no other mods activated. This bug also occurred there.

DungeonDraft Update Breaks Importing

After updating to DungeonDraft to version 0.9.4.2, and uploading maps exported from that version, changes in the .d2vtt file format have made it so that attempting to upload those maps causes corruption in the entire world, issues that eventually forced us to reset the world. I may be able to work on a pull request for this issue.

Importer Won't Upload the VTT File On Local Machine

Hello,

Been using your module for a few months now with no problems. Love it, I would marry it if I could. But these last two weeks its been spitting errors and will not upload the VTT files. I do all my work on my local machine.

Foundry DungeonDraft Error Report

Maps uploaded via Firefox are not converted to webp

Tonight we had a session with a user, let's call him Dave, who has very slow internet. Our DM had created a scene using this tool and Dave had a very hard time loading this scene, despite us hosting with a rock-solid gigabit upload on a good rig and no other users experiencing issues. Diving further, we found that the scene in question had been named with the .webp extension, but it was still in fact a PNG and was gigantic (~60MB in our case).

I created a test world to play with, and found that if I created the scene using either the Electron app, Chrome, or Edge the resulting map was a valid WEBP file and was appropriately small. These all behaving identically (and I checked the output WEBP file is bit-wise identical) makes sense since I think this is all Chromium doing the work. However, when using Firefox to create the scene in an identical manner, the result was a PNG file with a .webp extension that was giant.

Repro steps (100%):

  • Install Foundry VTT 0.7.9, Dungeondraft Importer 1.1, and in our case the system Sandbox System Builder
  • Use Firefox to connect to the Foundry installation
  • Create a world that uses the Dungeondraft Importer module
  • Go to the Scenes tab and open the Dungeondraft Import tool
  • Enter a scene name, and leave all other options at default (storage type = user data, image type = png, convert to webp = checked, fidelity = lowest, offset = 0.1)
  • Upload a .dd2vtt map exported from Dungeondraft (I've attached a sample map that repros the issue)
  • Click Import
  • Once done, inspect the resulting WEBP file placed into the worlds directory
  • Notice that the file is not a valid WEBP file, is actually a PNG file, and is of large size
  • Trying the above with Chrome/the Electron app/Edge does not exhibit this behaviour

Here is a Google Drive link (it is too large to attach) containing a sample test map for importing, and the resulting output for both Chrome and Firefox.

Feature - Roofs

Hello,

With the latest version of Dungeon Draft, we can now create roofs!
That would be awesome if the importer can import roofs as single tiles for example.
This way we can manage the visibility of the roof and ever better, we can use the module https://github.com/VanceCole/roofs

Door/Wall types

Hi there,

you can define "block light" or "allow light" with dungeondraft doors. I translate these with "door" and "window" respectivly.

A door in foundryvtt would be a wall of type door.
A window in foundryvtt could be an invisible wall (see/hear everything, can't move through).

Is it possible to differentiate between these types in your importer?

Cheers

Relates to #10

image

Thumbnail Generation Error

Error when importing map:
"Thumbnail generation for Scene failed: Cannot read property 'thumb' of null"

Fix:
Open scene configuration, manually change file separator from forward slash (/) to backslash (\) so that it matches default Windows file separators. Error then disappears, thumbnail generates successfully.

Broke automatic updates for people using 0.9 version and lower...

The change in version number introduced here e00022c broke the updates for everybody using the module before.

In decimal, 0.9 is superior to 0.10 or 0.11, so no update will automatically being downloaded by Foundry until you go over the 0.90 number.

I suggest changing version to 1.12 or 0.912 to get all of your users back on automatic updates.

Issue - Hosted Upload

When I host Foundry on a local Windows 10 machine and then try to upload the dd2vtt file from my client PC via the web interface, nothing happens when you click the 'import' button.

I have to upload to the dd2vtt to the server and then upload it locally through the foundry client on the server.

Cannot import map with the same filename twice

This was fun to debug today: When you import a map into a scene, then change the content of the .dd2vtt file, and import the new version of the file into a different scene, it will re-use the previously imported file, so the changes to the map will not be reflected. This can be worked around by changing the name of the file you import, but it is very confusing at first.

FVTT Import Issue

I am unable to import Dungeondraft cave walls. Dungeon walls, however, seem to work fine, I assume the program should be able to import both wall types, correct?

Thanks for making this importer! It is super useful.

EDIT: Problem solved thanks to moo-man. I am a dummy and didn't have the most recent version installed. That was causing all the issues.

Idea: Allow placed objects to block LoS

I personally make liberal use of the Object tool within DungeonDraft to create forest scenes. It'd be super convenient if importing the scene into FoundryVTT would cause the trees to automatically have LoS walls.

I'm not sure if there's an ability to do that already or if it would need additional changes on Megasploot's end as well.

Cannot successfully import

Friday July 24. Successfully imported a couple vtt format files from Dungeondraft. Suddenly, they would not import any longer. I cannot even import the files saved and imported successfully earlier in the day. Probably the nut behind the wheel.

Lights seem very bright on new map import

When I import a map into 0.7.5 the lights seem very bright:

image

As a comparison in Dungeondraft the same section looks like this:

image

I guess it has something to do with the new tintAlpha property - or me using the lights in DungeonDraft wrong.

Right now I am working around this with a little function I run in the developer console after importing the map:

    function dimLights(tint = 0) {
        var allLights = canvas.lighting.placeables;
        var updateOperation = allLights.map(light => { return { _id: light.id, tintAlpha: tint} });
        canvas.lighting.updateMany(updateOperation);
    }

Walls and Lighting ok, but no background image?

Hello! Tried a small test map with the Importer, but it's only loading the wall and lighting layers. No background image at all. Screenshots and the Error log from my console follow. Any idea what I've done wrong?
Dungeondraft Importer Version 0.10
Foundry VTT Version 0.65
Original Dungeondraft Map: https://imgur.com/oDKYIbe
Map as it appears after importing to FVTT: https://imgur.com/bJ4XfaE

Error Log:

Failed to load resource: the server responded with a status of 400 (Bad Request)
2game:1 Not allowed to load local resource: file:///D:/AppData/Local/FoundryVTT/Data/worlds/aoa/scenes/Test.png
upload:1 Failed to load resource: the server responded with a status of 400 (Bad Request)
3game:1 Not allowed to load local resource: file:///D:/AppData/Local/FoundryVTT/Data/worlds/aoa/scenes/Test.png
foundry.js:10781 TypeError: Cannot read property 'orig' of null
at BackgroundLayer.draw (foundry.js:31449)
at Canvas.draw (foundry.js:10778)
at async Scene.view (foundry.js:28924)
draw @ foundry.js:10781
settings-extender.js:89 Uncaught TypeError: Cannot read property 'ctrlKey' of undefined
at settings-extender.js:89
at Array.reduce ()
at modifiersEqual (settings-extender.js:88)
at eventIsForBinding (settings-extender.js:97)
at Function.KeyBinding.eventIsForBinding (settings-extender.js:206)
at index.js:9
upload:1 Failed to load resource: the server responded with a status of 400 (Bad Request)
game:1 Not allowed to load local resource: file:///D:/AppData/Local/FoundryVTT/Data/worlds/aoa/scenes/Test.png
foundry.js:10781 TypeError: Cannot read property 'orig' of null
at BackgroundLayer.draw (foundry.js:31449)
at Canvas.draw (foundry.js:10778)
at async Scene.view (foundry.js:28924)
draw @ foundry.js:10781
settings-extender.js:89 Uncaught TypeError: Cannot read property 'ctrlKey' of undefined
at settings-extender.js:89
at Array.reduce ()
at modifiersEqual (settings-extender.js:88)
at eventIsForBinding (settings-extender.js:97)
at Function.KeyBinding.eventIsForBinding (settings-extender.js:206)
at index.js:9

Roof and Overhead Tiles

So there is a module called roof and overhead tiles that creates a roof tile layer that becomes transparent when a player's token is under them. And dungeondraft just recently updated to provide a roof tool, is there any chance that dungeon draft imports could create roof tiles when that module is present?

DD Import Issue

It appears that I am unable to upload maps with the site lines in ver 7.3 of Foundry VTT. It continues to operate correctly when I revert to 6.6

DungeonFog support

Hi!

I'm a developer at DungeonFog currently working on our VTT export format for Foundry.
To make implementing this easier and gain wider support faster, we've chosen to use a similar format that Dungeondraft has already established.

We are just starting with this and right now the only difference between our files and the ones from Dungeondraft is the file ending (.df2vtt instead of .dd2vtt). We would possibly like to contribute at least the change to add this format to the file selection dialog filter to this importer.

Since it would be a bit of a marketing issue to tell our users to "use the Dungeondraft importer", we've thought about how to work around this; there would be three options, that we would love to discuss with you:

  • Your current importer (at least in the metadata) gets renamed to "Battlemap Importer", "DungeonFog/Dungeondraft Importer" or something similar - by this your importer would become more "universal" and could support two different map companies.
  • You publish this module a second time, with only the name/description changed to "DungeonFog Importer"
  • We (DungeonFog) create a downstream fork of this repo where we - for now - only change the name and the description, and we publish it as our own Importer (of course with credit going to the original developers).

To keep it simple and move fast, we would probably start with the last approach, but we can contribute our minimal changes back to the upstream later.

Which of these options sounds the best to you (@ the developers of this importer)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.