Results 1 to 9 of 9

Thread: [PATCH] Track content familiar charges

  1. #1
    Developer
    Join Date
    Jan 2007
    Posts
    95

    Post [PATCH] Track content familiar charges

    Hey all. Not super sure of this one so I'd like to post here. Since content familiar drop chance increases per turn used following their last drop, I'd like to track their "charge". There are some content familiars for whom the exact mechanics are not calculated yet, but this tracking can only aid that.

    My big spadey question, though, is do these charges persist over rollover? I assumed no, but the code for Angry Jung Man and Grimstone Golem charges assumes they're persistant. They also don't necessarily all behave the same way.

    If they do, I'll probably need to add code to set them to zero and not touch them again once the daily drops has reached its max.

    Also in this patch: some familiars have charges that we track that were not reflected in their "charges" proxy record, so I've fixed that.
    Attached Files
    Last edited by gausie; 07-10-2019 at 09:23 AM. Reason: Removed some accidental changes from the patch

  2. #2
    Senior Member
    Join Date
    Apr 2018
    Posts
    328

    Default

    You should probably clean up the patch a bit. It has a lot of inadvertent changes in it.

  3. #3
    Developer
    Join Date
    Jan 2007
    Posts
    95

    Default

    Oh huh I left a few changes I meant to exclude at the top - will remove them. The other seemingly inadvertent changes are ordering the defaults.txt alphabetically though, so I'll keep them

  4. #4
    Senior Member
    Join Date
    Apr 2018
    Posts
    328

    Default

    Iím not sure I see a reason to implement this explicitly for each familiar. Couldnít you just track the number of combats spent each day with any given familiar, using the same mechanism utilized for tracking turns spent at locations? Itíd be a lot cleaner. Optionally, store the turn number of the last drop similar to the existing tracking for sausage goblin encounters.

    On that note, Iím not quite sure what the use of this would be. When would you adjust your behavior according to the drop chance? It could be useful for spading, but you could use log files for that too. To be clear, that alone is not a reason to reject such a patch.

  5. #5
    Developer
    Join Date
    Jan 2007
    Posts
    95

    Default

    The chance of a drop from these familiars increases per adventure spent with the familiar but without the item dropping, so that is the direct application. I couldn't think of a better way of doing that than this patch, but I'd be interested to know if you had one.

    The water might be muddied somewhat by the fact that I also brought a few unrelated familiars in-line w.r.t. having both a charge pref and a charge proxy record.

  6. #6
    Developer fronobulax's Avatar
    Join Date
    Feb 2009
    Location
    Central Virginia, USA
    Posts
    4,511

    Default

    The water might be muddied somewhat by the fact that I also brought a few unrelated familiars in-line w.r.t. having both a charge pref and a charge proxy record.
    Originally Posted by gausie View Post
    Consider two separate patches.
    Well, thank you.
    Originally Posted by Veracity View Post

  7. #7
    Developer
    Join Date
    Jan 2007
    Posts
    95

    Default

    Ok this is now split into two patches.

    The first (charges.patch) adds new tracking for item-dropping familiars.
    The second (charges_proxy_record.patch) fixes the fact a few familiars have a charge that is tracked in preferences but not returned in the "charges" proxy record.
    Attached Files

  8. #8
    Senior Member
    Join Date
    Apr 2018
    Posts
    328

    Default

    The chance of a drop from these familiars increases per adventure spent with the familiar but without the item dropping, so that is the direct application.
    Originally Posted by gausie View Post
    I canít conceive of a scenario where the altered drop chance would be important, though. If you are running a familiar to get a drop, wouldnít you continue running it until you get said drop?
    I couldn't think of a better way of doing that than this patch, but I'd be interested to know if you had one.
    Originally Posted by gausie View Post
    Well, this is conceptually the same thing as the turns_played proxy record field for locations, right? For the sake of simplicity and maintainability, I feel we should try to reuse that approach for this. That being said, I think there are outstanding problems with that already, most notably the lack of persistence between KoLmafia sessions. Or that might be the intended behavior, Iím not quite sure.

  9. #9
    Developer
    Join Date
    Jan 2007
    Posts
    95

    Default

    I can’t conceive of a scenario where the altered drop chance would be important, though. If you are running a familiar to get a drop, wouldn’t you continue running it until you get said drop?
    Originally Posted by Saklad5 View Post
    There are plenty of reasons. Ultimately we allow scripts (and, indeed, the user) to have a fuller understanding of the game state without having to track things themselves.

    Well, this is conceptually the same thing as the turns_played proxy record field for locations, right? For the sake of simplicity and maintainability, I feel we should try to reuse that approach for this. That being said, I think there are outstanding problems with that already, most notably the lack of persistence between KoLmafia sessions. Or that might be the intended behavior, I’m not quite sure.
    Originally Posted by Saklad5 View Post
    No because the charge is not derived from the turns played with the familiar active, but the turns played with the familiar since their last drop.

Posting Permissions

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