mirror of
https://github.com/vcmi/vcmi.git
synced 2025-05-31 22:59:54 +02:00
It is now possible for mods to modify json lists precisely, without full replacement. Supported options: - `append`: appends a single item to end of list - `appendItems`: appends multiple items to end of list - `insert@NUM`: inserts a single item *before* item NUM (item counting is 0-based) - `modify@NUM`: allows editing of a single item NUM (item counting is 0- based) Example - addition of a new item into town hall slots: ```json "hallSlots": { "modify@4" : { "append" : [ "dwellingLvl7B", "dwellingUpLvl7B" ] } }, ``` This would modify 4th element (last row) by appending new entry to the end of last row ```json { "modify@4" : { "insert@1" : [ "dwellingLvl5B", "dwellingUpLvl5B" ] } }, ``` This would add new slot not in the end of last row, but before 1st item (between 5th and 6th dwellings)