/ mabinogi

Generating data xml mods

Data folder mods are generally a hassle because updating them is always a pain. You can get around this by taking advantage of DataModder.

Instead of editing the raw xml files, and doing so every time there's a patch that touches those files, you write a lua script to do those modifications and DataModder provides you with the most recent versions of the files you want to change.

For example if you want to switch how Divine Link targets when you press Ctrl, you'd want to switch

<Skill SkillID="46004" SkillEngName="Divine Link" ... TargetPreference="enemy" ... />


<Skill SkillID="46004" SkillEngName="Divine Link" ... TargetPreference="friend" ... />

The corresponding lua script might look something like

setattributes('/SkillInfo/SkillList/Skill[@SkillID=46004]', 'TargetPreference', 'friend')

I made some tiny changes to DataModder to fit my usecase. In particular just adding a command line argument so I can generate the data folder without needing to open the UI. You can download that with some small examples here