Git Product home page Git Product logo

r20converter's Introduction

Introduction

R20Converter is a Windows/Linux/Mac application that does the entire conversion from a Roll20 campaign (exported with R20Exporter) into a Foundry VTT world.

This tool is currently only available to my Patreon subscribers.

You can see it in action here : https://youtu.be/fngH2te2TJE

This repository is used for keeping track of issues and feature requests.

R20Converter

This application converts a Roll20 campaign into a Foundry VTT world or module.

It will automate the entire conversion process and all(*) of your campaign will be setup just the way it was in Roll 20

(*) While macros will be converted, they will be sent as chat message only, since inline rolls and other Roll20 specific macros are not supported in Foundry VTT. You also need to be using the OGL character sheet ("D&D 5e by Roll20") or the Shaped Sheet template for conversion of characters to work. This tool does not convert other character sheets, meaning that non-dnd5e games will have blank character sheets for actors and NPCs (though if a NPC of the same name exists in the system's compendiums, it will be imported from the game system compendium).

image

How to use

Follow the instructions from the demo video to see it in action and how to use it :

R20Converter 0.9 demo

Windows

This package comes with an executable for Windows. Simply open the R20converter.exe application and follow the instructions on screen to select your exported zip and convert it.

Mac OS X

Open the R20Converter application and follow the instructions.

Linux

If using Linux, you will need Python 3.6 or later to use R20Converter.

You can run it with python3 src/main.py in a terminal. Use the --help option to see which options are available to you during conversion.

Required dependencies are : requests, pillow, python-slugify and for the GUI eel

sudo pip3 install requests pillow python-slugify eel

If you are running raspbian on a Raspberry Pi, you may also need to run the command sudo apt-get install libopenjp2-7 to install one of the dependencies. In order to run the Graphics User Interface, you will also need to have python-tk installed. That one can be installed from your distribution's package manager using sudo apt install python3-tk or sudo dnf install python3-tkinter. Installing Google Chrome's browser is also recommended.

If no arguments are provided and the appropriate dependencies are installed, the program will launch in GUI mode.

Campaign Conversion

To convert a campaign, you first need to have your Roll 20 campaign exported. To do so, use the R20Exporter extension and follow its README instructions on how to use it.

Once you have your campaign exported as a ZIP file or a JSON file, you can start the conversion process. Note that you do not need to extract the campaign's zip file; R20Converter will work directly with the zip file itself to do the conversion.

You need to select your output directory. This should ideally be your existing local Foundry VTT installation. If you do not have Foundry installed locally, you can select any empty directory instead.

Final steps

When the script is done, your campaign will be converted and available to use in Foundry VTT.

The converted world will automatically enable the permission_viewer FVTT module in the generated world. It is suggested to have that module installed.

The permission viewer FVTT module is helpful for those coming from Roll 20 to see which handouts/character sheets are shared with whom.

If you use D&D Beyond, check out Beyond20, another project of mine which lets you roll from monster stat blocks and character sheets directly in D&D Beyond and get the result in your VTT application.

If you use The Forge for hosting your Foundry VTT games, then you can import your world folder using the Import Wizard.

r20converter's People

Contributors

kakaroto 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

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

palikhov

r20converter's Issues

Add option to minimize output size

lots of duplicated files (tokens and tiles mostly), it would be good to simply avoid that by using a common tiles dir and link directly to character tokens instead of copying them for the scene.

Potential new option for "Download remote assets"

Would it not be feasible to have an option in the converter setup screen to "Download remote assets".

This related to #45, where you could use the --json option to download every file.

Then you would get the best of both worlds - you can convert the existing files from the zip file and if the converter finds an URL - it will download the file instead of ignoring it or replacing it with mystery-man.svg for example.

Force slugify of world name

From @atropos
Issue Report / Feature Request
Worlds imported from Roll20 may have names which are not url-friendly and it seems the R20 converter does not rename the world when creating it via the import process. Please consider slugifying the world name and using that web-safe name for the imported content. FVTT tries to enforce this for worlds created within the app, so it would be nice if worlds created outside the app for import can abide by the same rules.

Imported World Name: Sunless Citadel
Preferred World Name: sunless-citadel

scene/character name can break image paths

If a character or scene name used in a os.path.join starts with a "/" or a "X:" (on windows) for example, then the previous elements are skipped. See LMoP on Windows, where "2: Cragmaw Hideout" for the scene makes all of its images saved in the world root dir instead of the scenes subdirectory.

Actors: items missing, wrong damage, etc..

From boovov: non Compendium items are all missing.
Weapons +1 lose their magical +1 damage
some other stuff is wrong too, check for attacks, and feats and compare character sheets.

contemplate cx_freeze or py2exe

Windows Defender is currently detecting pyinstaller generated .exe as a trojan virus. It is a false positive, but other py->exe converters might not have the issue and be worth switching to.

convert token GM Notes

Get text from GM notes of a token, create handout, place said handout in the map with GM only access... though it would be a pain lol

Create a simple GUI

Use of command line tools is nice but with the ever increasing options and not everyone being tech savvy, having a GUI would go a long way into making it more usable.

add selection for the system

Should allow users to specify a target system. If not dnd5e, don't export character sheets. Warn about this limitation for non-dnd5e.

Scene thumbnails are too big

Someone could have a few hundred MBs of scenes that get loaded in the sidebar when they open FVTT which can negatively impact performance.

From @atropos on Discord:

Bug Report (Suspected)
I was helping a user troubleshoot Foundry today, they had imported a world from R20 using this tool and they were having really bad performance. I got into their world and discovered that they had 50 scenes that were converted over, but each scene was using the full resolution image as the scene thumbnail. Overall it was close to 600MB of images that were being loaded as "thumbs" in the Scene sidebar.

I don't know if this is perhaps a bug with the converter, or something that went wrong in this particular user's case - but I wanted to point it out in case it slipped under the radar or is a new issue. Let me know if you need any more detail in order to look into it.

Update README on the full effects of using the --json option

From a reply about potential CORS issues when converting a campaign:

one way to avoid this problem with CORS, is to extract the campaign.json file from the exported zip, and convert that using the "use json" option in the converter.. then all the images will be downloaded by the R20Converter app, so CORS becomes irrelevant and all images (as long as they exist) would be downloaded and converted. It just means the conversion will take even more time as it will redownload everything.

The README could be improved with this information.
I've also tested this option and found that, indeed, the files that R20Exporter could not obtain were present and properly downloaded. Even if it does take more time it could be a good fallback option to try for those who used a lot of external assets in their R20 campaigns.

avoid setting background as tiles

If we find a graphics that doesn't match 100% but matches, let's say 95% of the size and is the only one that meets the criteria, then set it as background with a position shift.
Might be a bit tricky if the size doesn't match though, would need work through that somehow.

add option for url mapping

If some assets aren't available anymore because they moved, having an option to do a mapping of old url -> new url would be pretty cool to ease conversions

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.