Sign in to follow this  
Captain_Chaos

WorldPainter to Wurm Unlimited converter

Recommended Posts

Hi guys,

I made a simple converter for converting WorldPainter worlds to Wurm Unlimited maps. It used to be a stand-alone command line tool, but is now a WorldPainter plugin that adds the possibility of exporting worlds to Wurld Unlimited maps directly from WorldPainter. If you're interested, please test it out and let me know what problems you encountered and what feature ideas you have.

What it does:

  • Exports WorldPainter worlds (.world files) as Wurm Unlimited maps (a collection of .map files for now) using the API.
  • There are three scaling modes:
    • Minecraft - This mode retains the same real-world scale and enables worlds created for Minecraft, or imported from Minecraft, to be converted to Wurm Unlimited. Since Wurm Unlimited's horizontal resolution is lower than Minecraft's this means that every four by four block patch of the WorldPainter world will be converted to one tile in Wurld Unlimited, with the average height of the blocks in World Painter, and the terrain type that is most prevalent on that patch in WorldPainter. Every one block of height difference in WorldPainter translates to ten dirts in Wurm Unlimited.
    • Wurm Unlimited Unscaled - Every 1x1 m block in WorldPainter becomes one 4x4 m tile in Wurm Unlimited, resulting in a real-world scaling up by a factor of four. This means the WorldPainter world can be much smaller, but it does mean that slopes will be exagerated in WorldPainter and distances reported incorrectly. The vertical scaling remains the same: every block of height difference translates to ten dirts.
    • Wurm Unlimited Scaled - The horizontal scaling is the same as for Unscaled (each block becomes one tile), but the vertical distances are multiplied by four in the export, so a meter of height in WorldPainter becomes four meters (40 dirts) in Wurm Unlimited. This means that the slopes will be displayed correctly in WorldPainter, but also that heights reported in WorldPainter are only a quarter of what they will be in Wurm Unlimited.

Note: I recommend that you use the Minecraft scaling mode, which is the default, because then WorldPainter works best, with distances and heights displayed and reported correctly in the editor, filters working as expected, and generally the least amount of surprise and confusion. The downsides are that it uses a large amount of memory since the resolution is sixteen times higher than necessary, and that you lose resolution in the export. In practice the latter isn't really that noticeable though.

  • Any terrain type or material that Wurm Unlimited doesn't have is converted to its nearest equivalent, or to dirt.
  • Tile types that Minecraft doesn't have are supported by creating Custom Terrain types with special names. Currently supported are "W:Steppe" (without the quotes) for steppe and W:Tundra for tundra.
  • For a complete overview of how the terrain types are mapped, see this post.
  • The Frost layer is supported, and will result in snowy tiles (but not in ice on the water since Wurm Unlimited doesn't have that).
  • The tree layers (Deciduous, Pine, Swamp and Jungle) are also supported. Deciduous places birch, oak, maple, chestnut and linden trees; Pine places cedars, pines and firs; Swamp land places willows and changes grass and dirt tiles around the water level to marsh and Jungle places apple, lemon, olive, cherry and walnut trees (orchards in other words). All tree layers also place bushes of every type.
  • Other layers are not supported and are ignored for now.
  • Resources and caves are not yet supported.
  • Water at any other level than the default water level is not supported by Wurm Unlimited. The default water level is the level you configured on the New World or Import Height Map screen in WorldPainter; you can change it from the level suggested by WorldPainter if you want.
  • The rock layer is supported. Its depth follows the top layer depth settings in the dimension properties in WorldPainter (Ctrl+P).

What it does not:

  • Convert Minecraft maps. You can however first import a Minecraft map into WorldPainter and then export that to Wurm Unlimited using this plugin. It's a crude mechanism and you will lose things like trees in the process though.

How to use:

  • Make sure you have Java 8 or later installed, and the latest version of WorldPainter.
  • Download the plugin from here. Do not extract it!
  • From WorldPainter, open the plugins folder via the Tools menu.
  • Place the downloaded file in the plugins folder and restart WorldPainter.
  • Load or create the WorldPainter world you want to export.
  • To export the world to Wurm Unlimited, open the Export World screen by press Ctrl+E, choosing the Export tool on the toolbar (the map with a green arrow pointing away from it) or using the menu: File -> Export -> Export as new Minecraft map...
  • Select the name and directory where you want the map to be created.
  • Select Wurm Unlimited as the Map Format.
  • To start the export, press the Export button.
  • On the Wurm Unlimited Export Settings screen, select the scaling mode you want to use (see above). "Minecraft" is the recommended scaling mode, as it keeps the scale the same as in Minecraft, and slopes, heights and distances will be reported correctly in WorldPainter (in blocks/meters). But remember to create WorldPainter worlds four times as large as the number of Wurm Unlimited tiles you want.
  • To play, copy the Creative map to a new map in the dedicated server window and copy the generated *.map files over the ones in the copied map.

Notes:

  • The converter supports any size world, but for a good match you should stick to the possible Wurm Unlimited map sizes. Don't forget to multiply the number of tiles by four if you're using the Minecraft scaling mode (the default)! In other words, create square maps that are 4,096, 8,192, 16,384, 32,76865,536 or 131,072 blocks to a side (those last three will be very large and might be a challenge to create in WorldPainter) for Minecraft scaling mode, or 1,024, 2,0484,0968,19216,38432,768 blocks to a side for Wurm Unlimited scaling modes.
  • Make sure that your map is an island; in other words that the outside edges are all water.
  • WorldPainter supports creating maps of up to 2048 blocks (20480 dirts) high! There is a height setting on the New World screen as well as the Import Height Map screen that allows you to select a different maximum terrain height than the Minecraft default of 256.
  • Note that if you use the Wurm Unlimited Scaled scaling mode the Wurm Unlimited map can even be 81,920 dirts high, which is higher than possible with the Wurm Unlimited map format. The theoretical limit is 32,767 dirts, in practice it has been reported that heights above about 20,000 dirts are problematic. That means that when you use the Wurm Unlimited Scaled scaling mode you should keep the maximum terrain height (relative to the water level) below about 500 blocks in WorldPainter!
  • Note that when you change the maximum height, WorldPainter also adjusts the default terrain and water levels to about half the new maximum height. If you find them too high, you can change them back to lower values if you want.

 

Edited by Captain_Chaos
It's now a plugin
  • Like 4

Share this post


Link to post
Share on other sites

okay i made my world in the painter  and have it in the same folder as the .jar i downloaded but when i click the .jar file it does not do anything. I just downloaded the newest java 8 this morning so i am not sure what is going on. 


 


Also you say that the default water is needed what level do i need to set the water too in the world painter for it to work? 


Edited by Kegan

Share this post


Link to post
Share on other sites

okay i made my world in the painter  and have it in the same folder as the .jar i downloaded but when i click the .jar file it does not do anything. I just downloaded the newest java 8 this morning so i am not sure what is going on. 

 

Also you say that the default water is needed what level do i need to set the water too in the world painter for it to work? 

Why are you clicking the .jar file, instead of following the instructions? ;)

 

