Inventory Plus Versión 1.0, for Unity 3D 3y3.net
Index Introduction... 5 Youtube Channel... 5 Quick Start tutorial...6 Starting up the tutorial... 6 Minimum scene requirements... 6 What is the best place to add inventory?... 6 Presets and skins. Basic knowledge... 7 Tuning inventory. Basic parameters... 8 Item database. Basic setup... 9 Player Manual... 13 Show/Hide Inventory, equipment and crafting... 13 Split stacks... 13 Break Item... 13 In deep... 14 Main behavior... 14 Presets... 14 Save in play mode... 14 Persistent content and file name... 15 Inventory rows and columns... 15 Inventory help... 15 Weight mode... 16 Use experience and item levels... 16 Global visual settings... 16 Loot hint text... 17 Custom Variables... 18 Toggle keys, equipment and Crafting window... 18 Inventory Key... 19
Equipment setting... 19 Crafting system, visual aspect... 20 Equip/Craft alignment... 21 Visible equipment slots... 21 Skins, sounds, textures, fonts how to set the look of Inventory Plus... 22 Sound settings... 22 Inventory Settings... 23 Title settings...24 Slot Settings... 25 Equipment Settings... 26 Custom variables and custom values... 27 A bit of theory... 27 Creating Custom Variables... 27 Advanced Item Database... 28 Opening Item Database... 29 Create an Item... 29 Setting Item Parameters... 30 Crafting system... 34 Localization, how to translate literals to your own language... 36 How to create your own skin... 37 Inventory textures... 37 Slot textures...37 Equipment/Crafting textures... 37 Font faces... 37 Programming & third party integration (PlayMaker, etc)... 38 How to prepare an in scene object to receive drops from the inventory... 38 Get/Set the main variables of the inventory from an outer script... 38 Basic operations... 39
Experience level... 39 Inventory Weight... 39 Public methods and common functionality... 39 F.A.Q... 41 May I run Inventory Plus in Unity Free?... 41 May I run Inventory Plus in mobile devices?... 41 May I run several inventory instances in the same scene at same time?... 41
Introduction We are proud of announce the new Inventory Plus, the definitive asset to create AAA Inventories instantly. Inventory Plus was designed cover all fundamental aspects for any inventory system either for RPG, adventure, FPS, or any other game, providing you full control and a professional visual result. Some of the Inventory Pus features are: AAA visual inventory, equipment and crafting Looting and drop in scene system Crafting system, both Recipe (RPG like games) or Free mode (adventure like games) Player equipment and statistics Drag&drop items between inventory, equipment and crafting windows Stackable items to a predefined limit per item Customizable in game tool tip window Nine preset skins (more to come) or customize your own skin easily More than 120 configurable parameters Can set level of experience for use, craft and equip any item Optional Weight mode for inventory Customizable sounds for pick up, drop, error and equip Auto save/load inventory contents Professional custom editor Works both on Unity Free and Unity Pro Works on Mobile (*no left click implemented) Unlimited item database for equipment and consumable items Auto generated item icon from prefab, with transparent background! Three looting modes, mouse click, key press and auto collect Define minimum activation distance for loot Define your own player statistics and its values in items Customize and apply changes to the inventory in scene Professional recipe editor. Items can be combined or break into other items Translate easily to any language. Localizable strings class. Full documented API and third party integration This manual will cover all the aspects and functionality of Inventory Plus. In addition we recommend you to see our Youtube channel which has lot of tutorials, from basic to advanced, about how to use all Inventory Plus features. Anyway, we will add references to these videos along the manual when appropriate. Youtube Channel http://youtu.be/37otpsv_dyk
Quick Start tutorial This intro will allow you setup an inventory quickly and familiarize you with basic aspects and configuration parameters of Inventory Plus. The tutorial was designed to work in conjunction with the Demo Tutorial scene of the package. If you wish a complete description of the Inventory Plus and its functionality, please jump directly to the In Deep section. Starting up the tutorial Open the Demo Tutorial scene in the Tutorial folder. The scene should contain only a directional light, a checkered terrain and a First Person Controller. If you hit play you can control the player moving around the scene. Minimum scene requirements Inventory Plus will look for a Main Camera so it is required a camera objet tagged as MainCamera in the scene. In this scene the camera is in the First Person Controller object. Test that the camera is tagged as MainCamera. What is the best place to add inventory? Some functionality in Inventory Plus uses distance from inventory to target, for example when you set the Loot minimum distance. Also, the inventory has an Audio Source to play some sounds. So the place where Inventory asset is placed is important. Usually, the best practice is in the Player game object. Drop the Inventory_3y3net script in the First Person Controller object.
A good practice is to create an empty GameObject, drop the Inventory_3y3net in this GameObject and place the game object in the player so you can set the Inventory transform just where you wish. Presets and skins. Basic knowledge If you run your scene immediately after adding the Inventory_3y3net script, you will show only an ugly box without any details, slots, textures The quick and easiest way to get a full skinned inventory is use the Presets. Version 1.0 comes with nine presets, three in SciFi look, three in fantasy/adventure look and three in horror look. We promise to add more presets in future updates (by the way, if you have a good proposal for a preset, request it in soft@3y3.net). Click on the Third Person Controller that contains the Inventory Script you just dropped and select any of the presets in the inspector until you get the preferred one. Now the look of your inventory will be simply awesome!
If you play around the Inventory editor you will see some buttons, Inventory settings, Title settings, Slot Settings and Equipment Settings. We will cover in deep these sections later, but by now, do not hesitate to touch, modify and play with any of the value in these sections. You can restore de default values simply by clicking in any preset button. Tuning inventory. Basic parameters Although Inventory Plus has good online help and most of the fields in editor are selfexplanatory, it has more than 120 parameters the user can change. Most of these parameters can be used by default as it only changes very specific aspects of the Inventory, others not. The most basic parameters of Inventory Plus are: Inventory Rows and Columns: Set the number of rows and columns of the Inventory and therefore the number of slots. Inventory Help: Will display an icon in the top left corner of the inventory. When the player mouse over this icon a tooltip window will be displayed with basic info about the inventory.
Title text. Is the text to display in the inventory title. Tooltip on mouse over. If this check is on, a tooltip with all item information will be displayed every time the user mouse over any item in the inventory. The look of the tooltip will be similar to the general skin selected. Inventory Alignment: Set the position of the inventory in the screen. The inventory layout is really flexible and allows you to set horizontal or vertical style inventories. These are the very basic Inventory Plus configuration capabilities. For a comprehensive description of all properties, please see the Inventory Editor Reference section or In Deep section. Now is time to fill up the inventory with items and see Inventory Plus in action. But first stop the scene! Item database. Basic setup The Item Database is a list which contains all different kinds of items the inventory can hold. Moreover, it contains a complete description of each of these Items, such as name, icon, if can be stacked in the slot, stack limit, etc It must be manipulated with scene stoped, remember this. Initially the Item database is empty and you need to add as much items types as you will use in your game. Add an Item is really easy, simply drop the prefab in the Prefab, field and automatically an icon will be rendered (with a nice transparent background!) or, if you prefer, set your own icon. Follow these instructions:
1) Add two new items to Item Database by click two times the Add New Item or directly typing 2 in the Number of Items field. 2) Open Item 00 by clicking the button. Dont panic!! Item description is, by far, the most complete and important part of the inventory setup. In this section you define the behavior of the items, if the prefabs can be looted or dropped in the scene, the custom statistics for each item, description text, how can they be combined to create other items, if can be broke in parts, etc
3) Now go to prefabs folder in the demo project folder and drop the BlueSphere prefab in the prefab field. Set the name to Sphere and type any description you wish. 4) Repeat the process with the ComplexObject prefab in the Item1 item of the database. Give this item the name Blue Bomb and any description you wish. The final aspect of the Item Database should be as this: By the way, did you notice that the icon is automatically generated? Nice... 5) If you wish to see some items really inside your inventory, open each of the items in the item database and set the Lootable flag to true. 6) Then drop some prefabs in scene.
7) Now play the scene and get the player close to any of the items... nice, uh? Do not hesitate to play around changing values and seeing results. If you wish a complete definition of how to setup items see the Inventory Editor Reference section or In Deep section. The tutorial folder also contains the demo finished, if you have some troubles doing this tutorial, open this scene and compare with yours.
Player Manual Before go in deep on how to configure Inventory Plus you need to know the basic Player Manual, that is, what can the player do and how. Show/Hide Inventory, equipment and crafting There is a toggle key assigned for each window. Bu default I for inventory, E for equipment and C for crafting. In addition, each window has a close button in the top right corner. Split stacks If a slot contains a stack of items, this stack can be split by right clicking on it. The contextual menu allows the user to select the number of items to split. Break Item If the itam has beed designed to be breakable, the player can break it by right clicking in the slot. The contextual menu allows the user to select the number of items to break.
In deep At this point you are supposed to know how to create an Inventory, where is the best place to drop it in scene and the very basic aspects of item configuration and setup. Now is time to move to serious things and learn how to configure all aspects of the most powerful inventory asset! Main behavior This section will cover comprehensively all the configuration parameters of the inventory. Some of the descriptions have been shown in previous sections. Presets The fastest way to get your inventory ready is to use one of the nine existing presets. Simply by clicking in any of the buttons all the main parameters will be set to the selected preset. We keep our promise for adding new presets in future updates (want to know a secret? We are now cooking the Military and Toon presets and will be ready soon!) Feel free to modify any of the presets, change sizes, textures, etc... Remember that you can get back to the original preset simply by clicking again the button. Save in play mode
One of the best things in Inventory Plus is that you can play your scene and visually change textures, fonts, sizes or any other parameter in the editor. Once you stop the scene, all the changes will persist. This allows you a smooth control over the visual aspect of your Inventory. To activate this feature simply check on the toggle button. Persistent content and file name Inventory Plus takes care of saving and reloading inventory and equipment contents making persistent any changes that happens in game. Check on the Persisten content toggle, give an unique file name and forget about saving and loading your game inventory data. Inventory rows and columns Set the number of rows and columns of your inventory and take a peek at the visual aspect of it. Rows can be set between 1 and 10, columns can be set between 1 and 15. Inventory help If you set on this toggle a help icon will be displayed in the top left corner of the inventory. When user mouse over this icon a Inventory Status tooltip will be displayed with information about total slots, free slots, inventory mode, etc...
Weight mode By default, the inventory has no limit in the weight of the items the user can carry. If you wish to limit the total weight allowed, simply check on the toggle and set the maximun weight allowed. Once set, Inventory Plus does not allow the user to add items exceeding this limit and an error sound will be played. Use experience and item levels Inventory Plus can limit how the player can user, craft or equip the items by an experience/level system. Check on the Use experience toggle and set the current exprience (this value is public and can be changed by API and third party assets), and the player will limited to use, craft or wear items of less or equal experience than current. Global visual settings This section will cover four different visual aspects of the inventory: 1) Title text. Is the text to display in the inventory title. 2) Tooltip on mouse over. If this check is on, a tooltip with all item information will be displayed every time the user mouse over any item in the inventory. The look of the tooltip will be similar to the general skin selected.
3) Inventory alignment. Set the position of the inventory in the main screen. Can be either Top Left, Top Center, Top Right, Middle Left, Middle Center, Middle Right, Bottom Left, Bottom Center or Bottom Right. 4) Inventory padding. Set the distance between the inventory and the border of the screen. Loot hint text Inventory Plus has an automatic looting system so the player can loot any object in the scene if is listed in the Item Database (see section Item Database) You can set the Text color, outline
color, font and size of the hint text that will appear when an Item is lootable in scene. NOTE: The content of this hint text is set in the Item definition (see section Item Database). Custom Variables See section Custom Variables and Custom Values. Toggle keys, equipment and Crafting window Click on the blue button Keys, Equipment and Crafting to show all the options.
Inventory Key Set the toggle key to show/hide the inventory window. By default is set to key I Equipment setting Inventory Plus comes with a complete equipment and player stats system. This section will cover how to configure the main visual aspects of the equipment system. 1) Equipment box: Check on this toggle to activate all the equipment features. 2) Equipment Key: Define the show/hide toggle key for equipment. By default is set to E. 3) Player stats: Finally, you can set on or off the visual player statistics. Take a look at the different equipment layouts with and without stats. NOTE: Equipment slots and player stats can be defined by you, see Equipment Slots and Custom Variables sections. Player stats ON Player stats OFF
Crafting system, visual aspect Inventory Plus provides a very powerful crafting system. This section will cover how to configure the Crafting visual aspect and behavior. 1) Crafting box: Check on this toggle to activate all the crafting features. 2) Crafting Key: If you set on the Crafting box check, you can define the show/hide toggle key for crafting window. By default is set to C. 3) Crafting Mode: Inventory Plus provides two crafting modes. The Recipe Mode will display a full list with all recipes and descriptions, using a color code to tell the user which recipes can be crafted based on the items he has in the inventory. This is the classical Crafting system for RPG games. The Free Mode will display an empty box where the user can drop items with no clue on how to combine them. All the items that can be crafted with the dropped elements will be displayed in the bottom of this box. This is the classical Crafting system for adventure games. Crafting Window in Recipe Mode
Crafting window in Free Mode 4) Order by / Sort by: If Recipe Mode is set you can show the recipe list plain or grouped by Slot. You can set also the order of the recipes by either, Item leve, alphabetically or by weight. Take in mind that if the list is grouped, the order will be applied inside each of the groups. Equip/Craft alignment Set the relative position of the equipment and crafting window relative to the inventory window. You cat set it to either, Top, Doen, Left or Right. Select an aligmnt that match well with the Globa Inventory Aligment. For example if your inventory is 2x8 and bottom center aligned, the best equipment/crafting aligment will be Top because if you set Down the equip/craftwill be displayed out of the screen! Visible equipment slots In this section you define how many slots does the equipment window has.
Simply toggle on or off the desired slots and automatically the equipment window will be set to the appropriate look. For example: Skins, sounds, textures, fonts how to set the look of Inventory Plus This section will cover all the visual and audio settings for the inventory Sound settings Click on the blue button Sound Settings to show all the options. Simply drop the audio files on each of the fields. Inventory Plus plays sound when drag, drop and equip an item and when any error happens.
Inventory Settings Click on the blue button Inventory Settings to show all the options. In this section you configure the mains visual aspects of textures, borders and shapes of the inventory. 1) Icon Layout: Can be set to Mode Normal or Mode Exagon. The first mode will display a grid layout for the inventory slots. The second one will use a zigzag layout suitable for exagon slots. See pictures bellow. Normal Mode Hexagon Mode 2) Inner padding: Set the internal padding between the borders of the inventory and the inner slots. 3) Draw box: If not set, Inventory Plus will draw only the slots in the screen, with no borders, title nor background. 4) Background texture: The texture picture to draw as inventory background.
5) Crop background: If set, the background texture wont be resized and will be cropped to the inventory size. If not set the texture will be redimensioned to the inventory size. 6) Horizontal border: The texture to draw in top and down borders. 7) Vertical border: The texture to draw in left and right borders. 8) Corner: The texture to draw on each corner of the inventory. Title settings Click on the blue button Title Settings to show all the options. In this section you configure the visual aspects of the title of the inventory. 1) Title texture: The texture to draw in the inventory title. 2) Title size: Size for the title 3) Title aspect ratio: This option will change the height/width relation for the title. 4) Title alignment: Set the alignment of the title. The title will be allways draw in top of the inventory, but you can set alignment to Left, Center or Right. 5) Horizontal padding: This option set the horizontal padding of the title respect to the inventory. Use this option if you wish to slightly move the title left or right. 6) Vertical padding: This option set the vertical padding of the title respect to the inventory. Use this option if you wish to slightly move the title up or down. 7) Title color: The color for the text in the title. 8) Title outline color: The color for the outline text in the title. 9) Title font type: Font to use in the title
10) Font size: Font size for the title 11) Text vertical padding: This option set the vertical padding of the title text respect to the title texture. Use this option if you wish to slightly move the title text up or down. Slot Settings Click on the blue button Slot Settings to show all the options. In this section you configure the visual aspects of the slots of the inventory. 1) Cell size: The size of the slot in the inventory. 2) Cell padding: The padding between slots in the inventory. 3) Icon scale: The scale of the icon to display respect the size of the cell. Sometimes the icon fills the whole slot and some parts falls out (for example, because the slots has circular or hexagonal shapes) With this option you can resize the icon to fit exactly the size of the slots. 4) Empty slot texture: The texture to draw in the background of emplty slots. 5) Filled slot texture: The texture to draw in the background of fill slots. 6) Slot frame texture: The texture to draw over each slot. Is a frame to get a superb visual aspect.
7) Highlighted slot texture: The texture to draw in the background of slots when the mouse is over. 8) Stack alignment: When a slot contains a stackable item, a small number will be draw to show the amount of items stacked in this slot. This option will set the alignment for this text. 9) Stack text color: The color for the stack text. 10) Stack text outline color: The color for the outline stack text. 11) Font type: Font to use in the stack text. 12) Stack Font size: Font size for the stack text. Equipment Settings Click on the blue button Equipment Settings to show all the options. In this section you configure the visual aspects of the equipment of the inventory. 1) Equipment size: The size of the equipment window.
2) Equipment padding: The padding of the equipment window respect the inventory window. 3) Equipment background: The background texture for the equipment window. 4) Crop background: If set, the background texture won t be resized and will be cropped to the equipment size. If not set the texture will be dimensioned to the equipment size. 5) Equipment silhouette: The texture for the silhouette in the equipment. 6) Empty slot texture: The texture to draw in the background of empty slots. 7) Filled slot texture: The texture to draw in the background of fill slots. 8) Slot frame texture: The texture to draw over each slot. Is a frame to get a superb visual aspect. 9) Highlighted slot texture: The texture to draw in the background of slots when the mouse is over. 10) Show slots hints: If set, a small text will be draw on each equipment slot showing the slot function. 11) Equipment text color: The color for the equipment hint text. 12) Equipment text outline color: The color for the outline equipment hint text. 13) Equipment type: Font to use in the equipment hint text. 14) Equipment Font size: Font size for the equipment hint text. Custom variables and custom values One of the most powerful features of Inventory Plus is the Custom variables and custom values. A bit of theory A custom variable is a value you can define and set for any item. You can define as many custom variables as you wish and use then in runtime. Moreover, the player stats system is fully integrated with the Custom Variables you define. For example, if you wish a game where the player stats are Strength, Attack, Armor and Magic simply create this variables in the Custom Variable section and set the values for each item in the Item database (see next section). But Custom Variables are not limited only to player stats. You can use them to store values for consumable items (like live potions, temporary shields, whatever you want) and create items with its own values for this variables. Creating Custom Variables To create your Custom Variables click on the green button Add New Custom Variable or set directly the number of variables to create. To show or hide the custom variables click the small
green button Show Custom Variables. Once you create the custom variable you should to set its values. 1) Name: Is the name of the variable. This name will be used to display in the tooltip and stats (if Show in tooltip or is stat is set) and also to set the value for this variable on each item (see section Item Database below) 2) Show in tooltip: The name and value of this variable will be displayed in the item tooltip. 3) Is stat: The stat will be displayed in the stat section of the equipment window and Inventory Plus will sum the values of all items in the equipment which has set this variable. 4) Variable color: The color for the name of the variable in the tooltip and equipment stat window. 5) Value color: The color for the value of the variable in the tooltip and equipment stat window. Create as many Custom Variables as you wish and use them in the Item Database definitions. Also, there are API functions to retrieve Custom Values from items in runtime. So you can store and retrieve your own values for each item, for example, a chance of an item to be poisoned, and apply in runtime. Advanced Item Database The Item Database is the true hearth of your inventory. Here you will define all the kinds of items the player can use, wear, drop, loot, craft, etc... The values for the custom variables you wish to set on each item and the craft recipes. Each Item has lot of configurable parameters but most of them can be used by default.
Opening Item Database To open the Item Database click on the blue button Item Database Create an Item To create an item simply click in Add New Item button or directly set the total amount of items to be created.
Setting Item Parameters Don t panic! In five minutes you will be familiar with all item options and moreover, you will find confortable settings all the values. 1) Prefab: First of all, it is not mandatory to use a prefab to define an item. You can simply use an icon texture and define most of the values of the item. When do you should use prefabs? If the item can be looted from the scene, or can be dropped you must set the prefab. IMPORTANT! Do not drop a scene game object here. Instead drop the Project original prefab. Otherwise the Inventory won t work properly.
Never drop the prefab from the scene. Instead drop it from the Project Inspector. 2) Label: The name for the item. This name will be used to display the item name in tooltip, equipment and even in scene hints. 3) Description: The full description for the item. This name will be used to display the item name in tooltip and equipment windows. 4) Needed experience: The needed experience to use, wear, craft or break the item. This value will be used only if Use experience is on in the main inventory settings. Otherwise, will be ignored. 5) Icon: The icon texture to display in the inventory. If you drop a prefab for the item and nice icon will be automatically generated. 6) Item type: The type of item. If you set the item to an equipment slot then the player could wear the item in this slot. 7) Item weight: Weigh of the item. This value will be used only if Weight inventory is on in the main inventory settings. Otherwise, will be ignored. 8) Custom values: Here you can set the item values for any of the Custom Variables defined in the inventory.
To create custom values simply click in Add New Custom Values button or directly set the total amount of values to be created. To show or hide the custom values click the small green button Show Custom Values. Custom values are really easy to set, first select the variable name from the drop down list. Here you will see all the Custom Variables you defined in the Inventory. Finally set the value for this variable in this type of item. If the value is for a stat variable, you can use the plus + or minus signs or nothing. But it is needed a numerical value because all this variables will be sum in the equipment stats window. Set all the variables you wish for the item.
9) Lootable: If you drop a prefab for the item, a toggle button for Lootable will appear. If you set to on, the player can loot all the game objects of this prefab directly in scene. If you set lootable to on the new options will be displayed. Looting mode: Set the looting mode for this item. Can be set to a) Mouse Click: The player must click on the scene game object to loot it. b) Key Press: The player mus click a specific key to loot the game object from the scene. If you select KeyPress then you must select the Key to loot the item. By default is set to G. c) Autocollect: The player simply need to walk over the game object to loot it. Activation radio: Is the minimum distance needed to be able to loot the item. Loot hint mode: Set the hint to display in scene when the user is able to loot an item (the item is lootable and is close enough to be looted) The available options are:
a) Loot instructions only: Display a hint text with instructions (mouse click or specific key to loot) b) Loot instructions and item name: Similar to previous but with the item name. c) Loot instructions and full tooltip: Displays the loot hint and the tooltip for this item d) None: Does not display anything at all Can be dropped: If set, the user can drop the item from inventory to scene. 10) Can be stacked: If set, then the item can be stacked in an inventory slot up to the limit you set in Max Stack Size. 11) Can be crafted: If you set on this toggle a new bunch of fields will be displayed. These are the heart of the recipes/crafting system. Can be decomposed: Set on if the item not only can be crafted but also can be decomposed in other items. Crafting system The first step for create crafting recipes is to add as many components to the list as ingredients you need. To create new components click on the green button Add New Component to Craft List or set directly the number of components to create. To show or hide the component list click the small green button Show Craft Values. Each craft component has the following values:
Component#: Is the item from the database. The entire item from the database will be listed in the drop down. Simply select the desired one. Needed items: The numner of items of this type needed to craft. Decomposed items: The number of resulting items of this type when you broke up the item. You can add as many ingredients as you wish to each recipe. Once you finish, Inventory Plus will automatically set the Recipe/Craft system for in game use.
Localization, how to translate literals to your own language Most of the text to display is directly set by you in the item database, inventory title, etc.. But there are some other literals that are automatically displayed by the inventory system. If you wish to translate this text to your own language simply open the Scripts/InventoryLocalization_3y3net file and change all the literals you wish. It is recommended to make a copy of the original file.
How to create your own skin Inventory Plus comes with 9 nice presets and the promise of create more and more in next updates. But for sure you may wish to use your own inventory background texture, or slot frame or equipment silhouette, etc... This section will cover the image types and sizes needed to set your own skin. Inventory textures 1) Background texture: 1024 width x 1024 height 2) Vertical border texture: 20 width x 1024 height (automatically cropped) 3) Horizontal border texture: 1024 width x 20 height (automatically cropped) 4) Corner texture: 20 width x 20 height 5) Title texture: 512 width x 128 height Slot textures 1) Empty background texture: 256 width x 256 height 2) Filled background texture: 256 width x 256 height 3) Border frame texture: 256 width x 256 height 4) Highlighted background texture: 256 width x 256 height Equipment/Crafting textures 1) Background texture: 1024 width x 1024 height 2) Silhouette: 512 width x 512 height 3) Empty background texture: 256 width x 256 height 4) Filled background texture: 256 width x 256 height 5) Border frame texture: 256 width x 256 height 6) Highlighted background texture: 256 width x 256 height Font faces You can set the font faces for these elements. 1) Loot in scene hint (main section on the editor) 2) Inventory title font face (title settings section) 3) Slot stack amount figure (slot settings section) 4) Equipment hint text (equipment settings section) A good practice is import your textures to a specific folder (remember to set alpha transparency if needed) and drop each texture in the field of the inventory inspector you wish.
Programming & third party integration (PlayMaker, etc) Inventory Plus has a public API and supports both direct calls to methods or messages from third party assets. You can take a look at the compelte API documentation at: http:// Here we will describe some basic tutorials to know how to interact with the script and integrate with third party assets. How to prepare an in scene object to receive drops from the inventory When the player drops an item from inventory to scene Inventory System will raytrace to the destination position. If there is an object chich implements the method: void DropTrigger(Inventory_3y3net inventory) Then the system will send a message to this game object method and set some public variables to inform the destination method which type of drop is performed. 1. public int triggeroriginslot: The slot index of the inventory from where the drop comes 2. public int triggeritemindex: The itemdatabase item index 3. public int triggeritemamount: The ammount of items dropped 4. public DragOrigin triggerdragorigin: The window from where the drag is originated, can be either Inventory, Equipment or Crafting A simple implementation of this script can be tested in the Demo Scene Programmer : Get/Set the main variables of the inventory from an outer script Sometimes you will need to get or set some inventory variables, for example increase the Inventory Experience Level to allow the player wear or craft some items, or increase the total weight allowed by the inventory etc...
Inventory Plus provides two methods to access main variables, the first and most direct method is simply by setting the these variables as they are public. The second is by Messaging from other scripts, this is very common method for third party assets like PlayMaker. You can get the complete list of public variables and methods from the documentation (see link above) but we wish to list the most common methods and variables a game designer may use. Basic operations showinventorywindow: Show inventorey window hideinventorywindow: Hide inventorey window showequipmentwindow: Show equipment window hideequipmentwindow: Hide equipment window showcraftingwindow: Show crafting window hidecraftingwindow: Hide crafting window Experience level The public variable name is currentexperience, so simply access to it to set or get the value. If you are using PlayMaker or similar, send one of this Messages to the inventory object: setexperience(int val): Send the desired experience as parameter in the message int getexperience: Returns the current experience in the inventory Inventory Weight The public variable name is maxweight, so simply access to it to set or get the value. If you are using PlayMaker or similar, send one of this Messages to the inventory object: setmaxweight(int val): Send the desired max weight as parameter in the message int getmaxweight: Returns the current max weight in the inventory These are other weight functions very usefull: int currentweightofinventory: Get the current used inventory weight. int availableweightofinventory: Get the current available inventory weight. Public methods and common functionality Inventory Plus provide a wide range of methods to cover the functionality you may need when developing your game. We encourage you to see the full documentation, this is only a subset of the existing methods. int freeslots: Get the number of free slots in the inventory. int firstfreeslots: Return the first slot index free.
int numberofitemsininventory(int itemid): Return the amount of items of specific type in the inventory. bool inventoryweightfor(int itemid, int numitems): Looks if there is enougth weight capacity to store the items provided. bool inventoryroomfor(int itemid, int numitems): Looks if there is enougth room capacity to store the items provided. bool AddItemToInventory(int itemid, int numitems, int atindex): Add numitems Item of type itemid to the inventory at specific slot in atindex. int getequipmentfor(inventoryitem_3y3net.equipmentslot slottype): Get the itemid for a specific equipment slots. EqSlotData[] getequipmentslots():get all the equipment slots content. int[] getinventorystacks():get the amount of items in each slot of inventory int[] getinventoryslots():get all the inventory slots content
F.A.Q. May I run Inventory Plus in Unity Free? A: Yes May I run Inventory Plus in mobile devices? A: Yes, there are no limitations for mobile others than screen size. Just remember that there is no right click contextual menu. May I run several inventory instances in the same scene at same time? A: There are no limitations on this aspect. Just remember you can only drop items in its corresponding inventory.