l4d2-addon-parser/README.md

721 B

L4D2 Addon Parser

A simple library that lets you parse l4d2 vpk files and extract useful information.

  • checksum (SHA256, SHA512) of VPK file
  • addoninfo.txt data (title, version, author, description, content types (weaon, campaign, sound, etc..))
  • mission data (coop campaign chapter ids)
  • check/set enabled addons

Usage

let file = File::open("addons/my-addon.vpk").unwrap();
let mut vpk = L4D2Addon::new(file).expect("failed to open vpk");
let info = vpk.info().expect("failed to parse addon").expect("addon does not include addoninfo.txt");
println!("Addon Title: {:?}", info.title);
println!("Addon Author: {:?}", info.description);
println!("Is Map: {}", info.content.is_map);

License

MIT