Skip to main content

Re-implementation of genieutils in Python

Project description

genieutils-py

Python implementation of genieutils.

This library can be used to read and write empires2_x2_p1.dat files for Age of Empires II Definitive Edition.

Supported dat versions

Currently, only the latest version used in Age of Empires II Definitive Edition is supported (GV_LatestDE2/GV_C20).

Installation

pip install genieutils-py

Usage examples

Dump the whole dat file as json

The package comes with a handy command line tool that does that for you.

dat-to-json path/to/empires2_x2_p1.dat

Change cost of Loom to 69 Gold

from genieutils.datfile import DatFile

data = DatFile.parse('path/to/empires2_x2_p1.dat')
data.techs[22].resource_costs[0].amount = 69
data.save('path/to/modded/empires2_x2_p1.dat')

Prevent Kings from garrisoning

from genieutils.datfile import DatFile

data = DatFile.parse('path/to/empires2_x2_p1.dat')
for civ in data.civs:
    civ.units[434].bird.task_size -= 1
    civ.units[434].bird.tasks.pop()
data.save('path/to/modded/empires2_x2_p1.dat')

Authors

HSZemi - Original Author

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

genieutils_py-0.0.1.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

genieutils_py-0.0.1-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file genieutils_py-0.0.1.tar.gz.

File metadata

  • Download URL: genieutils_py-0.0.1.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for genieutils_py-0.0.1.tar.gz
Algorithm Hash digest
SHA256 34bfe055b955a6a1803e6e98f481fc311f785e4d4690b7705d15369487cb3648
MD5 336b0f99cbb787d4b015b129468ca65f
BLAKE2b-256 c524c06aadf2869bf9e257211a5e0700620c6a366a330ea96c55bf5dba61bb1e

See more details on using hashes here.

File details

Details for the file genieutils_py-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: genieutils_py-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 25.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for genieutils_py-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f65c5e05e2186d661b9d383554c1d13b5ed30ffb7b3e9215bcd2ce5727b0466
MD5 201e1595dede3201cbc96251d4b1542c
BLAKE2b-256 a653dd82be3865f894350e0b72a59fdff0cf1c6bf0a9a976a26647708acf502a

See more details on using hashes here.

Supported by

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