soul4soul / ot-monster-converter

C# .NET 5 program for converting OpenTibia (OT) monsters between commonly used formats
10 stars 12 forks source link

[opentibiabr revscriptsys][output] Add support for this format #45

Open soul4soul opened 3 years ago

soul4soul commented 3 years ago

https://github.com/opentibiabr/canary has used this tool in the past, it was used to aid in convertering the creatures in their repo from XML to revscriptsys. They used a fork of the v2.0~ release which had many issues. Since then the program has under gone extensive changes which would make rebasing difficult.

Support for this format can be added with minimal effort since it's a derivative of the tfs revscriptsys format.

Tech implementation: Not sure how I want to handle it yet, so far all converters have been in separate binaries. Due to the similarity with tfs revscriptsys format I'm thinking of adding it to the same binary. The current class can be changed to an abstract base class, which tfs and otserverbr classes can inherit. The base class can accept an enum to indicate TFS or otserv and have conditional checks as necessary. Instead of passing a enum to the baseclass the giant function to output the lua file can be split up into sub functions for general info, attacks, defensives, loot, immunities, etc.. and the inherited classes can override those when there are differences.