https://github.com/g1org1owo/wolfrpg-map-parser
Parser for Wolf RPG Editor map files
https://github.com/g1org1owo/wolfrpg-map-parser
Last synced: 3 months ago
JSON representation
Parser for Wolf RPG Editor map files
- Host: GitHub
- URL: https://github.com/g1org1owo/wolfrpg-map-parser
- Owner: G1org1owo
- License: mit
- Created: 2024-09-22T10:18:37.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-02-21T15:19:40.000Z (4 months ago)
- Last Synced: 2025-02-21T16:29:02.725Z (4 months ago)
- Language: Rust
- Homepage:
- Size: 506 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Parser for Wolf RPG Editor map files
====================================
[](https://github.com/G1org1owo/wolfrpg-map-parser)
[](https://crates.io/crates/wolfrpg-map-parser)
[](https://docs.rs/wolfrpg-map-parser)
[](https://github.com/G1org1owo/wolfrpg-map-parser/blob/main/LICENSE)
The aim of this crate is to allow users to easily parse Wolf RPG Editor map (`.mps`) files and expose a complete
interface to enable interaction with each component of a map, from the tiles to the events.This package includes both a library crate that parses the map into a tree of rust structs and a binary crate that
outputs the result in JSON format.## Usage
You can run the standalone directly through Cargo:
```bash
$ cargo run --project wolfrpg-map-parser --bin wolfrpg-map-parser --features="serde"
```Or you can add the crate and import the needed modules:
```rust
use wolfrpg_map_parser::Map;fn main() {
match fs::read("filepath.mps") {
Ok(bytes) => {
let map: Map = Map::parse(&bytes);// Data manipulation ...
}
Err(_) => {
// Error handling ...
}
}
}
```