KoLmafia Properties

From Kolmafia
Revision as of 05:57, 20 November 2007 by 222.62.198.66 (talk)
Jump to navigation Jump to search

trdronsitc

Part 11 - KoLmafia Properties

In addition to affecting gameplay directly through ASH functions and CLI commands, scripters also have the ability to control certain core behaviors of KoLmafia through direct modification of the preferences file. In addition, scripters can also create variables that will survive across sessions.

To see all of the pre-defined variables that exist, look in the “data” subfolder wherever you keep the KoLmafia executable and open up any of the .kcs files named for your characters. This guide will not attempt to describe all of the variables that are there: many are uninteresting from the player’s point of view and others are too unwieldy to be properly set at the moment. Of those that are interesting and accessable, the functionality can be divided into three main sections:

Edit: I believe the preferences are now stored in the "settings" folder, rather than the "data" folder, and are named "prefs_character_name.txt". Anyone more knowledgable than I care to confirm? --HallowedWeasel 15:59, 27 February 2007 (CST)

Choice Adventures

These settings control all of the non-combat adventures that give you a choice of outcomes. In the GUI, you can view and set these options in the Choices tab of the Preferences window, but you can also more-or-less directly access the values from ASH. This is slightly unorthodox behavior, given that the GUI doesn’t get notified that the true value has been updated and so your Choices page could be out of synch, but needs must when the Devil drives, eh?

As I said before, setting these values may be more-or-less direct, which turns out to be true in a literal sense. Of the two sections on the Choices tab, the lower set is “more” direct. These line up as follows:

Property NamePreferences Tab NameKoL Adventure Name
choiceAdventure2PalindomeDenim Axes Examined
choiceAdventure3TeleportitisThe Oracle Will See You Now
choiceAdventure4South of the BorderFinger-Lickin’ … Death
choiceAdventure5Gravy Barrow 1Heart of Very, Very Dark Darkness
choiceAdventure7Gravy Barrow 2How Depressing
choiceAdventure8Gravy Barrow 3On the Verge of a Dirge
choiceAdventure15eXtreme Slope 1Yeti Nother Hippy
choiceAdventure16eXtreme Slope 2Saint Beernard
choiceAdventure17eXtreme Slope 3Generic Teen Comedy
choiceAdventure18Itznotyerzitz Mine 1A Flat Miner
choiceAdventure19Itznotyerzitz Mine 2100% Legal
choiceAdventure20Itznotyerzitz Mine 3See You Next Fall
choiceAdventure21Sleazy Back AlleyUnder the Knife
choiceAdventure22Pirate’s Cove 1The Arrrbitrator
choiceAdventure23Pirate’s Cove 2Barrie Me at Sea
choiceAdventure24Pirate’s Cove 3Amatearrr Night
choiceAdventure25Dungeon of DoomOuch! You bump into a door!
choiceAdventure40Cola Wars 1The Effervescent Fray
choiceAdventure41Cola Wars 2Smells Like Team Spirit
choiceAdventure42Cola Wars 3What is it Good For?
choiceAdventure45Spooky Forest 1Maps and Legends
choiceAdventure46Spooky Forest 2An Interesting Choice
choiceAdventure47Spooky Forest 3Have a Heart
choiceAdventure73Whitey’s Grove 1Don’t Fence Me In
choiceAdventure74Whitey’s Grove 2The Only Thing About Him…
choiceAdventure75Whitey’s Grove 3Rapido!

Changing the settings for these adventures is as easy as an ASH function like set_property(”choiceAdventure40″, “2″) or the CLI command “set choiceAdventure46=3″. To be candid, I can never figure out the correct numeric value by any amount of cleverness, so what I do is to log in to KoLmafia, use the Preferences Window to set the value to what I want, quit KoLmafia, and then check my character’s .kcs file to see the value that was set for the appropriate key.

By contrast, there is limited support for setting the adventures in the upper set, as these are compound settings. The two that are most affected are Castle Wheel, which controls all of choiceAdventure9 through choiceAdventure12, and which corpse you want to loot in the Spooky Forest, which covers choiceAdventure26 through choiceAdventure29. Again, your best bet is to set these two adventures to the choice you want and then check your data file to see which specific settings correspond to the high-level decision. So far as I know, there is no way to use scripts to specify your choices for the Astral Trip.

However, according to Holatuwol (here), the settings map to "X=pick the Xth Option" and X+1=pick an item you don't have (i.e., complete the outfit).

Other KoLmafia-based preferences

This is going to be a limited survey of the more interesting of the settings that you can control.

battleAction - This specifies the strategy that you will use in battle. The sorts of values that you might select here are “attack” for normal attacking, “custom” to use the Custom Combat Scripts, “item dictionary” when you’re adventuring in the Valley beyond Orc Chasm, or “skill thrust smack” to use TS during the entire battle.

hpAutoRecovery - This is a float value that specifies the percentage of your HP at which the autohealer kicks in. I haven’t tried it, but I think you’d be generally unhappy if you set it to something other than a multiple of 0.1.

hpAutoRecoveryTarget - A companion to the above, this is the target that the autohealer will aspire to achieve.

As before, feel free to peruse the .kcs file to see all of the values. The names aren’t very subtle, so you should be able to guess what they’re all for.

User-defined variables

In addition to setting the variables that KoLmafia predefines, you can also create any others to cover any information you wish. As you do so, keep in mind that while you can clear a variable’s value to the null string, there is currently no way to delete a key (aside from editing the .kcs file in the text processor of your choice and deleting the line that contains the key).