WinDanesz / WizardryUtils

WizardryUtils is a library mod to ease addon (spell pack) development for the Electroblob's Wizardry Minecraft mod.
https://www.curseforge.com/minecraft/mc-mods/wizardryutils
GNU General Public License v3.0
3 stars 1 forks source link

[Bug - 1.12.2] Format Error Text & "wizardryutils.SpellCost" doesn't work with negative values. #15

Open SonicX8000 opened 1 year ago

SonicX8000 commented 1 year ago

Description

Minecraft: 1.12.2 Forge: 14.23.5.2860

Mods: 6 Baubles-1.12-1.5.2 ElectroblobsWizardry-4.3.8 HadEnoughItems_1.12.2-4.24.1 PotionCore-1.9_for_1.12.2 QualityTools-1.0.7_for_1.12.2 WizardryUtils-1.12.2-1.1.3


image

Using quality tools to add in some attributes for wand tiers and apparently the text shows ' Number Format Error % Attribute'.

Spell Cost aka wizardryutils.SpellCost doesn't work if using negative values to reduce the mana cost for spells... though if you use positive values which increases mana usage... that works correctly and takes the extra mana as it should.

Here's an example using different spells.

Dart - Novice Earth Spell | Base Mana Cost: 5 -50% Spell Cost? 5 Mana is consumed. (Bugged, mana usage would be 2.5 if halved.)

+200% Spell Cost? 15 Mana is consumed. (Works, as that's about 3x mana usage.)

=====

Arrow Rain - Master Sorcery Spell | Base Mana Cost: 75

-50% Spell Cost? 75 Mana is consumed. (Bugged, mana usage would be 37.5 if halved.)

+200% Spell Cost? 225 Mana is consumed. (Works, as that's about 3x mana usage.)

WinDanesz commented 1 year ago

Please see if v1.1.4 solves these issues

WinDanesz commented 1 year ago

Also, what attribute "operation" are using (0,1,2)?

SonicX8000 commented 1 year ago

Looks to be fixed in v1.1.4. I tested this using Operation 0 via quality tools.

Spell: Font of Vitality

Mana Cost: 112 (112.5) with 50 % Spell Cost 93 (93.25) with 25 % Spell Cost 75 56 (56.25) with -25 % Spell Cost 37 (37.5) with -50 % Spell Cost

The format is also fixed by the looks of it. image

WinDanesz commented 1 year ago

Thanks. Not related, but what adds the green property at the bottom? The set bonus mod?

SonicX8000 commented 1 year ago

The Set Bonus Mod adds that text, yea. Though that's only custom text as the attribute values can be different besides what's shown. For example...

I could have an item say +500% Attack Damage but have it apply generic.attackDamage = -2.0 @ 1 to give -200% Attack Damage.