As to the default water level: "default" means that you don't have to change the setting, you can accept what WorldPainter suggests (which is the Minecraft default of 62).

Share this post


Link to post
Share on other sites

Are you noisily interpolating heights so that it does not look minecraft blocky from the block is 10 dirts limitation? Can you make the option to not do the 4x4 blocks is averaged into one tile and make it one block is one tile, then you could make a 2kx2k minecraft world and import it directly as a 2kx2k Wurm island, and rescale heights accordingly. Are you using the latest WurmAPI to generate .maps, there have already been some bug fixes to it.  


 


Also see AK_ image uploader code if you want to save it as PNG files so it can be imported into other editors/generators or cleaned up in paint programs


 


https://github.com/aekazakov/WurmMapUploader


Edited by yarnevk

Share this post


Link to post
Share on other sites

Are you noisily interpolating heights so that it does not look minecraft blocky?  Are you using the WurmAPI to generate .maps, there have already been some bug fixes to it and you should use it and not generate .maps directly as it checks that you are making legit map files.

 

I don't have to, for several reasons: every four by four patch of Minecraft blocks is averaged to one tile so there is a smoothing effect, Wurm adds noise to the terrain, and WorldPainter actually has a higher internal precision than Minecraft so it can generate smoother terrain than is possible in Minecraft. And yes, I am using the API (as stated in my post ;)).

Share this post


Link to post
Share on other sites

Wurm bumpmaps the internal details of the tiles based on the terrain type - like sand is flat gravel is bumpy.  But it does not noise/smooth up the height map itself based on surrounding biomes, if height is bumpy where you put sand, then you will have bumpy sand.


 


I understood from your post 1 height step is converted to 10 dirts, it is is higher precision than minecraft why not 1 height is 1 dirt?


 


The smoothing effect of 4x4 averaging is why I suggest the option of 1 world painter tile is 1 wurm tile.


Edited by yarnevk

Share this post


Link to post
Share on other sites

