Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix custom condition factor not saving properly (#1524) #1525

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

yohjimane
Copy link
Contributor

@yohjimane yohjimane commented Nov 14, 2023

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

@Xottab-DUTY Xottab-DUTY added Breaking change This breaks saves compatibility, or changes binary formats, etc. Bug The issue in the run-time. labels Nov 15, 2023
@yohjimane yohjimane changed the title Draft: Fix #1524 Fix custom condition factor not saving properly (#1524) Dec 4, 2023
@yohjimane
Copy link
Contributor Author

yohjimane commented Dec 4, 2023

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.

@Hrusteckiy
Copy link
Contributor

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

@yohjimane
Copy link
Contributor Author

yohjimane commented Dec 4, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking change This breaks saves compatibility, or changes binary formats, etc. Bug The issue in the run-time.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants