<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://te4.org/w/index.php?action=history&amp;feed=atom&amp;title=T4_Modules_Howto_Guide%2FInventory_Dialogs</id>
		<title>T4 Modules Howto Guide/Inventory Dialogs - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://te4.org/w/index.php?action=history&amp;feed=atom&amp;title=T4_Modules_Howto_Guide%2FInventory_Dialogs"/>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Inventory_Dialogs&amp;action=history"/>
		<updated>2026-05-15T02:36:08Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Inventory_Dialogs&amp;diff=9766&amp;oldid=prev</id>
		<title>Zireael: update</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Inventory_Dialogs&amp;diff=9766&amp;oldid=prev"/>
				<updated>2015-08-17T08:48:25Z</updated>
		
		<summary type="html">&lt;p&gt;update&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 08:48, 17 August 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l198&quot; &gt;Line 198:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 198:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;First, return to the UseItemDialog.lua file in the dialogs directory and uncomment the commented lines in the use and generateList methods.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;First, return to the UseItemDialog.lua file in the dialogs directory and uncomment the commented lines in the use and generateList methods.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;p&amp;gt;The onuse flag refers to whether the inventory screen should be closed or not upon using an item.&amp;lt;/p&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;Next you need to add a new method to the object class to allow the code to check whether an object can be used.&amp;#160; If you have not already, this will involve actually creating an objects class.&amp;#160; Paste the following into the Object.lua class file:&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;Next you need to add a new method to the object class to allow the code to check whether an object can be used.&amp;#160; If you have not already, this will involve actually creating an objects class.&amp;#160; Paste the following into the Object.lua class file:&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zireael</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Inventory_Dialogs&amp;diff=6163&amp;oldid=prev</id>
		<title>BDota at 14:58, 29 September 2013</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Inventory_Dialogs&amp;diff=6163&amp;oldid=prev"/>
				<updated>2013-09-29T14:58:05Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 14:58, 29 September 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l350&quot; &gt;Line 350:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 350:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Go back to [[T4 Modules Howto Guide]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Go back to [[T4 Modules Howto Guide]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Module Guides}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>BDota</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Inventory_Dialogs&amp;diff=5902&amp;oldid=prev</id>
		<title>Ibanix: Ibanix moved page Inventory Dialogs to T4 Modules Howto Guide/Inventory Dialogs: namespace collision prevention</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Inventory_Dialogs&amp;diff=5902&amp;oldid=prev"/>
				<updated>2013-07-08T18:37:08Z</updated>
		
		<summary type="html">&lt;p&gt;Ibanix moved page &lt;a href=&quot;/wiki/Inventory_Dialogs&quot; class=&quot;mw-redirect&quot; title=&quot;Inventory Dialogs&quot;&gt;Inventory Dialogs&lt;/a&gt; to &lt;a href=&quot;/wiki/T4_Modules_Howto_Guide/Inventory_Dialogs&quot; title=&quot;T4 Modules Howto Guide/Inventory Dialogs&quot;&gt;T4 Modules Howto Guide/Inventory Dialogs&lt;/a&gt;: namespace collision prevention&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 18:37, 8 July 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;' lang='en'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Ibanix</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Inventory_Dialogs&amp;diff=5795&amp;oldid=prev</id>
		<title>Ibanix at 21:12, 6 July 2013</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Inventory_Dialogs&amp;diff=5795&amp;oldid=prev"/>
				<updated>2013-07-06T21:12:09Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 21:12, 6 July 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l349&quot; &gt;Line 349:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 349:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Go back to [[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;T4modules-module-howto-guides&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Go back to [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;T4 Modules Howto Guide&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ibanix</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Inventory_Dialogs&amp;diff=3305&amp;oldid=prev</id>
		<title>66.225.111.10 at 05:05, 29 May 2013</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Inventory_Dialogs&amp;diff=3305&amp;oldid=prev"/>
				<updated>2013-05-29T05:05:05Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 05:05, 29 May 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;h1 id=&amp;quot;toc0&amp;quot;&amp;gt;Inventory and Equipment Dialogs&amp;lt;/h1&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;h1 id=&amp;quot;toc0&amp;quot;&amp;gt;Inventory and Equipment Dialogs&amp;lt;/h1&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;This section assumes that objects and inventory has already been enabled by following the instructions in the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;a class=&amp;quot;&amp;quot; style=&amp;quot;&amp;quot; href=&amp;quot;/web/20130220054010/http://te4.org/wiki/t4modules-objects&amp;quot;&amp;gt;objects&amp;lt;/a&amp;gt; &lt;/del&gt;guide.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;This section assumes that objects and inventory has already been enabled by following the instructions in the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[Objects]] &lt;/ins&gt;guide.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>66.225.111.10</name></author>	</entry>

	<entry>
		<id>https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Inventory_Dialogs&amp;diff=3259&amp;oldid=prev</id>
		<title>66.225.111.10: Created page with &quot;&lt;h1 id=&quot;toc0&quot;&gt;Inventory and Equipment Dialogs&lt;/h1&gt; &lt;p&gt;This section assumes that objects and inventory has already been enabled by following the instructions in the &lt;a class=&quot;&quot;...&quot;</title>
		<link rel="alternate" type="text/html" href="https://te4.org/w/index.php?title=T4_Modules_Howto_Guide/Inventory_Dialogs&amp;diff=3259&amp;oldid=prev"/>
				<updated>2013-05-29T00:04:28Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;h1 id=&amp;quot;toc0&amp;quot;&amp;gt;Inventory and Equipment Dialogs&amp;lt;/h1&amp;gt; &amp;lt;p&amp;gt;This section assumes that objects and inventory has already been enabled by following the instructions in the &amp;lt;a class=&amp;quot;&amp;quot;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;h1 id=&amp;quot;toc0&amp;quot;&amp;gt;Inventory and Equipment Dialogs&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This section assumes that objects and inventory has already been enabled by following the instructions in the &amp;lt;a class=&amp;quot;&amp;quot; style=&amp;quot;&amp;quot; href=&amp;quot;/web/20130220054010/http://te4.org/wiki/t4modules-objects&amp;quot;&amp;gt;objects&amp;lt;/a&amp;gt; guide.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 id=&amp;quot;toc1&amp;quot;&amp;gt;Picking up and dropping items&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;To start, lets add the ability to actually pickup and drop items.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;First, in your Game.lua file, find the setupCommands() method.  Inside this method add the following entry to the self.key:addBinds command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; PICKUP_FLOOR = function()&lt;br /&gt;
    if self.player.no_inventory_access then return end&lt;br /&gt;
    self.player:playerPickup()&lt;br /&gt;
end,&lt;br /&gt;
DROP_FLOOR = function()&lt;br /&gt;
    if self.player.no_inventory_access then return end&lt;br /&gt;
    self.player:playerDrop()&lt;br /&gt;
end, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This allows the pickup and drop commands to be mapped, which causes the player:playerPickup() or player:playerDrop() methods to execute. Now lets add these methods to the Player.lua file:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; function _M:playerPickup()&lt;br /&gt;
    -- If 2 or more objects, display a pickup dialog, otherwise just picks up&lt;br /&gt;
    if game.level.map:getObject(self.x, self.y, 2) then&lt;br /&gt;
        local d d = self:showPickupFloor(&amp;amp;quot;Pickup&amp;amp;quot;, nil, function(o, item)&lt;br /&gt;
            self:pickupFloor(item, true)&lt;br /&gt;
            self.changed = true&lt;br /&gt;
            d:used()&lt;br /&gt;
        end)&lt;br /&gt;
    else&lt;br /&gt;
        self:pickupFloor(1, true)&lt;br /&gt;
        self:sortInven()&lt;br /&gt;
        self:useEnergy()&lt;br /&gt;
    self.changed = true&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function _M:playerDrop()&lt;br /&gt;
    local inven = self:getInven(self.INVEN_INVEN)&lt;br /&gt;
    local d d = self:showInventory(&amp;amp;quot;Drop object&amp;amp;quot;, inven, nil, function(o, item)&lt;br /&gt;
        self:dropFloor(inven, item, true, true)&lt;br /&gt;
        self:sortInven(inven)&lt;br /&gt;
        self:useEnergy()&lt;br /&gt;
        self.changed = true&lt;br /&gt;
        return true&lt;br /&gt;
    end)&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Now you can play and pick up and drop your items!&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 id=&amp;quot;toc2&amp;quot;&amp;gt;Inventory and equipment Screen&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Now that you can pick up and drop items, you need to be able to obtain an inventory list and equip items.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;First, as above, add the following to the key mappings in Game.lua:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; SHOW_INVENTORY = function()&lt;br /&gt;
    if self.player.no_inventory_access then return end&lt;br /&gt;
    local d&lt;br /&gt;
    d = self.player:showEquipInven(&amp;amp;quot;Inventory&amp;amp;quot;, nil, function(o, inven, item, button, event)&lt;br /&gt;
        if not o then return end&lt;br /&gt;
        local ud = require(&amp;amp;quot;mod.dialogs.UseItemDialog&amp;amp;quot;).new(event == &amp;amp;quot;button&amp;amp;quot;, self.player, o, item, inven, function(_, _, _, stop)&lt;br /&gt;
            d:generate()&lt;br /&gt;
            d:generateList()&lt;br /&gt;
            if stop then self:unregisterDialog(d) end&lt;br /&gt;
        end)&lt;br /&gt;
        self:registerDialog(ud)&lt;br /&gt;
    end)&lt;br /&gt;
end, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Once done, you can try run the game and enjoy your new inventory listing.  You may however notice that the game will crash if you try to actually use or equip anything in your inventory.  This is because we have not yet defined the UseItemDialog.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In your module's Dialogs directory, create a new file file UseItemDialog.lua and paste the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; require &amp;amp;quot;engine.class&amp;amp;quot;&lt;br /&gt;
require &amp;amp;quot;engine.ui.Dialog&amp;amp;quot;&lt;br /&gt;
local List = require &amp;amp;quot;engine.ui.List&amp;amp;quot;&lt;br /&gt;
local Savefile = require &amp;amp;quot;engine.Savefile&amp;amp;quot;&lt;br /&gt;
local Map = require &amp;amp;quot;engine.Map&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
module(..., package.seeall, class.inherit(engine.ui.Dialog))&lt;br /&gt;
&lt;br /&gt;
function _M:init(center_mouse, actor, object, item, inven, onuse)&lt;br /&gt;
    self.actor = actor&lt;br /&gt;
    self.object = object&lt;br /&gt;
    self.inven = inven&lt;br /&gt;
    self.item = item&lt;br /&gt;
    self.onuse = onuse&lt;br /&gt;
&lt;br /&gt;
    self:generateList()&lt;br /&gt;
    local name = object:getName()&lt;br /&gt;
    local w = self.font_bold:size(name)&lt;br /&gt;
    engine.ui.Dialog.init(self, name, 1, 1)&lt;br /&gt;
&lt;br /&gt;
    local list = List.new{width=math.max(w, self.max) + 10, nb_items=#self.list, list=self.list, fct=function(item) self:use(item) end}&lt;br /&gt;
&lt;br /&gt;
    self:loadUI{&lt;br /&gt;
        {left=0, top=0, ui=list},&lt;br /&gt;
    }&lt;br /&gt;
    self:setupUI(true, true, function(w, h)&lt;br /&gt;
        if center_mouse then&lt;br /&gt;
            local mx, my = core.mouse.get()&lt;br /&gt;
            self.force_x = mx - w / 2&lt;br /&gt;
            self.force_y = my - (self.h - self.ih + list.fh / 3)&lt;br /&gt;
        end&lt;br /&gt;
    end)&lt;br /&gt;
&lt;br /&gt;
    self.key:addBinds{ EXIT = function() game:unregisterDialog(self) end, }&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function _M:use(item)&lt;br /&gt;
    if not item then return end&lt;br /&gt;
    game:unregisterDialog(self)&lt;br /&gt;
&lt;br /&gt;
    local act = item.action&lt;br /&gt;
&lt;br /&gt;
    --if act == &amp;amp;quot;use&amp;amp;quot; then&lt;br /&gt;
        --self.actor:playerUseItem(self.object, self.item, self.inven, self.onuse)&lt;br /&gt;
        --self.onuse(self.inven, self.item, self.object, true)&lt;br /&gt;
    --else&lt;br /&gt;
    if act == &amp;amp;quot;drop&amp;amp;quot; then&lt;br /&gt;
        self.actor:doDrop(self.inven, self.item, function() self.onuse(self.inven, self.item, self.object, false) end)&lt;br /&gt;
    elseif act == &amp;amp;quot;wear&amp;amp;quot; then&lt;br /&gt;
        self.actor:doWear(self.inven, self.item, self.object)&lt;br /&gt;
        self.onuse(self.inven, self.item, self.object, false)&lt;br /&gt;
    elseif act == &amp;amp;quot;takeoff&amp;amp;quot; then&lt;br /&gt;
        self.actor:doTakeoff(self.inven, self.item, self.object)&lt;br /&gt;
        self.onuse(self.inven, self.item, self.object, false)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function _M:generateList()&lt;br /&gt;
    local list = {}&lt;br /&gt;
&lt;br /&gt;
    --if self.object:canUseObject() then list[#list+1] = {name=&amp;amp;quot;Use&amp;amp;quot;, action=&amp;amp;quot;use&amp;amp;quot;} end&lt;br /&gt;
    if self.inven == self.actor.INVEN_INVEN and self.object:wornInven() and self.actor:getInven(self.object:wornInven()) then list[#list+1] = {name=&amp;amp;quot;Wield/Wear&amp;amp;quot;, action=&amp;amp;quot;wear&amp;amp;quot;} end&lt;br /&gt;
    if self.inven ~= self.actor.INVEN_INVEN and self.object:wornInven() then list[#list+1] = {name=&amp;amp;quot;Take off&amp;amp;quot;, action=&amp;amp;quot;takeoff&amp;amp;quot;} end&lt;br /&gt;
    if self.inven == self.actor.INVEN_INVEN then list[#list+1] = {name=&amp;amp;quot;Drop&amp;amp;quot;, action=&amp;amp;quot;drop&amp;amp;quot;} end&lt;br /&gt;
&lt;br /&gt;
    self.max = 0&lt;br /&gt;
    self.maxh = 0&lt;br /&gt;
    for i, v in ipairs(list) do&lt;br /&gt;
        local w, h = self.font:size(v.name)&lt;br /&gt;
        self.max = math.max(self.max, w)&lt;br /&gt;
        self.maxh = self.maxh + self.font_h&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    self.list = list&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In your Player.lua class file paste the following two functions:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; function _M:doDrop(inven, item, on_done, nb)&lt;br /&gt;
    if self.no_inventory_access then return end&lt;br /&gt;
    &lt;br /&gt;
    if nb == nil or nb &amp;amp;gt;= self:getInven(inven)[item]:getNumber() then&lt;br /&gt;
        self:dropFloor(inven, item, true, true)&lt;br /&gt;
    else&lt;br /&gt;
        for i = 1, nb do self:dropFloor(inven, item, true) end&lt;br /&gt;
    end&lt;br /&gt;
    self:sortInven(inven)&lt;br /&gt;
    self:useEnergy()&lt;br /&gt;
    self.changed = true&lt;br /&gt;
    if on_done then on_done() end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function _M:doWear(inven, item, o)&lt;br /&gt;
    self:removeObject(inven, item, true)&lt;br /&gt;
    local ro = self:wearObject(o, true, true)&lt;br /&gt;
    if ro then&lt;br /&gt;
        if type(ro) == &amp;amp;quot;table&amp;amp;quot; then self:addObject(inven, ro) end&lt;br /&gt;
    elseif not ro then&lt;br /&gt;
        self:addObject(inven, o)&lt;br /&gt;
    end&lt;br /&gt;
    self:sortInven()&lt;br /&gt;
    self:useEnergy()&lt;br /&gt;
    self.changed = true&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function _M:doTakeoff(inven, item, o)&lt;br /&gt;
    if self:takeoffObject(inven, item) then&lt;br /&gt;
        self:addObject(self.INVEN_INVEN, o)&lt;br /&gt;
    end&lt;br /&gt;
    self:sortInven()&lt;br /&gt;
    self:useEnergy()&lt;br /&gt;
    self.changed = true&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You should now be able to drop items from within the inventory screen as well as equip and takeoff items.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2 id=&amp;quot;toc3&amp;quot;&amp;gt;Consumable and activatable items&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Right now you can only &amp;amp;quot;wear&amp;amp;quot;, &amp;amp;quot;takeoff&amp;amp;quot;, &amp;amp;quot;pickup&amp;amp;quot; and &amp;amp;quot;drop&amp;amp;quot; items. This section deals with allowing objects to be &amp;amp;quot;used&amp;amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;First, return to the UseItemDialog.lua file in the dialogs directory and uncomment the commented lines in the use and generateList methods.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Next you need to add a new method to the object class to allow the code to check whether an object can be used.  If you have not already, this will involve actually creating an objects class.  Paste the following into the Object.lua class file:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; require &amp;amp;quot;engine.class&amp;amp;quot;&lt;br /&gt;
require &amp;amp;quot;engine.Object&amp;amp;quot;&lt;br /&gt;
require &amp;amp;quot;engine.interface.ObjectActivable&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
local Stats = require(&amp;amp;quot;engine.interface.ActorStats&amp;amp;quot;)&lt;br /&gt;
local Talents = require(&amp;amp;quot;engine.interface.ActorTalents&amp;amp;quot;)&lt;br /&gt;
local DamageType = require(&amp;amp;quot;engine.DamageType&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
module(..., package.seeall, class.inherit(&lt;br /&gt;
    engine.Object,&lt;br /&gt;
    engine.interface.ObjectActivable,&lt;br /&gt;
    engine.interface.ActorTalents&lt;br /&gt;
))&lt;br /&gt;
&lt;br /&gt;
function _M:init(t, no_default)&lt;br /&gt;
    t.encumber = t.encumber or 0&lt;br /&gt;
&lt;br /&gt;
    engine.Object.init(self, t, no_default)&lt;br /&gt;
    engine.interface.ObjectActivable.init(self, t)&lt;br /&gt;
    engine.interface.ActorTalents.init(self, t)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function _M:canAct()&lt;br /&gt;
    if self.power_regen or self.use_talent then return true end&lt;br /&gt;
    return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function _M:act()&lt;br /&gt;
    self:regenPower()&lt;br /&gt;
    self:cooldownTalents()&lt;br /&gt;
    self:useEnergy()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function _M:use(who, typ, inven, item)&lt;br /&gt;
    inven = who:getInven(inven)&lt;br /&gt;
&lt;br /&gt;
    if self:wornInven() and not self.wielded and not self.use_no_wear then&lt;br /&gt;
        game.logPlayer(who, &amp;amp;quot;You must wear this object to use it!&amp;amp;quot;)&lt;br /&gt;
        return&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local types = {}&lt;br /&gt;
    if self:canUseObject() then types[#types+1] = &amp;amp;quot;use&amp;amp;quot; end&lt;br /&gt;
&lt;br /&gt;
    if not typ and #types == 1 then typ = types[1] end&lt;br /&gt;
&lt;br /&gt;
    if typ == &amp;amp;quot;use&amp;amp;quot; then&lt;br /&gt;
        local ret = {self:useObject(who, inven, item)}&lt;br /&gt;
        if ret[1] then&lt;br /&gt;
            if self.use_sound then game:playSoundNear(who, self.use_sound) end&lt;br /&gt;
            who:useEnergy(game.energy_to_act * (inven.use_speed or 1))&lt;br /&gt;
        end&lt;br /&gt;
        return unpack(ret)&lt;br /&gt;
    end&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;You will also need to modify you Game.lua class: In the loaded function modify the Zone:setup call to also include your new Object class:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; Zone:setup{npc_class=&amp;amp;quot;mod.class.NPC&amp;amp;quot;, grid_class=&amp;amp;quot;mod.class.Grid&amp;amp;quot;, object_class=&amp;amp;quot;mod.class.Object&amp;amp;quot;} &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Also add the following function to the Player.lua class:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; function _M:playerUseItem(object, item, inven)&lt;br /&gt;
    local use_fct = function(o, inven, item)&lt;br /&gt;
        if not o then return end&lt;br /&gt;
        local co = coroutine.create(function()&lt;br /&gt;
            self.changed = true&lt;br /&gt;
&lt;br /&gt;
            local ret = o:use(self, nil, inven, item) or {}&lt;br /&gt;
            if not ret.used then return end&lt;br /&gt;
            if ret.destroy then&lt;br /&gt;
                if o.multicharge and o.multicharge &amp;amp;gt; 1 then&lt;br /&gt;
                    o.multicharge = o.multicharge - 1&lt;br /&gt;
                else&lt;br /&gt;
                    local _, del = self:removeObject(self:getInven(inven), item)&lt;br /&gt;
                    if del then&lt;br /&gt;
                        game.log(&amp;amp;quot;You have no more %s.&amp;amp;quot;, o:getName{no_count=true, do_color=true})&lt;br /&gt;
                    else&lt;br /&gt;
                        game.log(&amp;amp;quot;You have %s.&amp;amp;quot;, o:getName{do_color=true})&lt;br /&gt;
                    end&lt;br /&gt;
                    self:sortInven(self:getInven(inven))&lt;br /&gt;
                end&lt;br /&gt;
            end&lt;br /&gt;
        end)&lt;br /&gt;
        local ok, ret = coroutine.resume(co)&lt;br /&gt;
        if not ok and ret then print(debug.traceback(co)) error(ret) end&lt;br /&gt;
        return true&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    if object and item then return use_fct(object, inven, item) end&lt;br /&gt;
&lt;br /&gt;
    local titleupdator = self:getEncumberTitleUpdator(&amp;amp;quot;Use object&amp;amp;quot;)&lt;br /&gt;
    self:showEquipInven(titleupdator(),&lt;br /&gt;
        function(o)&lt;br /&gt;
            return o:canUseObject()&lt;br /&gt;
        end,&lt;br /&gt;
        use_fct&lt;br /&gt;
    )&lt;br /&gt;
end &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Congratulations, you now have usable items.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Now all you need to do is define your items usable.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For consumable objects like potions:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; use_simple = { name = &amp;amp;quot;power name&amp;amp;quot;,&lt;br /&gt;
  use = function(self,who)&lt;br /&gt;
    &amp;amp;lt;Code for power use here&amp;amp;gt;&lt;br /&gt;
    return {used = true, destroy = true}&lt;br /&gt;
  end&lt;br /&gt;
}, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For an object like a wand with limited charges:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; multicharge = &amp;amp;lt;charges&amp;amp;gt;,&lt;br /&gt;
use_simple = { name = &amp;amp;quot;power name&amp;amp;quot;,&lt;br /&gt;
  use = function(self,who)&lt;br /&gt;
    &amp;amp;lt;Code for power use here&amp;amp;gt;&lt;br /&gt;
    return {used = true, destroy = true}&lt;br /&gt;
  end&lt;br /&gt;
}, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For a magical object with regenerating power:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; max_power = &amp;amp;lt;max power&amp;amp;gt;,&lt;br /&gt;
power_regen = &amp;amp;lt;power regained per turn&amp;amp;gt;,&lt;br /&gt;
use_power = {name = &amp;amp;quot;power name&amp;amp;quot;, power = &amp;amp;lt;power use per charge&amp;amp;gt;,&lt;br /&gt;
  use = function(self, who)&lt;br /&gt;
    &amp;amp;lt;Code for power use here&amp;amp;gt;&lt;br /&gt;
    return true&lt;br /&gt;
  end&lt;br /&gt;
}, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For a magical object that activates a talent on use:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; max_power = &amp;amp;lt;max power&amp;amp;gt;,&lt;br /&gt;
power_regen = &amp;amp;lt;power regained per turn&amp;amp;gt;,&lt;br /&gt;
use_talent = {id = Talents.T_SOMETALENT, level = &amp;amp;lt;level of talent&amp;amp;gt;, power = &amp;amp;lt;power use per charge&amp;amp;gt; }, &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go back to [[T4modules-module-howto-guides]]&lt;/div&gt;</summary>
		<author><name>66.225.111.10</name></author>	</entry>

	</feed>