Jump to content

Tool: dp2rathena - convert divine-pride data to rathena format

Recommended Posts

Posted (edited)

Hi all, I put together a command-line tool to help save time when porting lots of existing items to an rAthena server.
I noticed that the rAthena community often refers to divine-pride.net (DP) as a source of truth, so I figured it would be useful to connect with their API.

The tool uses data from divine-pride.net and attempts to map the API response to a desired rAthena database format.

Requires Python 3.6+ and pip installed: 

pip install dp2rathena

Generate a divine-pride.net API key if you don't have one yet (registration required), then you can start converting data:
Example: Store API key and convert items with id 501 and 1101

dp2rathena config
dp2rathena item 501 1101

Produces this output:

  Type: ITEM_DB
  Version: 1
- Id: 501
  AegisName: Red_Potion
  Name: Red Potion
  Type: Healing
  Buy: 10
  Weight: 70
- Id: 1101
  AegisName: Sword
  Name: Sword
  Type: Weapon
  SubType: 1hSword
  Buy: 100
  Weight: 500
  Attack: 25
  Range: 1
  Slots: 3
    Alchemist: true
    Assassin: true
    Blacksmith: true
    Crusader: true
    Knight: true
    Merchant: true
    Novice: true
    Rogue: true
    SuperNovice: true
    Swordman: true
    Thief: true
    Right_Hand: true
  WeaponLevel: 1
  EquipLevelMin: 2
  Refineable: true


Further instructions can be found at the repository: https://github.com/Latiosu/dp2rathena

Currently only items can be converted and with the following limitations:

  • "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

The following item_db.yml fields are excluded as DP API doesn't expose sufficient data to reverse-engineer the mapping:

  • "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 
  • "View" - view sprite of the item
  • "AliasName" - another item's AegisName to be sent to client instead of this AegisName

Let me know if you'd like to be able to convert other data from DP, some other suggestion or any questions. 

Edit: Updated instructions for usage

Edited by latios
Updated instructions for usage
  • Upvote 2
  • Like 1

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.