<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.kolmafia.us/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=QVamp</id>
	<title>Kolmafia - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kolmafia.us/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=QVamp"/>
	<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Special:Contributions/QVamp"/>
	<updated>2026-04-24T22:54:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=KoLmafia_Properties&amp;diff=1307</id>
		<title>KoLmafia Properties</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=KoLmafia_Properties&amp;diff=1307"/>
		<updated>2016-07-17T17:42:46Z</updated>

		<summary type="html">&lt;p&gt;QVamp: added missing airports&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
Inside your KoLmafia &amp;quot;settings&amp;quot; directory, you should find several files. KoLmafia properties are stored in the files that end with &amp;quot;_prefs.txt&amp;quot;. One of these files will start with &amp;quot;GLOBAL&amp;quot;; the settings inside are shared by all characters using the program (and some of these properties are needed by KoLmafia even when no character is logged in). The other files ending with &amp;quot;_prefs.txt&amp;quot; will start with the name of a character, one for each who has been logged in to date. (Note: the names will all be converted to lowercase.)&lt;br /&gt;
&lt;br /&gt;
==Global Variables==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Variable Name&lt;br /&gt;
!  scope=&amp;quot;col&amp;quot; width=&amp;quot;300&amp;quot; | Default Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
|  addChatCommandLine&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  addCreationQueue&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  addStatusBarToFrames&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  allowCloseableDesktopTabs&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  allowNegativeTally&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  allowNonMoodBurning&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  alwaysGetBreakfast&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoLogin&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  allowSocketTimeout&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoHighlightOnFocus&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoPlantHardcore&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoPlantSoftcore&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoSatisfyWithCloset&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoSatisfyWithCoinmasters&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoSatisfyWithMall&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoSatisfyWithNPCs&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoSatisfyWithStash&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoSatisfyWithStorage&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  breakfastHardcore&lt;br /&gt;
|  Advanced Saucecrafting,Pastamastery,Advanced Cocktailcrafting&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  breakfastSoftcore&lt;br /&gt;
|  Advanced Saucecrafting,Pastamastery,Advanced Cocktailcrafting&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  browserBookmarks&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  cacheMallSearches&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  charsheetDropdown&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  chatBeep&lt;br /&gt;
|  false&lt;br /&gt;
|  Beep on private message in chat&lt;br /&gt;
|-&lt;br /&gt;
|  chatFontSize&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  chatLinksUseRelay&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  chatStyle&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  checkJackassHardcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  checkJackassSoftcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  cloverProtectActive&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  coinMasterIndex&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey0&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey1&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey2&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey3&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey4&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey5&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey6&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey7&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey8&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  combatHotkey9&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  commandLineNamespace&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  connectViaAddress&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  cookies.inventory&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  copyAsHTML&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  customizedTabs&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  dailyDeedsOptions &lt;br /&gt;
|  Breakfast,Daily Dungeon,Submit Spading Data,Chips,Library Card,Telescope,Ball Pit,Styx Pixie,VIP Pool,Swimming Pool,April Shower,Bag o&#039; Tricks,Legendary Beat,Outrageous Sombrero,Feast,Friars,Skate Park,Concert,Demon Summoning,Rage Gland,Free Rests,Hot Tub,Nuns,Oscus&#039; Soda,Express Card,Flush Mojo,Pudding,Hatter,Melange,Ultra Mega Sour Ball,Stills,Photocopy,Putty,Camera,Banished Monsters,Romantic Arrow,Avatar of Jarlberg Staves,Bonus Adventures,Familiar Drops,Free Fights,Free Runaways,Defective Token&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  dailyDeedsVersion&lt;br /&gt;
|  8&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  debugBuy&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  debugConsequences&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  debugFoxtrotRemoval&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  debugPathnames&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  defaultBorderColor&lt;br /&gt;
|  blue&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  defaultDropdown1&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  defaultDropdown2&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  defaultDropdownSplit&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  defaultLimit&lt;br /&gt;
|  5&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  defaultLoginServer&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  displayName&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  externalEditor&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  fixedThreadPoolSize&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  gapProtection&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  getBreakfast&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  grabCloversHardcore&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  grabCloversSoftcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  greenScreenProtection&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  grimoireSkillsHardcore&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  grimoireSkillsSoftcore&lt;br /&gt;
|  Summon Hilarious Objects&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  guiUsesOneWindow&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  harvestGardenHardcore&lt;br /&gt;
|  none&lt;br /&gt;
|  The crop that breakfast will harvest, if in your garden.&lt;br /&gt;
|-&lt;br /&gt;
|  harvestGardenSoftcore&lt;br /&gt;
|  none&lt;br /&gt;
|  The crop that breakfast will harvest, if in your garden.&lt;br /&gt;
|-&lt;br /&gt;
|  hideServerDebugText&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  highlightList&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  http.proxyHost&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  http.proxyPassword&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  http.proxyPort&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  http.proxyUser&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  https.proxyHost&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  https.proxyPassword&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  https.proxyPort&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  https.proxyUser&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  initialDesktop&lt;br /&gt;
|  AdventureFrame,CommandDisplayFrame,&amp;lt;br /&amp;gt;MallSearchFrame,GearChangeFrame,SkillBuffFrame &lt;br /&gt;
|  starting tab configuration&lt;br /&gt;
|-&lt;br /&gt;
|  initialFrames&lt;br /&gt;
|  RecentEventsFrame&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  innerChatColor&lt;br /&gt;
|  #ffa98c&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  innerTabColor&lt;br /&gt;
|  #8ca9ff&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  itemManagerIndex&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBuffRequestType&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastRelayUpdate&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastRssUpdate&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastRssVersion&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastUserAgent&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastUsername&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  libramSkillsHardcore&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  libramSkillsSoftcore&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logAcquiredItems&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logBattleAction&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logBrowserInteractions&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logChatMessages&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logChatRequests&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logCleanedHTML&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logDecoratedResponses&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logFamiliarActions&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logGainMessages&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logReadableHTML&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  loginRecoveryHardcore&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  loginRecoverySoftcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  loginScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  loginServerName&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  loginWindowLogo&lt;br /&gt;
|  lantern.jpg&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logMonsterHealth&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logoutScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logReverseOrder&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logStatGains&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logStatusEffects&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  logStatusOnLogin&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  macroDebug&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  macroLens&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mementoListActive&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mergeHobopolisChat&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  outerChatColor&lt;br /&gt;
|  #b4460f&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  outerTabColor&lt;br /&gt;
|  #0f46b4&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pathedSummonsHardcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pathedSummonsSoftcore&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  preferredWebBrowser&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  previousNotifyList&lt;br /&gt;
|  &amp;lt;&amp;gt;&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  previousUpdateVersion&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  previousUpdateRevision&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  protectAgainstOverdrink&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  proxySet&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  readManualHardcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  readManualSoftcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAddsCustomCombat&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAddsDiscoHelper&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAddsGraphicalCLI&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAddsQuickScripts&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAddsRestoreLinks&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAddsUpArrowLinks&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAddsUseLinks&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAddsWikiLinks&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayAllowRemoteAccess&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayBrowserOnly&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayFormatsChatText&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayHidesJunkMallItems&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayMaintainsEffects&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayMaintainsHealth&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayMaintainsMana&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayOverridesImages&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayRunsAfterAdventureScript&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayRunsBeforeBattleScript&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayRunsBeforePVPScript&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayScriptButtonFirst&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relaySkillButtonCount&lt;br /&gt;
|  5&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayTextualizesEffects&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayTrimsZapList&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayUsesInlineLinks&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayUsesIntegratedChat&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayViewsCustomItems&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayWarnOnRecoverFailure&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  removeMalignantEffects&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  saveSettingsOnSet&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  saveState&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  saveStateActive&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  scriptButtonPosition&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  scriptList&lt;br /&gt;
|  restore hp | restore mp&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sharePriceData&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  showAllRequests&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  showAnnouncements&lt;br /&gt;
|  true&lt;br /&gt;
|  Display special KoL announcements from the login page&lt;br /&gt;
|-&lt;br /&gt;
|  showExceptionalRequests&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  simpleSvnUpdate&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  statusDropdown&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  stealthLogin&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  svnInstallDependencies&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  svnShowCommitMessages&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  svnUpdateOnLogin&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  swingLookAndFeel&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  switchEquipmentForBuffs&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  syncAfterSvnUpdate&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  tomeSkillsHardcore&lt;br /&gt;
|  Summon Snowcone&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  tomeSkillsSoftcore&lt;br /&gt;
|  all&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  toolbarPosition&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useChatToolbar&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useContactsFrame&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useCrimboToysHardcore&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useCrimboToysSoftcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useDecoratedTabs&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useDevProxyServer&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useDockIconBadge&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useImageCache&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useLastUserAgent&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useNaiveSecureLogin&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useSecureLogin&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useShinyTabbedChat&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useSystemTrayIcon&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useTabbedChatFrame&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useToolbars&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  useZoneComboBox&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  userAgent&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  verboseSpeakeasy&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  visitLoungeHardcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  visitLoungeSoftcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  visitRumpusHardcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  visitRumpusSoftcore&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Per-Account Variables==&lt;br /&gt;
Several categories of Per-Account preferences ([[Daily Variables]], [[Choice Adventures]], and [[Quest Tracking Preferences]]) have their own pages and are not listed here.&lt;br /&gt;
&lt;br /&gt;
===Daily Variables===&lt;br /&gt;
See page [[Daily Variables]].&lt;br /&gt;
&lt;br /&gt;
===Choice Adventures===&lt;br /&gt;
See page [[Choice Adventures]].&lt;br /&gt;
&lt;br /&gt;
===Quest Tracking===&lt;br /&gt;
See page [[Quest Tracking Preferences]].&lt;br /&gt;
&lt;br /&gt;
===User-defined variables===&lt;br /&gt;
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&amp;amp;#8217;s value to the null string, there is currently no way to delete a key (aside from editing the .txt file in the text processor of your choice and deleting the line that contains the key).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Variable Name&lt;br /&gt;
!  scope=&amp;quot;col&amp;quot; width=&amp;quot;300&amp;quot; | Default Value&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
|  addingScrolls&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  afterAdventureScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  arcadeGameHints&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoAbortThreshold&lt;br /&gt;
|  -0.05&lt;br /&gt;
|  Abort adventuring at this percentage of HP. (-0.05 means if HP restoration failed)&lt;br /&gt;
|-&lt;br /&gt;
|  autoAntidote&lt;br /&gt;
|  0&lt;br /&gt;
|  Use antidotes in combat&lt;br /&gt;
|-&lt;br /&gt;
|  autoBuyPriceLimit&lt;br /&gt;
|  20000&lt;br /&gt;
|  Don&#039;t auto purchase anything that costs more than this&lt;br /&gt;
|-&lt;br /&gt;
|  autoCraft&lt;br /&gt;
|  true&lt;br /&gt;
|  Automatically spend 10 meat to create a badass belt or Bonerdagon necklace if the components are available&lt;br /&gt;
|-&lt;br /&gt;
|  autoQuest&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  autoEntangle&lt;br /&gt;
|  false&lt;br /&gt;
|  Use Entangling Noodles at the beginning of combat&lt;br /&gt;
|-&lt;br /&gt;
|  autoGarish&lt;br /&gt;
|  false&lt;br /&gt;
|  If true, when attempting to eat lasagna, will attempt to automatically acquire and use a {{kolwiki|potion of the field gar}}&lt;br /&gt;
|-&lt;br /&gt;
|  autoManaRestore&lt;br /&gt;
|  true&lt;br /&gt;
|  Restore MP in combat&lt;br /&gt;
|-&lt;br /&gt;
|  autoOlfact&lt;br /&gt;
|  &lt;br /&gt;
|  Automatically cast Olfaction&lt;br /&gt;
|-&lt;br /&gt;
|  autoPotionID&lt;br /&gt;
|  false&lt;br /&gt;
|  Attempt to ID ! potions in combat&lt;br /&gt;
|-&lt;br /&gt;
|  autoPutty&lt;br /&gt;
|  &lt;br /&gt;
|  Automatically use Spooky Putty&lt;br /&gt;
|-&lt;br /&gt;
|  autoRepairBoxServants&lt;br /&gt;
|  true&lt;br /&gt;
|  Create in-a-boxen before cooking or mixing &lt;br /&gt;
|-&lt;br /&gt;
|  autoSphereID&lt;br /&gt;
|  false&lt;br /&gt;
|  Attempt to ID spheres from the Hidden City&lt;br /&gt;
|-&lt;br /&gt;
|  autoSteal&lt;br /&gt;
|  true&lt;br /&gt;
|  Attempt to pickpocket in combat&lt;br /&gt;
|-&lt;br /&gt;
|  autostartGalaktikQuest&lt;br /&gt;
|  true&lt;br /&gt;
|  Get Doc Galaktik&#039;s Quest at the start of ascension&lt;br /&gt;
|-&lt;br /&gt;
|  autoTuxedo&lt;br /&gt;
|  false&lt;br /&gt;
|  If true, when drinking a martini, automatically attempts to equip a {{kolwiki|tuxedo shirt}} first&lt;br /&gt;
|-&lt;br /&gt;
|  availableCandyCredits&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  availableDimes&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  availableQuarters&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  availableStoreCredits&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  availableSwagger&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  ballpitBonus&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  banishedMonsters&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  banishingShoutMonsters&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  bankedKarma&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  barrelGoal&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  bartenderTurnsUsed&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  basementMallPrices&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  battleAction&lt;br /&gt;
|  attack with weapon&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  beeCounter&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  beforePVPScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  betweenBattleScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  bigBrotherRescued&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  birdformCold&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  birdformHot&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  birdformRoc&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  birdformSleaze&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  birdformSpooky&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  birdformStench&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  blackBartsBootyAvailable&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  blackPuddingsDefeated&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  blackForestProgress&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  blankOutUsed&lt;br /&gt;
|  0&lt;br /&gt;
|  Tracks current amount of active Blank-out&lt;br /&gt;
|-&lt;br /&gt;
|  boneAbacusVictories&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  booPeakProgress&lt;br /&gt;
|  100&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  borisPoints&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  breakableHandling&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  breakableHandling1964&lt;br /&gt;
|  2&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  brodenBacteria&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  brodenSprinkles&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  buffBotCasting&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  buffBotMessageDisposal&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  buffBotPhilanthropyType&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  buffJimmyIngredients&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  burnoutsDefeated&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  buyScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  cameraMonster&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  camerasUsed&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  carboLoading&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  cellarLayout&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  charitableDonations&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  chasmBridgeProgress&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  chatbotScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  chatbotScriptExecuted&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  chatLiterate&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  chatServesUpdates&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  chefTurnsUsed&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  chessboardsCleared&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of queen cookies acquired from chessboards (max 50)&lt;br /&gt;
|-&lt;br /&gt;
|  chosenTrip&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  cinderellaMinutesToMidnight&lt;br /&gt;
|  0&lt;br /&gt;
|  Time left while doing the stepmother section of the {{kolwiki|grimstone mask}} content&lt;br /&gt;
|-&lt;br /&gt;
|  cinderellaScore&lt;br /&gt;
|  0&lt;br /&gt;
|  Current score while doing the stepmother section of the {{kolwiki|grimstone mask}} content&lt;br /&gt;
|-&lt;br /&gt;
|  grimstoneMaskPath&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  clanAttacksEnabled&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  coldAirportAlways&lt;br /&gt;
|  false&lt;br /&gt;
|  Set to true if you use an {{kolwiki|airplane charter: The Glaciest}}&lt;br /&gt;
|-&lt;br /&gt;
|  considerShadowNoodles&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  counterScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  corralUnlocked&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  crappyCameraMonster&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  crimboTreeDays&lt;br /&gt;
|  7&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  crudeMonster&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentEasyBountyItem&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentExtremity&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentHardBountyItem&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentHippyStore&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentJunkyardTool&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentJunkyardLocation&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentMood&lt;br /&gt;
|  default&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentNunneryMeat&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  currentSpecialBountyItem&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  customCombatScript&lt;br /&gt;
|  default&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  cyrptAlcoveEvilness&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  cyrptCrannyEvilness&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  cyrptNicheEvilness&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  cyrptNookEvilness&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  cyrptTotalEvilness&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  dampOldBootPurchased&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  dbNemesisSkill1&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  dbNemesisSkill2&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  dbNemesisSkill3&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  defaultFlowerLossMessage&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  defaultFlowerWinMessage&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  demonName1&lt;br /&gt;
|  &lt;br /&gt;
|  Name of demon that gives pies&lt;br /&gt;
|-&lt;br /&gt;
|  demonName2&lt;br /&gt;
|  &lt;br /&gt;
|  Name of demon that gives Preternatural Greed&lt;br /&gt;
|-&lt;br /&gt;
|  demonName3&lt;br /&gt;
|  &lt;br /&gt;
|  Name of demon that gives Fit To Be Tide&lt;br /&gt;
|-&lt;br /&gt;
|  demonName4&lt;br /&gt;
|  &lt;br /&gt;
|  Name of demon that gives Big Flaming Whip&lt;br /&gt;
|-&lt;br /&gt;
|  demonName5&lt;br /&gt;
|  &lt;br /&gt;
|  Name of demon that gives Demonic Taint&lt;br /&gt;
|-&lt;br /&gt;
|  demonName6&lt;br /&gt;
|  Tatter&lt;br /&gt;
|  Name of demon that gives pile of smoking rags&lt;br /&gt;
|-&lt;br /&gt;
|  demonName7&lt;br /&gt;
|  Ak&#039;gyxoth&lt;br /&gt;
|  Name of demon that gives drinks&lt;br /&gt;
|-&lt;br /&gt;
|  demonName8&lt;br /&gt;
|  &lt;br /&gt;
|  Name of demon found in the Nemesis&#039; Lair&lt;br /&gt;
|-&lt;br /&gt;
|  demonName9&lt;br /&gt;
|  &lt;br /&gt;
|  Name of demon that gives Burning, Man&lt;br /&gt;
|-&lt;br /&gt;
|  desertExploration&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  desktopHeight&lt;br /&gt;
|  600&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  desktopWidth&lt;br /&gt;
|  800&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  dnaSyringe&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  dolphinItem&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  envyfishMonster&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  flyeredML&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  fossilB&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of bat teeth on the fossilized necklace&lt;br /&gt;
|-&lt;br /&gt;
|  fossilD&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of demon teeth on the fossilized necklace&lt;br /&gt;
|-&lt;br /&gt;
|  fossilN&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of baboon teeth on the fossilized necklace&lt;br /&gt;
|-&lt;br /&gt;
|  fossilP&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of spider teeth on the fossilized necklace&lt;br /&gt;
|-&lt;br /&gt;
|  fossilS&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of serpent teeth on the fossilized necklace&lt;br /&gt;
|-&lt;br /&gt;
|  fossilW&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of wyrm teeth on the fossilized necklace&lt;br /&gt;
|-&lt;br /&gt;
|  fratboysDefeated&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  gameProBossSpecialPower&lt;br /&gt;
|  Unknown&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  ghostPencil1&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  ghostPencil2&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  ghostPencil3&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  ghostPencil4&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  ghostPencil5&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  ghostPencil6&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  ghostPencil7&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  ghostPencil8&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  ghostPencil9&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  goldenMrAccessories&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  gongPath&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  gourdItemCount&lt;br /&gt;
|  5&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  grimstoneCharge&lt;br /&gt;
|  0&lt;br /&gt;
|  Track combat turns with Grimstone Golem&lt;br /&gt;
|-&lt;br /&gt;
|  guardTurtlesFreed&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of times that [http://kol.coldfront.net/thekolwiki/index.php/Cold-Blooded_Warm_Fuzzies guard turtles have been freed] this ascension.&lt;br /&gt;
|-&lt;br /&gt;
|  guyMadeOfBeesCount&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  guyMadeOfBeesDefeated&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  hardcorePVPWarning&lt;br /&gt;
|  false&lt;br /&gt;
|  If true, will warn you if you click on the Prism with a broken Hippy Stone and PVP fights remaining&lt;br /&gt;
|-&lt;br /&gt;
|  heavyRainsStartingThunder&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  heavyRainsStartingRain&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  heavyRainsStartingLightning&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  heroDonationBoris&lt;br /&gt;
|  0&lt;br /&gt;
|  Meat donated to Boris&lt;br /&gt;
|-&lt;br /&gt;
|  heroDonationJarlsberg&lt;br /&gt;
|  0&lt;br /&gt;
|  Meat donated to Jarlsberg&lt;br /&gt;
|-&lt;br /&gt;
|  heroDonationSneakyPete&lt;br /&gt;
|  0&lt;br /&gt;
|  Meat donated to Sneaky Pete&lt;br /&gt;
|-&lt;br /&gt;
|  hippiesDefeated&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  hotAirportAlways&lt;br /&gt;
|  false&lt;br /&gt;
|  Set to true if you use an {{kolwiki|airplane charter: That 70s Volcano}}&lt;br /&gt;
|-&lt;br /&gt;
|  hpAutoRecovery&lt;br /&gt;
|  -0.05&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  hpAutoRecoveryItems&lt;br /&gt;
|  cannelloni cocoon;scroll of drastic healing;tongue of the walrus;lasagna bandages;doc galaktik&#039;s ailment ointment&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  hpAutoRecoveryTarget&lt;br /&gt;
|  1.0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  iceSculptureMonster&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  invalidBuffMessage&lt;br /&gt;
|  You sent an amount which does not correspond to a valid buff amount.&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  jarlsbergPoints&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of bonus skill points earned by doing {{kolwiki|Avatar of Jarlsberg}} ascensions&lt;br /&gt;
|-&lt;br /&gt;
|  jungCharge&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  kingLiberated&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  kingLiberatedScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  knownAscensions&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  kolhsTotalSchoolSpirited&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lassoTraining&lt;br /&gt;
|  &lt;br /&gt;
|  Records your current {{kolwiki|sea lasso}} adjective.&lt;br /&gt;
|-&lt;br /&gt;
|  lastAdventure&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastAnticheeseDay&lt;br /&gt;
|  -5&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastArcadeAscension&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBadMoonReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion819&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion820&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion821&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion822&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion823&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion824&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion825&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion826&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotion827&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBangPotionReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBattlefieldReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastBreakfast&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastCastleGroundUnlock&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastCastleTopUnlock&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastCellarReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastChanceBurn&lt;br /&gt;
|  &lt;br /&gt;
|  CLI command executed at lastChanceThreshold (&amp;quot;#&amp;quot; is replaced by the amount of MP to burn)&lt;br /&gt;
|-&lt;br /&gt;
|  lastChanceThreshold&lt;br /&gt;
|  100&lt;br /&gt;
|  amount of unburned MP at which alternatives to extending existing buffs will be considered&lt;br /&gt;
|-&lt;br /&gt;
|  lastChessboard&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastChasmReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastCouncilVisit&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastCounterDay&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDesertUnlock&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDispensaryOpen&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDoorCodeReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfDiceRolls&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfDigitRunes&lt;br /&gt;
|  -------&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfEquipmentRunes&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem118&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem119&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem120&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem360&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem361&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem362&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem363&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem364&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem365&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem910&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryItem3199&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfOfficeItem3208&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfOfficeItem3209&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfOfficeItem3210&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfOfficeItem3211&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfOfficeItem3212&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfOfficeItem3213&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfOfficeItem3214&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfOreRunes&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfFactoryReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfHopper1&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfHopper2&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfHopper3&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastDwarfHopper4&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastEVHelmetValue&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastEVHelmetReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastEasterEggBalloon&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastEmptiedStorage&lt;br /&gt;
|  -1&lt;br /&gt;
|  Number of the last ascension that Hangk&#039;s storage was emptied.&lt;br /&gt;
|-&lt;br /&gt;
|  lastEncounter&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastFilthClearance&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastGoofballBuy&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastGuildStoreOpen&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastGuyMadeOfBeesReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastHiddenCityAscension&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastHippyCall&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastKingLiberation&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastLightsOutTurn&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastMushroomPlot&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastMessageId&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastMiningReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStripReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStrip3144&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStrip4138&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStrip4139&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStrip4140&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStrip4141&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStrip4142&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStrip4143&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPaperStrip4144&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateEphemera&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateEphemeraReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsult1&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsult2&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsult3&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsult4&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsult5&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsult6&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsult7&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsult8&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPirateInsultReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPlusSignUnlock&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPorkoBoard&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPorkoPayouts&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastPorkoExpected&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastQuartetAscension&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastQuartetRequest&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastSecondFloorUnlock&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastSemirareReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastTavernAscension&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastTavernSquare&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastTelescopeReset&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastTowerClimb&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastVioletFogMap&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lastWartDinseyDefeated&lt;br /&gt;
|  -1&lt;br /&gt;
|  Tracks defeat of {{kolwiki|Wart Dinsey}}&lt;br /&gt;
|-&lt;br /&gt;
|  lastZapperWand&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  lightsOutAutomation&lt;br /&gt;
|  1&lt;br /&gt;
|  Highlights/automatically selects correct option during {{kolwiki|Lights Out Quest}} noncombats&lt;br /&gt;
|-&lt;br /&gt;
|  louvreDesiredGoal&lt;br /&gt;
|  7&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  louvreGoal&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  louvreOverride&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  makeFriendsMonster&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  manaBurnSummonThreshold&lt;br /&gt;
|  10&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  manaBurningThreshold&lt;br /&gt;
|  -0.05&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  maximizerMRUSize&lt;br /&gt;
|  5&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  maximizerCombinationLimit&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  maxManaBurn&lt;br /&gt;
|  1000&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| mayflyExperience&lt;br /&gt;
| 0&lt;br /&gt;
| Uses of mayfly bait necklace. Reset each ascension.&lt;br /&gt;
|-&lt;br /&gt;
|  meansuckerPrice&lt;br /&gt;
|  400&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  meatDropSpading&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mineLayout1&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mineLayout2&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mineLayout3&lt;br /&gt;
|  &lt;br /&gt;
|  Stores the results of each twinkly rock mined in {{kolwiki|Anemone Mine (Mining)}}. This is used by the relay browser to display the results in-game.&lt;br /&gt;
|-&lt;br /&gt;
|  mineLayout4&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  miniAdvClass&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mmgAutoConfirmBets&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mmgDisabled&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mmgSearchMinimum&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mmgSearchMaximum&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  moleTunnelLevel&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mpAutoRecovery&lt;br /&gt;
|  0.0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mpAutoRecoveryItems&lt;br /&gt;
|  phonics down;knob goblin superseltzer;mountain stream soda;magical mystery juice;knob goblin seltzer;cherry cloaca cola;soda water&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  mpAutoRecoveryTarget&lt;br /&gt;
|  0.3&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  munchiesPillsUsed&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  nextAdventure&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  nextSpookyravenElizabethRoom&lt;br /&gt;
|  The Haunted Storage Room&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  nextSpookyravenStephenRoom&lt;br /&gt;
|  The Haunted Bedroom&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  nosyNoseMonster&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  oceanAction&lt;br /&gt;
|  savecontinue&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  oceanDestination&lt;br /&gt;
|  manual&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  olfactedMonster&lt;br /&gt;
|  unknown&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  parasolUsed&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pastaThrall1&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pastaThrall2&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pastaThrall3&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pastaThrall4&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pastaThrall5&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pastaThrall6&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pastaThrall7&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pastaThrall8&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pendingMapReflections&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  peteMotorbikeTires&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  peteMotorbikeGasTank&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  peteMotorbikeHeadlight&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  peteMotorbikeCowling&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  peteMotorbikeMuffler&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  peteMotorbikeSeat&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  photocopyMonster&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pieStuffing&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pirateSwagger&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  plantingDate&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  plantingDay&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  plantingLength&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  plantingScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
| poolSharkCount&lt;br /&gt;
| 0&lt;br /&gt;
| Number of times &amp;quot;Rack &#039;em up&amp;quot; was selected at {{kolwiki|A Shark&#039;s Chum}}&lt;br /&gt;
|-&lt;br /&gt;
|  postAscensionScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  preAscensionScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  preBlackbirdFamiliar&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  promptAboutCrafting&lt;br /&gt;
|  1&lt;br /&gt;
|  Prompt when crafting would spend an adventure. (0=never, 1=one-time confirmation, 2=always)&lt;br /&gt;
|-&lt;br /&gt;
|  pyramidPosition&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  pyramidBombUsed&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  rainDohMonster&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  raveCombo1&lt;br /&gt;
|  &lt;br /&gt;
|  Rave Concentration&lt;br /&gt;
|-&lt;br /&gt;
|  raveCombo2&lt;br /&gt;
|  &lt;br /&gt;
|  Rave Nirvana&lt;br /&gt;
|-&lt;br /&gt;
|  raveCombo3&lt;br /&gt;
|  &lt;br /&gt;
|  Rave Knockout&lt;br /&gt;
|-&lt;br /&gt;
|  raveCombo4&lt;br /&gt;
|  &lt;br /&gt;
|  Rave Bleeding&lt;br /&gt;
|-&lt;br /&gt;
|  raveCombo5&lt;br /&gt;
|  &lt;br /&gt;
|  Rave Steal&lt;br /&gt;
|-&lt;br /&gt;
|  raveCombo6&lt;br /&gt;
|  &lt;br /&gt;
|  Rave Substats&lt;br /&gt;
|-&lt;br /&gt;
|  reanimatorArms&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  reanimatorLegs&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  reanimatorSkulls&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  reanimatorWeirdParts&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  reanimatorWings&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  recentLocations&lt;br /&gt;
|  5&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  recoveryScript&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayCounters&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayShowSpoilers&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relayShowWarnings&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relocatePygmyJanitor&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  relocatePygmyLawyer&lt;br /&gt;
|  -1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  rememberDesktopSize&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  requireBoxServants&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  requireSewerTestItems&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  retrieveContacts&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  rumpelstiltskinTurnsUsed&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  rumpelstiltskinKidsRescued&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  safePickpocket&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  scriptMRULength&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  scriptMRUList&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  seahorseName&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  semirareCounter&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  semirareLocation&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  serverAddsCustomCombat&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sexChanges&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  showGainsPerUnit&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  showNoSummonOnly&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  showTurnFreeOnly&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sideDefeated&lt;br /&gt;
|  neither&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sidequestArenaCompleted&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sidequestFarmCompleted&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sidequestJunkyardCompleted&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sidequestLighthouseCompleted&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sidequestNunsCompleted&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sidequestOrchardCompleted&lt;br /&gt;
|  none&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  singleFamiliarRun&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  skateParkStatus&lt;br /&gt;
|  war&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  skillLevel46&lt;br /&gt;
|  2&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  skillLevel47&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  skillLevel48&lt;br /&gt;
|  2&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sleazeAirportAlways&lt;br /&gt;
|  false&lt;br /&gt;
|  Set to true if you use an {{kolwiki|airplane charter: Spring Break Beach}}&lt;br /&gt;
|-&lt;br /&gt;
|  slimelingFullness&lt;br /&gt;
|  0.0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  slimelingStacksDropped&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  slimelingStacksDue&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  sneakyPetePoints&lt;br /&gt;
|  0&lt;br /&gt;
|  Number of bonus skill points earned by doing {{kolwiki|Avatar of Sneaky Pete}} ascensions&lt;br /&gt;
|-&lt;br /&gt;
|  sortByRoom&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  spadingData&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  spookyAirportAlways&lt;br /&gt;
|  false&lt;br /&gt;
|  Set to true if you use an {{kolwiki|airplane charter: Conspiracy Island}}&lt;br /&gt;
|-&lt;br /&gt;
|  spookyPuttyMonster&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  stationaryButton1&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  stationaryButton2&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  stationaryButton3&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  stationaryButton4&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  stationaryButton5&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  stenchAirportAlways&lt;br /&gt;
|  false&lt;br /&gt;
|  Set to true if you use an {{kolwiki|airplane charter: Dinseylandfill}}&lt;br /&gt;
|-&lt;br /&gt;
|  suppressInappropriateNags&lt;br /&gt;
|  false&lt;br /&gt;
|  Facilitates end-user suppression of inappropriate nags.&lt;br /&gt;
|-&lt;br /&gt;
|  suppressPotentialMalware&lt;br /&gt;
|  false&lt;br /&gt;
|  If true, prevents the relay browser from connecting to known malware attack vectors.&lt;br /&gt;
|-&lt;br /&gt;
|  tacoDanCocktailSauce&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  tacoDanFishMeat&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  [[tavernLayout]]&lt;br /&gt;
|  0000000000000000000000000&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescope1&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescope2&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescope3&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescope4&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescope5&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescope6&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescope7&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescopeLookedHigh&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  telescopeUpgrades&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  testudinalTeachings&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  thanksMessage&lt;br /&gt;
|  Thank you for the donation!&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  timeTowerAvailable&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  trackLightsOut&lt;br /&gt;
|  false&lt;br /&gt;
|  Track {{kolwiki|Lights Out Quest}}. Can be set with &amp;quot;spookyraven&amp;quot; CLI command.&lt;br /&gt;
|-&lt;br /&gt;
|  trapperOre&lt;br /&gt;
|  chrome ore&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  turtleBlessingTurns&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  uneffectWithHotTub&lt;br /&gt;
|  true&lt;br /&gt;
|  If true, during HC/ronin KoLmafia will spend a {{kolwiki|hot tub}} use to remove a negative effect instead of a {{kolwiki|soft green echo eyedrop antidote}}. Does not change casual/aftercore behavior.&lt;br /&gt;
|-&lt;br /&gt;
|  usable1HWeapons&lt;br /&gt;
|  3&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usable1xAccs&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usable2HWeapons&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usable3HWeapons&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usableAccessories&lt;br /&gt;
|  3&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usableHats&lt;br /&gt;
|  2&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usableOffhands&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usableOther&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usablePants&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  usableShirts&lt;br /&gt;
|  1&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  valueOfAdventure&lt;br /&gt;
|  500&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  valueOfInventory&lt;br /&gt;
|  1.8&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  valueOfStill&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  valueOfTome&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  verboseMaximizer&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  violetFogGoal&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  violetFogLayout&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  warProgress&lt;br /&gt;
|  unstarted&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  waxMonster&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  welcomeBackAdv&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  workteaClue&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3542&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3543&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3544&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3545&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3546&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3547&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3548&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3749&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe3751&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe4172&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe4173&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  unknownRecipe4174&lt;br /&gt;
|  true&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  yearbookCameraAscensions&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  yearbookCameraPending&lt;br /&gt;
|  false&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  yearbookCameraTarget&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  yearbookCameraUpgrades&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|-&lt;br /&gt;
|  zeppelinProtestors&lt;br /&gt;
|  0&lt;br /&gt;
|  Counts protesters removed from {{kolwiki|A Mob of Zeppelin Protesters}}&lt;br /&gt;
|-&lt;br /&gt;
|  zombiePoints&lt;br /&gt;
|  0&lt;br /&gt;
|  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{SeeAlso|get_property|set_property}}&lt;br /&gt;
&lt;br /&gt;
{{PropertyNav}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>QVamp</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Data_Structures&amp;diff=3202</id>
		<title>Data Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Data_Structures&amp;diff=3202"/>
		<updated>2012-09-01T20:27:32Z</updated>

		<summary type="html">&lt;p&gt;QVamp: expanded sort section with more information and a full example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
&lt;br /&gt;
KoLmafia supports complex data structures such as maps and records made from simple [[Data Types|data types]].&lt;br /&gt;
&lt;br /&gt;
== Maps ==&lt;br /&gt;
Most of this information was copied directly from ASH Maps Tutorial, by Veracity (http://kolmafia.sourceforge.net/advanced.html#maps)&lt;br /&gt;
&lt;br /&gt;
A map is indexed by one data type (the key) and associates that key with another (or the same) data type (the value). The key can be any ASH simple data type: boolean, int, float, string, item, location, class, stat, skill, effect, familiar, slot, or monster. The value can be any ASH data type at all: a simple type, a record, or can be another map. This effectively allows multi-dimensional maps and. In fact, that&#039;s how the syntax we provide for multi-dimensional maps actually operate: maps of maps of maps ...&lt;br /&gt;
&lt;br /&gt;
You can declare a map any time you can declare a variable: as a top level (global) variable, as a function parameter, or as a local variable in any scope.&lt;br /&gt;
&lt;br /&gt;
You can fetch data from a map any time you can provide a data value: in an expression, as a function parameter, on the right side of an assignment statement, from a &amp;quot;return&amp;quot; statement, as so on. You can pass around entire maps, individual elements, or intermediate maps: &amp;quot;slices&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Declarations ===&lt;br /&gt;
&lt;br /&gt;
The syntax for declaring the data type of a map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;data type&amp;gt; [ &amp;lt;key type&amp;gt;, ... ] &amp;lt;aggregate_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
{{CodeSample&lt;br /&gt;
|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
string [item] map1;&lt;br /&gt;
float [class, string, int] another_map;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Assignments ===&lt;br /&gt;
&lt;br /&gt;
If you use a map on the left side of an assignment, you set the whole map at once to the new value.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample&lt;br /&gt;
|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int [item] my_pricelist;&lt;br /&gt;
int [item] new_pricelist;&lt;br /&gt;
&lt;br /&gt;
/* Some code that updates new_pricelist */&lt;br /&gt;
&lt;br /&gt;
my_pricelist = new_pricelist;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you specify a map and a complete set of indices (of the correct types) on the left side of an assignment statement, you set a single element.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample&lt;br /&gt;
|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int [item] my_pricelist;&lt;br /&gt;
my_pricelist[ $item[ pail ] ] = 1000;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you specify a map and a prefix of indices (of the correct type), you directly set one of the intermediate maps, a &amp;quot;slice&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample&lt;br /&gt;
|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
float [string, int, string] my_map;&lt;br /&gt;
float [int, string] slice1;&lt;br /&gt;
&lt;br /&gt;
/* Some code that fills slice1 */&lt;br /&gt;
my_map[ &amp;quot;slice1&amp;quot; ] = slice1;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
The syntax for referencing an element (or slice) of a map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;aggregate name&amp;gt;[ &amp;lt;key expression&amp;gt;, ... ]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the key expressions will be evaluated at run time. If you specify all the keys the map expects, you fetch data of the type specified by the map. If you specify fewer keys than the map expects, you get an intermediate map, a &amp;quot;slice&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
As an example:&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
boolean [string, string] props; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
might be used to hold &amp;quot;properties&amp;quot; associated with names.&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
props[ &amp;quot;dog&amp;quot;, &amp;quot;mammal&amp;quot; ] = true; &lt;br /&gt;
props[ &amp;quot;dog&amp;quot;, &amp;quot;pet&amp;quot; ] = true; &lt;br /&gt;
props[ &amp;quot;dog&amp;quot;, &amp;quot;fun&amp;quot; ] = false;&lt;br /&gt;
props[ &amp;quot;turtle&amp;quot;, &amp;quot;mammal&amp;quot; ] = false;&lt;br /&gt;
props[ &amp;quot;turtle&amp;quot;, &amp;quot;pet&amp;quot; ] = true;&lt;br /&gt;
props[ &amp;quot;turtle&amp;quot;, &amp;quot;fun&amp;quot; ] = false;&lt;br /&gt;
props[ &amp;quot;aardvark&amp;quot;, &amp;quot;mammal&amp;quot; ] = true;&lt;br /&gt;
props[ &amp;quot;aardvark&amp;quot;, &amp;quot;pet&amp;quot; ] = false;&lt;br /&gt;
props[ &amp;quot;aardvark&amp;quot;, &amp;quot;fun&amp;quot; ] = true; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
references:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
props[ &amp;quot;dog&amp;quot;, &amp;quot;mammal&amp;quot;] =&amp;gt; true&lt;br /&gt;
boolean [string] animal = props[ &amp;quot;turtle&amp;quot; ];&lt;br /&gt;
animal[ &amp;quot;fun&amp;quot; ] =&amp;gt; false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Contains ===&lt;br /&gt;
&lt;br /&gt;
You can test the presence of a key in a map using the &amp;quot;contains&amp;quot; operator:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;aggregate reference expression&amp;gt; contains &amp;lt;key expression&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;aggregate reference expression&amp;gt; must evaluate at run time to a map or slice, and must evaluate at run time to a key of the appropriate type. (Note that that is enforced at parse time; ASH can tell the datatype any expression will produce).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
props contains &amp;quot;dog&amp;quot; =&amp;gt; true&lt;br /&gt;
props contains &amp;quot;elephant&amp;quot; =&amp;gt; false&lt;br /&gt;
props[ &amp;quot;aardvark&amp;quot; ] contains &amp;quot;fun&amp;quot; =&amp;gt; true&lt;br /&gt;
animal contains &amp;quot;pet&amp;quot; =&amp;gt; true&lt;br /&gt;
animal contains &amp;quot;favorite food&amp;quot; =&amp;gt; false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove ===&lt;br /&gt;
&lt;br /&gt;
You can remove a key-value association from a map using the &amp;quot;remove&amp;quot; unary operator:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
remove &amp;lt;aggregate reference&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For clarification, an aggregate reference is &amp;quot;&amp;lt;map name&amp;gt;[ &amp;lt;index 1&amp;gt; ... &amp;lt;index n&amp;gt; ]&amp;quot; where &amp;lt;map name&amp;gt;[ &amp;lt;index 1&amp;gt; ... &amp;lt;index n-1&amp;gt; ] specifies the &amp;quot;slice&amp;quot; and &amp;lt;index n&amp;gt; specifies the &amp;quot;key&amp;quot;. Which is just what you expect, if you fully specify the indices; for a single dimensional map, &amp;quot;map[10]&amp;quot; -&amp;gt; &amp;quot;map&amp;quot; is the slice and 10 is the key. The &amp;quot;remove&amp;quot; operator removes the &amp;quot;key&amp;quot; from the &amp;quot;slice&amp;quot;. For example:&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
string [int] map1;&lt;br /&gt;
map1[5] = &amp;quot;foo&amp;quot;;&lt;br /&gt;
print( count( map1 ) + &amp;quot; &amp;quot; + map1 contains 5 + &amp;quot; &amp;quot; + map1[5] );&lt;br /&gt;
print( &amp;quot;remove: &amp;quot; + remove map1[5] );&lt;br /&gt;
print( count( map1 ) + &amp;quot; &amp;quot; + map1 contains 5 + &amp;quot; &amp;quot;  + map1[5] );&lt;br /&gt;
print( &amp;quot;remove: &amp;quot; + remove map1[5] );&lt;br /&gt;
int [string, string] map2;&lt;br /&gt;
map2[&amp;quot;me&amp;quot;,&amp;quot;you&amp;quot;] = 17;&lt;br /&gt;
print( count( map2[&amp;quot;me&amp;quot;] ) + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;] contains &amp;quot;you&amp;quot; + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;,&amp;quot;you&amp;quot;] );&lt;br /&gt;
print( &amp;quot;remove: &amp;quot; + remove map2[&amp;quot;me&amp;quot;, &amp;quot;you&amp;quot;] );&lt;br /&gt;
print( count( map2[&amp;quot;me&amp;quot;] ) + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;] contains &amp;quot;you&amp;quot; + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;,&amp;quot;you&amp;quot;] );&lt;br /&gt;
print( &amp;quot;remove: &amp;quot; + remove map2[&amp;quot;me&amp;quot;, &amp;quot;you&amp;quot;] );&lt;br /&gt;
print( count( map2 ) + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;] );&lt;br /&gt;
print( &amp;quot;remove: &amp;quot; + remove map2[&amp;quot;me&amp;quot;] );&lt;br /&gt;
print( count( map2 ) + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
yields:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1 true foo&lt;br /&gt;
remove: foo&lt;br /&gt;
0 false&lt;br /&gt;
remove:&lt;br /&gt;
1 true 17&lt;br /&gt;
remove: 17&lt;br /&gt;
0 false 0&lt;br /&gt;
remove: 0&lt;br /&gt;
1 aggregate int [string]&lt;br /&gt;
remove: aggregate int [string]&lt;br /&gt;
0 aggregate int [string]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Clear ===&lt;br /&gt;
&lt;br /&gt;
You can remove all &amp;lt;code&amp;gt;key =&amp;gt; value&amp;lt;/code&amp;gt; entries from a map using the {{f|clear}} function:&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;clear( &amp;lt;aggregate&amp;gt; );&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Count ===&lt;br /&gt;
&lt;br /&gt;
The {{f|count}} function returns the number of defined keys for the specified aggregate.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;int size = count( &amp;lt;aggregate&amp;gt; );&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Sort ===&lt;br /&gt;
&lt;br /&gt;
From http://kolmafia.us/showthread.php?t=1738 and http://kolmafia.us/showthread.php?10729&lt;br /&gt;
&lt;br /&gt;
The syntax is:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;sort aggregate by keyExpr;&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;aggregate&amp;lt;/code&amp;gt; is a reference to the object to be sorted - arrays are probably the most useful things to sort, but any mapping type can be used.  But please note that when you sort a map, you change the values that correspond to the index. To sort on a map, you would want to use a multidimensional maps, but note that you can only sort along a single dimension at a time when doing this. Simply put... &amp;quot;sort&amp;quot; is only useful in cases where your data exists entirely in the values of the map; the keys can have no meaning beyond simply being distinct.&lt;br /&gt;
&lt;br /&gt;
The reference must not be enclosed in parentheses, as that would look like a call to a function named &amp;lt;code&amp;gt;sort()&amp;lt;/code&amp;gt; - which is still perfectly valid, &amp;quot;sort&amp;quot; has not become a [[Reserved Words|reserved word]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;keyExpr&amp;lt;/code&amp;gt; is an arbitrary expression that defines how the items should be ordered. It is evaluated once for every entry in the aggregate, in a scope with two additional variables implicitly defined: &#039;&amp;lt;code&amp;gt;index&amp;lt;/code&amp;gt;&#039; and &#039;&amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;&#039;, holding the details of that entry. The value of the &amp;lt;code&amp;gt;keyExpr&amp;lt;/code&amp;gt; is used as the sort key; typically it would be an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt;, but can be any ASH type that can be compared via &amp;quot;&amp;lt;&amp;quot; and the other relational operators.&lt;br /&gt;
&lt;br /&gt;
The most basic form of sorting would therefore be &amp;quot;&amp;lt;code&amp;gt;sort ... by value&amp;lt;/code&amp;gt;&amp;quot;, but many useful things can be done with the use of a more complex &amp;lt;code&amp;gt;keyExpr&amp;lt;/code&amp;gt; - the only real restriction is that the expression should not modify the object you&#039;re sorting. For example, if you had an array of items, you could sort it &amp;quot;&amp;lt;code&amp;gt;by autosell_price(value)&amp;lt;/code&amp;gt;&amp;quot;. An array of weapon items could be sorted &amp;quot;&amp;lt;code&amp;gt;by -get_power(value)&amp;lt;/code&amp;gt;&amp;quot; to put it in decreasing order of power. If the elements of your aggregate are records, you&#039;d need to use something like &amp;quot;&amp;lt;code&amp;gt;by value.fieldName&amp;lt;/code&amp;gt;&amp;quot;, since the records themselves can&#039;t be meaningfully compared.&lt;br /&gt;
&lt;br /&gt;
After the sort statement, the aggregate will have exactly the same sets of keys and values as before (even if the keys weren&#039;t consecutive), and the iteration order of the keys will be the same, but the values will likely be associated with different keys. The sort is stable - in other words, elements with sort keys that compare as equal will remain in the same order. This means that you can sort on multiple criteria by simply performing separate sorts for each of the criteria, in increasing order of significance.&lt;br /&gt;
&lt;br /&gt;
To find out how many things you have, you might do:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
item [int] whatGot;&lt;br /&gt;
int ctr =0;&lt;br /&gt;
&lt;br /&gt;
foreach it in get_inventory() {&lt;br /&gt;
   whatGot[ctr] = it;&lt;br /&gt;
   ctr+=1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sort whatGot by item_amount(value);&lt;br /&gt;
&lt;br /&gt;
foreach x, it in whatGot&lt;br /&gt;
   print(item_amount(it) + &#039; of &#039; + it);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
Note that this use of an optional feature of foreach. The second variable in the foreach is the value of whatGot[x].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A few more examples of things you can do:&lt;br /&gt;
* &amp;quot;&amp;lt;code&amp;gt;by -value&amp;lt;/code&amp;gt;&amp;quot; sorts integers in decreasing order (there&#039;s no similar trick for &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; values).&lt;br /&gt;
* &amp;quot;&amp;lt;code&amp;gt;by -index&amp;lt;/code&amp;gt;&amp;quot; reverses the existing order of an array (or map with integer keys).&lt;br /&gt;
* &amp;quot;&amp;lt;code&amp;gt;by random(1000000)&amp;lt;/code&amp;gt;&amp;quot; shuffles into a random order.&lt;br /&gt;
* &amp;quot;&amp;lt;code&amp;gt;by otherArray[index]&amp;lt;/code&amp;gt;&amp;quot; uses values from a parallel array as the sort keys (you&#039;d then need to do &amp;quot;&amp;lt;code&amp;gt;sort otherArray by value;&amp;lt;/code&amp;gt;&amp;quot; if you wanted the two arrays to remain in sync).&lt;br /&gt;
&lt;br /&gt;
===Iteration===&lt;br /&gt;
To iterate through a map, use the &#039;&#039;&#039;foreach&#039;&#039;&#039; operator. For instance, if you wanted to print out how many of each item you had, you could do something like the following:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int[item] map = get_inventory();&lt;br /&gt;
foreach key in map {&lt;br /&gt;
    print(key + &amp;quot; (&amp;quot; + map[key] + &amp;quot;)&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Multidimensional maps are implemented as maps that map keys to maps. &#039;&#039;&#039;int[item][string]map&#039;&#039;&#039; is really a mapping of items to int[string] maps. Iteration, therefore, is as follows:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int[item][string] map;&lt;br /&gt;
file_to_map(&amp;quot;somefile.txt&amp;quot;, map);&lt;br /&gt;
foreach k1 in map {&lt;br /&gt;
    print(k1 + &amp;quot;: &amp;quot;);&lt;br /&gt;
    foreach k2 in map[k1] {&lt;br /&gt;
        print(&amp;quot;\t&amp;quot; + k2 + &amp;quot;: &amp;quot; + map[k1][k2]);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Two things to note: First, &#039;&#039;&#039;int[item][string]map&#039;&#039;&#039; is equivalent to &#039;&#039;&#039;int[item, string]map&#039;&#039;&#039;. This really comes down to author preference, although the second form is generally more common. Second, the two following foreach loops are equivalent:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int[item][string] map;&lt;br /&gt;
foreach k1 in map {&lt;br /&gt;
    foreach k2 in map[k1] {&lt;br /&gt;
        func(map[k1][k2]);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
foreach k1, k2 in map {&lt;br /&gt;
    func(map[k1][k2]);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Of course, the latter does not lend itself to, say, only printing the first key once, whereas the former can be used that way (see the preceding example).&lt;br /&gt;
&lt;br /&gt;
===Implementation===&lt;br /&gt;
Maps in ASH are implemented internally as TreeMaps [http://download.oracle.com/javase/1.5.0/docs/api/java/util/TreeMap.html]. See below for some implications.&lt;br /&gt;
&lt;br /&gt;
== Arrays ==&lt;br /&gt;
These look and behave like mappings of integers to values, where the keys only take values from 0 to n, but these are implemented as Java Arrays.&lt;br /&gt;
&lt;br /&gt;
===Differences between arrays and maps===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;item [12] array;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Can use keys 0 - 11. You get a runtime error if you use any other key. It always uses memory to hold 12 items, even if you only use a couple of them. But it&#039;s a constant time - O(1) - to access any element.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;item [int] map;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Can use any int as a key. It has constant memory for the Java map, and additional memory for each element in the map, but is O( log n) to access any particular element.&lt;br /&gt;
&lt;br /&gt;
If you are able to use (a fairly densely packed set of) integers as keys, your program will be faster and use (potentially) slightly more memory.&lt;br /&gt;
&lt;br /&gt;
If you have a sparse set of integers, you can still use an array and get fast access, but you will waste a lot of memory.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t use integers as keys or don&#039;t want to waste memory on a sparse array, you can have a slower but less memory consuming map.&lt;br /&gt;
&lt;br /&gt;
[http://kolmafia.us/showthread.php?6425-Sorting-skills-by-mana-cost&amp;amp;p=48703&amp;amp;viewfull=1#post48703]&lt;br /&gt;
&lt;br /&gt;
====Time considerations====&lt;br /&gt;
* Given &#039;&#039;&#039;if (a == item1 || a == item2 || a == item3)&#039;&#039;&#039; and &#039;&#039;&#039;if ($items[item1, item2, item3] contains a)&#039;&#039;&#039;, which is faster?&lt;br /&gt;
&lt;br /&gt;
This is going to depend on the number of items in the list, and which one happens to match; if &#039;a&#039; is almost always item1, then the first form is likely to win on practical grounds, even though it&#039;s theoretically slower (O(n) vs. O(log n)).&lt;br /&gt;
&lt;br /&gt;
The second form is a definite win assuming no such coincidences of the item chosen, a somewhat larger set of items, and that the code is executed more than once per run of the script. The first lookup in a plural constant actually builds an internal map that allows such queries to be efficiently done; this is deferred because typical use of a plural constant involves only iteration, not lookups.&lt;br /&gt;
&lt;br /&gt;
There&#039;s always the &amp;quot;profile&amp;quot; command, if you really need to know which is more efficient in a given situation - although it&#039;s unlikely that either would have a noticeable effect on your script&#039;s performance.&lt;br /&gt;
&lt;br /&gt;
[http://kolmafia.us/showthread.php?6425-Sorting-skills-by-mana-cost&amp;amp;p=48728&amp;amp;viewfull=1#post48728]&lt;br /&gt;
&lt;br /&gt;
== Records ==&lt;br /&gt;
&lt;br /&gt;
(copy-pasted from Veracity&#039;s post introducing the record [http://kolmafia.us/showthread.php?t=280])&lt;br /&gt;
&lt;br /&gt;
Starting with SVN revision 1311 of KoLmafia, ASH now supports a new kind of structured data: the record. Here is a little example of how you declare a record and variables of the new type you&#039;ve created by doing so.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
record my_type {&lt;br /&gt;
  	int ifield;&lt;br /&gt;
	string sfield;&lt;br /&gt;
	record {&lt;br /&gt;
		int first;&lt;br /&gt;
		int second;&lt;br /&gt;
	} rfield;&lt;br /&gt;
	int [int, int] mfield;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
my_type rvar;&lt;br /&gt;
my_type [int] mrvar;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
What I&#039;ve done with the above is declare a new data type which I&#039;ve named &amp;quot;my_type&amp;quot;. Having declared the new type, I can use it (almost) anywhere that I can use a built-in type name. I declared a variable, &amp;quot;rvar&amp;quot;, of that type, and I defined a map, &amp;quot;mrvar&amp;quot;, which maps keys of type integer to values of type my_type.&lt;br /&gt;
&lt;br /&gt;
The new type, &amp;quot;my_type&amp;quot; is a &amp;quot;composite&amp;quot; type. It contains four fields. &amp;quot;ifield&amp;quot; is an integer. &amp;quot;sfield&amp;quot; is a string. &amp;quot;rfield&amp;quot; is another composite field: an anonymous record containing two integers named &amp;quot;first&amp;quot; and &amp;quot;second&amp;quot;. Finally, &amp;quot;mfield&amp;quot; is a map from [int, int] to int.&lt;br /&gt;
&lt;br /&gt;
As you can see, a record can combine data of all the types ASH supports: primitive, aggregate, and composite.&lt;br /&gt;
&lt;br /&gt;
Having defined the new data type and several variables using it, here are some examples of how to access the fields.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
rvar.ifield = 10;&lt;br /&gt;
rvar.sfield = &amp;quot;secret&amp;quot;;&lt;br /&gt;
rvar.rfield.first = 1000;&lt;br /&gt;
rvar.rfield.second = 2000;&lt;br /&gt;
rvar.mfield[ 2, 3 ] = 12;&lt;br /&gt;
&lt;br /&gt;
mrvar[ 1 ] = rvar;&lt;br /&gt;
&lt;br /&gt;
foreach key in mrvar&lt;br /&gt;
	foreach key1, key2 in mrvar[key].mfield&lt;br /&gt;
		print( &amp;quot;val = &amp;quot; + mrvar[key].mfield[key1,key2] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, if you have a variable that is a record, you access the fields of the record by following the variable name with &amp;quot;.&amp;amp;lt;field name&amp;amp;gt;&amp;quot;. The resulting value will be of whatever type you declared in the definition of the record. If the value is a map, you can give a list of keys within [], just like any other map. If the value is another record, you can access the fields of the nested record by using another &amp;quot;.&amp;amp;lt;field name&amp;amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are familiar with Pascal &amp;quot;records&amp;quot; or C/C++ &amp;quot;structs&amp;quot;, this should all be comfortably familiar.&lt;br /&gt;
&lt;br /&gt;
Finally, if you create a map whose values is a record, the file_to_map and map_to_file built-in ASH functions will Do The Right Thing; they will efficiently and reliably save and restore your data.&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>QVamp</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Miscellaneous_Functions&amp;diff=1182</id>
		<title>Miscellaneous Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Miscellaneous_Functions&amp;diff=1182"/>
		<updated>2012-02-12T04:41:15Z</updated>

		<summary type="html">&lt;p&gt;QVamp: added link to get more info on maps&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
== Chat Functions ==&lt;br /&gt;
{{Flink|void|chat_clan|string}}&lt;br /&gt;
{{Flink|void|chat_clan|string|string|desc=Sends a message to clan chat.}}&lt;br /&gt;
{{Flink|void|chat_macro|string|desc=Submits a chat macro to KoL.}}&lt;br /&gt;
{{Flink|void|chat_notify|string|string|desc=Sends a notification to the player&#039;s own chat.}}&lt;br /&gt;
{{Flink|void|chat_private|string|string|desc=Sends a private message to another player.}}&lt;br /&gt;
{{Flink|boolean|is_online|string|desc=Check to see if a player is online.}}&lt;br /&gt;
{{Flink|boolean [string]|who_clan|desc=Returns a list of whom is in your clan and if they are in chat.}}&lt;br /&gt;
&lt;br /&gt;
== Debugging Functions == &lt;br /&gt;
{{Flink|void|disable|string|desc=Disables the specified function.}}&lt;br /&gt;
{{Flink|void|enable|string|desc=Enables the specified function.}}&lt;br /&gt;
{{Flink|buffer|load_html|string|desc=Works like visit_url(), but for debugging.}}&lt;br /&gt;
{{Flink|string|make_url|string|boolean|boolean|desc=Crafts the URL to visit.}}&lt;br /&gt;
&lt;br /&gt;
== Map Management Functions ==&lt;br /&gt;
&#039;&#039;Note: Information about maps (including creating, assigning, and removing keys, can be found at: &lt;br /&gt;
[[Data Structures#Maps|Map Data Structures]]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{Flink|boolean|file_to_map|string|aggregate|desc=Loads a map from a tab-delimited text file.}}&lt;br /&gt;
{{Flink|boolean|map_to_file|aggregate|string|desc=Saves a map to a tab-delimited text file.}}&lt;br /&gt;
{{Flink|int|count|aggregate|desc=Returns the number of defined keys for the specified aggregate.}}&lt;br /&gt;
{{Flink|void|clear|aggregate|desc=Removes all keys from the specified aggregate.}}&lt;br /&gt;
&lt;br /&gt;
== Time Functions ==&lt;br /&gt;
{{Flink|string|format_date_time|string|string|string|desc=Reformats dates.}}&lt;br /&gt;
{{Flink|int|gameday_to_int|desc=Returns the current KoL date as an integer.}}&lt;br /&gt;
{{Flink|string|gameday_to_string|desc=Returns the current KoL date as a string.}}&lt;br /&gt;
{{Flink|int|gametime_to_int|desc=Returns the current KoL time in ms as an integer.}}&lt;br /&gt;
{{Flink|string|now_to_string|string|desc=Returns current local time/date in SimpleDateFormat format.}}&lt;br /&gt;
{{Flink|string|time_to_string|desc=Returns the current local time in HH:mm:ss z format.}}&lt;br /&gt;
{{Flink|string|today_to_string|desc=Returns the current local day in ISO format.}}&lt;br /&gt;
&lt;br /&gt;
== User Interaction ==&lt;br /&gt;
{{Flink|void|print|string|{{opt|string}}|desc=Prints to CLI and status line of Adventuring window, optionally in a specified color.}}&lt;br /&gt;
{{Flink|void|print_html|string|desc=Prints to CLI, parsing any included html.}}&lt;br /&gt;
{{Flink|void|logprint|string|desc=Prints to the session log.}}&lt;br /&gt;
{{Flink|void|wait|int}}&lt;br /&gt;
{{Flink|void|waitq|int|desc=Sleeps for the specified number of seconds.}}&lt;br /&gt;
{{Flink|boolean|user_confirm|string|desc=Allows user input in Y/N format.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Other Functions ==&lt;br /&gt;
{{Flink|void|abort|{{opt|string}}|desc=Aborts the current script with an optional message.}}&lt;br /&gt;
{{Flink|boolean|cli_execute|string|desc=Executes the given command as if it were entered into the CLI.}}&lt;br /&gt;
{{Flink|string|get_property|string|desc=Gets a global or user preference as appropriate.}}&lt;br /&gt;
{{Flink|void|set_property|string|string|desc=Sets a global or user preference as appropriate.}}&lt;br /&gt;
{{Flink|void|batch_open|desc=Used to mark the beginning of a block of functions to operate in batch mode (see page for {{f|batch_close}} for details).}}&lt;br /&gt;
{{Flink|boolean|batch_close|desc=Used to mark the end of a block of functions to operate in batch mode (see page for details).}}&lt;br /&gt;
{{Flink|int|get_revision|desc=Returns the current KoLmafia revision number.}}&lt;br /&gt;
{{Flink|string|get_version|desc=Returns the most recent KoLmafia version.}}&lt;br /&gt;
&lt;br /&gt;
Additional functions that are considered not really to be ash functions are available in [[Miscellaneous ASH Features#Special Syntax Functions|Misc ASH Features]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>QVamp</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Miscellaneous_Functions&amp;diff=1178</id>
		<title>Miscellaneous Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Miscellaneous_Functions&amp;diff=1178"/>
		<updated>2011-09-16T15:38:06Z</updated>

		<summary type="html">&lt;p&gt;QVamp: added link to similar section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
== Chat Functions ==&lt;br /&gt;
{{Flink|void|chat_clan|string}}&lt;br /&gt;
{{Flink|void|chat_clan|string|string|desc=Sends a message to clan chat.}}&lt;br /&gt;
{{Flink|void|chat_macro|string|desc=Submits a chat macro to KoL.}}&lt;br /&gt;
{{Flink|void|chat_notify|string|string|desc=Sends a notification to the player&#039;s own chat.}}&lt;br /&gt;
{{Flink|void|chat_private|string|string|desc=Sends a private message to another player.}}&lt;br /&gt;
{{Flink|boolean|is_online|string|desc=Check to see if a player is online.}}&lt;br /&gt;
{{Flink|boolean [string]|who_clan|desc=Returns a list of whom is in your clan and if they are in chat.}}&lt;br /&gt;
&lt;br /&gt;
== Time Functions ==&lt;br /&gt;
{{Flink|int|gameday_to_int|desc=Returns the current KoL date as an integer.}}&lt;br /&gt;
{{Flink|string|gameday_to_string|desc=Returns the current KoL date as a string.}}&lt;br /&gt;
{{Flink|int|gametime_to_int|desc=Returns the current KoL time in ms as an integer.}}&lt;br /&gt;
{{Flink|string|now_to_string|string|desc=Returns current local time/date in SimpleDateFormat format.}}&lt;br /&gt;
{{Flink|string|time_to_string|desc=Returns the current local time in HH:mm:ss z format.}}&lt;br /&gt;
{{Flink|string|today_to_string|desc=Returns the current local day in ISO format.}}&lt;br /&gt;
&lt;br /&gt;
== Debugging Functions == &lt;br /&gt;
{{Flink|void|disable|string|desc=Disables the specified function.}}&lt;br /&gt;
{{Flink|void|enable|string|desc=Enables the specified function.}}&lt;br /&gt;
{{Flink|buffer|load_html|string|desc=Works like visit_url(), but for debugging.}}&lt;br /&gt;
{{Flink|string|make_url|string|boolean|boolean|desc=Crafts the URL to visit.}}&lt;br /&gt;
&lt;br /&gt;
== Map Management Functions ==&lt;br /&gt;
{{Flink|boolean|file_to_map|string|aggregate|desc=Loads a map from a tab-delimited text file.}}&lt;br /&gt;
{{Flink|boolean|map_to_file|aggregate|string|desc=Saves a map to a tab-delimited text file.}}&lt;br /&gt;
{{Flink|int|count|aggregate|desc=Returns the number of defined keys for the specified aggregate.}}&lt;br /&gt;
{{Flink|void|clear|aggregate|desc=Removes all keys from the specified aggregate.}}&lt;br /&gt;
&lt;br /&gt;
== Other Functions ==&lt;br /&gt;
{{Flink|void|abort|{{opt|string}}|desc=Aborts the current script with an optional message.}}&lt;br /&gt;
{{Flink|void|print|string|{{opt|string}}|desc=Prints to CLI and status line of Adventuring window, optionally in a specified color.}}&lt;br /&gt;
{{Flink|void|print_html|string|desc=Prints to CLI, parsing any included html.}}&lt;br /&gt;
{{Flink|void|logprint|string|desc=Prints to the session log.}}&lt;br /&gt;
{{Flink|boolean|cli_execute|string|desc=Executes the given command as if it were entered into the CLI.}}&lt;br /&gt;
{{Flink|void|wait|int}}&lt;br /&gt;
{{Flink|void|waitq|int|desc=Sleeps for the specified number of seconds.}}&lt;br /&gt;
{{Flink|boolean|user_confirm|string|desc=Allows user input in Y/N format.}}&lt;br /&gt;
{{Flink|string|get_property|string|desc=Gets a global or user preference as appropriate.}}&lt;br /&gt;
{{Flink|void|set_property|string|string|desc=Sets a global or user preference as appropriate.}}&lt;br /&gt;
{{Flink|void|batch_open|desc=Used to mark the beginning of a block of functions to operate in batch mode (see page for {{f|batch_close}} for details).}}&lt;br /&gt;
{{Flink|boolean|batch_close|desc=Used to mark the end of a block of functions to operate in batch mode (see page for details).}}&lt;br /&gt;
{{Flink|int|get_revision|desc=Returns the current KoLmafia revision number.}}&lt;br /&gt;
{{Flink|string|get_version|desc=Returns the most recent KoLmafia version.}}&lt;br /&gt;
&lt;br /&gt;
Additional functions that are considered not really to be ash functions are available in [[Miscellaneous ASH Features#Special Syntax Functions|Misc ASH Features]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>QVamp</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=ASH_For_Beginners&amp;diff=6339</id>
		<title>ASH For Beginners</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=ASH_For_Beginners&amp;diff=6339"/>
		<updated>2011-09-16T15:17:44Z</updated>

		<summary type="html">&lt;p&gt;QVamp: added section on how to run scripts.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==File Editing==&lt;br /&gt;
To create and edit ASH scripts, you need a text editing program that doesn&#039;t automatically add line-breaks for word wrapping.&lt;br /&gt;
&lt;br /&gt;
===Mac===&lt;br /&gt;
While the built in editor TextEdit will work fine (as long as you remember to write only in plaintext), [http://www.barebones.com/products/textwrangler/ TextWrangler] is a much more powerful tool. It may not be designed for ASH scripting specifically, but it was written for a similar purpose.&lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
If you use Linux, you probably already know about the options available for text editing. Emacs, Vi, etc. are all fine for creating ASH scripts.&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
Windows users beware; using Microsoft Word to create ASH files will lead to no end of headaches! The built-in program notepad will work, as can wordpad when configured with the option &amp;quot;No Wrap&amp;quot; for text. However, having a program that can handle syntax-highlighting can be very beneficial. Many scripters recommend [http://notepad-plus.sourceforge.net/uk/site.htm Notepad++] for ASH (and other programmatic) scripting. In this case, it&#039;s also beneficial to have a style configuration that works well with ASH, and one example can be found [http://kolmafia.us/showthread.php?3164-How-do-you-write-an-ASH-file&amp;amp;p=21567&amp;amp;viewfull=1#post21567 here].&lt;br /&gt;
&lt;br /&gt;
==Saving==&lt;br /&gt;
ASH scripts need to be saved with the file extension &amp;quot;.ash&amp;quot; to be properly recognized by KoLmafia. If you&#039;re using a built-in text editor on a Windows machine, it may automatically save your files with the &amp;quot;.txt&amp;quot; extension by default. (So you may end up with a file called &amp;quot;script.ash.txt&amp;quot; instead of the desired &amp;quot;script.ash&amp;quot;.) One way around this on Windows that usually works is to put quotes around the file name when you save it, including the extension.&lt;br /&gt;
&lt;br /&gt;
Most advanced text editors (such as Notepad++) will save files as specified, without the need for the quotes-trick.&lt;br /&gt;
&lt;br /&gt;
Most files should be saved in the &amp;quot;scripts&amp;quot; directory, which is located by default at the same directory level as the KoLmafia .jar or .exe file on Windows. You can also create a sub-directory under &amp;quot;scripts,&amp;quot; and it will be listed in KoLmafia&#039;s Scripts Menu.&lt;br /&gt;
&lt;br /&gt;
Relay browser scripts are the exception to the rule: they must be saved in the &amp;quot;relay&amp;quot; directory. Relay browser overrides need to be saved in the top level of &amp;quot;relay,&amp;quot; and must be named the same as the page they will override, except with an &amp;quot;.ash&amp;quot; extension. For example, to override &amp;quot;charpane.php&amp;quot; your script would need to be named &amp;quot;charpane.ash&amp;quot;. For user-interface scripts, the script name needs to start with &amp;quot;relay_&amp;quot; and end with &amp;quot;.ash&amp;quot;. These scripts must also be saved in the top-level of the &amp;quot;relay&amp;quot; directory.&lt;br /&gt;
&lt;br /&gt;
==Programming==&lt;br /&gt;
You should first read through the various pages listed under &amp;quot;LANGUAGE CONVENTIONS&amp;quot; on the [[Main Page]]. One should also be aware that, with the exception of [[Control Structures]], all ASH commands need to end with a semi-colon. Also, every identifier in ASH&amp;amp;mdash;variables, functions, and other various keywords&amp;amp;mdash;are case-insensitive, so &amp;lt;code&amp;gt;string myVar=&amp;quot;abb&amp;quot;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;STRing MYvar=&amp;quot;abb&amp;quot;&amp;lt;/code&amp;gt; produce the same results.&lt;br /&gt;
&lt;br /&gt;
===Variables===&lt;br /&gt;
Variables are used to hold information that you need to access multiple times. They must be declared before they can be used, by specifying the [[Data Types|Data Type]] that they will hold, followed by the variable name.&lt;br /&gt;
{{CodeSample|description=For example:|code=&amp;lt;syntaxhighlight&amp;gt;int count;&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
would declare a variable named &amp;quot;count&amp;quot; of an integer type. You can also set the initial value of a variable on the same line it is declared.&lt;br /&gt;
{{CodeSample|description=On the other hand:|code=&amp;lt;syntaxhighlight&amp;gt;int count = 6;&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
would declare the variable &amp;quot;count&amp;quot; with an initial value of 6.&lt;br /&gt;
&lt;br /&gt;
Notice that you would not want to have both of the above lines in your script! Variables operate under what&#039;s referred to as their scope. In a nutshell, scope defines where a variable is accessible. Scope &amp;quot;cascades&amp;quot; down, similar to stylesheets for those familiar with web programming. A variable declared at the top-level of a script (a &amp;quot;global&amp;quot; variable), outside of any functions, will be accessible anywhere in your script, or in any other scripts that import it. A variable declared inside of a function will be accessible only inside that function (including inside of control structures), but is considered to not exist by other functions. Since ASH uses curly brace scope, variables within a set of curly braces (&#039;&#039;&#039;{ }&#039;&#039;&#039;) will not be available outside that same set of braces.&lt;br /&gt;
&lt;br /&gt;
Declaring a variable multiple times will generate an [[ASH Errors#Variable is already defined|error]]. Note that this only applies to variable with overlapping scope; if one function uses a variable named &amp;quot;bob&amp;quot; that is declared inside of the function, another function can declare another variable with the same name, even as a different datatype. However, the error will still occur if you have a globally-defined variable, and then declare a variable with the same name inside of a function (as their scopes overlap).&lt;br /&gt;
&lt;br /&gt;
===Functions===&lt;br /&gt;
Functions are groupings of operations that can be applied multiple times by referencing the function name. Basically, they avoid having to re-type the same code over and over.&lt;br /&gt;
&lt;br /&gt;
====Built-in functions====&lt;br /&gt;
Many functions are built-in to KoLmafia, and examples can be found all over this wiki. Examples on the wiki are given in the following format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;datatypeReturned function_name([datatype1 parameter1] ...)&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first part is the datatype that the function returns. Though you don&#039;t have to make use of this in a script, you would almost always want to (except for some functions that return a boolean). You need to be careful to match datatypes (though sometimes an implicit conversion is done; ie KoLmafia will usually translate a float into an int, and many commands that output text will implicitly convert from most datatypes). For example, if you have a variable of the datatype string, it is often an error to assign to it a function that returns an item.&lt;br /&gt;
&lt;br /&gt;
The function name follows and then parentheses, which may have nothing or multiple sets of datatypes &amp;amp; parameters.&lt;br /&gt;
&lt;br /&gt;
The parameter names are used for reference on the rest of the page (so you can match descriptions of parameters to the parameter in question, which is especially useful if the function takes more than one parameter with the same datatype).&lt;br /&gt;
&lt;br /&gt;
Note that, as with assignments of a function&#039;s return value, it is important to match the parameter datatypes when using the function. If you have a function with the parameter &amp;lt;b&amp;gt;item it&amp;lt;/b&amp;gt;, and you supply the name of the item as text in quotes (which is how a string is written), you will get an error for doing so.&lt;br /&gt;
&lt;br /&gt;
====Custom-coded functions====&lt;br /&gt;
It&#039;s also possible to write your own functions. To do so, you declare them similarly to a variable as above. However, a function can also have the datatype of &amp;quot;void,&amp;quot; which is not allowed for variables. A &amp;quot;void&amp;quot; function is one that does not return any value; it simply does what it&#039;s programmed to do and the rest of your program moves on, regardless of the results (unless of course an [[ASH Errors|error]] occurs, including a call to [[abort|abort()]].)&lt;br /&gt;
{{CodeSample|description=For example, this simple function will double an integer:|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int double_it(int value) {&lt;br /&gt;
   return 2 * value;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
{{CodeSample|description=Furthermore, there are two distinct ways to call functions, user-defined or built-in:&amp;lt;br /&amp;gt;Conventional,|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
function(param1[,param2,param3,...]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
{{CodeSample|description=and &amp;quot;Java style&amp;quot;:|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
param1.function([param2,param3,...]);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
The only difference between the two forms is aesthetics, as they are functionally equivalent.&lt;br /&gt;
{{CodeSample|description=Also somewhat important to note is that these commands can be chained together, and they will be executed from left-to-right. So, for instance,|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;quot;polka pop&amp;quot;.to_item().to_int()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
{{CodeSample|description=will return the item number for $item[Polka Pop], 4342. This is one instance where &amp;quot;Java style&amp;quot; is more aesthetically pleasing compared to the conventional|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
to_int(to_item(&amp;quot;polka pop&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Note that scope (discussed above, under [[ASH_For_Beginners#Variables|Variables]]) also applies to user-defined functions. Also, functions built into KoLmafia have priority over any user-defined functions with the same name and parameters.&lt;br /&gt;
&lt;br /&gt;
===String Concatenation===&lt;br /&gt;
The basics to string concatenation: &amp;quot;Hello&amp;quot; + &amp;quot;world&amp;quot; yields &amp;quot;Helloworld&amp;quot;. Likewise, variables can be strung together in this fashion. Unless the variables are both numbers (floats, booleans, or ints), they will be converted to strings, then concatenated. For instance: &amp;quot;3x &amp;quot; + $item[Polka Pop] yields &amp;quot;3x Polka Pop&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Running a Script==&lt;br /&gt;
Once your script is saved, you can run it.  Scripts saved in the scripts directory will appear in Mafia under the scripts menu.  Simply clicking on one will run it.  You may also run your script from the command line by typing &amp;quot;exec&amp;quot; followed by the script name For instance: exec myscript.&lt;br /&gt;
&lt;br /&gt;
The script looks for the function &#039;main()&#039; in order to know where to start. &lt;br /&gt;
&lt;br /&gt;
{{CodeSample|description=Generally the function will look like this:|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
void main() {&lt;br /&gt;
   // the rest of your code&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The main function can contain variables, other code and calls to other functions within the script.&lt;br /&gt;
&lt;br /&gt;
You may also have an input into your main function.  By requiring an input, this will cause KoLmafia to show a textbox to the user in order to get input into the script.  This textbox can be filled in and submitted, or cancelled. &lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>QVamp</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Data_Types&amp;diff=6791</id>
		<title>Data Types</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Data_Types&amp;diff=6791"/>
		<updated>2011-09-12T14:44:37Z</updated>

		<summary type="html">&lt;p&gt;QVamp: added missing datatype&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
==Primitive Datatypes==&lt;br /&gt;
&lt;br /&gt;
===void===&lt;br /&gt;
Can be thought of better as the absence of a datatype. No value can be assigned to &#039;&#039;&#039;void&#039;&#039;&#039; nor can a value be returned from a function of datatype &#039;&#039;&#039;void&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===boolean===&lt;br /&gt;
A boolean value is either &#039;&#039;&#039;true&#039;&#039;&#039; or &#039;&#039;&#039;false&#039;&#039;&#039;. By default, a boolean variable is set to false.&lt;br /&gt;
&lt;br /&gt;
===int===&lt;br /&gt;
&lt;br /&gt;
A whole number (short for &amp;quot;integer&amp;quot;), either positive or negative (or 0).  The int used by KoLmafia is a 32-bit signed int, meaning it has a maximum value of 2,147,483,647 and a minimum value of -2,147,483,648. The default value of a integer variable is 0.&lt;br /&gt;
&lt;br /&gt;
Be careful when doing math with integers! As with some other strongly-typed languages, numbers are converted to integers at every step of the operation when only integer types are used. For example:&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int a = 1;&lt;br /&gt;
int b = 2;&lt;br /&gt;
print( a / b * 2 );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
Will give the output &amp;quot;0,&amp;quot; not &amp;quot;1&amp;quot; as you may expect. Changing either variable to a float type will &amp;quot;correct&amp;quot; this.&lt;br /&gt;
&lt;br /&gt;
===float===&lt;br /&gt;
&lt;br /&gt;
The float data type is a single-precision 32-bit IEEE 754 floating point. Its range of values is beyond the scope of this discussion, but is specified in section 4.2.3 of the Java Language Specification. [http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.2.3]&lt;br /&gt;
&lt;br /&gt;
When assigning to a variable of type float, one should be careful to always enter numbers in decimal form, as unwanted behavior can result from supplying a value that KoLmafia may interpret as an int type without the decimal point.&lt;br /&gt;
&lt;br /&gt;
Note that float is not infinitely precise; it intrinsically rounds off after a certain point. This loss of accuracy is for the sake of storage, but beware of the possibility of small errors compounding from multiple float types.&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
description=For instance, try the following code as an example of how rather long post-decimal portions are handled:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
float f;&lt;br /&gt;
f = 4.9999999;&lt;br /&gt;
print( f );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
The default value of a &amp;lt;code&amp;gt;float&amp;lt;/code&amp;gt; variable is 0.0.&lt;br /&gt;
&lt;br /&gt;
===string===&lt;br /&gt;
&lt;br /&gt;
A group of characters including, but not limited to: lowercase letters, uppercase characters, numbers, and various control characters. When assigning a value to a string, always enclose the desired value in either single or double quotes (note you must use the same quote type on both ends of the string assignment). If you need to include the same character inside of the string itself, you will need to escape it first with a backslash.{{CodeSample|&lt;br /&gt;
description=For example:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
string s = &amp;quot;This is my \&amp;quot;friend\&amp;quot; Pete.&amp;quot;;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;|&lt;br /&gt;
moreinfo=&lt;br /&gt;
Will result in the following being stored to s:&lt;br /&gt;
&amp;lt;pre&amp;gt;This is my &amp;quot;friend&amp;quot; Pete&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
The default value of a string is an empty string, or literally &amp;lt;code&amp;gt;&amp;quot;&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===buffer===&lt;br /&gt;
&lt;br /&gt;
Similar to a string, but more efficient in certain operations, including concatenation and passing as function arguments. For the most part, you can interchange references to strings and buffers. However, you should test all such actions first, as a few functions require a specific datatype to be supplied as a parameter. (Most notably, those listed under [[String Handling Routines#Regular Expressions|Regular Expressions]].)&lt;br /&gt;
&lt;br /&gt;
==Special Datatypes==&lt;br /&gt;
&lt;br /&gt;
Several datatypes are included in KoLmafia to represent common categories within the KoL universe.&lt;br /&gt;
&lt;br /&gt;
Note that while variables of these types are declared in the same way as for Primitive Datatypes; assigning and referencing them is done differently.&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=For example, to declare an item datatype and assign it a value, you would use the following line of code:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
item it = $item[ broken skull ];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
The default values of any variable of one of the following types is &amp;lt;code&amp;gt;$&#039;&#039;type&#039;&#039;[ none ]&amp;lt;/code&amp;gt;. For example, the default value of a &amp;lt;code&amp;gt;item&amp;lt;/code&amp;gt; variable is &amp;lt;code&amp;gt;$item[ none ]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===class===&lt;br /&gt;
&lt;br /&gt;
Besides $class[ none ], there are six possible values for this datatype:&lt;br /&gt;
&lt;br /&gt;
* Seal Clubber&lt;br /&gt;
* Turtle Tamer&lt;br /&gt;
* Pastamancer&lt;br /&gt;
* Sauceror&lt;br /&gt;
* Disco Bandit&lt;br /&gt;
* Accordion Thief &lt;br /&gt;
&lt;br /&gt;
===coinmaster===&lt;br /&gt;
All shops that deal with currency other than meat.&lt;br /&gt;
&lt;br /&gt;
===effect===&lt;br /&gt;
&lt;br /&gt;
Any effect you can be under in KoL, whether from items, skills, or what-have-you, is valid for this datatype.&lt;br /&gt;
&lt;br /&gt;
The full range, besides $effect[ none ], is too much to list and keep up with here: please see the Wiki {{kolwiki|Effects}} page for more information.&lt;br /&gt;
&lt;br /&gt;
===element===&lt;br /&gt;
&lt;br /&gt;
Besides $element[ none ], there are six possible values for this datatype. (Note that &amp;quot;Bad Spelling&amp;quot; is not considered a true element.)&lt;br /&gt;
Also note that these names are case-sensitive (referencing $element[ Spooky ] will generate an error).&lt;br /&gt;
&lt;br /&gt;
* cold&lt;br /&gt;
* hot&lt;br /&gt;
* sleaze&lt;br /&gt;
* spooky&lt;br /&gt;
* stench&lt;br /&gt;
* slime&lt;br /&gt;
&lt;br /&gt;
===familiar===&lt;br /&gt;
&lt;br /&gt;
Any familiar available in KoL is valid for this datatype.&lt;br /&gt;
&lt;br /&gt;
The full range, besides $familiar[ none ], is too much to list and keep up with here: please see the Wiki {{kolwiki|Familiars}} page for more information.&lt;br /&gt;
&lt;br /&gt;
===item===&lt;br /&gt;
&lt;br /&gt;
Any item in all of KoL is valid for this datatype. Note that unlike most special datatypes, item references can make use of the item ID number.&lt;br /&gt;
{{CodeSample|&lt;br /&gt;
description=For example, you could assign the item plexiglass pants as follows:|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
item it = $item[ 1234 ];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
The full range, besides $item[ none ], is too much to list and keep up with here: please see the Wiki {{kolwiki|Items}} page for more information.&lt;br /&gt;
&lt;br /&gt;
===location===&lt;br /&gt;
&lt;br /&gt;
Any location one can adventure at in KoL is valid for this datatype.&lt;br /&gt;
&lt;br /&gt;
The full range, besides $location[ none ], is too much to list and keep up with here: please see the Wiki {{kolwiki|Locations}} page for more information.&lt;br /&gt;
&lt;br /&gt;
===monster===&lt;br /&gt;
&lt;br /&gt;
Any monster you can encounter in KoL is valid for this datatype.&lt;br /&gt;
&lt;br /&gt;
The full range, besides $monster[ none ], is too much to list and keep up with here: please see the Wiki {{kolwiki|Monster Compendium}} page for more information.&lt;br /&gt;
&lt;br /&gt;
===skill===&lt;br /&gt;
Any skill you can have in KoL (whether permable or not, granted by items, etc.) is valid for this datatype.&lt;br /&gt;
&lt;br /&gt;
The full range, besides $skill[ none ], is too much to list and keep up with here: please see the Wiki {{kolwiki|Skills}} page for more information.&lt;br /&gt;
&lt;br /&gt;
===slot===&lt;br /&gt;
&lt;br /&gt;
Besides $slot[ none ], there are 13 possible values for this datatype.&lt;br /&gt;
&lt;br /&gt;
* hat&lt;br /&gt;
* weapon&lt;br /&gt;
* off-hand&lt;br /&gt;
* shirt&lt;br /&gt;
* pants&lt;br /&gt;
* acc1&lt;br /&gt;
* acc2&lt;br /&gt;
* acc3&lt;br /&gt;
* familiar&lt;br /&gt;
* sticker1&lt;br /&gt;
* sticker2&lt;br /&gt;
* sticker3&lt;br /&gt;
* fakehand&lt;br /&gt;
&lt;br /&gt;
===stat===&lt;br /&gt;
&lt;br /&gt;
Besides $stat[ none ], there are six possible values for this datatype (the last three are for referencing sub-stats).&lt;br /&gt;
&lt;br /&gt;
* muscle&lt;br /&gt;
* mysticality&lt;br /&gt;
* moxie&lt;br /&gt;
* submuscle&lt;br /&gt;
* submysticality&lt;br /&gt;
* submoxie&lt;br /&gt;
&lt;br /&gt;
==aggregate==&lt;br /&gt;
&lt;br /&gt;
An aggregate is a complex datatype composed of two or more primitive or special datatypes. For more information, see [[Data Structures]].&lt;br /&gt;
&lt;br /&gt;
==record==&lt;br /&gt;
&lt;br /&gt;
Records are user-defined datatypes that hold as many sub-datatypes as desired. For more information, see the page for [[Data Structures]].&lt;br /&gt;
&lt;br /&gt;
==Plural Typed Constants==&lt;br /&gt;
&lt;br /&gt;
(see http://kolmafia.us/showthread.php?p=15592, from which this section is reproduced)&lt;br /&gt;
&lt;br /&gt;
Plural typed constants allow you to easily do something with a list of specified objects, without having to replicate code or laboriously build up an array of the objects so that you can iterate over it. Here&#039;s a quick example:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
foreach weapon in $items[star sword, star staff, star crossbow] {&lt;br /&gt;
   if (available_amount(weapon) &amp;gt; 0) {&lt;br /&gt;
      equip(weapon);&lt;br /&gt;
      break;&lt;br /&gt;
   }&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
The syntax is basically the same as the existing typed constant feature, but with an &amp;quot;s&amp;quot; or &amp;quot;es&amp;quot; after the type name. (The &amp;quot;es&amp;quot; case is there so that you can properly pluralize &amp;quot;class&amp;quot;.) The text between the square brackets is interpreted as a comma-separated list of elements, each of which is converted to the specified type as if it were an individual constant. More details:&lt;br /&gt;
* The list can span multiple lines.&lt;br /&gt;
* Whitespace before or after elements is ignored.&lt;br /&gt;
* Completely empty elements are ignored (so that you can leave a comma at the end of the list).&lt;br /&gt;
* You can include a comma or closing square bracket in an element by writing it as &amp;quot;\,&amp;quot; or &amp;quot;\]&amp;quot;.&lt;br /&gt;
* All the other escape sequences allowed in strings are possible, such as &amp;quot;\n&amp;quot; (newline), &amp;quot;\t&amp;quot; (tab), and &amp;quot;\uXXXX&amp;quot; (Unicode character value). To put an actual backslash in an element, you have to write it as &amp;quot;\\&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The value generated by a plural constant is of type boolean[type], with the keys being the specified elements, and the boolean value always being true - although you won&#039;t normally do anything with the boolean, you&#039;d use a foreach loop to iterate over the keys. You can assign a plural constant to a variable declared as that type, but note that the value differs from a normal map in three important respects:&lt;br /&gt;
* Since the expression that generates it is syntactically a constant, the value has to be immutable. If you were allowed to change it in any way, those changes would appear in every future use of the same constant.&lt;br /&gt;
* There can be multiple instances of the same key - $ints[1,1,2,3,5,8] is perfectly valid, and will result in the value 1 appearing twice in a foreach loop.&lt;br /&gt;
* The keys will appear in the order you wrote them, rather than being sorted alphanumerically as maps usually do.&lt;br /&gt;
&lt;br /&gt;
In addition to being used in a foreach loop, plural constants also efficiently support membership testing via the &#039;contains&#039; operator. Here&#039;s another example:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
for hour from 1 to 12 {&lt;br /&gt;
   print(&amp;quot;It&#039;s &amp;quot; + hour + &amp;quot; o&#039;clock.&amp;quot;);&lt;br /&gt;
   if ($ints[10, 2, 4] contains hour) {&lt;br /&gt;
      print(&amp;quot;Time to drink a Dr Pepper!&amp;quot;);&lt;br /&gt;
   }&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
(Yes, that example could just as easily have been done with a switch statement.)&lt;br /&gt;
&lt;br /&gt;
Iterating over an empty list is rather pointless, so plural constants with no elements are given a different meaning: they represent every value of the specified type, where this is practical. (The &#039;none&#039; value, if defined for a given type, is omitted.) The biggest benefit here is $items[], which lets you loop over every defined item, more efficiently than you could otherwise write in a script (since the list is generated once per session and then cached), and without having to hard-code a maximum item ID number in your script. Example:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
foreach it in $items[] {&lt;br /&gt;
   if (autosell_price(it) == 42) print(it);&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
Enumeration of all possible values works with the following types:&lt;br /&gt;
* $booleans[] - false and true.&lt;br /&gt;
* $items[]&lt;br /&gt;
* $locations[]&lt;br /&gt;
* $classes[]&lt;br /&gt;
* $stats[] - Muscle, Mysticality, Moxie: the substat values are omitted.&lt;br /&gt;
* $skills[]&lt;br /&gt;
* $effects[]&lt;br /&gt;
* $familiars[]&lt;br /&gt;
* $slots[] - includes sticker slots and fake hands, which you might not want to consider as normal slots.&lt;br /&gt;
* $monsters[]&lt;br /&gt;
* $elements[] - includes slime now, and possibly other not-quite-elements like cute in the future.&lt;br /&gt;
&lt;br /&gt;
The remaining types that can be used in plural constants require an explicit list of elements, since there are too many possible values:&lt;br /&gt;
* $ints[] - you don&#039;t have enough RAM to store a list with 4 billion elements.&lt;br /&gt;
* $floats[] - ditto.&lt;br /&gt;
* $strings[] - nobody has that much RAM.&lt;br /&gt;
&lt;br /&gt;
==Custom==&lt;br /&gt;
&lt;br /&gt;
===matcher===&lt;br /&gt;
&lt;br /&gt;
A matcher isn&#039;t really a datatype so much as it&#039;s a class, but it is included here for reference, as it is used much as datatypes are in ASH. It can only be declared through the function {{f|create_matcher}}, using two strings. One is the string to find matches in, the other a regular expression to test against. For more information on using a matcher, see [[Regular Expressions]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>QVamp</name></author>
	</entry>
	<entry>
		<id>https://wiki.kolmafia.us/index.php?title=Data_Structures&amp;diff=3201</id>
		<title>Data Structures</title>
		<link rel="alternate" type="text/html" href="https://wiki.kolmafia.us/index.php?title=Data_Structures&amp;diff=3201"/>
		<updated>2011-08-10T18:34:32Z</updated>

		<summary type="html">&lt;p&gt;QVamp: added missing aggregate function&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOCright}}&lt;br /&gt;
&lt;br /&gt;
KoLmafia supports complex data structures such as maps and records made from simple [[Data Types|data types]].&lt;br /&gt;
&lt;br /&gt;
== Maps ==&lt;br /&gt;
Most of this information was copied directly from ASH Maps Tutorial, by Veracity (http://kolmafia.sourceforge.net/advanced.html#maps)&lt;br /&gt;
&lt;br /&gt;
A map is indexed by one data type (the key) and associates that key with another (or the same) data type (the value). The key can be any ASH simple data type: boolean, int, float, string, item, location, class, stat, skill, effect, familiar, slot, or monster. The value can be any ASH data type at all: a simple type, a record, or can be another map. This effectively allows multi-dimensional maps and. In fact, that&#039;s how the syntax we provide for multi-dimensional maps actually operate: maps of maps of maps ...&lt;br /&gt;
&lt;br /&gt;
You can declare a map any time you can declare a variable: as a top level (global) variable, as a function parameter, or as a local variable in any scope.&lt;br /&gt;
&lt;br /&gt;
You can fetch data from a map any time you can provide a data value: in an expression, as a function parameter, on the right side of an assignment statement, from a &amp;quot;return&amp;quot; statement, as so on. You can pass around entire maps, individual elements, or intermediate maps: &amp;quot;slices&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Declarations ===&lt;br /&gt;
&lt;br /&gt;
The syntax for declaring the data type of a map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;data type&amp;gt; [ &amp;lt;key type&amp;gt;, ... ] &amp;lt;aggregate_name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
{{CodeSample&lt;br /&gt;
|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
string [item] map1;&lt;br /&gt;
float [class, string, int] another_map;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Assignments ===&lt;br /&gt;
&lt;br /&gt;
If you use a map on the left side of an assignment, you set the whole map at once to the new value.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample&lt;br /&gt;
|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int [item] my_pricelist;&lt;br /&gt;
int [item] new_pricelist;&lt;br /&gt;
&lt;br /&gt;
/* Some code that updates new_pricelist */&lt;br /&gt;
&lt;br /&gt;
my_pricelist = new_pricelist;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you specify a map and a complete set of indices (of the correct types) on the left side of an assignment statement, you set a single element.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample&lt;br /&gt;
|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int [item] my_pricelist;&lt;br /&gt;
my_pricelist[ $item[ pail ] ] = 1000;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you specify a map and a prefix of indices (of the correct type), you directly set one of the intermediate maps, a &amp;quot;slice&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample&lt;br /&gt;
|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
float [string, int, string] my_map;&lt;br /&gt;
float [int, string] slice1;&lt;br /&gt;
&lt;br /&gt;
/* Some code that fills slice1 */&lt;br /&gt;
my_map[ &amp;quot;slice1&amp;quot; ] = slice1;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
The syntax for referencing an element (or slice) of a map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;aggregate name&amp;gt;[ &amp;lt;key expression&amp;gt;, ... ]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the key expressions will be evaluated at run time. If you specify all the keys the map expects, you fetch data of the type specified by the map. If you specify fewer keys than the map expects, you get an intermediate map, a &amp;quot;slice&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
As an example:&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
boolean [string, string] props; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
might be used to hold &amp;quot;properties&amp;quot; associated with names.&lt;br /&gt;
{{&lt;br /&gt;
CodeSample|&lt;br /&gt;
code=&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
props[ &amp;quot;dog&amp;quot;, &amp;quot;mammal&amp;quot; ] = true; &lt;br /&gt;
props[ &amp;quot;dog&amp;quot;, &amp;quot;pet&amp;quot; ] = true; &lt;br /&gt;
props[ &amp;quot;dog&amp;quot;, &amp;quot;fun&amp;quot; ] = false;&lt;br /&gt;
props[ &amp;quot;turtle&amp;quot;, &amp;quot;mammal&amp;quot; ] = false;&lt;br /&gt;
props[ &amp;quot;turtle&amp;quot;, &amp;quot;pet&amp;quot; ] = true;&lt;br /&gt;
props[ &amp;quot;turtle&amp;quot;, &amp;quot;fun&amp;quot; ] = false;&lt;br /&gt;
props[ &amp;quot;aardvark&amp;quot;, &amp;quot;mammal&amp;quot; ] = true;&lt;br /&gt;
props[ &amp;quot;aardvark&amp;quot;, &amp;quot;pet&amp;quot; ] = false;&lt;br /&gt;
props[ &amp;quot;aardvark&amp;quot;, &amp;quot;fun&amp;quot; ] = true; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
references:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
props[ &amp;quot;dog&amp;quot;, &amp;quot;mammal&amp;quot;] =&amp;gt; true&lt;br /&gt;
boolean [string] animal = props[ &amp;quot;turtle&amp;quot; ];&lt;br /&gt;
animal[ &amp;quot;fun&amp;quot; ] =&amp;gt; false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Contains ===&lt;br /&gt;
&lt;br /&gt;
You can test the presence of a key in a map using the &amp;quot;contains&amp;quot; operator:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;aggregate reference expression&amp;gt; contains &amp;lt;key expression&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;aggregate reference expression&amp;gt; must evaluate at run time to a map or slice, and must evaluate at run time to a key of the appropriate type. (Note that that is enforced at parse time; ASH can tell the datatype any expression will produce).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
props contains &amp;quot;dog&amp;quot; =&amp;gt; true&lt;br /&gt;
props contains &amp;quot;elephant&amp;quot; =&amp;gt; false&lt;br /&gt;
props[ &amp;quot;aardvark&amp;quot; ] contains &amp;quot;fun&amp;quot; =&amp;gt; true&lt;br /&gt;
animal contains &amp;quot;pet&amp;quot; =&amp;gt; true&lt;br /&gt;
animal contains &amp;quot;favorite food&amp;quot; =&amp;gt; false&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Remove ===&lt;br /&gt;
&lt;br /&gt;
You can remove a key-value association from a map using the &amp;quot;remove&amp;quot; unary operator:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
remove &amp;lt;aggregate reference&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For clarification, an aggregate reference is &amp;quot;&amp;lt;map name&amp;gt;[ &amp;lt;index 1&amp;gt; ... &amp;lt;index n&amp;gt; ]&amp;quot; where &amp;lt;map name&amp;gt;[ &amp;lt;index 1&amp;gt; ... &amp;lt;index n-1&amp;gt; ] specifies the &amp;quot;slice&amp;quot; and &amp;lt;index n&amp;gt; specifies the &amp;quot;key&amp;quot;. Which is just what you expect, if you fully specify the indices; for a single dimensional map, &amp;quot;map[10]&amp;quot; -&amp;gt; &amp;quot;map&amp;quot; is the slice and 10 is the key. The &amp;quot;remove&amp;quot; operator removes the &amp;quot;key&amp;quot; from the &amp;quot;slice&amp;quot;. For example:&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
string [int] map1;&lt;br /&gt;
map1[5] = &amp;quot;foo&amp;quot;;&lt;br /&gt;
print( count( map1 ) + &amp;quot; &amp;quot; + map1 contains 5 + &amp;quot; &amp;quot; + map1[5] );&lt;br /&gt;
print( &amp;quot;remove: &amp;quot; + remove map1[5] );&lt;br /&gt;
print( count( map1 ) + &amp;quot; &amp;quot; + map1 contains 5 + &amp;quot; &amp;quot;  + map1[5] );&lt;br /&gt;
print( &amp;quot;remove: &amp;quot; + remove map1[5] );&lt;br /&gt;
int [string, string] map2;&lt;br /&gt;
map2[&amp;quot;me&amp;quot;,&amp;quot;you&amp;quot;] = 17;&lt;br /&gt;
print( count( map2[&amp;quot;me&amp;quot;] ) + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;] contains &amp;quot;you&amp;quot; + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;,&amp;quot;you&amp;quot;] );&lt;br /&gt;
print( &amp;quot;remove: &amp;quot; + remove map2[&amp;quot;me&amp;quot;, &amp;quot;you&amp;quot;] );&lt;br /&gt;
print( count( map2[&amp;quot;me&amp;quot;] ) + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;] contains &amp;quot;you&amp;quot; + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;,&amp;quot;you&amp;quot;] );&lt;br /&gt;
print( &amp;quot;remove: &amp;quot; + remove map2[&amp;quot;me&amp;quot;, &amp;quot;you&amp;quot;] );&lt;br /&gt;
print( count( map2 ) + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;] );&lt;br /&gt;
print( &amp;quot;remove: &amp;quot; + remove map2[&amp;quot;me&amp;quot;] );&lt;br /&gt;
print( count( map2 ) + &amp;quot; &amp;quot; + map2[&amp;quot;me&amp;quot;] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
yields:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1 true foo&lt;br /&gt;
remove: foo&lt;br /&gt;
0 false&lt;br /&gt;
remove:&lt;br /&gt;
1 true 17&lt;br /&gt;
remove: 17&lt;br /&gt;
0 false 0&lt;br /&gt;
remove: 0&lt;br /&gt;
1 aggregate int [string]&lt;br /&gt;
remove: aggregate int [string]&lt;br /&gt;
0 aggregate int [string]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Clear ===&lt;br /&gt;
&lt;br /&gt;
You can remove all &amp;lt;code&amp;gt;key =&amp;gt; value&amp;lt;/code&amp;gt; entries from a map using the {{f|clear}} function:&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;clear( &amp;lt;aggregate&amp;gt; );&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Count ===&lt;br /&gt;
&lt;br /&gt;
The {{f|count}} function returns the number of defined keys for the specified aggregate.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;int size = count( &amp;lt;aggregate&amp;gt; );&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Sort ===&lt;br /&gt;
&lt;br /&gt;
From http://kolmafia.us/showthread.php?t=1738&lt;br /&gt;
&lt;br /&gt;
The syntax is:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;sort aggregate by keyExpr;&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&amp;lt;code&amp;gt;aggregate&amp;lt;/code&amp;gt; is a reference to the object to be sorted - arrays are probably the most useful things to sort, but any mapping type can be used (even multidimensional maps, but note that you can only sort along a single dimension at a time). The reference must not be enclosed in parentheses, as that would look like a call to a function named &amp;lt;code&amp;gt;sort()&amp;lt;/code&amp;gt; - which is still perfectly valid, &amp;quot;sort&amp;quot; has not become a [[Reserved Words|reserved word]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;keyExpr&amp;lt;/code&amp;gt; is an arbitrary expression that defines how the items should be ordered. It is evaluated once for every entry in the aggregate, in a scope with two additional variables implicitly defined: &#039;&amp;lt;code&amp;gt;index&amp;lt;/code&amp;gt;&#039; and &#039;&amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;&#039;, holding the details of that entry. The value of the &amp;lt;code&amp;gt;keyExpr&amp;lt;/code&amp;gt; is used as the sort key; typically it would be an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt;, but can be any ASH type that can be compared via &amp;quot;&amp;lt;&amp;quot; and the other relational operators.&lt;br /&gt;
&lt;br /&gt;
The most basic form of sorting would therefore be &amp;quot;&amp;lt;code&amp;gt;sort ... by value&amp;lt;/code&amp;gt;&amp;quot;, but many useful things can be done with the use of a more complex &amp;lt;code&amp;gt;keyExpr&amp;lt;/code&amp;gt; - the only real restriction is that the expression should not modify the object you&#039;re sorting. For example, if you had an array of items, you could sort it &amp;quot;&amp;lt;code&amp;gt;by autosell_price(value)&amp;lt;/code&amp;gt;&amp;quot;. An array of weapon items could be sorted &amp;quot;&amp;lt;code&amp;gt;by -get_power(value)&amp;lt;/code&amp;gt;&amp;quot; to put it in decreasing order of power. If the elements of your aggregate are records, you&#039;d need to use something like &amp;quot;&amp;lt;code&amp;gt;by value.fieldName&amp;lt;/code&amp;gt;&amp;quot;, since the records themselves can&#039;t be meaningfully compared.&lt;br /&gt;
&lt;br /&gt;
After the sort statement, the aggregate will have exactly the same sets of keys and values as before (even if the keys weren&#039;t consecutive), and the iteration order of the keys will be the same, but the values will likely be associated with different keys. The sort is stable - in other words, elements with sort keys that compare as equal will remain in the same order. This means that you can sort on multiple criteria by simply performing separate sorts for each of the criteria, in increasing order of significance.&lt;br /&gt;
&lt;br /&gt;
A few more examples of things you can do:&lt;br /&gt;
* &amp;quot;&amp;lt;code&amp;gt;by -value&amp;lt;/code&amp;gt;&amp;quot; sorts integers in decreasing order (there&#039;s no similar trick for &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; values).&lt;br /&gt;
* &amp;quot;&amp;lt;code&amp;gt;by -index&amp;lt;/code&amp;gt;&amp;quot; reverses the existing order of an array (or map with integer keys).&lt;br /&gt;
* &amp;quot;&amp;lt;code&amp;gt;by random(1000000)&amp;lt;/code&amp;gt;&amp;quot; shuffles into a random order.&lt;br /&gt;
* &amp;quot;&amp;lt;code&amp;gt;by otherArray[index]&amp;lt;/code&amp;gt;&amp;quot; uses values from a parallel array as the sort keys (you&#039;d then need to do &amp;quot;&amp;lt;code&amp;gt;sort otherArray by value;&amp;lt;/code&amp;gt;&amp;quot; if you wanted the two arrays to remain in sync).&lt;br /&gt;
&lt;br /&gt;
===Iteration===&lt;br /&gt;
To iterate through a map, use the &#039;&#039;&#039;foreach&#039;&#039;&#039; operator. For instance, if you wanted to print out how many of each item you had, you could do something like the following:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int[item] map = get_inventory();&lt;br /&gt;
foreach key in map {&lt;br /&gt;
    print(key + &amp;quot; (&amp;quot; + map[key] + &amp;quot;)&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Multidimensional maps are implemented as maps that map keys to maps. &#039;&#039;&#039;int[item][string]map&#039;&#039;&#039; is really a mapping of items to int[string] maps. Iteration, therefore, is as follows:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int[item][string] map;&lt;br /&gt;
file_to_map(&amp;quot;somefile.txt&amp;quot;, map);&lt;br /&gt;
foreach k1 in map {&lt;br /&gt;
    print(k1 + &amp;quot;: &amp;quot;);&lt;br /&gt;
    foreach k2 in map[k1] {&lt;br /&gt;
        print(&amp;quot;\t&amp;quot; + k2 + &amp;quot;: &amp;quot; + map[k1][k2]);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Two things to note: First, &#039;&#039;&#039;int[item][string]map&#039;&#039;&#039; is equivalent to &#039;&#039;&#039;int[item, string]map&#039;&#039;&#039;. This really comes down to author preference, although the second form is generally more common. Second, the two following foreach loops are equivalent:&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
int[item][string] map;&lt;br /&gt;
foreach k1 in map {&lt;br /&gt;
    foreach k2 in map[k1] {&lt;br /&gt;
        func(map[k1][k2]);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
foreach k1, k2 in map {&lt;br /&gt;
    func(map[k1][k2]);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Of course, the latter does not lend itself to, say, only printing the first key once, whereas the former can be used that way (see the preceding example).&lt;br /&gt;
&lt;br /&gt;
===Implementation===&lt;br /&gt;
Maps in ASH are implemented internally as TreeMaps [http://download.oracle.com/javase/1.5.0/docs/api/java/util/TreeMap.html]. See below for some implications.&lt;br /&gt;
&lt;br /&gt;
== Arrays ==&lt;br /&gt;
These look and behave like mappings of integers to values, where the keys only take values from 0 to n, but these are implemented as Java Arrays.&lt;br /&gt;
&lt;br /&gt;
===Differences between arrays and maps===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;item [12] array;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Can use keys 0 - 11. You get a runtime error if you use any other key. It always uses memory to hold 12 items, even if you only use a couple of them. But it&#039;s a constant time - O(1) - to access any element.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;item [int] map;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Can use any int as a key. It has constant memory for the Java map, and additional memory for each element in the map, but is O( log n) to access any particular element.&lt;br /&gt;
&lt;br /&gt;
If you are able to use (a fairly densely packed set of) integers as keys, your program will be faster and use (potentially) slightly more memory.&lt;br /&gt;
&lt;br /&gt;
If you have a sparse set of integers, you can still use an array and get fast access, but you will waste a lot of memory.&lt;br /&gt;
&lt;br /&gt;
If you can&#039;t use integers as keys or don&#039;t want to waste memory on a sparse array, you can have a slower but less memory consuming map.&lt;br /&gt;
&lt;br /&gt;
[http://kolmafia.us/showthread.php?6425-Sorting-skills-by-mana-cost&amp;amp;p=48703&amp;amp;viewfull=1#post48703]&lt;br /&gt;
&lt;br /&gt;
====Time considerations====&lt;br /&gt;
* Given &#039;&#039;&#039;if (a == item1 || a == item2 || a == item3)&#039;&#039;&#039; and &#039;&#039;&#039;if ($items[item1, item2, item3] contains a)&#039;&#039;&#039;, which is faster?&lt;br /&gt;
&lt;br /&gt;
This is going to depend on the number of items in the list, and which one happens to match; if &#039;a&#039; is almost always item1, then the first form is likely to win on practical grounds, even though it&#039;s theoretically slower (O(n) vs. O(log n)).&lt;br /&gt;
&lt;br /&gt;
The second form is a definite win assuming no such coincidences of the item chosen, a somewhat larger set of items, and that the code is executed more than once per run of the script. The first lookup in a plural constant actually builds an internal map that allows such queries to be efficiently done; this is deferred because typical use of a plural constant involves only iteration, not lookups.&lt;br /&gt;
&lt;br /&gt;
There&#039;s always the &amp;quot;profile&amp;quot; command, if you really need to know which is more efficient in a given situation - although it&#039;s unlikely that either would have a noticeable effect on your script&#039;s performance.&lt;br /&gt;
&lt;br /&gt;
[http://kolmafia.us/showthread.php?6425-Sorting-skills-by-mana-cost&amp;amp;p=48728&amp;amp;viewfull=1#post48728]&lt;br /&gt;
&lt;br /&gt;
== Records ==&lt;br /&gt;
&lt;br /&gt;
(copy-pasted from Veracity&#039;s post introducing the record [http://kolmafia.us/showthread.php?t=280])&lt;br /&gt;
&lt;br /&gt;
Starting with SVN revision 1311 of KoLmafia, ASH now supports a new kind of structured data: the record. Here is a little example of how you declare a record and variables of the new type you&#039;ve created by doing so.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
record my_type {&lt;br /&gt;
  	int ifield;&lt;br /&gt;
	string sfield;&lt;br /&gt;
	record {&lt;br /&gt;
		int first;&lt;br /&gt;
		int second;&lt;br /&gt;
	} rfield;&lt;br /&gt;
	int [int, int] mfield;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
my_type rvar;&lt;br /&gt;
my_type [int] mrvar;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
What I&#039;ve done with the above is declare a new data type which I&#039;ve named &amp;quot;my_type&amp;quot;. Having declared the new type, I can use it (almost) anywhere that I can use a built-in type name. I declared a variable, &amp;quot;rvar&amp;quot;, of that type, and I defined a map, &amp;quot;mrvar&amp;quot;, which maps keys of type integer to values of type my_type.&lt;br /&gt;
&lt;br /&gt;
The new type, &amp;quot;my_type&amp;quot; is a &amp;quot;composite&amp;quot; type. It contains four fields. &amp;quot;ifield&amp;quot; is an integer. &amp;quot;sfield&amp;quot; is a string. &amp;quot;rfield&amp;quot; is another composite field: an anonymous record containing two integers named &amp;quot;first&amp;quot; and &amp;quot;second&amp;quot;. Finally, &amp;quot;mfield&amp;quot; is a map from [int, int] to int.&lt;br /&gt;
&lt;br /&gt;
As you can see, a record can combine data of all the types ASH supports: primitive, aggregate, and composite.&lt;br /&gt;
&lt;br /&gt;
Having defined the new data type and several variables using it, here are some examples of how to access the fields.&lt;br /&gt;
&lt;br /&gt;
{{CodeSample|code=&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
rvar.ifield = 10;&lt;br /&gt;
rvar.sfield = &amp;quot;secret&amp;quot;;&lt;br /&gt;
rvar.rfield.first = 1000;&lt;br /&gt;
rvar.rfield.second = 2000;&lt;br /&gt;
rvar.mfield[ 2, 3 ] = 12;&lt;br /&gt;
&lt;br /&gt;
mrvar[ 1 ] = rvar;&lt;br /&gt;
&lt;br /&gt;
foreach key in mrvar&lt;br /&gt;
	foreach key1, key2 in mrvar[key].mfield&lt;br /&gt;
		print( &amp;quot;val = &amp;quot; + mrvar[key].mfield[key1,key2] );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, if you have a variable that is a record, you access the fields of the record by following the variable name with &amp;quot;.&amp;amp;lt;field name&amp;amp;gt;&amp;quot;. The resulting value will be of whatever type you declared in the definition of the record. If the value is a map, you can give a list of keys within [], just like any other map. If the value is another record, you can access the fields of the nested record by using another &amp;quot;.&amp;amp;lt;field name&amp;amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are familiar with Pascal &amp;quot;records&amp;quot; or C/C++ &amp;quot;structs&amp;quot;, this should all be comfortably familiar.&lt;br /&gt;
&lt;br /&gt;
Finally, if you create a map whose values is a record, the file_to_map and map_to_file built-in ASH functions will Do The Right Thing; they will efficiently and reliably save and restore your data.&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>QVamp</name></author>
	</entry>
</feed>