Skip to content

spalter/sc2k-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SC2K Library Rust

Simple project to read and convert SimCity 2000 files written in Rust.

Disclaimer

This is an unofficial project not related to Maxis or SimCity 2000. The source code can be found here. The information in this file does not originate from Maxis, any Maxis employee, or any signatory of a non-disclosure agreement with Maxis, and neither make any claims as to its accuracy or usability for any purpose.

Usage

Debug information

This will output the debug information in the console. The city name and a few stats, but no tile information.

./sc2kcli -d [.SC2]

JSON output

This will output a JSON representation of the file in the console.

./sc2kcli -j [.SC2]

Lib usage

The library is split into two parts, a CLI part and a Rust crate. Simply create a new struct with the SC2KFile::from("path") function. More details can be found in the rust docs.

use sc2klib::sc2kfile::SC2KFile;

let city_data = SC2KFile::from(String::from("assets/Utopia.sc2")).unwrap();
println!("{:?}", city_data.to_json());

Credits

All implementation details came from the following two sources. They did a great job documenting the file specs!

About

Simple lib to work with SimCity 2000 save files.

Resources

License

Stars

Watchers

Forks

Contributors

Languages