Bug - Fixed Ascending set timesRested value to bad value

katyarn

Member
Some change between r25765 and r25773, log property changes has started producing bad data for me. I can't tell if the actual properties are not returning correct values or if it's purely a logging issue.

For comparison sake, here are excerpts from my logs from yesterday and today.


Upon entering Valhalla, KoLMafia set Preference timesRested changed from 1 to 99.
Later, upon exiting Valhalla, it set Preference timesRested changed from 99 to 14.

Normally it would go from 1 to 0 and then be correct following the ascension. The order of a bunch of property resets changed between r25765 and r25773. Attached are the two logs of properties resetting upon reaching Valhalla named PropertyReset11 and PropertyReset12 based on the date of the month. Diffing the two files can give you an idea of what went wrong, though why it happened, I have no clue.
 

Attachments

  • PropertyReset11.txt
    20 KB · Views: 1
  • PropertyReset12.txt
    20.5 KB · Views: 1
Last edited:

heeheehee

Developer
Staff member
I did a quick skim of all the other legacyDefaults and timesRested is the only oddball. Good catch!
 

lostcalpolydude

Developer
Staff member
Correcting to 1 less than the limit after incorrectly being set to above the limit is expected behavior (unrelated to recent changes).
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
@gausie it looks like r25773 touched the timesRested preference, which has... a strange default value of 99.

@katyarn do you happen to have 14 free rests available normally?
This is weird. I'll look at git history to see why its 99
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
Seems to have been the case for a very long time. I suppose its so we don't assume you have free rests when you don't after a wiped save. Since we can see whether the next free rest is going to be free from the presence or lack of a "(1)", it seems like we should just change the default value.

 

VladYvhuce

Member
It's not just ascending. Starting last night after rollover, when I logged into r25774, I discovered that I only had 1 free rest left out of my 9 free rests. I used that one during skill casting. I just updated to r23774 and logged back in a moment ago and this shows up in the CLI.
Preference previousUpdateVersion changed from KoLmafia r25773 to KoLmafia r25774
Preference lastRelayUpdate changed from KoLmafia r25773 to KoLmafia r25774
Preference previousUpdateRevision changed from 25773 to 25774
Clearing data overrides: upgrade from KoLmafia r25773 to KoLmafia r25774
Installing default certificate validation...
Sending login request...
Initializing session for rick tyger...
Loading character status...
Refreshing session data...
Synchronizing moon data...
Retrieving character data...
Updating inventory...
Examining Meat in closet...
Updating closet...
Retrieving quest data...
Retrieving familiar data...
Familiar data retrieved.
Retrieving campground data...
Preference timesRested changed from 9 to 8
 
Top