Swiftpack.co - Package - Xenoxiluna/Terraria-World-Parser

Terraria World Parser

Terraria 1.4.0.5 world parser in the Swift programing language

NOTE: Only Terraria 1.3.5.3 -1.4.0.5 is supported!

NOTE 2: Saving the edited world is not yet supported but will be soon.

Usage

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

import TerrariaWorldParser

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.

Dependencies

References

License

Terraria World Parser is licensed under the MIT License

Github

link
Stars: 0

Dependencies

Used By

Total: 0

Releases

v0.2.5 - 2020-10-04 18:44:03

Updated SwiftyBytes Dependency

v0.2.4 - 2020-06-11 17:59:39

v0.2.3 - 2020-05-18 23:39:31

Fix Incorrect access level

v0.2.2 - 2020-05-18 23:33:35

Update for Terraria 1.4.0.2(WLD version 226)

Terraria World Parser v0.2.1 - 2020-05-08 17:41:28

Terraria World Parser v0.2.0 - 2020-05-07 22:27:57

Terraria-World-Parser-v0.1 - 2020-05-05 16:32:27