#far #parser #sims

sims-far

A library to parse The Sims 1 .far files

4 stable releases

1.3.0 May 20, 2023
1.2.0 May 20, 2023
1.1.0 May 19, 2023
1.0.0 May 7, 2023

#7 in #far

47 downloads per month

MIT license

19KB
133 lines

Contains (rust library, 10KB) libdoc.rlib

sims-far

A Rust library to extract data from The Sims 1 UIGraphics.far files.

Installation

cargo add sims-far

Usage

Extract all contents of the far file:

use sims_far::Far;
use std::fs::File;

let far = Far::new(r"C:\Program Files (x86)\Maxis\The Sims\UIGraphics\UIGraphics.far");

for manifest_entry in far.manifest.manifest_entries {
    let mut f = File::create(manifest_entry.file_name).unwrap();
    f.write_all(&manifest_entry.get_bytes()).unwrap();
}

Dependencies

~245–700KB
~16K SLoC