#super #lib #smash #bros #brawl

brawllib_rs

Brawl character file parser, based on brawlbox/brawllib

12 releases (7 breaking)

✓ Uses Rust 2018 edition

new 0.8.0 Feb 17, 2019
0.7.0 Feb 15, 2019
0.6.0 Feb 10, 2019
0.5.1 Feb 8, 2019
0.1.2 Jan 17, 2019

#77 in Game engines

Download history 12/week @ 2019-01-06 41/week @ 2019-01-13 21/week @ 2019-01-20 15/week @ 2019-01-27 58/week @ 2019-02-03 26/week @ 2019-02-10

59 downloads per month

MIT license

321KB
6.5K SLoC

brawllib_rs Build Status dependency status Crates.io

A brawl character file parser, based on brawlbox/brawllib, written in rust.

Doesn't support modifying files, only reading them.

Example

In this example we:

  • Create a Fighter from an exported brawl fighter directory. This is the raw data from the fighter folder, stored in a tree of structs
  • Create a HighLevelFighter from an exported brawl fighter directory. This contains processed data from the Fighter struct, stored in a tree of structs
use brawllib_rs::fighter::Fighter;
use brawllib_rs::high_level_fighter::HighLevelFighter;
use std::fs;

for fighter in Fighter::load(fs::read_dir("some/real/dir/fighter").unwrap(), None, false) {
    println!("Fighter name: {}", fighter.cased_name);
    println!("The name of the first model file name: {}", fighter.models[0].name);

    let hl_fighter = HighLevelFighter::new(&fighter);
    println!("Hurtboxes on the 4th frame of 'Run' action {:#?}", hl_fighter.subactions.iter().find(|x| x.name == "Run").unwrap().frames[4].hurt_boxes);
}

Documentation

Refer to docs.rs for the full API.

Dependencies

~4MB
~71K SLoC