Results 1 to 6 of 6

Thread: How does the maimizer handle conflicting requests?

  1. #1
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,515

    Default How does the maimizer handle conflicting requests?

    If I say "maximize +equip BACKITEM1 +equip BACKITEM2", obviously, it can't fulfill that, since you only have one "back" slot. Accessories, sure - you can take two slots.

    What does it do?

    - give an error and do nothing
    - take the first and ignore the second (with or without an error)
    - take the second and ignore the first (with or without an error(

    What SHOULD it do?
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  2. #2
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,515

    Default

    My motivation:

    My Spacegate script wants to use the maximizer to maximize on (something) with a set of required equipment, based on the environmental hazards and (perhaps) the desired sample kit.
    It also allows you to specify additional maximizer parameters. If you have a favorite shirt, fine. If you have a favorite back item and have to wear the rad cloak, not so fine.

    If I specify both "equip rad cloak" and "+equip OTHERBACKITEM", what happens?

    Does it take the first - in which case, no problem: I put the required items first and the extra items second.
    Does it take the last, in which case, no problem, I put the extra items first and the required items second.
    Does it simply fail? In which case, I can issue the command with all items and abort if it fails.
    Or I can write lots of code to parse user-supplied maximizer options and check compatibility with the required options and strip out the conflicting user-supplied ones with a warning.

    What is the current behavior?
    That will inform what I need to do.
    What is the desired behavior (if different from current behavior)?
    That will inform what I (or Darzil ) needs to do with either the script or KoLmafia code.

  3. #3
    Senior Member ckb's Avatar
    Join Date
    Mar 2006
    Posts
    833

    Default

    I don't know what the current behavior is, but if there is a change, I like option B (take the first and ignore the second (without an error)), so that any tie breakers for maximizer will be the order in which they appear in the string to be maximized.

  4. #4
    Developer
    Join Date
    Apr 2010
    Posts
    4,932

    Default

    It should certainly fail, as it won’t meet all the requirements. Currently it won’t give an error (though it will ‘fail’) and will maximise everything else ignoring required items etc. This is because high score plus fail beats low score plus fail. You could put in checks and get it to give a friendly error and not waste time if a user gives it an impossible request.

  5. #5
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,515

    Default

    I think I'll just check if all the required items are equipped after maximizing and any are not, give a message and abort.
    Thanks for the explanation!

  6. #6
    Senior Member
    Join Date
    Jun 2016
    Posts
    261

    Default

    Yeah, my script solution for handling maximizer calls with potentially conflicting equipment requirements is to unequip everything, then equip all the required equipments (for example the protopack if I'm looking to bust a ghost), and then call the maximizer with the 'empty' restriction included to fill up the remaining slots.

Posting Permissions

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