I understood from your post 1 height step is converted to 10 dirts, it is is higher precision than minecraft why not 1 height is 1 dirt? The smoothing effect of 4x4 averaging is why I suggest the option of 1 world painter tile is 1 wurm tile.

 

The answer to both questions is: because WorldPainter is a Minecraft map generator, and those are the scales of Minecraft. Making the scale different for Wurm Unlimited would be counterintuitive and would mean you could not export existing WorldPainter worlds made for Minecraft, or existing Minecraft maps imported into WorldPainter, as Wurm Unlimited maps (which you can now do). As I said, the internal precision of WorldPainter is higher than Minecraft, so it can generate smooth terrain using all ten dirts per meter. It works well, and it looks quite nice I think, why not give it a try?

Share this post


Link to post
Share on other sites

It works really well!  I created a quick 4096x4096 map in World Painter, not much detail or time spend other than making some islands.  Converted the .world file and started up a new dedicated server to test it out.


 


Not sure if you've mapped clay and tar to one of the Minecraft block types, but I couldn't see any way to add these vital tiles to a WU map.  This tool has some serious potential!

Share this post


Link to post
Share on other sites

Not sure one of the Minecraft block types, but I couldn't see any way to add these vital tiles to a WU map. This tool has some serious potential!

Share this post


Link to post
Share on other sites

Well, I don't personally consider them to be essential but to be complete there should be moss and peat.  I think the rest are represented.  I completely forgot about the clay blocks in Minecraft, so moss and peat might already be there too.  :)

Share this post


Link to post
Share on other sites

I completely forgot about the clay blocks in Minecraft, so moss and peat might already be there too. :)

They aren't. ;) I'll add those too.

Share this post


Link to post
Share on other sites

Awesome! Will use it, however I hope once it is well-tested, this functionality will be directly available in World Painter. I've also e-mailed creator of WP to see if he could make such functionality and he said he would, then after some back&forth regarding details, he said it could work. I'll give him link to this thread to see if he can merge this code.


Share this post


Link to post
Share on other sites

Hmm, I thought Captain_Chaos is the author of World Painter?

 

Yes, yes he is.

Share this post


Link to post
Share on other sites

They aren't. ;) I'll add those too.

Couldn't be mossy cobble be used in place of moss?

Share this post


Link to post
Share on other sites

Hmm, I thought Captain_Chaos is the author of World Painter?

Yeah, he is. It was cleared later via e-mail. Cheers!

Share this post


Link to post
Share on other sites

New release!


 


I refreshed the Wurm Unlimited converter; redownload it from the link in the original post. I made the following changes:


  • The different tree layers now place different types of tree:
    • Deciduous places birch, oak, maple, chestnut and linden trees
    • Pine places cedars, pines and firs
    • Swamp Land places willows and changes grass and dirt tiles around the water level to marsh
    • Jungle places apple, lemon, olive, cherry and walnut trees (so it creates orchards basically)
    • All tree layers also place bushes of every type

  • Podzol is now mapped to peat and Soul Sand to tar
  • Grass (but not Bare Grass) will now have random patches of moss, as will forests
  • Any unsupported materials and layers encountered are now reported as a warning
  • Bug fix: account for tile size difference when calculating WU map size

I don't actually play Wurm Online or Unlimited myself, so I can't judge its usefulness. I need your help to let me know what more functionality is needed to complete this tool!


Share this post


Link to post
Share on other sites

Couldn't be mossy cobble be used in place of moss?

 

Mossy Cobblestone is already mapped to rough cobblestone.

Share this post


Link to post
Share on other sites

Here is a complete overview of how the WorldPainter materials are mapped to Wurm Unlimited tile types:

 

Grass -> grass with patches of moss, tall or wild grass and flowers
Bare Grass -> grass
Beaches -> mix of grass, gravelsand and clay
Dirt, Tilled Dirt -> dirt
Permadirt -> packed dirt
Podzol -> peat
Sand, Desert, Red Sand, Red Desert -> sand
Stone, Obsidian, Bedrock, Sandstone, Rock, Netherrack, Netherlike, Resources, End Stone, Mesa, Red Sandstone, Granite, Diorite, Andesite, Stone Mix, all Ores, all Single and Double Stone and Sandstone Slabs, Prismarine -> rock, cliff (at angles > 45°)
Lava -> lava
Snow, Deep Snow, Ice, Packed Ice -> snow
Gravel -> gravel
Clay, Hardened Clay, all Stained Clays -> clay
Cobblestone -> cobblestone
Mossy Cobblestone -> rough cobblestone
Soul Sand -> tar
Mycelium -> mycelium
Wooden Planks, Single and Double Wooden Slabs -> planks
Custom Terrain named "W:Steppe" -> steppe
Custom Terrain named "W:Tundra" -> tundra

 

