Terraria World Parser
Terraria 22.214.171.124 world parser in the Swift programing language
NOTE: Only Terraria 126.96.36.199 -188.8.131.52 is supported!
NOTE 2: Saving the edited world is not yet supported but will be soon.
This is a swift package. Add as a dependency in your project to use it. There is an experimental windows version available in the windows branch. An example can be found in example.swift
You can then open a world file by the following:
let path: String = "/Users/Xenoxiluna1/Desktop/test2.wld" let nsData = try Data(contentsOf: URL(fileURLWithPath: path)) var world: WorldFile = WorldFile(data: nsData) try world.parseWorldFile()
The world version is expected to be 194 or higher. Please be aware that this parser will fail if the world does not meet that condition.
Terraria World Parser is licensed under the MIT License