Rereskillable Rereforked

Rereskillable Rereforked

166k Downloads

Stat buffs based on skill level

rabrunos opened this issue · 4 comments

commented

Skill Buffs configuration

You could add simple buffs to Skills.

In the code below I put the example of how the configuration would be, so it is easier to understand:

# Here is the default `skillLocks` configuration
skillLocks = ["minecraft:iron_sword attack:5", "minecraft:iron_pickaxe mining:5"]

# ------------------------------------------------------------------

# Here would be a new section that would allow the user to create variables to put multiple items in just one word
# I gave a crude example as I don't know how it could be done in an efficient way
itemVariables = ["sword = minecraft:iron_sword minecraft:golden_sword othermod:sword", "pickaxe = minecraft:iron_pickaxe minecraft:golden_pickaxe othermod:pickaxe"]

# ------------------------------------------------------------------

# Here would be a comment field with the existing buffs in the mod.
# For the examples that will be cited below, these buffs would be:

# damage = Item damage multiplier
# breakingSpeed = Item breaking speed multiplier

# ------------------------------------------------------------------

# Here would be a new configuration section to configure buffs separately from `skillLocks`
# This section could be configured in two ways:

# itemVariable skill:level buff:value
# or
# mod:id skill:level buff:value

skillBuffs = ["sword attack:5 damage:2", "pickaxe mining:5 breakingSpeed:1.5", "minecraft:wooden_sword attack:5 damage:0.5"]

# That way, if the user were to buff only 1 item, he wouldn't need to create a variable for it, just put the ID. (If I were to choose one of the two to stay in the mod, I would choose the variable configuration. )
  • With the above configuration, when reaching level 5 in Attack, all items added to the sword variable would do 2 times more damage and when reaching level 5 in Mining, all items added to the pickaxe variable would be 1.5 times faster and wooden sword would have the damage reduced by half!
  • User could configure the same item or variables for multiple levels, just add the same configuration but with different values, example:
    ["sword attack:5 damage:2", "sword attack:10 damage:3" ].
    Configured this way, higher values ​​prevail over lower values. (In the example above, the buff that is activated at level 10 of Attack, overrides the value of the buff that is activated at level 5.)
  • The allowed values could be between 0.001 and 10.000, so the user could configure so that at the beginning the player would have a slower pickaxe due to lack of skill and over time, when increasing his skills he would be faster when mining. (This goes for any buff)
  • When hovering the mouse over the Skill icon, a popup appeared with the Buffs and the levels required to activate them.
    Based on the examples above, when hovering over the skill icon Attack, the following information would appear:

I could use this model:
%1 = variable or itemID
%2 = buff
%3 = buff value

%1 %2 multiplied by %3

Unlockable Buffs

Level 5
Sword damage multiplied by 2

Level 10
Sword damage multiplied by 3

  • If there is no value in the skillBuffs configuration field, nothing would happen, it would just disable the buffs function if the user didn't want to add them. (There could also be another configuration field with a Boolean value that looks something like this: buffsEnable = true or false, so the user could disable the buffs without removing any configuration already created.)

If you get this idea for yourself, I will suggest cool buffs here! Otherwise, I won't say anything, so the Feature Request doesn't get a big text.
This is a very bold idea, but it is a possible idea!
I look forward to hearing from you to see what you think of it!

commented

I tried to be as clear as possible in explaining my idea.

commented

Right, I'll reopen that one.

commented

This is quite a cool idea, it would be complicated to implement though. I'm currently busy with some other issues the mod has, so I probably won't do this soon, but a very good suggestion to be sure!

commented

Glad you considered the idea!
I know how to program something in pascal and javascript!
I wanted to start programming for mods too to help with pull requests and etc!
But I don't know what tools the devs use here!
When I find out, maybe I'll try to create this function and send you a Pull Request!