arkparser 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. arkparser/__init__.py +117 -0
  2. arkparser/common/__init__.py +72 -0
  3. arkparser/common/binary_reader.py +402 -0
  4. arkparser/common/exceptions.py +99 -0
  5. arkparser/common/map_config.py +166 -0
  6. arkparser/common/types.py +249 -0
  7. arkparser/common/version_detection.py +195 -0
  8. arkparser/data_models.py +801 -0
  9. arkparser/export.py +485 -0
  10. arkparser/files/__init__.py +25 -0
  11. arkparser/files/base.py +309 -0
  12. arkparser/files/cloud_inventory.py +259 -0
  13. arkparser/files/profile.py +205 -0
  14. arkparser/files/tribe.py +155 -0
  15. arkparser/files/world_save.py +699 -0
  16. arkparser/game_objects/__init__.py +32 -0
  17. arkparser/game_objects/container.py +180 -0
  18. arkparser/game_objects/game_object.py +273 -0
  19. arkparser/game_objects/location.py +87 -0
  20. arkparser/models/__init__.py +29 -0
  21. arkparser/models/character.py +227 -0
  22. arkparser/models/creature.py +642 -0
  23. arkparser/models/item.py +207 -0
  24. arkparser/models/player.py +263 -0
  25. arkparser/models/stats.py +226 -0
  26. arkparser/models/structure.py +176 -0
  27. arkparser/models/tribe.py +291 -0
  28. arkparser/properties/__init__.py +77 -0
  29. arkparser/properties/base.py +329 -0
  30. arkparser/properties/byte_property.py +230 -0
  31. arkparser/properties/compound.py +1125 -0
  32. arkparser/properties/primitives.py +803 -0
  33. arkparser/properties/registry.py +236 -0
  34. arkparser/py.typed +0 -0
  35. arkparser/structs/__init__.py +60 -0
  36. arkparser/structs/base.py +63 -0
  37. arkparser/structs/colors.py +108 -0
  38. arkparser/structs/misc.py +133 -0
  39. arkparser/structs/property_list.py +101 -0
  40. arkparser/structs/registry.py +140 -0
  41. arkparser/structs/vectors.py +221 -0
  42. arkparser-0.1.0.dist-info/METADATA +833 -0
  43. arkparser-0.1.0.dist-info/RECORD +46 -0
  44. arkparser-0.1.0.dist-info/WHEEL +5 -0
  45. arkparser-0.1.0.dist-info/licenses/LICENSE +21 -0
  46. arkparser-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,833 @@
