We all know that trying to create a map, a poster or a drawing is not an easy task in PlaneShift. The in-game editor lacks some basic features, such as rotation, grouping or alignment. But don't despair, creating content with some outside tool and converting it to a format that the game can import is not impossible!
The process is rather straightforward:
- Create a drawing using simple elements available for use in the integrated editor: straight lines and two-point bezier curves.
- Export the drawing to Scalable Vector Format, or SVG.
- Use a tool to convert the SVG file to XML the PS Editor can parse.
- Load your new XML file to PS.
- Edit the drawing to add text or icons, modify line colors etc.
- Finish editing, and save your masterpiece!
Now you can give your new drawing or map to other characters in-game, post it on message boards, or do anything else your character desires with it!
For the first step, I use an open source diagram editing program,
DIA. You can download DIA from
here.
After you are done installing, it is time to open the program and create your first drawing. To be able to import your drawing to PlaneShift, you should only use two tools from the tool palette: Line (shortcut: "L") and Bezierline (shortcut: "C"). These two will appear familiar to anyone who has tried creating drawings in the PS map editor. For best results, set the line width to minimum (select the thinner line or enter "0" as the line width in properties.) DIA offers a set of tools such as grid and object snapping, grouping, copy/paste and zooming.
One more thing to note is the blue lines defining page borders in your drawing. For best results, try to start your drawing into the first page, the one with (0,0) as upper-left corner coordinates, and remain within pages with positive coordinates.
Once you are done drawing, it may be a good idea to save the document in the native format, to be able to make modifications later on as needed. So select "File" -> "Save" and save your image with a .dia extension.
Now you need to export your drawing to SVG format. Go to the menu and select "File" -> "Export". In the export dialog make sure you select "Cairo Scalable vector graphics (*.svg)" in the "Determine file type:" drop down within "Export Options".
Step 3 requires the use of a tool to convert the SVG to XML that can be imported by the PlaneShift Map editor. You need to download the tool from
here.
To run this tool, you need a BASH shell. Windows 10 is supposed to provide a BASH compatible shell. Older versions of Windows could support a BASH shell through
Cygwin. Most Linux distributions also provide BASH by default. On a MAC, MacOS should also provide a BASH compatible shell.
In addition, you need to have SED installed and available in your BASH PATH. With everything but Windows 10 embedded BASH shell, you need to find and install an appropriate package for SED. Note that most Linux distributions will have SED installed by default. If not, you will need to search on the internet for instructions on how to install SED and include it in your path.
Once you have everything set up, you can save the tool in the same directory as your SVG drawing. Open a terminal, and use the command line to change to the directory containing the script and the SVG. Then run a command like the following:
./transform_svg.sh diagram.svg > diagram.xml
Copy diagram.xml to the sketches local PlaneShift directory (~/.PlaneShift/sketches under Linux). Then fire up PlaneShift, open a map, edit it and import diagram.xml. You may need to adjust the map size by dragging at the handle on its lower right corner.
As a final note: If the diagram needs to be scaled, open the original document again in DIA, go to File -> Page Setup, and in Scaling select Scale and change the scaling percentage to adjust the size of the output drawing. Increase the scaling to make the drawing larger, decrease to make it smaller. Re-export the drawing to SVG and repeat the process until you are satisfied with the results.
For an alternative method of converting SVG to Map XML, you can also read
this thread.