Bountiful (Fabric)

Bountiful (Fabric)

7M Downloads

[Suggestion] Command Rewards

Mike5357 opened this issue ยท 8 comments

commented

A nice addition I'd like to see would be allowing command rewards, so that instead of only being able to give items on completion of a bounty a command could be run as a reward and a custom reward message set. This would only really be useful to server owners, but could also possibly be used to link rewards to unlock custom advancements.

commented

What would the text say to the user in the tooltip, though? @Mike5357

That's what I suggested a custom reward message for :)

In my case, I'd like to run a command to give a player a pokemon from the Pixelmon mod so I'd ideally want a config that ends up looking something like this:

  {
    "content": "/pokegive {player} Charmander s",
    "unitWorth": 100,
    "rewardName": "Shiny Charmander",
  },

customreward

This would also allow custom reward names for regular items as well. If the rewardName field was left empty or wasnt included then it could just show the normal item name if an item is the reward.

commented

That sounds like a good idea. What would the text say to the user in the tooltip, though? @Mike5357

commented

Ah, gotcha. That does sound good! I'll look into it for the future.

commented

Okay, this is definitely going to happen. It's just a matter of when, considering I'm rewriting much of the mod for 1.13, which will take a while. The command system that Minecraft uses was also completely changed in 1.13, so that will add a bit of time as well. This should be coming, though (Command rewards and custom display text for objectives/rewards)

commented

Here ya go @Mike5357 ! This has been added in 41662da and will be available with Bountiful v3.1.0 for Minecraft 1.14/1.15. Eventually the wiki will be updated to show how to use it, but here are two example entries for rewards:

{   
  "type": "command",
  "name": "Make it Rain",
  "content": "/weather rain",
  "amountRange": {
    "min": 1,
    "max": 1
  },
  "unitWorth": 1000,
  "weight": 1000
}

That changes the weather to rain.

{   
  "type": "command",
  "name": "Kill the Player",
  "content": "/kill %player%",
  "amountRange": {
    "min": 1,
    "max": 1
  },
  "unitWorth": 1000,
  "weight": 1000
}

That kills the player that turned in the bounty. You can use %player% and it will substitute in the player's name, and %amount% will substitute in the random amount that got picked in case you want to work that into your command somehow.

commented

This suggestion was great~ the feature being added would be really helpful.
Problem is most mods like pixelmon will be forever stuck in 1.12.2.
Could you possible backport this feature or even the full mod to 1.12.2?
I love this mod. I use it on all my servers and suggest it to the other servers I run.
I would really like to see all the new stuff in 1.12.2

commented

Unfortunately, I won't be backporting any features from versions beyond when The Flattening occurred (1.13). Here's why:

  • 1.13+ code is very different from 1.12 code (that's kind of a given, haha). Many mappings were changed, and I adopted new functionality included in Minecraft itself (such as datapack reloading). Item/Block metadata is no longer a thing to account for, and custom model resources are handled completely differently (in a more simple way!). Tons of things had to get changed.
  • I rewrote the whole mod, because it was really difficult for me as a developer to add new types of objectives and rewards in Bountiful v2. The old code got thrown out or refactored when considering the new version (v3), and isn't really compatible with the old code.
  • As such, the fastest/easiest way to get this feature on 1.12 would be to backport all of Bountiful v3.X to 1.12. Which, I dunno, could be done with a moderate amount of work, a lot of it might be mappings changes. But, you'd have to fully reimplement village generation and mod configuration, because both of those got changed in 1.13+.

Overall, it's really just a headache. If someone would be willing to do the port and make a pull request (PR) into the 1.12 branch, then I'd be willing to review it! It's just not worth my time, unfortunately.

New mods will come, though! There's always new stuff brewing on new versions ๐ŸŽŠ

commented

Awe that's really sad to hear~ at the very least the commands would have been a big hit. the 1.12.2 community for pixelmon (one of the biggest mods for minecraft) will never be updating to a new version.