1
+ Metadata-Version: 2.4
2
+ Name: arkparser
3
+ Version: 0.1.0
4
+ Summary: Pure Python parser for ARK: Survival Evolved and ARK: Survival Ascended save files
5
+ Author: Vertyco
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/vertyco/arkparser
8
+ Project-URL: Repository, https://github.com/vertyco/arkparser
9
+ Project-URL: Documentation, https://github.com/vertyco/arkparser#readme
10
+ Project-URL: Issues, https://github.com/vertyco/arkparser/issues
11
+ Keywords: ark,survival,evolved,ascended,savegame,parser,binary,ase,asa,game,save-file
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Topic :: Games/Entertainment
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Classifier: Typing :: Typed
25
+ Requires-Python: >=3.10
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=9.0; extra == "dev"
30
+ Requires-Dist: ruff>=0.15; extra == "dev"
31
+ Requires-Dist: build>=1.4; extra == "dev"
32
+ Requires-Dist: twine>=6.0; extra == "dev"
33
+ Dynamic: license-file
34
+
35
+ # ARK Save Parser
36
+
37
+ [![Python 3.10](https://img.shields.io/badge/python-3.10-blue?logo=python&logoColor=white)](https://www.python.org/)
38
+ [![Python 3.11](https://img.shields.io/badge/python-3.11-blue?logo=python&logoColor=white)](https://www.python.org/)
39
+ [![Python 3.12](https://img.shields.io/badge/python-3.12-blue?logo=python&logoColor=white)](https://www.python.org/)
40
+ [![Python 3.13](https://img.shields.io/badge/python-3.13-blue?logo=python&logoColor=white)](https://www.python.org/)
41
+ [![Python 3.14](https://img.shields.io/badge/python-3.14-blue?logo=python&logoColor=white)](https://www.python.org/)
42
+
43
+ ![Typed](https://img.shields.io/badge/typing-py.typed-brightgreen)
44
+ ![No Dependencies](https://img.shields.io/badge/dependencies-none-brightgreen)
45
+ ![Ruff](https://img.shields.io/badge/style-ruff-D7FF64?logo=ruff&logoColor=D7FF64)
46
+ ![license](https://img.shields.io/github/license/Vertyco/arkparser)
47
+
48
+ A pure-Python library for parsing ARK: Survival Evolved (ASE) and ARK: Survival Ascended (ASA) save files. Zero third-party dependencies.
49
+
50
+ ---
51
+
52
+ ## Table of Contents
53
+
54
+ - [Features](#features)
55
+ - [Installation](#installation)
56
+ - [Quick Start](#quick-start)
57
+ - [Player Profile](#player-profile)
58
+ - [Tribe Data](#tribe-data)
59
+ - [Cloud Inventory / Obelisk](#cloud-inventory--obelisk)
60
+ - [World Save](#world-save)
61
+ - [World Save Models](#world-save-models)
62
+ - [JSON Export (ASV-compatible)](#json-export-asv-compatible)
63
+ - [Package Structure](#package-structure)
64
+ - [API Reference](#api-reference)
65
+ - [File Parsers](#file-parsers)
66
+ - [Profile](#profile)
67
+ - [Tribe (File Parser)](#tribe-file-parser)
68
+ - [CloudInventory](#cloudinventory)
69
+ - [WorldSave](#worldsave)
70
+ - [Game Objects](#game-objects)
71
+ - [GameObject](#gameobject)
72
+ - [GameObjectContainer](#gameobjectcontainer)
73
+ - [LocationData](#locationdata)
74
+ - [Models](#models)
75
+ - [TamedCreature](#tamedcreature)
76
+ - [WildCreature](#wildcreature)
77
+ - [Player](#player)
78
+ - [Character](#character)
79
+ - [Structure](#structure)
80
+ - [Item](#item)
81
+ - [TribeModel](#tribemodel)
82
+ - [TribeMember](#tribemember)
83
+ - [TribeLogEntry](#tribelogentry)
84
+ - [CreatureStats](#creaturestats)
85
+ - [Location](#location)
86
+ - [Data Models](#data-models)
87
+ - [UploadedCreature](#uploadedcreature)
88
+ - [UploadedItem](#uploadeditem)
89
+ - [CryopodCreature](#cryopodcreature)
90
+ - [DinoStats](#dinostats)
91
+ - [Export Functions](#export-functions)
92
+ - [Map Config](#map-config)
93
+ - [Version Detection](#version-detection)
94
+ - [Exceptions](#exceptions)
95
+ - [Format Support](#format-support)
96
+ - [Credits](#credits)
97
+
98
+ ## Features
99
+
100
+ - **Player Profiles** (`.arkprofile`) — character name, level, stats, engrams
101
+ - **Tribe Data** (`.arktribe`) — members, ranks, logs, alliances
102
+ - **Cloud Inventory / Obelisk** — uploaded creatures, items, cryopod contents
103
+ - **World Saves** (`.ark`) — full map state: creatures, structures, items, players
104
+ - **Dual Format** — automatic ASE (v5-6) / ASA (v7+, SQLite) detection
105
+ - **Export** — ASV-compatible JSON export with GPS coordinate conversion
106
+ - **Typed** — full type annotations, `py.typed` marker
107
+
108
+ ## Installation
109
+
110
+ ```bash
111
+ pip install arkparser
112
+ # or editable install for development
113
+ pip install -e .
114
+ ```
115
+
116
+ ## Quick Start
117
+
118
+ ### Player Profile
119
+
120
+ ```python
121
+ from arkparser import Profile
122
+
123
+ profile = Profile.load("path/to/player.arkprofile") # auto-detects ASE/ASA
124
+
125
+ print(profile.player_name) # "SomePlayer"
126
+ print(profile.level) # 105
127
+ print(profile.tribe_id) # 1729028872
128
+ print(profile.engram_blueprints) # ["EngramEntry_Campfire_C", ...]
129
+ print(profile.get_stat(0)) # Health level-up points
130
+ print(profile.to_dict()) # Full dict export
131
+ ```
132
+
133
+ ### Tribe Data
134
+
135
+ ```python
136
+ from arkparser import Tribe
137
+
138
+ tribe = Tribe.load("path/to/tribe.arktribe")
139
+
140
+ print(tribe.name) # "My Tribe"
141
+ print(tribe.tribe_id) # 1729028872
142
+ print(tribe.member_count) # 3
143
+ for member in tribe.get_members():
144
+ print(f" {member['name']} (ID: {member['id']})")
145
+ print(tribe.log_entries) # ["Day 45: Tamed a Rex", ...]
146
+ ```
147
+
148
+ ### Cloud Inventory / Obelisk
149
+
150
+ ```python
151
+ from arkparser import CloudInventory
152
+
153
+ inv = CloudInventory.load("path/to/obelisk_file") # or use Obelisk alias
154
+
155
+ print(f"Creatures: {inv.creature_count}")
156
+ print(f"Items: {inv.item_count}")
157
+
158
+ for creature in inv.uploaded_creatures:
159
+ print(f" {creature.species} Lv{creature.level} - {creature.name}")
160
+ print(f" Stats: {creature.stats.to_dict()}")
161
+
162
+ for item in inv.uploaded_items:
163
+ print(f" {item.display_name} x{item.quantity} ({item.quality_name})")
164
+ if item.is_cryopod and item.cryopod_creature:
165
+ cryo = item.cryopod_creature
166
+ print(f" Contains: {cryo.species} Lv{cryo.level}")
167
+ ```
168
+
169
+ ### World Save
170
+
171
+ ```python
172
+ from arkparser import WorldSave
173
+
174
+ # Works with both ASE (binary) and ASA (SQLite) — auto-detected
175
+ save = WorldSave.load("path/to/Extinction.ark") # ASE
176
+ save = WorldSave.load("path/to/Extinction_WP.ark") # ASA
177
+
178
+ print(f"Objects: {save.object_count}")
179
+ print(f"Creatures: {len(save.get_creatures())}")
180
+ print(f"Structures: {len(save.get_structures())}")
181
+ print(f"Parse errors: {save.parse_error_count}")
182
+ print(f"Is ASA: {save.is_asa}")
183
+ ```
184
+
185
+ ### World Save Models
186
+
187
+ Extract typed models from parsed world saves:
188
+
189
+ ```python
190
+ from arkparser.models import TamedCreature, WildCreature, Player, Structure
191
+
192
+ # From game objects in a world save
193
+ for obj in save.objects:
194
+ class_name = obj.class_name or ""
195
+ if "DinoCharacterStatusComponent" not in class_name:
196
+ tamed = TamedCreature.from_game_object(obj, status_component)
197
+ print(f"{tamed.name} Lv{tamed.level}")
198
+ ```
199
+
200
+ ### JSON Export (ASV-compatible)
201
+
202
+ ```python
203
+ from arkparser import export_all
204
+ from arkparser.common import get_map_config
205
+
206
+ map_config = get_map_config("extinction.ark")
207
+ data = export_all(save, map_config)
208
+ # Returns: {"ASV_Tamed": [...], "ASV_Wild": [...], "ASV_Players": [...], ...}
209
+ ```
210
+
211
+ Or export to files:
212
+
213
+ ```python
214
+ from arkparser import export_to_files
215
+
216
+ export_to_files(save, "output/", map_config)
217
+ # Creates: ASV_Tamed.json, ASV_Wild.json, ASV_Players.json, etc.
218
+ ```
219
+
220
+ ## Package Structure
221
+
222
+ ```
223
+ arkparser/
224
+ ├── __init__.py # Public API
225
+ ├── data_models.py # UploadedCreature, UploadedItem, CryopodCreature, DinoStats
226
+ ├── export.py # ASV-compatible JSON export functions
227
+ ├── common/ # Binary reader, types, exceptions, map configs
228
+ ├── files/ # File parsers (Profile, Tribe, CloudInventory, WorldSave)
229
+ ├── game_objects/ # GameObject, GameObjectContainer, LocationData
230
+ ├── models/ # High-level typed wrappers (Creature, Player, Structure, etc.)
231
+ ├── properties/ # Property parsing system (ArrayProperty, StructProperty, etc.)
232
+ └── structs/ # Struct types (Vector, Color, Guid, etc.)
233
+ ```
234
+
235
+ ---
236
+
237
+ ## API Reference
238
+
239
+ ### File Parsers
240
+
241
+ All file parsers support `load(source)` which accepts `str`, `Path`, or `bytes` and auto-detects ASE/ASA format.
242
+
243
+ #### Profile
244
+
245
+ `arkparser.files.profile.Profile` — Parser for `.arkprofile` player profile files.
246
+
247
+ | Property | Type | Description |
248
+ |---|---|---|
249
+ | `player_name` | `str \| None` | Character name |
250
+ | `player_id` | `int \| None` | Unique player ID |
251
+ | `unique_id` | `str \| None` | Platform ID (Steam/Xbox numeric ID) |
252
+ | `tribe_id` | `int \| None` | Tribe ID (handles ASE `TribeId` / ASA `TribeID`) |
253
+ | `tribe_name` | `str \| None` | Always `None` — tribe name is not stored in profiles |
254
+ | `level` | `int` | Current level (`ExtraCharacterLevel + 1`) |
255
+ | `experience` | `float` | Total XP |
256
+ | `total_engram_points` | `int` | Engram points spent |
257
+ | `engram_blueprints` | `list[str]` | Learned engram blueprint paths |
258
+ | `version` | `int` | Save format version |
259
+ | `is_asa` | `bool` | Whether ASA format |
260
+ | `objects` | `list[GameObject]` | All parsed game objects |
261
+
262
+ | Method | Returns | Description |
263
+ |---|---|---|
264
+ | `load(source: str \| Path \| bytes)` | `Profile` | Load and parse a profile file |
265
+ | `get_stat(stat_index: int)` | `dict[str, Any]` | Stat value by index (0=Health … 11=Crafting) |
266
+ | `get_property_value(name, default=None)` | `Any` | Get property from the main object |
267
+ | `to_dict()` | `dict` | Full dictionary export |
268
+
269
+ #### Tribe (File Parser)
270
+
271
+ `arkparser.files.tribe.Tribe` — Parser for `.arktribe` tribe data files.
272
+
273
+ | Property | Type | Description |
274
+ |---|---|---|
275
+ | `name` | `str \| None` | Tribe name |
276
+ | `tribe_id` | `int \| None` | Unique tribe ID |
277
+ | `owner_player_id` | `int \| None` | Tribe owner's player ID |
278
+ | `member_ids` | `list[int]` | Member player IDs |
279
+ | `member_names` | `list[str]` | Member player names |
280
+ | `member_ranks` | `list[int]` | Member rank indices |
281
+ | `member_count` | `int` | Number of members |
282
+ | `log_entries` | `list[str]` | Raw tribe log strings |
283
+ | `rank_groups` | `list[dict]` | Rank definitions |
284
+ | `alliance_ids` | `list[int]` | Allied tribe IDs |
285
+ | `government_type` | `int` | Governance type (0=Player, 1=Tribe, 2=Personal) |
286
+
287
+ | Method | Returns | Description |
288
+ |---|---|---|
289
+ | `load(source: str \| Path \| bytes)` | `Tribe` | Load and parse a tribe file |
290
+ | `get_members()` | `list[dict]` | Detailed member info: `{player_id, name, rank}` |
291
+ | `to_dict()` | `dict` | Full dictionary export |
292
+
293
+ #### CloudInventory
294
+
295
+ `arkparser.files.cloud_inventory.CloudInventory` — Parser for obelisk/cloud inventory files. Also available as `Obelisk`.
296
+
297
+ | Property | Type | Description |
298
+ |---|---|---|
299
+ | `uploaded_creatures` | `list[UploadedCreature]` | Uploaded creatures with stats |
300
+ | `uploaded_items` | `list[UploadedItem]` | Uploaded items (includes cryopods) |
301
+ | `creature_count` | `int` | Number of uploaded creatures |
302
+ | `item_count` | `int` | Number of uploaded items |
303
+ | `creatures` | `list[GameObject]` | Raw creature GameObjects |
304
+ | `items` | `list[GameObject]` | Raw item GameObjects |
305
+ | `characters` | `list[GameObject]` | Uploaded player characters |
306
+ | `character_count` | `int` | Number of uploaded characters |
307
+
308
+ | Method | Returns | Description |
309
+ |---|---|---|
310
+ | `load(source: str \| Path \| bytes)` | `CloudInventory` | Load and parse an obelisk file |
311
+ | `to_dict()` | `dict` | Full dictionary export |
312
+
313
+ #### WorldSave
314
+
315
+ `arkparser.files.world_save.WorldSave` — Unified parser for `.ark` world save files. Auto-detects ASE binary vs ASA SQLite.
316
+
317
+ | Property | Type | Description |
318
+ |---|---|---|
319
+ | `version` | `int` | Save format version |
320
+ | `game_time` | `float` | In-game time in seconds |
321
+ | `save_count` | `int` | Times the map has been saved (ASE v9+) |
322
+ | `is_asa` | `bool` | Whether ASA SQLite format |
323
+ | `objects` | `list[GameObject]` | All parsed game objects |
324
+ | `object_count` | `int` | Total object count |
325
+ | `parse_error_count` | `int` | Number of parsing errors |
326
+ | `parse_errors` | `list[str]` | Error messages (read-only) |
327
+ | `container` | `GameObjectContainer \| None` | Relationship-aware container (ASE only) |
328
+ | `actor_locations` | `dict[str, LocationData]` | GUID → location map (ASA only) |
329
+ | `location_count` | `int` | Number of actor locations (ASA only) |
330
+ | `data_files` | `list[str]` | External data file references |
331
+ | `name_table` | `list[str] \| dict[int, str]` | Deduplicated name strings |
332
+
333
+ | Method | Returns | Description |
334
+ |---|---|---|
335
+ | `load(source, load_properties=True, max_objects=None)` | `WorldSave` | Load and parse a world save |
336
+ | `get_creatures()` | `list[GameObject]` | All creatures (tamed and wild) |
337
+ | `get_tamed_creatures()` | `list[GameObject]` | Tamed creatures only |
338
+ | `get_wild_creatures()` | `list[GameObject]` | Wild creatures only |
339
+ | `get_structures()` | `list[GameObject]` | Tribe-owned placed structures |
340
+ | `get_player_pawns()` | `list[GameObject]` | Player characters on the map |
341
+ | `get_items()` | `list[GameObject]` | Item objects |
342
+ | `get_objects_by_class(class_name: str)` | `list[GameObject]` | Objects matching class name substring |
343
+ | `get_object_by_guid(guid: str)` | `GameObject \| None` | Lookup by GUID (ASA) |
344
+ | `get_actor_location(guid: str)` | `LocationData \| None` | Actor location by GUID (ASA) |
345
+ | `to_dict()` | `dict` | Metadata dictionary |
346
+
347
+ ---
348
+
349
+ ### Game Objects
350
+
351
+ #### GameObject
352
+
353
+ `arkparser.game_objects.game_object.GameObject` — The fundamental entity in ARK saves representing creatures, items, structures, players, etc.
354
+
355
+ | Field | Type | Description |
356
+ |---|---|---|
357
+ | `id` | `int` | Object index within the save |
358
+ | `guid` | `str` | 16-byte GUID (ASA only, empty for ASE) |
359
+ | `class_name` | `str` | UE4 class name |
360
+ | `is_item` | `bool` | Whether this is an item/blueprint/engram |
361
+ | `names` | `list[str]` | ArkName list (1 for actors, 2+ for components) |
362
+ | `location` | `LocationData \| None` | World position and rotation |
363
+ | `properties` | `list[Property]` | Parsed property list |
364
+ | `extra_data` | `bytes \| None` | Additional data after properties |
365
+ | `parent` | `GameObject \| None` | Parent object (set by container) |
366
+ | `components` | `dict[str, GameObject]` | Child component objects |
367
+
368
+ | Method | Returns | Description |
369
+ |---|---|---|
370
+ | `get_property(name, index=None)` | `Property \| None` | Get property by name and optional index |
371
+ | `get_property_value(name, default=None, index=None)` | `Any` | Get property value |
372
+ | `get_properties_by_name(name)` | `list[Property]` | All properties with given name |
373
+ | `has_property(name)` | `bool` | Check if property exists |
374
+ | `add_component(component)` | `None` | Add a child component |
375
+ | `to_dict()` | `dict` | Serialize to dictionary |
376
+
377
+ #### GameObjectContainer
378
+
379
+ `arkparser.game_objects.container.GameObjectContainer` — Relationship-aware container for game objects. Supports `len()`, iteration, and indexing.
380
+
381
+ | Method | Returns | Description |
382
+ |---|---|---|
383
+ | `add(obj)` | `None` | Add an object |
384
+ | `get_by_id(obj_id)` | `GameObject \| None` | Lookup by numeric ID |
385
+ | `get_by_guid(guid)` | `GameObject \| None` | Lookup by GUID |
386
+ | `get_by_name(name)` | `GameObject \| None` | Lookup by primary name |
387
+ | `get_by_class(class_name)` | `list[GameObject]` | Exact class name match |
388
+ | `find_by_class_pattern(pattern)` | `list[GameObject]` | Substring class name match |
389
+ | `build_relationships()` | `None` | Build parent/component relationships |
390
+ | `get_creatures()` | `list[GameObject]` | All creatures |
391
+ | `get_structures()` | `list[GameObject]` | Tribe-owned structures |
392
+ | `get_player_pawns()` | `list[GameObject]` | Player characters on map |
393
+ | `get_players()` | `list[GameObject]` | Player data objects |
394
+ | `get_items()` | `list[GameObject]` | Item objects |
395
+
396
+ #### LocationData
397
+
398
+ `arkparser.game_objects.location.LocationData` — 3D position and rotation.
399
+
400
+ | Field | Type | Description |
401
+ |---|---|---|
402
+ | `x` | `float` | X position |
403
+ | `y` | `float` | Y position |
404
+ | `z` | `float` | Z position |
405
+ | `pitch` | `float` | Pitch rotation |
406
+ | `yaw` | `float` | Yaw rotation |
407
+ | `roll` | `float` | Roll rotation |
408
+
409
+ | Property / Method | Returns | Description |
410
+ |---|---|---|
411
+ | `position` | `tuple[float, float, float]` | `(x, y, z)` tuple |
412
+ | `rotation` | `tuple[float, float, float]` | `(pitch, yaw, roll)` tuple |
413
+ | `to_dict()` | `dict[str, float]` | All 6 fields |
414
+
415
+ ---
416
+
417
+ ### Models
418
+
419
+ High-level typed wrappers created from `GameObject` instances via `from_game_object()`.
420
+
421
+ #### TamedCreature
422
+
423
+ `arkparser.models.creature.TamedCreature` — Tamed creature with full stats, breeding, and ownership data.
424
+
425
+ | Property | Type | Description |
426
+ |---|---|---|
427
+ | `class_name` | `str` | Blueprint class name |
428
+ | `name` | `str` | Player-given name |
429
+ | `tribe_name` | `str` | Owning tribe |
430
+ | `tamer_name` | `str` | Player who tamed it |
431
+ | `level` | `int` | Total level (base + extra) |
432
+ | `base_level` | `int` | Wild/base level |
433
+ | `extra_level` | `int` | Levels gained after taming |
434
+ | `experience` | `float` | Current XP |
435
+ | `is_female` | `bool` | Gender |
436
+ | `is_baby` | `bool` | Whether a baby |
437
+ | `is_neutered` | `bool` | Whether neutered/spayed |
438
+ | `is_clone` | `bool` | Whether cloned |
439
+ | `is_cryo` | `bool` | Whether in a cryopod |
440
+ | `is_wandering` | `bool` | Wandering enabled |
441
+ | `is_mating` | `bool` | Mating enabled |
442
+ | `imprint_quality` | `float` | Imprint percentage (0.0–1.0) |
443
+ | `imprinter_name` | `str` | Player who imprinted |
444
+ | `colors` | `list[int]` | 6 color region indices |
445
+ | `base_stats` | `CreatureStats` | Wild stat points |
446
+ | `tamed_stats` | `CreatureStats` | Post-tame stat points |
447
+ | `mutated_stats` | `CreatureStats` | Mutation stat points |
448
+ | `total_mutations` | `int` | Total mutations (female + male) |
449
+ | `mutations_female` | `int` | Female line mutations |
450
+ | `mutations_male` | `int` | Male line mutations |
451
+ | `father_id` | `int \| None` | Father's dino ID |
452
+ | `mother_id` | `int \| None` | Mother's dino ID |
453
+ | `father_name` | `str` | Father's name |
454
+ | `mother_name` | `str` | Mother's name |
455
+ | `targeting_team` | `int` | Tribe ID |
456
+ | `location` | `Location \| None` | World position |
457
+
458
+ | Method | Returns | Description |
459
+ |---|---|---|
460
+ | `from_game_object(game_object, status_object=None)` | `TamedCreature` | Create from game object + status component |
461
+ | `to_dict()` | `dict` | ASV_Tamed export format |
462
+
463
+ #### WildCreature
464
+
465
+ `arkparser.models.creature.WildCreature` — Wild creature with level and stats.
466
+
467
+ | Property | Type | Description |
468
+ |---|---|---|
469
+ | `class_name` | `str` | Blueprint class name |
470
+ | `level` | `int` | Creature level |
471
+ | `base_level` | `int` | Same as level for wild |
472
+ | `base_stats` | `CreatureStats` | Wild stat points |
473
+ | `is_female` | `bool` | Gender |
474
+ | `colors` | `list[int]` | 6 color region indices |
475
+ | `tameable` | `bool` | Whether tameable |
476
+ | `location` | `Location \| None` | World position |
477
+
478
+ | Method | Returns | Description |
479
+ |---|---|---|
480
+ | `from_game_object(game_object, status_object=None)` | `WildCreature` | Create from game object + status component |
481
+ | `to_dict()` | `dict` | ASV_Wild export format |
482
+
483
+ #### Player
484
+
485
+ `arkparser.models.player.Player` — In-world player entity built from profile data.
486
+
487
+ | Property | Type | Description |
488
+ |---|---|---|
489
+ | `player_id` | `int` | Player data ID |
490
+ | `name` | `str` | Character name |
491
+ | `steam_name` | `str` | Platform gamertag |
492
+ | `steam_id` | `str` | Platform unique ID |
493
+ | `tribe_id` | `int` | Tribe ID |
494
+ | `tribe_name` | `str` | Tribe name |
495
+ | `level` | `int` | Total level |
496
+ | `experience` | `float` | Current XP |
497
+ | `is_female` | `bool` | Gender |
498
+ | `stats` | `CreatureStats` | Player stat points |
499
+ | `engram_points` | `int` | Engram points available |
500
+ | `location` | `Location \| None` | World position |
501
+ | `data_file` | `str` | Profile filename |
502
+
503
+ | Method | Returns | Description |
504
+ |---|---|---|
505
+ | `from_game_object(game_object, status_object=None)` | `Player` | Create from game object + status component |
506
+ | `to_dict()` | `dict` | ASV_Players export format |
507
+
508
+ #### Character
509
+
510
+ `arkparser.models.character.Character` — Player character from the world save (`PlayerPawnTest_*` objects).
511
+
512
+ | Property | Type | Description |
513
+ |---|---|---|
514
+ | `player_id` | `int` | Player ID |
515
+ | `player_name` | `str` | Character name |
516
+ | `steam_name` | `str` | Platform gamertag |
517
+ | `tribe_id` | `int` | Tribe ID |
518
+ | `tribe_name` | `str` | Tribe name |
519
+ | `level` | `int` | Total level |
520
+ | `is_female` | `bool` | Gender |
521
+ | `is_sleeping` | `bool` | Whether offline/sleeping |
522
+ | `stats` | `CreatureStats` | Character stat points |
523
+ | `location` | `Location \| None` | World position |
524
+
525
+ | Method | Returns | Description |
526
+ |---|---|---|
527
+ | `from_game_object(game_object, status_object=None)` | `Character` | Create from game object + status component |
528
+ | `to_dict()` | `dict` | Dictionary export |
529
+
530
+ #### Structure
531
+
532
+ `arkparser.models.structure.Structure` — Placed structure with ownership and state.
533
+
534
+ | Property | Type | Description |
535
+ |---|---|---|
536
+ | `class_name` | `str` | Blueprint class name |
537
+ | `owner_tribe_id` | `int` | Owning tribe ID |
538
+ | `owner_tribe_name` | `str` | Owning tribe name |
539
+ | `owner_name` | `str` | Placing player name |
540
+ | `health` | `float` | Current health |
541
+ | `max_health` | `float` | Maximum health |
542
+ | `is_powered` | `bool` | Whether powered |
543
+ | `is_locked` | `bool` | Whether locked |
544
+ | `decay_time` | `float` | Seconds until decay |
545
+ | `custom_name` | `str` | Renamed structure name |
546
+ | `location` | `Location \| None` | World position |
547
+
548
+ | Method | Returns | Description |
549
+ |---|---|---|
550
+ | `from_game_object(game_object)` | `Structure` | Create from game object |
551
+ | `to_dict()` | `dict` | ASV_Structures export format |
552
+
553
+ #### Item
554
+
555
+ `arkparser.models.item.Item` — Inventory item with quality and stats.
556
+
557
+ | Property | Type | Description |
558
+ |---|---|---|
559
+ | `class_name` | `str` | Blueprint class name |
560
+ | `name` | `str` | Custom name (if renamed) |
561
+ | `quantity` | `int` | Stack quantity |
562
+ | `quality_index` | `int` | Quality tier (0=Primitive … 5=Ascendant) |
563
+ | `quality_name` | `str` | Quality tier name |
564
+ | `durability` | `float` | Current durability |
565
+ | `is_blueprint` | `bool` | Whether a blueprint |
566
+ | `is_engram` | `bool` | Whether an engram |
567
+ | `is_equipped` | `bool` | Whether equipped |
568
+ | `stat_values` | `list[int]` | 8 item stat modifiers |
569
+ | `crafting_skill_bonus` | `float` | Crafting skill bonus |
570
+
571
+ | Method | Returns | Description |
572
+ |---|---|---|
573
+ | `from_game_object(game_object)` | `Item` | Create from game object |
574
+ | `to_dict()` | `dict` | Dictionary export |
575
+
576
+ #### TribeModel
577
+
578
+ `arkparser.models.tribe.Tribe` — Tribe data model (distinct from the file parser `arkparser.files.Tribe`). Imported as `TribeModel` from the top-level package.
579
+
580
+ | Property | Type | Description |
581
+ |---|---|---|
582
+ | `tribe_id` | `int` | Unique tribe ID |
583
+ | `name` | `str` | Tribe name |
584
+ | `owner_id` | `int` | Owner player ID |
585
+ | `owner_name` | `str` | Owner name |
586
+ | `member_count` | `int` | Number of members |
587
+ | `members` | `list[TribeMember]` | Member list |
588
+ | `alliance_ids` | `list[int]` | Allied tribe IDs |
589
+ | `log` | `list[TribeLogEntry]` | Parsed log entries |
590
+ | `raw_logs` | `list[str]` | Raw log strings |
591
+
592
+ | Method | Returns | Description |
593
+ |---|---|---|
594
+ | `from_game_object(game_object)` | `Tribe` | Create from game object |
595
+ | `to_dict()` | `dict` | ASV_Tribes export format |
596
+
597
+ #### TribeMember
598
+
599
+ `arkparser.models.tribe.TribeMember` — Individual tribe member.
600
+
601
+ | Field | Type | Description |
602
+ |---|---|---|
603
+ | `player_id` | `int` | Player ID |
604
+ | `name` | `str` | Player name |
605
+ | `rank` | `int` | Rank index |
606
+
607
+ #### TribeLogEntry
608
+
609
+ `arkparser.models.tribe.TribeLogEntry` — Parsed tribe log entry.
610
+
611
+ | Field / Property | Type | Description |
612
+ |---|---|---|
613
+ | `day` | `int` | In-game day number |
614
+ | `time` | `str` | Time string (`HH:MM:SS`) |
615
+ | `message` | `str` | Raw log message |
616
+ | `clean_message` | `str` | Message with RichColor tags stripped |
617
+
618
+ | Method | Returns | Description |
619
+ |---|---|---|
620
+ | `from_string(raw: str)` | `TribeLogEntry` | Parse from `"Day X, HH:MM:SS: message"` |
621
+
622
+ #### CreatureStats
623
+
624
+ `arkparser.models.stats.CreatureStats` — 12-stat named access for level-up points.
625
+
626
+ | Field | Type | Description |
627
+ |---|---|---|
628
+ | `health` | `int` | Health points |
629
+ | `stamina` | `int` | Stamina points |
630
+ | `torpidity` | `int` | Torpidity points |
631
+ | `oxygen` | `int` | Oxygen points |
632
+ | `food` | `int` | Food points |
633
+ | `water` | `int` | Water points |
634
+ | `temperature` | `int` | Temperature points |
635
+ | `weight` | `int` | Weight points |
636
+ | `melee` | `int` | Melee damage points |
637
+ | `speed` | `int` | Movement speed points |
638
+ | `fortitude` | `int` | Fortitude points |
639
+ | `crafting` | `int` | Crafting skill points |
640
+
641
+ | Property / Method | Returns | Description |
642
+ |---|---|---|
643
+ | `total` | `int` | Total points (excluding torpidity) |
644
+ | `from_array(points: list[int])` | `CreatureStats` | Create from 12-element array |
645
+ | `to_array()` | `list[int]` | Convert to 12-element array |
646
+ | `to_dict()` | `dict[str, int]` | All 12 stat fields |
647
+
648
+ #### Location
649
+
650
+ `arkparser.models.stats.Location` — 3D position with optional GPS conversion.
651
+
652
+ | Field | Type | Description |
653
+ |---|---|---|
654
+ | `x` | `float` | X position |
655
+ | `y` | `float` | Y position |
656
+ | `z` | `float` | Z position |
657
+ | `pitch` | `float` | Pitch rotation |
658
+ | `yaw` | `float` | Yaw rotation |
659
+ | `roll` | `float` | Roll rotation |
660
+
661
+ | Property / Method | Returns | Description |
662
+ |---|---|---|
663
+ | `latitude` | `float \| None` | GPS latitude (requires `with_map()`) |
664
+ | `longitude` | `float \| None` | GPS longitude (requires `with_map()`) |
665
+ | `ccc` | `str` | CCC teleport string `"x y z"` |
666
+ | `with_map(map_config)` | `Location` | Return copy with GPS conversion enabled |
667
+ | `to_dict()` | `dict` | Position + rotation + lat/lon if map attached |
668
+
669
+ ---
670
+
671
+ ### Data Models
672
+
673
+ Lower-level data models for cloud inventory / obelisk data.
674
+
675
+ #### UploadedCreature
676
+
677
+ `arkparser.data_models.UploadedCreature` — Uploaded creature from obelisk data.
678
+
679
+ | Property | Type | Description |
680
+ |---|---|---|
681
+ | `class_name` | `str` | Blueprint class name |
682
+ | `name` | `str` | Creature name |
683
+ | `species` | `str` | Extracted species name |
684
+ | `level` | `int` | Creature level |
685
+ | `experience` | `float` | Current XP |
686
+ | `stats` | `DinoStats` | Full stat values |
687
+ | `upload_time` | `int` | Upload timestamp |
688
+ | `unique_id` | `str` | Combined `"dinoId1_dinoId2"` |
689
+
690
+ | Method | Returns | Description |
691
+ |---|---|---|
692
+ | `from_ark_data(data: dict)` | `UploadedCreature` | Create from ArkTamedDinosData struct |
693
+ | `to_dict()` | `dict` | Full dictionary export |
694
+
695
+ #### UploadedItem
696
+
697
+ `arkparser.data_models.UploadedItem` — Uploaded item from obelisk data.
698
+
699
+ | Property | Type | Description |
700
+ |---|---|---|
701
+ | `blueprint` | `str` | Item blueprint path |
702
+ | `display_name` | `str` | Custom or extracted name |
703
+ | `quantity` | `int` | Stack size |
704
+ | `quality_index` | `int` | Quality tier (0–5) |
705
+ | `quality_name` | `str` | Quality name (Primitive … Ascendant) |
706
+ | `durability` | `float` | Current durability |
707
+ | `is_blueprint` | `bool` | Whether a blueprint |
708
+ | `is_cryopod` | `bool` | Whether a cryopod-type item |
709
+ | `cryopod_creature` | `CryopodCreature \| None` | Creature inside cryopod |
710
+
711
+ | Method | Returns | Description |
712
+ |---|---|---|
713
+ | `from_ark_data(data: dict)` | `UploadedItem` | Create from ArkItems struct |
714
+ | `to_dict()` | `dict` | Dictionary export (excludes raw_data) |
715
+
716
+ #### CryopodCreature
717
+
718
+ `arkparser.data_models.CryopodCreature` — Creature stored inside a cryopod.
719
+
720
+ | Property | Type | Description |
721
+ |---|---|---|
722
+ | `class_name` | `str` | Blueprint class name |
723
+ | `name` | `str` | Creature name |
724
+ | `species` | `str` | Species name |
725
+ | `level` | `int` | Level |
726
+ | `colors` | `list[int]` | Color region indices |
727
+ | `current_stats` | `dict[str, float]` | Current stat values |
728
+ | `base_stats` | `dict[str, float]` | Base stat values |
729
+ | `level_ups_wild` | `dict[str, int]` | Wild level-up points |
730
+ | `level_ups_tamed` | `dict[str, int]` | Tamed level-up points |
731
+ | `stats` | `DinoStats` | Stats in DinoStats format |
732
+
733
+ | Method | Returns | Description |
734
+ |---|---|---|
735
+ | `from_cryopod_bytes(byte_data: list[int])` | `CryopodCreature \| None` | Parse from raw cryopod bytes |
736
+ | `from_asa_cryopod_data(custom_data: dict)` | `CryopodCreature \| None` | Parse from ASA struct |
737
+ | `to_dict()` | `dict` | Dictionary export |
738
+
739
+ #### DinoStats
740
+
741
+ `arkparser.data_models.DinoStats` — Creature stat values (current and max).
742
+
743
+ | Field | Type | Description |
744
+ |---|---|---|
745
+ | `health` / `max_health` | `float` | Health |
746
+ | `stamina` / `max_stamina` | `float` | Stamina |
747
+ | `torpidity` / `max_torpidity` | `float` | Torpidity |
748
+ | `oxygen` / `max_oxygen` | `float` | Oxygen |
749
+ | `food` / `max_food` | `float` | Food |
750
+ | `water` / `max_water` | `float` | Water |
751
+ | `weight` / `max_weight` | `float` | Weight |
752
+ | `melee_damage` | `float` | Melee damage |
753
+ | `movement_speed` | `float` | Movement speed |
754
+ | `crafting_skill` | `float` | Crafting skill |
755
+
756
+ | Method | Returns | Description |
757
+ |---|---|---|
758
+ | `from_stat_strings(stat_strings: list[str])` | `DinoStats` | Parse from `"Health: 365.0 / 404.0"` format |
759
+ | `to_dict()` | `dict[str, float]` | All stat fields |
760
+
761
+ ---
762
+
763
+ ### Export Functions
764
+
765
+ `arkparser.export` — ASV-compatible JSON export. All functions accept a `WorldSave` and optional `MapConfig` for GPS conversion.
766
+
767
+ | Function | Returns | Description |
768
+ |---|---|---|
769
+ | `export_tamed(save, map_config=None)` | `list[dict]` | Tamed creatures (ASV_Tamed format) |
770
+ | `export_wild(save, map_config=None)` | `list[dict]` | Wild creatures (ASV_Wild format) |
771
+ | `export_players(save, map_config=None)` | `list[dict]` | Players (ASV_Players format) |
772
+ | `export_tribes(save)` | `list[dict]` | Tribes (ASV_Tribes format) |
773
+ | `export_structures(save, map_config=None)` | `list[dict]` | Structures (ASV_Structures format) |
774
+ | `export_tribe_logs(save)` | `list[dict]` | Tribe logs (ASV_TribeLogs format) |
775
+ | `export_all(save, map_config=None)` | `dict[str, list[dict]]` | All 7 formats keyed by name |
776
+ | `export_to_files(save, output_dir, map_config=None)` | `list[Path]` | Write all 7 formats to JSON files |
777
+
778
+ ---
779
+
780
+ ### Map Config
781
+
782
+ `arkparser.common.map_config` — GPS coordinate conversion for ARK maps.
783
+
784
+ | Function | Returns | Description |
785
+ |---|---|---|
786
+ | `get_map_config(filename: str)` | `MapConfig` | Lookup by save filename (case-insensitive) |
787
+ | `get_map_config_by_name(name: str)` | `MapConfig` | Lookup by display name |
788
+ | `list_maps()` | `list[MapConfig]` | All registered map configs |
789
+
790
+ `MapConfig` methods: `ue_to_lat(y)`, `ue_to_lon(x)`, `ue_to_gps(x, y)`, `ccc_string(x, y, z)`.
791
+
792
+ ---
793
+
794
+ ### Version Detection
795
+
796
+ `arkparser.common.version_detection` — File format identification.
797
+
798
+ | Function | Returns | Description |
799
+ |---|---|---|
800
+ | `detect_format(source: bytes \| str \| Path)` | `ArkFileFormat` | `ASE`, `ASA`, or `UNKNOWN` |
801
+ | `detect_file_type(source: bytes \| str \| Path)` | `ArkFileType` | `PROFILE`, `TRIBE`, `CLOUD_INVENTORY`, `WORLD_SAVE`, or `UNKNOWN` |
802
+ | `get_save_version(source: bytes \| str \| Path)` | `int` | Version number (-1 if invalid) |
803
+
804
+ ---
805
+
806
+ ### Exceptions
807
+
808
+ `arkparser.common.exceptions` — All exceptions inherit from `ArkParseError`.
809
+
810
+ | Exception | Description |
811
+ |---|---|
812
+ | `ArkParseError` | Base exception for all parsing errors |
813
+ | `CorruptDataError` | File data appears corrupted or invalid |
814
+ | `UnknownPropertyError` | Unrecognized property type encountered |
815
+ | `UnknownStructError` | Unrecognized struct type encountered |
816
+ | `UnexpectedDataError` | Data doesn't match expected values |
817
+ | `EndOfDataError` | Attempted to read past end of data |
818
+
819
+ ---
820
+
821
+ ## Format Support
822
+
823
+ | Feature | ASE (v5-6) | ASA (v7+) |
824
+ |---------|-----------|-----------|
825
+ | Vectors | Float (4 bytes) | Double (8 bytes) |
826
+ | Object IDs | Int32 index | 16-byte GUID |
827
+ | Booleans | Int32 | Int16 |
828
+ | World Save | Binary file | SQLite database |
829
+ | Compression | None | zlib + custom RLE |
830
+
831
+ ## Credits
832
+
833
+ This library was built by reverse-engineering ARK save formats with heavy reference to [ASV (Ark Save Visualizer)](https://github.com/miragedmuk/ASV) by **miragedmuk**. The C# implementation in ASV served as the primary reference for porting the binary parsing logic to Python.