Counters: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Lostcalpolydude
No edit summary
imported>Bale
No edit summary
Line 8: Line 8:
** '''number''' the is the number of turns until the counter expires
** '''number''' the is the number of turns until the counter expires
** '''title''' is an optional parameter to name the counter. If no name is given, then the counter will be named "manual".   
** '''title''' is an optional parameter to name the counter. If no name is given, then the counter will be named "manual".   
*** The title can include one or more instances of loc=X, where X is an adventure id that you can go without having the counter abort adventuring.  Using * for X will prevent it from aborting anywhere, making it a strictly informative counter.
*** The title can include one or more instances of '''loc=X''', where X is an adventure id that you can go without having the counter abort adventuring.  Using * for X will prevent it from aborting anywhere, making it a strictly informative counter.
*** The title can include '''type=wander''' which will cause it to remain at 0 turns until it is explicitly cleared. Wandering monsters work this way and mafia explicitly clears the counter after the wandering monster is encountered.
** '''img''' is an optional image for the counter. You can use any of the images in KoL's \itemimages directory. If no image is chosen, then mafia will use watch.gif for the counter.  
** '''img''' is an optional image for the counter. You can use any of the images in KoL's \itemimages directory. If no image is chosen, then mafia will use watch.gif for the counter.  



Revision as of 21:51, 31 July 2016


This is a CLI command for displaying or modifying KoLmafia's counters. Without any parameters it will display all current counters.

The possible parameters are:

  • clear: This will remove all current counters.
  • add condition: This will add a counter. If the condition is an item, it will set the necessary quantity to this many more than you currently have. This also has the additional parameters: number [title img]
    • number the is the number of turns until the counter expires
    • title is an optional parameter to name the counter. If no name is given, then the counter will be named "manual".
      • The title can include one or more instances of loc=X, where X is an adventure id that you can go without having the counter abort adventuring. Using * for X will prevent it from aborting anywhere, making it a strictly informative counter.
      • The title can include type=wander which will cause it to remain at 0 turns until it is explicitly cleared. Wandering monsters work this way and mafia explicitly clears the counter after the wandering monster is encountered.
    • img is an optional image for the counter. You can use any of the images in KoL's \itemimages directory. If no image is chosen, then mafia will use watch.gif for the counter.

Example: to add a fortune cookie counter to expire in 88 turns, use this command:

counters add 88 cookie fortune.gif

To add a counter that will not abort in The Haunted Gallery or The Haunted Bathroom, use this:

counters add 10 example loc=392 loc=394