Easier mutator implementation


#1

We should think of some way to allow easier mod implementation. For example, with current Italians mutator the entire builddefs.lua has to be overridden mod-side (as well as armordefs and some other file of that nature), because there is no easy way to ‘insert’ additional content into existing S44 tables without overriding them. This requires mutator re-release on every S44 change that affects buildtrees.

Problem will be even worse if we get any other additional nation mutators. For example, if there is a Japanese faction mod, in order to combine it with Italy there would have to be yet another Italy+Japan mutator with rewritten buildtree and armor tables.

One solution that I can think of is to have mod-defined buildtrees, armors and whatever in builddefs_ITA.lua, armordefs_ITA.lua (file name + some suffix), and have some code that looks for the files with that name pattern and adds their content to existing tables. This way combining several mutators will be as easy as writing a new modinfo.lua which just lists dependencies on mutator files.


#2

Interesting idea, certainly worth looking into.