

The above code is located in the file "Terraria_WorldFile.cs", in the function "public static void LoadWorldTiles(BinaryReader reader, bool importance)". So far I haven't found any error while reading world files, but I can't totally say that there isn't any error.

I'm not sure if I ported this well or not, so here is what I've done:Įlse if (num3 = 1) num3 = reader.ReadByte() Note: ILSpy returned some weird code, and I'm not sure if I translated it correctly. They were decompiled with ILSpy using the Terraria version 1.4.4.9 v4, so right now it's up to date.Īlso the code includes the colors of all the blocks (or tiles), and those were calculated with several functions designed by Jupisoft: first the original block textures were exported to PNG from the "Content" folder of Terraria itself thanks to the "XNA Extractor" by Jupisoft (also included in the "Minecraft Tools" by Jupisoft), and then the average color of each texture was calculated with the function "Obtener_Color_Medio_Imagen(), included in this source code".įor copyright reasons no original Terraria image or resource was included in this release, and the included code mentioned above was the minimum necessary to be able to properly read the world files.


To generate a world map, you can also just navigate to your Terraria world files, usually at your documents folder, then "My Games", then "Terraria" and finally "Worlds", then just select the world you want and drag and drop it to this application window, then just wait a few seconds.Īll the included source code files with a name that starts with "Terraria_" contain parts of the original source code of Terraria and are needed to be able to read the world files exactly as Terraria does. Loads Terraria worlds as read-only and generates full world maps as images, it also displays world and blocks info
