[Suggestion]: /scale modifier rework
ImSpaceLover opened this issue ยท 0 comments
What is your suggestion?
The way this command currently works is confusing and non-flexible.
I have a suggestion that might change it a but and make things easier.
Here's an idea how syntax of this command might look:
/scale modifier add
/scale modifier add <scale_type_1> <scale_type_2> <entity>
/scale modifier add <scale_type_1> <scale_type_2> <operator> <value> <entity>
<scale_type_1>
is a scale type the modifier is applied to
<scale_type_2>
is a scale type that is the base of the modifier
<operator>
is one of the default math operators (add, subtract, multiply, divide (and maybe even power if you'll add it))
<value>
is a value of the operator
Example:
/scale modifier add pehkui:health pehkui:base @s
would make player's health scale exactly like all other scales (1 base scale = 20 Health, 0.5 base scale = 10)
/scale modifier add pehkui:held_item pehkui:base power -1 @s
would make player's held item scale "reverse" so held item would always have default scale (4 base scale = 1/4 held item scale, 1/16 base scale = 16 held item scale)
You can also use multiple operators or modifiers on the same scale type.
For example:
/scale modifier add pehkui:attack pehkui:base multiply 2 @s
/scale modifier add pehkui:attack pehkui:base subtract 1 @s
(In this exact order) would make your pehkui:attack first set to pehkui:base*2 and then would subtract 1 from the result
(1 base scale = (1 * 2) - 1 attack (1), 2 base scale = (2 * 2)-1 attack (3))
But
Also
/scale modifier add pehkui:held_item pehkui:base power -1 @s
/scale modifier add pehkui:attack pehkui:held_item @s
/scale modifier add pehkui:attack pehkui:base multiply 2 @s
Would first make all items in your hands be unaffected by scaling, then would make your attack be stronger as smaller you are, and than would divide the attack value by pehkui:base*2 (1/4 base scale = 4 / (1/2) attack (8), 2 base scale = (1/2) / 4 attack (1/8))
Another example:
/scale modifier add pehkui:attack pehkui:b add 0.25 @s
/scale modifier add pehkui:attack pehkui:base multiply 2 @s
Would first add 0.25 and then multiply it by 2 (1 base scale = (1 + 0.25) * 2 attack (2.5), 2 base scale = (2 + 0.25) * 2 attack (4.5))
/scale modifier get
/scale modifier get <scale_type_1> <entity>
This commands returns <scale_type_2> <operator> <value>
Example:
After using /scale modifier add pehkui:held_item pehkui:base power -1 @s
/scale modifier get pehkui:held_item
would return pehkui:base power -1
/scale modifier remove
/scale modifier remove <scale_type_1> <scale_type_2> <entity>
/scale modifier remove <scale_type_1> <scale_type_2> <operator> entity>
Example:
/scale modifier remove pehkui:health pehkui:base
would remove all modifiers that are applied to pehkui:health and uses pehkui:base as its base
(if you had pehkui:base multiply 2
, pehkui:base add 1
, pehkui:width power 0.5
modifiers it would end up being just pehkui:width power 0.5
)
/scale modifier remove pehkui:health pehkui:base multiply 2
would remove only pehkui:base multiply 2
(if the situation would be the same as before (pehkui:base multiply 2
, pehkui:base add 1
, pehkui:width power 0.5
) it would be pehkui:base add 1
, pehkui:width power 0.5
)
/scale modifier reset
/scale modifier reset <entity>
/scale modifier reset <scale_type_1> <entity>
Example:
/scale modifier reset @s
would reset all modifiers of a player
/scale modifier reset <pehkui:defence> @s
would reset all modifiers that pehkui:defence has
Well, that's all. If you think this idea has potential but isn't perfect or if you have a question about it. Write it here or DM me in Discord (Space Lover#2057)