LVLI health values

Issue #7 closed
Daria Tynan repo owner created an issue

Add support for health percentage for items in LVLIs.

Updated in experimental and awaiting feedback from Ogerboss.

Comments (7)

  1. ogerboss

    (tested with 923359d)

    I gave this now finally a more in depth test and it seems to work mostly fine. For testing I just took my existing setup (clone Leveled Item from a dummy plugin, change the FormIDs of the contained items, add record to patch) and added a line set the entry's health value to twice the health value queried from it.

    Overall it works fine, except for one cornercase: If the original entry does not have a health value defined, getItemCondition() returns 0.0 instead of 1.0, which would make more sense.

  2. ogerboss

    Hmm, that's interesting...Tracing Statements indicate that your latest commit indeed changed the return value as I suggested. But in the testcase I described in my last post, the entry with originally no health data has still no health data assigned when I browse the output with Tes5Edit.

    The interesting pattern here is that it seems to affect only those items that had no "COED - Extra Data" block (as denoted in Tes5Edit), all entries that had this block in the Leveled list I cloned have health values that are modified as expected. Maybe you forgot to export this datablock, if it does not exist? This would also explain the earlier discrepancy in my observations. (The "does not work" report from the Bethesda forums was based on modifying health in a new leveled list created purely in SkyProc.)

  3. Daria Tynan reporter

    Alright I just changed the isValid() for COED to be true if it has a non 0 health. I'm not sure how it was valid for existing COED blocks before but it seems to work for me. Check if my latest commit does it for you.

  4. ogerboss

    Your fix works nicely, now all items in the LeveledItem have their health values doubled, regardless of wether they had a COED block before or not. :)

    From my point of view everything seems to be working now, thanks for implementing/resolving this issue.

  5. Log in to comment