yeelp/Distinct-Damage-Descriptions

Damage types are not always matched to the correct amounts in weapon tooltips

Closed this issue · 4 comments

From what I can tell, the icons/text for damage types are put in a fixed order, but the amounts are usually in the order they're written in the config. This doesn't always apply though so I'm not sure what the real cause is. The actual damage distributions do match the config, so it's just a visual bug. The mismatch occurs with icons or with just text.

Noticed this messing with my modpack, then tried it with just DDD and it persisted. I set these up for testing:

S:"Weapon Base Damage" <
   minecraft:golden_sword;[(s, 0.85),(p, 0.15)]
   minecraft:golden_axe;[(ddd_force, 0.50),(ddd_cold, 0.07),(ddd_fire, 0.18),(ddd_necrotic, 0.25)]
   minecraft:golden_pickaxe;[(b, 0.25),(s, 0.4),(p, 0.35)]
   minecraft:golden_shovel;[(p,0.25),(ddd_poison,0.75)]
   minecraft:golden_hoe;[(p,0.75),(ddd_poison,0.25)]
>

Results in-game:
image
Most of them are fine, but the axe and pickaxe are wrong. The pickaxe amounts doesn't match the config or the icons, so I have no idea what's happening there.

This does not apply to armor (which uses a fixed order with the correct amounts) or mobs (which uses an increasing order based on the amount). As a small feature request while I'm here, the ability to order damage types yourself based on the config would be nice.

yeelp commented

I must've overlooked something with the way the damage types are sorted (which is a little odd as I remember looking this over extensively. Must've missed something small). I believe I had a valid reason for sorting them, one of which is just consistency. I could see if I can sort by value instead of by type, but definitely not a major concern at the moment.

Config:

  • This is the config I used
    minecraft:wooden_sword;[(b, 0.01), (p, 0.02), (s, 0.03), (ddd_acid, 0.04), (ddd_cold, 0.05), (ddd_fire, 0.06), (ddd_force, 0.07), (ddd_lightning, 0.08), (ddd_necrotic, 0.09), (ddd_poison, 0.1), (ddd_psychic, 0.11), (ddd_radiant, 0.12), (ddd_thunder, 0.22)]

  • As a list:
    (b, 0.01)
    (p, 0.02)
    (s, 0.03)
    (ddd_acid, 0.04)
    (ddd_cold, 0.05)
    (ddd_fire, 0.06)
    (ddd_force, 0.07)
    (ddd_lightning, 0.08)
    (ddd_necrotic, 0.09)
    (ddd_poison, 0.1)
    (ddd_psychic, 0.11)
    (ddd_radiant, 0.12)
    (ddd_thunder, 0.22)

  • Using a weapon with 100 damage to test while in debug:
    starting damage: 100.0
    (ddd_acid (Special, built-in), 4.0),
    (ddd_necrotic (Special, built-in), 9.0),
    (ddd_thunder (Special, built-in), 22.0),
    (ddd_poison (Special, built-in), 10.0),
    (ddd_psychic (Special, built-in), 11.0),
    (ddd_cold (Special, built-in), 5.0),
    (ddd_bludgeoning (Physical, built-in), 1.0),
    (ddd_lightning (Special, built-in), 8.0),
    (ddd_fire (Special, built-in), 6.0),
    (ddd_slashing (Physical, built-in), 3.0),
    (ddd_force (Special, built-in), 7.0),
    (ddd_piercing (Physical, built-in), 2.0),
    (ddd_radiant (Special, built-in), 12.0)}
    new damage after deductions: 100.0

  • Note: Damage get calculated right

  • Screenshot of weapon tooltips:
    ddd_13damageTypes

  • only the tooltips are wrong

Mob Tooltips work fine:
ddd_13damageTypesMobs

yeelp commented

Cool, I'm terrible at closing keywords, but this should be fixed. Damage distributions did their tooltip formatting weirdly and there was no connection between the sorted types and their damage. As for not ordering the types at all, open a separate feature request for it - it just makes it easier to track independently of this bug.