ARKpy is a library for reading and writing the file formats of ARK: Survival Evolved with Python. ARKpy does not simply look for the offsets of particular strings to find the data (like other existing libraries/scripts), but implements the complete file protocol that reads the entire data structure of the file into memory.
For those interested in the reverse engineering of the file types, the complete specifications can be found among the library docs here. I also plan on writing a Blog post detailing my process of reverse engineering the formats, which I will include a link to in this page once it’s finished.
Ark: Survival Evolved is a open-world, survival pvp game. Basically that means, you play as a character starting from scratch and will have to fight, build, and tame your way to primacy against (or in cooperation with) many other players. In Ark, players tame Dinosaurs, Form Tribes and Alliances, Build Strongholds, and Wage War all in a persistent world.
Ark has a few file formats that are used to serialize game state, configurations, and other data. These include:
.arkcharactersetting
: These files describe the templates, or saved presets, that you can choose to quickly create a character off of on the character creation screen. They are relatively simple and contain no compressed data..arkprofile
: These files contain all the data relevant to the player character, apart from things handled at the world level like Inventory and Position..arktribe
: These files contain data about a Tribe, which includes things like the Creator/Owner of the Tribe, it’s members, and what alliances it may belong to. Also includes a limited chat log of in game messages sent to the Tribe Chat..ark
: These files describe the state of the world (the server in question), and includes all of the existing entities and their positions. Things like player bodies, structures, tamed and untamed dinosaurs.Arkpy provides support for reading all of these filetypes except the world .ark
file.
pip install arkgamepy
For the following example I’m going to try and read in my SinglePlayer Ark characters .arkprofile, and display some information about the character
from arkpy.ark import ArkProfile
from arkpy.ark import BoneMap, StatMap, BodyColorMap
file_path = 'data/SavedArksLocal/LocalPlayer.arkprofile'
profile = ArkProfile(file_path)
print 'Character Name: %s' % profile.character.name
print 'Level: %s ' % 1 + profile.character.level_ups
print 'XP: %s' % profile.character.experience
print 'Engram Points: %s' % profile.character.engram_points
# Get all the allocated Stat points and print them
stats = profile.character.stat_points
for stat in StatMap:
print '%s: %s' % (stat.name, stats[stat])
# Print all the bone modifier values, which are basically what the character looks like
bones = profile.character.body_modifiers
for bone in BoneMap:
print '%s: %s' % (bone.name, bones[bone])