[3.0.0] Protosets inheritance and aggregation
When more and more items appear in the game, it become hard to support items, split them by groups, etc.
I suggest to introduce possibility to split protests on multiple files.
Inheritance
Inheritance could be extremely useful as it helps to set default set of parameters:
...
{
"id": "armor_base",
"type": "armor",
"covers": ["body"],
"defence": 1,
"weight": 0
},
{
"id": "leather_armor",
"base": "armor_base", //takes parameters from base item, override specified only
"defence": 3,
"weight": 12
}
...
aggregation
may be not the best way to enable splitting protoset on several files, but one of them. structure and format may vary, again just one of possible options
{
"version": "1.0.0" //json schema version
"include": ["res://protosets/armors.json", "res://protosets/weapons.json"]
"items":
[
{"id": "item1"}, {"id": "item2"} //inheritance should work for included items as well
]
}
I suggest to introduce possibility to split protests on multiple files
aggregation
Agreed. It shouldn't be too hard to implement, but I'd leave it for v.3.0.1 so I can focus on releasing v.3.0.0 sooner.
Inheritance
There's already something very similar to what you suggested in v3.0.0: https://github.com/peter-kish/gloot/tree/dev_v3.0.0?tab=readme-ov-file#prototype-inheritance.