terra-plr-xbox360

Crates.ioterra-plr-xbox360
lib.rsterra-plr-xbox360
version0.1.0
sourcesrc
created_at2024-12-08 18:39:40.056356
updated_at2024-12-08 18:39:40.056356
descriptionXbox 360 terraria player parser
homepage
repositoryhttps://gitlab.com/terra-conv/terra-plr-xbox360
max_upload_size
id1476541
size98,708
(Fili-pk)

documentation

README

terra-plr-xbox360

Library for reading and modifying terraria xbox 360 player files.

Examples

Change player max life to 300

let mut player = Player::read_player(File::open("PLAYER.PLR")?)?;
player.max_life = 300;
player.write_player(File::create("PLAYER2.PLR")?, *SUPPORTED_VERSIONS.end())?;

Set 999 dirt items to first inventory slot

let mut player = Player::read(File::open("PLAYER.PLR")?)?;
player.inventory[0][0] = Some(ItemSlot {
    item: Item::DirtBlock,
    prefix: None,
    count: PositiveI16::new(999).expect("In bounds"),
});

player.write(File::create("PLAYER2.PLR")?, *SUPPORTED_VERSIONS.end())?;

Print player name

let mut player = Player::read(File::open("PLAYER.PLR")?)?;
println!("{}", player.name);

License

AGPL v3+ © Filip K.

Commit count: 2

cargo fmt