Crates.io | terra-plr-xbox360 |
lib.rs | terra-plr-xbox360 |
version | 0.1.0 |
source | src |
created_at | 2024-12-08 18:39:40.056356 |
updated_at | 2024-12-08 18:39:40.056356 |
description | Xbox 360 terraria player parser |
homepage | |
repository | https://gitlab.com/terra-conv/terra-plr-xbox360 |
max_upload_size | |
id | 1476541 |
size | 98,708 |
Library for reading and modifying terraria xbox 360 player files.
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);
AGPL v3+ © Filip K.