Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terraria-pc-player-api-1.2.1.tar.gz (22.1 kB view details)

Uploaded Source

File details

Details for the file terraria-pc-player-api-1.2.1.tar.gz.

File metadata

File hashes

Hashes for terraria-pc-player-api-1.2.1.tar.gz
Algorithm Hash digest
SHA256 a35d6187bd5dca2db8fa9471fc0410bc0d9bce757f4483a301958b8085fdf05e
MD5 1ed9381bbf4ab4ddea20e3eb514099c3
BLAKE2b-256 eb0b593052def645bd77a56d47edef9056a1196220b95c692c8856c8adaadb55

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page