Feature CAB data storage

I know this wouldn't be used -too- extensively, but in the instances it would need to be used, it would be a godsend. I have spent many ascensions perfecting my CABs (1 and 2 for SC, 3 and 4 for TT, etc) and logged in today and KoL conveniently forget them all.

There have been other cases where something random would clear one of the CAB lines, but never all 12. Very inconvenient.

Possible to have mafia remember what's what and offer a restore function?
 
When I heard about this type of thing happening before, it was a greasemonkey script screwing it up (I think jhunz's battlefield tracker script in that case), so that's something to check on. Scripts can store anything they want in the CAB, and strange formatting from other sources could mess with mafia's parsing of it.
 
When I first saw this, I assumed you were going to request to keep preferences in the CAB, or something, so you can run on multiple computers. We've thought about and discussed that for quite a while. There are a lot of issues - including the fact that KoL can choose to simply wipe out your CAB if the JSON string isn't JUST right. Not only would we hate to be the cause of people losing their CAB, KoL - or buggy scripts that use it - could make you lose your settings.

KoLmafia does read and cache your CAB whenever you login or timein. There's a comment "cache the JSON object locally and submit it to the server on logout." We don't actually submit it to the server on logout; whenever you read it in the Relay Browser, we watch, and whenever you write it in the Relay Browser, we watch and update our cached copy and pass on your request, but we never modify and write it of our own volition.

Given that, we certainly do have a copy of your CAB saved and could easily back it up for you in your settings directory, say, and even provide a CLI command to read that and send it to KoL. Presumably, rather than "submit to server on logout" (which we don't do), it would be "update current saved copy on logout".
 
Last edited:
That would be amazing, but does it keep a "backup" per se? I mean, what's to stop it from assuming my totally empty CABs are the way I've set them, and then erasing the saved copy?

Anyway, if they are already saved, is there a place I can look and see them in preferences? (I'm not opposed to digging through the settings file if need be)
 
They are currently never saved. I was proposing that we save them - only - on logout. If you log in next time and notice that your CAB has been wiped, you have a backup - until you log out again and save the wiped CAB.

I don't see how we can do better than that, automatically.
 
Back
Top