Closed Cocopa99 closed 2 months ago
When you use it on a player....
I was easily able to replicate this issue with only the bare minimum amount of mods installed:
This happens 100% of the time when dealing the finishing blow using the Skyward Sunder ascendancy ability to any mob.
Mods installed when testing: simplyskills 1.5.0+1.20.1 cloth-config 11.1.118 player-animator 1.0.2-rc1+1.20 puffish_attributes 0.5.0 puffish_skills 0.12.2 spell_engine 0.15.8+1.20.1 spell_power 0.11.1+1.20.1 trinkets 3.7.2 jade 11.9.2+fabric
Same issue with Cyclonic Cleave
and Ghostwalk
, entity hp gets set to NaN
upon any hit with those abilities (can be verified with, for example, CraftTweaker's /ct entity_info
) - doesn't even have to be a killing blow.
When used with "Armor & damage scaling" mod this also causes a tick crash.
Really hope to see a fix for it, since that makes the game effectively unplayable for players with those abilities.
I have never been able to reproduce this issue locally. Are you all running into this issue in a server environment?
Are you all running into this issue in a server environment?
Nope, i did my testing in singleplayer.
@HaXrBOT What version of Fabric API and Fabric Loader were you using? Also, did you have anything else unlocked in the skill tree, or was it just Skyward Sunder?
I was using Fabric-loader 0.15.11 and Fabric-API 0.92.2.
I only had Skyward Sunder unlocked in my example above.
@HaXrBOT Thank you. I believe I have reproduced the issue, after many hours murdering sheep. It appears to be specific to Pufferfish Attributes version 0.5.0. Previously, I had been using 0.4.0.
If you still have your test instance, would you mind confirming that you do not have this issue when using Pufferfish Attributes version 0.4.0?
@Sweenus I just tried it in my testing instance. And yeah, i am unable to reproduce the issue when using Pufferfish Attributes 4.0.0
@pufmat Do you know what might be causing this?
@pufmat Further to this, another modpack developer has reported the issue on a server when using Pufferfish Attributes 0.4.0, but I am unable to reproduce it to provide further detail. I notice that there is a mixin relating to setting attributes to NaN, and wonder if it might be related: https://github.com/pufmat/attributesmod/blob/1.21/Common/src/main/java/net/puffish/attributesmod/mixin/EntityAttributeInstanceMixin.java
The issue is caused because Simply Skills tries to get the value of a dynamic attribute. These attributes modify dynamic values, instead of providing values calculated from the base value. The older versions of Pufferfish's Attributes used to return some value. However, as it was incorrect, to avoid confusion, I later decided to return NaN instead to indicate that it should not be used.
Here Simply Skills gets they value of a Ranged Damage attribute which is a dynamic attribute, so the value is NaN: https://github.com/Sweenus/SimplySkills/blob/bb11ec79552e4bf5c353d4e4da65eaa305dfa283/src/main/java/net/sweenus/simplyskills/util/HelperMethods.java#L623
The issue is caused because Simply Skills tries to get the value of a dynamic attribute. These attributes modify dynamic values, instead of providing values calculated from the base value. The older versions of Pufferfish's Attributes used to return some value. However, as it was incorrect, to avoid confusion, I later decided to return NaN instead to indicate that it should not be used.
Here Simply Skills gets they value of a Ranged Damage attribute which is a dynamic attribute, so the value is NaN:
Thank you for taking the time to look at this! If I understand correctly, there is no longer any way to determine the attribute investment into, for example, ranged damage? This has several implications for Simply Skills, as there are a number of situations where I would like to determine the skill point investment in a specific attribute.
Would it be possible to have an API function to return some kind of value for these attributes? Even if they are relative and not representative of any real-world value. I just need a way to scale a variety of systems based on point investment into various attributes.
You can assume an initial value for the dynamic attribute and then apply modifiers:
var dealtDamage = /* assumed dealt damage value */
var rangedDamage = AttributesMod.applyAttributeModifiers(
dealtDamage,
Sign.POSITIVE.wrap(player.getAttributeInstance(AttributesMod.RANGED_DAMAGE))
);
is there a known fix for this problem yet? will there be an update for the mod soon?
i got into this bugged mode in an important world of mind and would like to get out of it?
is there a known fix for this problem yet? will there be an update for the mod soon?
i got into this bugged mode in an important world of mind and would like to get out of it?
^ Same, I would like to know a fix for this issue
I had this bug happen to my character. My health was set to NaN
which resulted in an invincibility of sorts that not even /kill
could resolve. My character was essentially in a constantly 'dying' state which caused the screen to shake and the inability to open menus. This was in response to using Skyward Sunder
with the Might II
effect.
Here's how I fixed it personally:
0.4.0
of Pufferfish Attributes (I was on 0.5.0
)/data modify entity YourPlayerName Health set value 20.0
/data modify entity YourPlayerName AbsorptionAmount set value 0.0
It seems to be fine for now.. but I'll update this if any adverse effects start happening. YMMV.
This should now be fixed in the latest version. Thank you @pufmat for identifying the cause 🙏
When you use the ability on a mob and bring it to 0 HP, the mob becomes invulnerable to all damage and can no longer be killed by any means, including undead mobs in sunlight.