Skip to main content

Convert Divine-Pride API data to rAthena YAML

Project description

dp2rathena: Divine-Pride API to rAthena

PyPI - Version PyPI - Python Version TravisCI Status codecov

Convert Divine-Pride API data to rAthena DB formats.

Currently supported formats are:

  • item_db.yml
  • mob_db.yml
  • mob_skill_db.txt

Requirements

  • Python 3.6+

Installation

pip install dp2rathena

Usage

A divine-pride.net API key is required, create an account and generate a key if you don't have one yet.

# Store API key
dp2rathena config

# Convert items with ids 501 and 1101
dp2rathena item 501 1101

# Convert mob with id 20355
dp2rathena mob 20355

# Convert mob skills from mob ids in a newline separated file
dp2rathena mobskill -f my_mobs.txt

# Print out help text
dp2rathena -h

Limitations

All fields are mapped except the ones listed below:

item_db.yml

Partially Mapped

  • "Type" - when the item type is "Consumable" on DP and subtype "Special", we output a few possible options for user to choose the correct one (Healing, Usable, DelayConsume or Cash)
  • "SubType" - when the item type is "Ammo" on DP, we output all rathena ammo subtypes for user to choose correct option as DP doesn't map all rathena ammo subtypes

Not Mapped (insufficient data)

  • "Script" / "EquipScript" / "UnEquipScript" - script to execute when some action is performed with the item
  • "Class" - upper class types that can equip item
  • "Flags" - item flags such as "BuyingStore", "DeadBranch", "BindOnEquip", etc...
  • "Delay" - item use delay
  • "Stack" - item stack amount
  • "NoUse" - conditions when the item is unusable
  • "AliasName" - another item's AegisName to be sent to client instead of this AegisName

mob_db.yml

Not Mapped (insufficient data)

  • MvpExp - MVP experience gained
  • RaceGroups - list of secondary groups the monster may be part of
  • Modes - list of unique behavior not defined by AI, Class, or Attribute
  • JapaneseName - name in Japanese
  • Drops > RandomOptionGroup - the Random Option Group applied to item on drop
  • Drops > Index - index used for overwriting item

Notes

  • Ai - not always defined on DP and needs manual input (refer to rathena docs)
  • Drops > Item - relies on an internal db yaml file (updated every dp2rathena release) to determine output aegis name

Contributing

This project uses poetry to manage the development environment.

  • Setup a local development environment with poetry install
  • Run tests with poetry run tox (or pytest for current python version)
  • Run live API tests with poetry run pytest --api
  • Update internal db yamls with poetry run python tools/generate_item_db.py (or tools/generate_skill_db.py)
  • Execute script with poetry run dp2rathena

Changelog

See CHANGELOG.md

License

See LICENSE

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

dp2rathena-0.4.0.tar.gz (213.3 kB view details)

Uploaded Source

Built Distribution

dp2rathena-0.4.0-py3-none-any.whl (218.5 kB view details)

Uploaded Python 3

File details

Details for the file dp2rathena-0.4.0.tar.gz.

File metadata

  • Download URL: dp2rathena-0.4.0.tar.gz
  • Upload date:
  • Size: 213.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.10 CPython/3.8.7 Linux/4.15.0-1077-gcp

File hashes

Hashes for dp2rathena-0.4.0.tar.gz
Algorithm Hash digest
SHA256 5e462493ae93466e5c4a605797d5bc1fdd3650933f95f3f719a094ec6e451eb6
MD5 643c382f1b6e274fdf08beb874dc2569
BLAKE2b-256 e2f75cdf9164e4711f40849051a5920263563e5259aa7b2cb3f362d4af409b8f

See more details on using hashes here.

File details

Details for the file dp2rathena-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: dp2rathena-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 218.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.10 CPython/3.8.7 Linux/4.15.0-1077-gcp

File hashes

Hashes for dp2rathena-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d80f4b1c1b390c4b58d673fc4e489e2f5e2f3d1ccf0bd95ffe34c8cf236eebf
MD5 a332147be008ebc999f0578a8e1e1a9f
BLAKE2b-256 6549882a9fc08a52ccdb87c8fecd4764c15a054b7b5d2fa21bedd4d3518fd95e

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