Materials not mentioned are not supported by WU at all and are converted to dirt tiles. Note that Custom Terrain types are supported, insofar as they consist of supported block types.

 

Not all Wurm Unlimited tile types are covered; let me know if any essential ones are missing!

Edited by Captain_Chaos
Fix formatting b0rked by forum

Share this post


Link to post
Share on other sites

If that's not a problem, could someone generate for me empty 32768x32768 (8192, xanadu size in wurm terms) .world file with following settings:


VQ1pHoQ.png


 


Water level is 1024 if anyone wonder. Because when I try, worldpainter just hangs and then crashes. So I think having a template of sorts would make this easier as you'd just copy world file, open it in WP, edit the map, save, export and import into wurm instead of having to generate it.


Share this post


Link to post
Share on other sites

You mean km or tiles?  World Painter is higher resolution than wurm so you realize you are asking for it generate something 16x bigger?  Although that would be a valid reason for my request to have it do 1x maps rather than smoothing out a 4x map.  


Edited by yarnevk

Share this post


Link to post
Share on other sites

Here is a complete overview of how the WorldPainter materials are mapped to Wurm Unlimited tile types:

 

Grass -> grass with patches of moss, tall or wild grass and flowers

Snow, Deep Snow, Ice, Packed Ice -> snow

Gravel -> gravel

 

tall/wild is part of grass life cycle not much point in varying it on a map because it will all eventually become wild once it grows in - nothing in the engine limits its life stage. It contributes to how much you get from forage/botanize and intended to make you explore if you harvest the grass.   It does not actually make a tile visual difference other than wild having more flowers if seeded with flowers (new grass shaders have been promised for years...), only the seasons change the actual grass textures .For a noob friendly map you would want it wild, but that only affects noobs that start with the server.  Rolf does not like to make it wild to give noob server starts a hard time.

 

snow is a deprecated tile nobody knows why or if game will crash or what

 

gravel is a road along with the cobbles, to make one players have to pack the dirt first, nnot sure how the engine will react if it is used as rocky terrain - it certainly is not noob friendly because they cannot remove or dig roads until very high levels.  Since beaches are a popular road place probably not a good idea unless you are actually porting over an actual road.  I personally like the idea of natural gravel and will use it on my own maps if it works because I prefer maps with challenges.  

 

You should also use dirt rather than grass for beaches, trees will expand to grass and grass expands to dirt, but not if any corner of the dirt is underwater (unless it is bugged again).  Keeps forest from going into the water (unless you want that for the marsh)

 

With marsh no matter what biome rules you use, if it neighbor is grass it will takeover and wogically march its way up a hill unless bounded by sand (or other tiles that stop flora expansion).  Since it can only be removed by covering with floorboards you want to make sure it cannot get loose,. I think trees have to grow on grass not sure if you can put trees on other ground types, may work but they may not regrow. I think WurmAPI enforces any flora on grass only.

Edited by yarnevk

Share this post


Link to post
Share on other sites

New release!

 

I refreshed the Wurm Unlimited converter; redownload it from the link in the original post. I made the following changes:

  • The different tree layers now place different types of tree:

    • Deciduous places birch, oak, maple, chestnut and linden trees

  • Pine places cedars, pines and firs

Swamp Land places willows and changes grass and dirt tiles around the water level to marsh

Jungle places apple, lemon, olive, cherry and walnut trees (so it creates orchards basically)

All tree layers also place bushes of every type

Podzol is now mapped to peat and Soul Sand to tar

Grass (but not Bare Grass) will now have random patches of moss, as will forests

Any unsupported materials and layers encountered are now reported as a warning

Bug fix: account for tile size difference when calculating WU map size

I don't actually play Wurm Online or Unlimited myself, so I can't judge its usefulness. I need your help to let me know what more functionality is needed to complete this tool!

 

Sweet!  One observation, moss is much too common and too evenly distributed.  It should probably be about 5% of what it is now and clumped into larger spots (3 to 8 tiles).

Share this post


Link to post
Share on other sites

You mean km or tiles?  World Painter is higher resolution than wurm so you realize you are asking for it generate something 16x bigger?  Although that would be a valid reason for my request to have it do 1x maps rather than smoothing out a 4x map.  

 

WorldPainter to Wurm requires a .world file that is 4 times bigger per side than the target WU size.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this