<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetCraftingBackPackSlots</id>
	<title>API:GetCraftingBackPackSlots - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetCraftingBackPackSlots"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetCraftingBackPackSlots&amp;action=history"/>
	<updated>2026-10-17T14:22:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:GetCraftingBackPackSlots&amp;diff=30365&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetCraftingBackPackSlots&amp;diff=30365&amp;oldid=prev"/>
		<updated>2026-10-16T19:43:25Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Crafting}}&lt;br /&gt;
Returns, for each filled crafting slot of a trade skill, the backpack slot the item came from.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sources = GetCraftingBackPackSlots(tradeSkill)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;tradeSkill : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – A &amp;lt;code&amp;gt;GameData.TradeSkills&amp;lt;/code&amp;gt; value. The stock UI uses &amp;lt;code&amp;gt;APOTHECARY&amp;lt;/code&amp;gt; (4) and &amp;lt;code&amp;gt;TALISMAN&amp;lt;/code&amp;gt; (5).&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;sources : &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; – Table keyed by crafting slot, &amp;#039;&amp;#039;&amp;#039;0&amp;#039;&amp;#039;&amp;#039; to 7, the same keys as [[API:GetCraftingData|GetCraftingData]]. Crafting slots whose source is not in the inventory or crafting backpack have no entry.&lt;br /&gt;
&lt;br /&gt;
Each entry has these fields:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Type !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;slot&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Slot inside the backpack, starting at 1.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;backpack&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || 2 for the main inventory or 4 for the crafting backpack (&amp;lt;code&amp;gt;EA_Window_Backpack.TYPE_INVENTORY&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;TYPE_CRAFTING&amp;lt;/code&amp;gt;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* Only items from the main inventory (slots 1–80) and the crafting backpack (slots 1–80) are reported.&lt;br /&gt;
* The table can have gaps. The stock UI stops at the first missing index.&lt;br /&gt;
* Nothing is returned for trade skill 0 or 7, or if there is no player object or the Lua state is not available. Other values are not range-checked.&lt;br /&gt;
* Exactly one argument must be passed.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None besides the generic &amp;#039;&amp;#039;Invalid Parameters&amp;#039;&amp;#039; message when the argument is missing or not a number.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;default/ea_craftingwindow/source/talismanmakingwindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local backpackSlots = GetCraftingBackPackSlots( GameData.TradeSkills.TALISMAN )&lt;br /&gt;
...&lt;br /&gt;
for index = 0, TalismanMakingWindow.maxResources&lt;br /&gt;
do&lt;br /&gt;
    if( not backpackSlots[index] )&lt;br /&gt;
    then&lt;br /&gt;
        break&lt;br /&gt;
    end&lt;br /&gt;
    local backpackSlot = backpackSlots[index].slot&lt;br /&gt;
    local backpackType = backpackSlots[index].backpack&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:GetCraftingData|GetCraftingData]]&lt;br /&gt;
* [[API:RemoveCraftingItem|RemoveCraftingItem]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>