Jump to content
exec

DataModder

Recommended Posts

585e7c850f058_ss(2016-12-24at02_47.36).png.bf65bdecec148a93cd6a202e9f218a6d.png.a8bd579665239e82e549fcc4fc5ae0c8.pngHave you ever thought that you'd hate to be the person who has to update those huge data mod packs that presumably break every other week? I always thought that if I were the maintainer I would write a tool that does all the hard work for me. Why should I have to go into a file and make the same tweak again and again if I can have a tool do that for me based on a set of rules?

With this base idea in mind I created a tool that does just that a while ago: DataModder. This prototype reads instructions on how to modify files from Lua scripts, applies the modifications to the most recent version of the requested file in the client's pack files, and writes the result to a data folder. What's especially useful is that DataModder understands XML. You don't have to set up a collection of crazy regular expressions, which would be prone to breaking as well, you have fine-grained control over how you modify an XML file. For example:

loadxmlfile('db/itemdb.xml')
setattributes('//Mabi_Item[@ID=1000]', 'Text_Name0', 'Just some book')

This would load the item db and change the attribute "Text_Name0" of the item with the id 1000 to "Just some book". A simple rule that will work for as long as that item exists. Similarly you can add and remove XML elements, replace files, and more.

I haven't worked on this prototype since I first created it, but I still think it's very promising, and I want to continue it some time.

GitHub: https://github.com/exectails/DataModder

Some quick usage instructions, should you decide to check it out: "Remove mods" restores the pack files to their original state, "Create data folder" deletes the current data folder and creates a new one based on the mod scripts, and "Modify" modifies the pack files to make the client use the ones in the data folder. Finally, "All in one" goes through those three steps in sequence, as a simple one click data update solution.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×