Python API for ark automation
Project description
ark-api
ark-api is an easy to use, fully open-source package to help you automate tasks in Ark: Survival Evolved.
Installation
ark-api is is available on pypi and can be downloaded using pip, note that python 3.10+ is required.
pip install ark-api
Features
- Pythonic representations of various in-game objects.
- Full control over the player movements.
- Reading of in-game settings / keybinds from ark .ini files.
- Server queries for server status, day, IP, port..
- Item representations (and the recipes to craft them)
- Tools to calculate the maximum amount of items craftable with a map of materials
- Lots of control over inventory interactions
- Grabbing of the ark boundaries / scaling to resolution
Examples
Alot of examples how to use the ark-api can be found in the ark-gacha-bot I am providing, as it is heavily based on the ark-api.
First steps
First, we need to set the path to the ark directory, so it can load the .ini files.
from ark import config
config.ARK_PATH = "C:\..."
Controlling the player
from ark import Player
player = Player(health=300, weight=800, food=100, water=100)
# turning the player
player.turn_x_by(90)
player.turn_y_by(-20)
# walking with the player
player.walk("w", duration=2)
Making a small script
Let's make a small script to automate the process of filling a forge with metal from a dedicated storage!
from ark import Player, TekDedicatedStorage, IndustrialForge, items
player = Player(300, 800, 100, 100)
dedi = TekDedicatedStorage()
forge = IndustrialForge()
dedi.open()
dedi.transfer_all()
dedi.close()
player.turn_x_by(100, delay=0.5)
forge.open()
player.transfer_all(items.RAW_METAL)
forge.turn_on()
forge.close()
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
Built Distribution
File details
Details for the file ark-api-1.3.3.tar.gz
.
File metadata
- Download URL: ark-api-1.3.3.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8fb631cf4899e33aa655b44011c8087c7efbeded70ea949edb6fe89f0b525aa |
|
MD5 | 9284bc1decee326ae8a678855d8a814b |
|
BLAKE2b-256 | 7be6edbbf1d14defb872e1a7b6f611374713ac931b63ef736d957800c8e57e8c |
File details
Details for the file ark_api-1.3.3-py3-none-any.whl
.
File metadata
- Download URL: ark_api-1.3.3-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ace6fd922ac50a026033d19fca0ac160a7c3496af44b476b6e57ff51bc3c163 |
|
MD5 | e7633392771392e6387d79992b4978db |
|
BLAKE2b-256 | 3ebc81a66443394ecf5ae6477b44848b9106eb5dee18266f7a71b38f206831ba |