Grasscutter
Grasscutter copied to clipboard
feat: add loot tables
Description
See #1378. Please note this is a prototype and need future discussions.
Please carefully read the Contributing note and Code of conduct before making any pull requests. And, Do not make a pull request to merge into stable unless it is a hotfix. Use the development branch instead.
Issues fixed by this PR
#1378
Type of changes
- [ ] Bug fix
- [x] New feature
- [x] Enhancement
- [ ] Documentation
Checklist:
- [x] My code follows the style guidelines of this project
- [x] My pull request is unique and no other pull requests have been opened for these changes
- [x] I have read the Contributing note and Code of conduct
- [x] I am responsible for any copyright issues with my code if it occurs in the future.
I like your loot table schema, but personally would prefer every monster loot table in one json file instead of in many files (per monster).
I like your loot table schema, but personally would prefer every monster loot table in one json file instead of in many files (per monster).
I afraid we'll eventually get a very huge file. How about organize the tables by monster group? e.g. All types of Hilichurls use one file with conditional tweaks in loot table rules
I like your loot table schema, but personally would prefer every monster loot table in one json file instead of in many files (per monster).
I afraid we'll eventually get a very huge file. How about organize the tables by monster group? e.g. All types of Hilichurls use one file with conditional tweaks in loot table rules
I agree, it would become too messy after a while. By mob type / groups within table would be easier to maintain.
I agree, it would become too messy after a while. By mob type / groups within table would be easier to maintain.
The reason i prefer it to be in one file is because i would rather not have to deal with 100s of json files with one for each monster. It would be better to make a tool to create drop tables for each monster and then have it compile everything into one json.
I agree, it would become too messy after a while. By mob type / groups within table would be easier to maintain.
The reason i prefer it to be in one file is because i would rather not have to deal with 100s of json files with one for each monster. It would be better to make a tool to create drop tables for each monster and then have it compile everything into one json.
Yeah big + for a tool, but yeah as it stands it’s a huge mess. Will be good to organize it at least.
I added a new layer LootRegistry
which can help reduce the count of the files
I have added an example on handling gacha with loot table
I'll mark this pr as ready as I have implemented most of it. Future developments and migrations can be done in other new prs.
I'll have to look deeper into some other details on this PR later, and I do agree with the general ideas of it, but I'd prefer to sort things out a bit more before merging this.
It's a big, breaking change and do need more attention. It's important for me to receive reviews to make it good for everyone.
object SceneObj_Area_Common_Property_Ani_Prop_BGM_01 should be add to file ChestReward.json ,because i see
WARN:GadgetChest Could not found the handler of this type of Chests
when trying to pick up bgm.
表现为无法拾取旋曜玉帛
object SceneObj_Area_Common_Property_Ani_Prop_BGM_01 should be add to file ChestReward.json ,because i see
WARN:GadgetChest Could not found the handler of this type of Chests
when trying to pick up bgm. 表现为无法拾取旋曜玉帛
It's somehow unrelated to this PR. However you can solve this problem by adding your tables after this PR is merged
why haven't it been merged yet? does it work?
Recent DMCA compliance push closed active PRs.
Apologies for taking so long to address loot tables, things keep popping up and the todo pile keeps growing :smiling_face_with_tear: