Globox1997 / LevelZ

https://modrinth.com/mod/levelz
https://www.curseforge.com/minecraft/mc-mods/levelz
GNU General Public License v3.0
51 stars 50 forks source link

config to allow skills to be multiplied by a value #313

Open PixelatedBruh opened 1 year ago

PixelatedBruh commented 1 year ago

Make sure you are not opening a duplicate.

Description of your suggestion.

From my knowledge the stamina skill multiplies your base speed when you add points to it. The ability to have this option for strength, archery, health, ect would prove invaluable to at many. At least me it would as it would allow me to have scaling be much more balanced with your other rpgdifficulty mod.

An example of this being. The wooden sword does 4 damage, if you were to then add a point to strength instead of it being a flat addition from the config you could config it to multiply the base damage. so every additional point would multiply the base by the value you set. Let's say in this case the multiple is 0.05. At level 100 the the sword would do 5x the damage (20) of the base damage of 4. this pairs nicely with scaled mobs from your other mod.

in this example the rpgdifficulty has mobs at level 100 have 5x stat multiplier. The ratio of damage of a wooden sword will be the same for any level mob as long as the strength level matches the mobs(not taking account of defence for this example) this in turn makes having better gear such as a diamond sword even more valuable as it would be multiplied as well mitigating the issue of flat additions making all the weapons do almost the same damage in the end.

This would make having a balanced leveling and difficulty system be infinitely better.

PixelatedBruh commented 1 year ago

so after a while faffing about. I found out that the mod by default only applies the function to the attribute base value and not the attribute value itself. So my example would not be possible without a much larger change than i thought it would be. I tried for a while but could not figure out a way without massive changes being done.

grergh ^ one of the many lines with the attribute function

I searched for a set value method to replace the setbasevalue one

https://maven.fabricmc.net/docs/yarn-1.19+build.1/net/minecraft/entity/attribute/EntityAttributeInstance.html In here i learned that there is no setvalue method.

I see something called modifiers, with those I think having the skill points affect the attribute value instead of the base value may be possible.

Im stuck at this moment and have questions i cant find answers for

in minecraft does holding a sword count as one of these "modifiers"? (because holding a sword does not change your base generic damage attribute it only changes the generic damage value) if so how can I implement something similar to the sword modifier for where the stat skill code function goes?

I used to use another mod for this in 1.19.2 that was able to do what I wanted but unfortunately the mod developer is on hiatus and I could not get an unofficial fork to work.

If anyone reads this and can provide any information or help I will be grateful.