<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nethackwiki.com/index.php?action=history&amp;feed=atom&amp;title=User%3AArdub23%2FYANI</id>
	<title>User:Ardub23/YANI - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nethackwiki.com/index.php?action=history&amp;feed=atom&amp;title=User%3AArdub23%2FYANI"/>
	<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=User:Ardub23/YANI&amp;action=history"/>
	<updated>2026-06-04T02:21:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.5</generator>
	<entry>
		<id>https://nethackwiki.com/index.php?title=User:Ardub23/YANI&amp;diff=182466&amp;oldid=prev</id>
		<title>Ardub23: Created page to document YANIs</title>
		<link rel="alternate" type="text/html" href="https://nethackwiki.com/index.php?title=User:Ardub23/YANI&amp;diff=182466&amp;oldid=prev"/>
		<updated>2025-01-20T04:09:21Z</updated>

		<summary type="html">&lt;p&gt;Created page to document YANIs&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A place to gather (and perhaps workshop) [[YANI]]s. Feel free to edit constructively! &amp;lt;span class=&amp;quot;nowrap&amp;quot;&amp;gt;— [[User:Ardub23|Ardub23]] &amp;lt;small&amp;gt;([[User talk:Ardub23|talk]])&amp;lt;/small&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Preferred slots ==&lt;br /&gt;
Add an [[option]] for preferred slots, to save the trouble of [[Adjust|#adjusting]] items to the slots you always use. In the options file, the user can map [[wikipedia:Regular expression|regular expressions]] to inventory slot letters. When the hero picks up an item or gains it in their starting inventory, it will be placed in the inventory slot associated with a matching regex.&lt;br /&gt;
&lt;br /&gt;
An additional argument for each preferred slot can be used to specify what to do if the preferred slot is already occupied, or if the (re-)acquired item was in a different slot and [[fixinv]] is enabled. Options for this argument could be:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;weak&amp;lt;/code&amp;gt;: Use this slot unless it's occupied or the acquired item is fixinv'd to another slot.&lt;br /&gt;
* &amp;lt;code&amp;gt;normal&amp;lt;/code&amp;gt;: Use this slot unless it's occupied (forget fixinv).&lt;br /&gt;
* &amp;lt;code&amp;gt;replace&amp;lt;/code&amp;gt;: Replace the previous item in this slot, unless it also prefers this slot.&lt;br /&gt;
* &amp;lt;code&amp;gt;force&amp;lt;/code&amp;gt;: Always replace any item occupying the slot.&lt;br /&gt;
&lt;br /&gt;
Whenever an item is shunted out of its current slot by another item—whether because of a preferred slot or a manual #adjust—it should try to go to its own preferred slot. In this case, though, occupied slots should always be overlooked to avoid domino chains and infinite loops. In other words, an item can only be shunted to an unoccupied slot.&lt;br /&gt;
&lt;br /&gt;
Syntax mockup:&lt;br /&gt;
&lt;br /&gt;
 # Put something inedible on 'y', unless something else is there already&lt;br /&gt;
 PREFERRED_SLOT=&amp;quot;stone&amp;quot; y normal&lt;br /&gt;
 &lt;br /&gt;
 # Put an unlocking tool on 'k', unless another unlocking tool is there&lt;br /&gt;
 PREFERRED_SLOT=&amp;quot;credit card|key|lock pick&amp;quot; k replace&lt;br /&gt;
 &lt;br /&gt;
 # Footrice corpses go to capital letters, less likely to type by accident&lt;br /&gt;
 PREFERRED_SLOT=&amp;quot;trice corpse&amp;quot; X normal&lt;br /&gt;
 PREFERRED_SLOT=&amp;quot;trice corpse&amp;quot; C force&lt;br /&gt;
&lt;br /&gt;
If an item matches more than one rule, the strongest rule is applied first (e.g. &amp;lt;code&amp;gt;force&amp;lt;/code&amp;gt; applies before &amp;lt;code&amp;gt;replace&amp;lt;/code&amp;gt;). In a tie, the last usable matching rule applies. In the above example, a [[footrice]] corpse you pick up would go to C and shunt out any item that's there, even if it's another footrice corpse. And if the shunted item &amp;lt;em&amp;gt;is&amp;lt;/em&amp;gt; another footrice corpse, that one will try to go to X, because it can't be shunted to the occupied slot C; if X is occupied too, then it gets assigned an arbitrary letter.&lt;/div&gt;</summary>
		<author><name>Ardub23</name></author>
		
	</entry>
</feed>