Results 1 to 7 of 7

Thread: Resetting var file

  1. #1
    Junior Member
    Join Date
    Aug 2010
    Posts
    4

    Default Resetting var file

    Recent builds (since at least r18026, but it could go back further) have been resetting the var files for my characters in a really weird fashion.

    I've got 2 characters. One of them has a 2 word name (eldron balkhan), which meant that the var file for that char was named vars_eldron balkhan.txt. A couple days ago, Harvest failed to run, citing 'no consumption script selected' - which was odd, as I haven't changed anything other than downloading new Mafia builds. Examining the options for Harvest, they'd reset - and despite hitting 'save' they wouldn't stick. Hunting down the vars file (in Data), I noticed that the character had 2 vars files: vars_eldron balkhan.txt, and vars_eldron_balkhan.txt. The latter, with the additional underscore, had been created that day, and had far fewer vars listed. I figured this was some weird new Mafia config change, copied the old over the new, saved it, and everything worked.

    Today, however, things got worse. Not only did the same thing happen to that character (the vars file resetting to contain very little), but now my other character, with a one word name (Hadanelith) ALSO had his vars file reset. Without creating a new one, so the old version was flat gone. Thankfully I was still able to duplicate the vars from the old version of eldron balkhan, and things ran, but seriously, what in the world is going on here?

    TLDR: vars files are randomly resetting themselves to a fairly empty state, can't figure out why.

    Actions taken: I'm duplicating the files tonight, and setting to read only. Hoping that will at least prevent further data loss? Please advise.

  2. #2

    Default

    vars_charactername.txt sounds like a zlib file. It is not a KoLmafia file. Perhaps something went wrong with the transition that zlib is going through.

  3. #3
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,735

    Default

    If you're mostly using var defaults, sounds like everything is working properly. Yay for cleaning vars!

  4. #4
    Junior Member
    Join Date
    Aug 2010
    Posts
    4

    Default

    1) not using defaults. Var_defaults has more stuff than this is resetting to.
    2) It actually kinda looks like Harvest is resetting stuff at run time. Or possibly one of my other scripts. Going to have to do some very careful step-by-step testing to figure it out.
    3) Once I find the problem child, I'll go bug that dev.

    Thanks for the clarification, friends.

  5. #5

    Default

    UGH this must be what is happening to me, I made a post about it over here; http://kolmafia.us/showthread.php?21...break-recently

    This is what happens when I run Harvest now; http://i.imgur.com/zebAWsT.png

    I have no idea how to fix this, I don't have back ups or anything, all I did was update my KoL Mafia to a newer one.

    Hadanelith, if you figure this out please let me know.

  6. #6
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    D.C. suburbs of Virginia, USA
    Posts
    3,800

    Default

    This sounds like a bug/feature of the changes to how zLib handles variables. In the New World order zLib maintains multiple files. One has defaults and applies to all characters and the other are specific to characters and contain variables that are not at the default.

    The transition is supposed to be transparent but it sounds like that was not the case. There is a line that was changed in the most recent version that replaces spaces with underscores in a file name. The errors described could be the result of that change - the old file is never found so a new one is created with basically default values. It might be too late but renaming "x x" to "x_x" and rerunning might recapture the non default settings.

    The vars_default file is likely to grow since every script that runs and use zLib variables will add their defaults to that file. The character files will likely get smaller.

    If this is still an issue it might get attention from zarqon if it was mentioned in the zLib thread.

    P.S. While the line building the file name was changed the string substitution of underscore for space was present so my hypothesis is much less likely. :-(
    Last edited by fronobulax; 05-17-2017 at 03:07 PM.
    You just vehemently agreed with me
    Originally Posted by Veracity View Post
    I agree with frono.
    Originally Posted by Veracity View Post
    There are 69 players more powerful than you.
    Originally Posted by Statistics Leaderboards

  7. #7

    Default

    For what it's worth, I've now updated Harvest to use the new ZLib world order. I too had reset problems, but post-update I set my copy of Harvest up again from scratch, and the values seem to be sticking across Mafia restarts and rollover. If anyone has any more issues with Harvest forgetting settings, please let me know on the main Harvest thread here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •