Fulmineo64 / Guild

Other
6 stars 12 forks source link

Add: Function reward type #10

Closed James103 closed 3 years ago

James103 commented 3 years ago

Currently, there's only the "item" reward type for quest rewards, unlike quest tasks which may include tasks not involving items. To fix this, I propose adding the reward type function. The function reward type allows data packs to implement any reward for a quest using commands. The reward type takes the following parameters:

{
    "type": "function",
    "name": "test:example", // The namespaced ID of the function to be run.
    "title": {"text":"Example Function"}, // The raw JSON text to display for the reward.
    "unit_worth": 100,
    "weight": 10
}
Examples (click to expand) ```json { "type": "function", "name": "test:speed_boost", "title": {"text":"Speed II (2:30)"}, "unit_worth": 100, "weight": 10 } ``` ```json { "type": "function", "name": "test:max_health", "title": {"text":"+2 Max Health"}, "unit_worth": 300, "weight": 5 } ```
Fulmineo64 commented 3 years ago

Hi James103, perfect timing. In the next Guild release, you'll be able to attach Nbt tags to quests. With this you can specify whatever item you want.

Loot tables functions are very useful and i'll probably add them in the future, if they'll still fit with the mod, after the v1.0.0 release.

You're also welcome to post more ideas / suggestions on my Discord: https://discord.com/invite/G8s2q4wMnt

See ya!

Fulmineo64 commented 3 years ago

I just realized that I got it all wrong!

You were talking about datapacks functions, not loot tables functions.

By the way all that I said above still applies including the release terms.

So keep tuned!