Consider merging Terraria World Creator with this one?

Sep 10, 2011 at 3:50 AM

Seems like they are both perfectly useful functions, so why not try to integrate the PNG2World functionality into this tool?  This tool seems to be updated a bit more, so maybe it should live here.  Since the other one is a fork, porting the code over would be relatively easy.

I'm trying to use this creation tool, along with Games::RolePlay::MapGen, to create mazes within Terraria, so I'm highly interested in getting some good development going with this.

Sep 10, 2011 at 5:05 AM

PNG2World will never see the light of day in MoreTerra as it's a flawed idea in the first place.

Terraria worlds have three layers of things that can sit in a single square on the map and it's completely possible for all
three to be visible at the same time.  This would be an area with a background wall, a table and it's underwater.  As of right
now only one color can be posted a single pixel on the map.  It currently favors water, then the table then the wall so where
water exists the other two would end up empty.  And if the water is only a tiny bit on the square there is no way to tell from
a single pixel of color. 

Also right now MoreTerra shows no difference between a Torch and a Chandelier in it's colors so there's no way to tell
which one it was supposed to be when recreating the world.  Nor does an image save the information about things
such as what is found in chests, the last known time of day or how many enemies are left in that goblin invasion. 

In order to fix this I would have to hide the data for all three layers in the picture.  This would either mean the colors would
have to make no sense at all or I would have to draw four pixels per every tile, making the PNG much larger.  While this would
work it would make editing an image to change your world much more complicated to the point where no one would want to
do it.

It would honestly be easier for me and the users to simply create a world editing program than it would be to try and implement
such a thing.  So far someone has made one and while it might not be quite what I'd want to see in an editor it certainly beats
trying to turn a picture into a World file.  The one I am talking about is Tedit from BinaryConstruct.  Give this a shot and see if it
would work well for you.

Sep 10, 2011 at 2:04 PM

The current 2.0 Terraria World Creator does at least has a 2nd wall image to provide a second layer, though I forgot that liquid adds a third layer to the mix.  He also built Chest/NPC/Sign information as separate files.  While it's a little messy (and the interface seems to be a bit buggy), it does provide a medium to build a map in one place and convert the information into a *.wld file.

My challenge is that I'm writing a Perl module (or some expansions to existing Perl modules) to produce a PNG image and the other files, so that they can be used in TWC.  However, TWC seems to be somewhat abandoned or at least not as well developed as this app.  I could make the leap to create pure *.wld files.  The file format isn't that bad, but there are some complexities with what it required to make full objects work, such as the size of a door/tree/vine, what soil is required for which plants, roots, and what is considered "important" for extra X/Y data.  (Actually, you're keeping track of the latter in tileTypeDefs, so I may be okay there.)  I may just have to bite the bullet and dive into the other half of TWC/WorldMapper.cs/AnalyseWorld to figure out what needs to be adjusted before the *.wld file creation.