Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.0.0] Protosets inheritance and aggregation #227

Open
Nordsoft91 opened this issue Aug 6, 2024 · 1 comment
Open

[3.0.0] Protosets inheritance and aggregation #227

Nordsoft91 opened this issue Aug 6, 2024 · 1 comment
Labels
enhancement New feature or request V3
Milestone

Comments

@Nordsoft91
Copy link

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
  ]
}
@peter-kish
Copy link
Owner

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.

@peter-kish peter-kish added this to the 3.0.1 milestone Aug 9, 2024
@peter-kish peter-kish added the enhancement New feature or request label Aug 9, 2024
@peter-kish peter-kish added the V3 label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request V3
Projects
None yet
Development

No branches or pull requests

2 participants