Jump to content
Sign in to follow this  

Conversion of Monster Database to YAML

Recommended Posts


MobDB -> YAML!

As of Git Hash: 7992e08, rAthena's monster database has been converted to YAML! Sorry for the delay of this post!

What this means:

The monster database being in YAML format means that the database is now much more human-readable, just like the item database. This allows for quick review, modification, and addition of monsters without having to memorize the CSV format or use any third party tools. The parser now also has much better error handling when reading monsters into memory so tracking down those pesky typos is a thing of the past!

The update combines mob_race2 and mob_drop databases into the mob_db so there is much less searching around multiple databases when doing anything with monsters!

The Mode field has been adjusted. rAthena will now be following the Aegis format of utilizing AI and Class to define monster modes. Don't fret, the Mode field is still fully supported for any custom monster modes! A detailed document with the AI and Class values can be found in doc/mob_db_mode_list.txt.

Each monster can now be classified with multiple RaceGroups. Before a monster was limited to a single group, but that is a thing of the past!

As with any YAML conversion we have provided an option in the CSV2YAML tool built right into rAthena! Just build the CSV2YAML tool within Visual Studio or via Make and run the executable. The tool will provide you with general steps and convert your custom monsters right on over to the YAML format!

Following suit with the item database conversion, the monster database will still support SQL! Simply continue to utilize the YAML2SQL tool which can convert the YAML monster database into SQL format. This allows servers who utilize SQL to continue with this method.

What this means to developers:

Pull Requests can be reviewed much quicker and much more simpler. Identifying the actual change to the monster and easily verifying said change without having to count commas!

Comparing monster data to Aegis becomes easier for the AI and Class as it's easy to identify immediately what the monster's mode should be without having to count the custom mode bits in rAthena.

Additional features being added to the monster database no longer requires the development of a side database. A vast majority of the monster data is now part of the mob_db structure and can continue to grow in this format! As already seen with the Green Aura for MVP update from kRO.


Redefined Import System:

Now that the mob_db is in YAML format, the adjustment of monsters is much simpler. If a change is being made to an monster only the parts that are being changed have to be defined in the import. Below are some examples:

Adjusting Scorpion attack to 1000.

  - Id: 1001
    Attack: 1000

Allow Amon Ra to walk and adjust the Yggdrasil Berry to a Diamond at 80% drop rate.

  - Id: 1511
      CanMove: true
      - Item: Diamond
        Rate: 8000
        Index: 0

Check out the mob_db documentation for further details!

Thanks to @Lemongrass, @nitrous, and lukasrmattos for their help!

  • Upvote 3
  • Love 2
  • MVP 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.

Sign in to follow this  

  • Create New...

Important Information

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