#level #save #online #parse #cnm #lparse #cnma

cnmo-parse

Utility to easily parse CNM Online game files

3 releases

0.1.2 Mar 11, 2023
0.1.1 Mar 11, 2023
0.1.0 Mar 11, 2023

#60 in #online

GPL-2.0-or-later WITH Bison-exception-2…

120KB
2.5K SLoC

A all-encompasing CNM Online lparse and cnma data format parser.

This crate allows one to load .cnmb/.cnms/.cnma files.

  • .cnmb/.cnms files are binary .lparse files and start with the bytes "CNML"
  • .cnma files are text files with a special format, kind of like .ini files

By default this crate only allows one to edit these files at the very lowest level (besides for cnma files which can already load in game configs), so if you want to load a cnm level file from an lparse file, you will need to specify certain crate features.

These features are:

  • "level_data" which adds in structs that represent all aspects of a CNM online level file, and has functions to save and load them from their respective .cnmb and .cnms lparse files.
  • "serde" which adds serde traits for said level data structs so that the level data can also additionally be saved to any other format that you want. This is NOT a serde implementation for lparse or cnma files (and you need "level_data" feature enabled already).

Heres the Github Link

Dependencies

~0.4–1MB
~23K SLoC