#parser #r2k #rpgmaker2000

nightly lcf

Bidirectional parser for the lcf file format used by RPG Maker 2000 games

13 releases (7 breaking)

Uses new Rust 2024

new 0.8.2 Nov 5, 2025
0.7.0 Oct 14, 2025

#2065 in Encoding

Download history 112/week @ 2025-08-09 142/week @ 2025-08-16 17/week @ 2025-08-23 6/week @ 2025-08-30 123/week @ 2025-09-13 134/week @ 2025-09-20 144/week @ 2025-09-27 167/week @ 2025-10-04 649/week @ 2025-10-11 61/week @ 2025-10-18 163/week @ 2025-10-25

1,044 downloads per month

MIT/Apache

135KB
3.5K SLoC

lcf-rs

A bidirectional parser for the lcf file format used by RPG Maker 2000 games.

Rust port of the C++ library EasyRPG/liblcf, which is licensed under MIT.

JavaScript bindings are available with lcf-js.


lib.rs:

Lcf-rs

Lcf is the file format used by the RPG Maker 2000/2003 game engine.

Each of the different file types is in a module with its extension as the name:

The crate::Lcf enum contains all of the above 4 types as variants and can be used if the exact one is not known ahead of time.


The above 5 types are wrappers around their corresponding structs in the crate::raw module:

All of the raw structs implement binrw::BinRead and binrw::BinWrite, as well as From and TryInto for their wrapper.

Example

use lcf::ConvertExt as _; // Bring the conversion trait into scope for wrapper formats.

let bytes = std::fs::read("RPG_RT.ldb").expect("file exists");
let mut reader = std::io::Cursor::new(bytes);
let database = lcf::Lcf::read(&mut reader).expect("valid lcf file");
assert!(matches!(database, lcf::Lcf::DataBase(_)))

Disclaimers

  • This crate is currently incomplete, some fields are left as uninterpreted byte arrays.
  • The raw structs can complete round trips successfully but the managed structs lose information.
  • RPG Maker 2003 features are entirely unsupported.
  • Save data is completely unimplemented.

JavaScript bindings are available with lcf-js.

Additionally see lcf-explorer and d2k for full examples.

Dependencies

~0.8–1.6MB
~31K SLoC