API for reading and modifying PC terraria player files.
Project description
terraria PC player API
API for reading and modifying PC terraria player files.
Examples
Change player max life to 300
>>> import terraria_pc_player_api
>>> player = terraria_pc_player_api.TerrariaPCPlayer("PLAYER1.PLR")
>>> player.max_life = 300
>>> player.write_to_file("PLAYER1.PLR")
Set 999 dirt items to first inventory slot
>>> import terraria_pc_player_api
>>> player = terraria_pc_player_api.TerrariaPCPlayer("PLAYER1.PLR")
>>> player.inventory[0][0] = terraria_pc_player_api.Item(2, 999, 0)
>>> player.write_to_file("PLAYER1.PLR")
Read player name
>>> import terraria_pc_player_api
>>> terraria_pc_player_api.TerrariaPCPlayer("PLAYER1.PLR").name
'test_plr'
Dependencies
Installation
pip install terraria-pc-player-api
License
GPL v3 © Filip K.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file terraria-pc-player-api-1.2.1.tar.gz
.
File metadata
- Download URL: terraria-pc-player-api-1.2.1.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a35d6187bd5dca2db8fa9471fc0410bc0d9bce757f4483a301958b8085fdf05e |
|
MD5 | 1ed9381bbf4ab4ddea20e3eb514099c3 |
|
BLAKE2b-256 | eb0b593052def645bd77a56d47edef9056a1196220b95c692c8856c8adaadb55 |