xray-16 icon indicating copy to clipboard operation
xray-16 copied to clipboard

Fix custom condition factor not saving properly (#1524)

Open yohjimane opened this issue 1 year ago • 3 comments

~Doesn't work yet because pSE_InventoryItem m_fCondition is not updated correctly, and overrides the correct value.~ That issue is fixed, should be ready to merge now!

Will break saves; requires new save

credits: lucy

yohjimane avatar Nov 14 '23 14:11 yohjimane

Fixed now - there was some code which was overriding the correct condition.

I removed that line, checked vanilla condition on save/load with multiple item types (weapon, armor, helmet, eatable item) - everything works as expected.

I also checked custom condition added with use_condition param, and that works as expected too*

*Eatable items also need to have max_uses defined to function properly.

yohjimane avatar Dec 04 '23 01:12 yohjimane

Does this work with elements that only have IsUsingCondition() flag?

Hrusteckiy avatar Dec 04 '23 02:12 Hrusteckiy

@Hrusteckiy Yes, it should work. I tested some outfits out- those use FUsingCondition flag instead of use_condition from ltx and the condition saves/loads correctly.

yohjimane avatar Dec 04 '23 02:12 yohjimane