Search Unity

S-Inventory: Equipment, Crafting, Skill Bar, Item Groups, Containers & Merchant (C# & JS)

Discussion in 'Assets and Asset Store' started by OussamaB, Jul 29, 2013.

Thread Status:
Not open for further replies.
  1. Idialot

    Idialot

    Joined:
    Dec 8, 2013
    Posts:
    18
    Some files seem to be missing according to the tutorials on Dialogue site.

    S-Inventory FPS Bridge and FPS Inventory Events

    I would assume these files would make the updates to the RFPSP Player via the attributes of items in S-Inventory.

    Or are the instructions out of date?

    Just wondering if I missed something somewhere

    Thanx
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    You have to import three packages. First import RFPS_Support and SInventory_Support. After you import SInventory_Support, there will be a new package in Third Party Support/SInventory Support for SInventory RFPS Support. Import this, too.
     
    EvilGremlin likes this.
  3. Idialot

    Idialot

    Joined:
    Dec 8, 2013
    Posts:
    18
    K I saw that but just thought it was a duplicate.... silly me should have checked it... Thanks again Tony.

    P
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    No problem; good luck!
     
  5. EvilGremlin

    EvilGremlin

    Joined:
    Aug 12, 2016
    Posts:
    231
    Hey, quick question. I don't need a full inventory system and I am using RFPS. I just need to be able to pick up an item and save it for later use. Will this let me skip the full inventory container and auto-equip an item to the skill bar easily or should I just code it myself? I'm not looking forward to delving into the RFPSs code to do this on my own and if $15 can save me from doing so, great. (I am also using Dialogue System.)
     
  6. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    If you do use the Dialogue System's S-Inventory Support package and you're using RFPS 1.23, please download the updated package from the Dialogue System Extras page. Then you can just assign no key to the full inventory so it won't appear, and tick Move To Skillbar On Pickup on your items so they appear automatically in the skillbar.
     
    EvilGremlin likes this.
  7. EvilGremlin

    EvilGremlin

    Joined:
    Aug 12, 2016
    Posts:
    231
    Okay, thank you for the speedy reply. I knew they integrated but I didn't realize I could do that. I suppose I should really familiarize myself with Dialogue System more. It seems like a really great tool.
     
  8. DecayGame

    DecayGame

    Joined:
    May 15, 2016
    Posts:
    86
    Hey I have a quick question :

    I have Dialouge System the latest version as with S - Inventory and I wanted to know if there was a way to make auto saving instead of pressing the buttons because cheaters will quit the game without saving. and re load it.
     
  9. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi @DecayGame - S-Inventory auto-saves to PlayerPrefs by default, but this doesn't auto-save the Dialogue System. So if you're using the Dialogue System it's important to untick Save and Load on the S-Inventory components. I replied here about how to save with the Dialogue System.
     
  10. Philostastically

    Philostastically

    Joined:
    Oct 12, 2012
    Posts:
    4
    Hi, I'm running 5.5.0b9 and I just imported S-Inventory into my plugins directory, I'm getting the compiler error:
    "Assets/Plugins/S-Inventory/C#/Scripts/Equipment/Equipment.cs(203,82): error CS0039: Cannot convert type `UnityEngine.Transform' to `UnityEngine.GameObject' via a built-in conversion"

    I've fixed it for myself by changing the line from
    Code (CSharp):
    1. TempObj = Instantiate(DefaultItem,MyTransform.position,MyTransform.rotation) as GameObject;
    to
    Code (CSharp):
    1. TempObj = Instantiate(DefaultItem, MyTransform.position, MyTransform.rotation).gameObject;
    I'm not sure if this error is tied to the beta version that I'm using, or something specific to my project.
     
    jtok4j and OussamaB like this.
  11. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    This error doesn't appear on earlier Unity versions so it must be something new in this version. Thanks for the fix. Anyone who's using the 5.5.0b9 version will find this useful. I will take a better look at it when it's officially released.
     
  12. darrennorthcott

    darrennorthcott

    Joined:
    Jun 17, 2014
    Posts:
    20
    Hi! I was wondering if you could tell me how to get the item icon in the crafting required items slot instead of the name of the item. Basically, I would like to show the item icon, then if it requires more than 1, the text with the amount over top, like in the inventory panel...

    Cheers!
     
  13. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Hello, please PM me your invoice ID and e-mail and I will send the modified Craft UI script.
     
  14. DecayGame

    DecayGame

    Joined:
    May 15, 2016
    Posts:
    86
    For some reason you can't hear the sounds in mine even when I have the sounds selected.
     
  15. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Very weird. Does this happen in the demo scene that came with the asset?
    Also can you try to import the asset into an empty project and see if you can hear the audio clips?
     
  16. DecayGame

    DecayGame

    Joined:
    May 15, 2016
    Posts:
    86
    Yeah this still happens I don't know what I did or to do. I mean all the clips are in there but there not playing.
     
  17. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Which Unity version are you using?
     
  18. DecayGame

    DecayGame

    Joined:
    May 15, 2016
    Posts:
    86
    5.4.3
     
  19. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Just figured what the problem was. In the demo scene, the main audio source is the one in the object that has the "InventoryManager.cs" script. And since that object is really far away from the camera (which has the audio listener comp), the audio clips can not be heard. So you can either move the audio source object near the audio listener or create your own audio source and make sure you assign it to the "AudioSC" field in the "InventoryManager.cs" script.
     
  20. DecayGame

    DecayGame

    Joined:
    May 15, 2016
    Posts:
    86
    Ooh, okay thanks :)
     
  21. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Hi @OussamaB , I have had a look at the demo of this asset and it looks like exactly what I need. I would like to buy it but I have one question:

    For the buying/selling is it possible to use a non drag and drop interface? I'm thinking of a more classic implementation where the items are displayed in a scrolling list and when the player highlights an item a sell button appears. Would this be possible?
     
  22. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    I'm not sure I exactly understand what you mean. But if you mean that you want items to be sold directly from the inventory panel by double clicking it/or clicking it and using a button that a comes out to sell it. Then it's very possible. If this not what you mean, can you please explain more?
     
  23. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Something similar to the old Pokemon games, where pressing a key near a merchant will bring up a menu with "Buy" & "Sell" options, and then going to "Buy" will bring up a scrollable list of all of the purchasable items. Pressing a key on an item in the list will allow it to be bought. Like this (skip to 21 secs):
     
  24. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    So you mean you want to be able to control everything using keys, not the mouse?
     
  25. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    The idea I had was that the item would need to be selected in an inventory list. This would be either by highlighting the item with up/down keys and then pressing another key to buy/sell/use the highlighted item. Or by highlighting it with the mouse and clicking on the item to buy/sell/use the highlighted item. The main difference is that the item is not being dragged and dropped, if that makes sense.
     
  26. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Yeah it's totally possible. It just requires some minor code modification.
     
  27. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Awesome, thanks for letting me know :)
     
  28. Demonoid74

    Demonoid74

    Joined:
    Jan 20, 2017
    Posts:
    16
    First off , just wanted to say great asset so far! Imported it to my older project that has been worked on a decent amount and it integrated flawlessly . Then upgraded Unity to 5.5 and kept getting a single error in equip script...I came here and that guy above that posted that one line fix , cleared it all up , thanks ;)

    Anyways...I changed the UI around to fit my games theme , changed the names , stats etc. without much effort..
    BUT...I tried added in a few test items , made a belt for the Waist Slot and a pair of pants for the Pants slot . It will not let me equip them by dragging at all...and when I click to bring up the menu to Equip Item , it puts the pants item into the Waist slot , and it puts the belt item into the Pants slot lol...been bugging me the last 2 days...I know I am probably missing something easy...
     
  29. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Make sure that your equipment slots are correctly created. Each equipment slot must have a couple of trigger events in order to function well. Also make sure to link the Equipment Slot UI icon to the correct equipment slot.
    In this part of the documentation: http://soumidelrio.com/document/s-inventory/equipment/ is all you need to setup the equipment slots.
     
  30. Demonoid74

    Demonoid74

    Joined:
    Jan 20, 2017
    Posts:
    16
    Hey just wanted to let you know , after actually getting some time to mess with my project...it turns out that it WAS something easy and dumb that was messing my items up lol . I had just used the straight prefab of your inventory/equipment and changed it around...don't know if it was like that from the demo or something I did , but shirt and ring slots , and pants and waist slots were actually switched around...So , I just renamed them to the other and it all has worked out...(its always something easy like that , that causes the most problems!)

    Thanks for that quick response and for making this available to us!
     
  31. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Do you plan to add controller support in a future version?
     
  32. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    It is indeed something planned but can't exactly tell you when. Currenty I am working on re-doing a lot of parts of the UI and generally improving it. That update should be available by the beginning of next week.
     
    magique likes this.
  33. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    A before sales question:

    What version of Unity will you be supporting with this new update?
     
  34. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Unity 5.5 and all next versions.
    What version are you using?
     
  35. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    Sounds good. I am using Unity 5.5.0f3 (windows 64-bit).
     
  36. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    It looks like none of the C# code in S-Inventory (02/01/2016 - v1.30) is using any namespaces. Can you add namespaces to your next update please. Otherwise we will have collisions with other C# assets.

    This issue of namespaces is also mentioned in Tony Li's very useful thread below.

    https://forum.unity3d.com/threads/how-to-make-better-code-assets-for-the-asset-store.366355/
     
  37. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
  38. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    Thanks.

    I have been testing my Rewired integration and S-inventory and it has been going fairly well. Still have to do more updates.
     
  39. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Great! Keep me updated.
     
  40. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    I will.
     
  41. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,216
    @OussamaB ,

    Does this Asset support sockettable (and socket) items and items that can be modified and that then saved out or loaded in (as the modified versions in the players inventory in say Save1)?
     
  42. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Unfortunately the asset does not support that currently.
     
  43. kebbaben

    kebbaben

    Joined:
    Mar 7, 2017
    Posts:
    2
    Hi! just bought your S-Inventory pack. I just want to use the pack as a reference but as soon as I started the demo i get this error in the equipment code at line 203:
    Error CS0039 Cannot convert type 'UnityEngine.Transform' to 'UnityEngine.GameObject' via a reference conversion, boxing conversion, unboxing conversion, wrapping conversion, or null type conversion test area.CSharp E:\Unity projects\test area\Assets\S-Inventory\C#\Scripts\Equipment\Equipment.cs 203 Active

    Any help soon would be appriciated

    thanks
     
  44. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    I think that is solved in msg #660 in the forum section.

    https://forum.unity3d.com/threads/s...ers-merchant-c-js.193111/page-14#post-2861818
     
  45. kebbaben

    kebbaben

    Joined:
    Mar 7, 2017
    Posts:
    2
  46. jtok4j

    jtok4j

    Joined:
    Dec 6, 2013
    Posts:
    322


    Thanks to Philostastically for the quick fix to the error mentioned in Msg #660. I am using Unity version 5.5.0f3 . Just copy, paste, and save the single line and the script's fixed.
     
  47. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Sorry for the trouble! I just submitted an update with a fix for that and also a whole bunch of code refactoring in order to improve the overall performance of the asset.
     
  48. drakedane

    drakedane

    Joined:
    May 23, 2017
    Posts:
    62
    Very confused. New user. I sent one or two emails about this already; but no replies at all. Looks like there MIGHT be a bit more modern activity going on here, so will copy/paste long report I just wrote and sent by email. Guess I can continue working my way through these 14 pages, but, so far, don't see any discussion about this issue. Seems like I might have missed something that would explain why no one else seems to be having this issue. I assume no one else is having this issue, because I get almost nothing, when I try to search for the keywords (baseslot or base slot and bag slot parent).

    Anyway, basically have everything set up and, as I reported, I can open/close all of the windows I have set up; but no slots can be created, until I can get this issue resolved! Not going to bother moving on to item creation, until I can solve this.

    If the answer is "obvious", I apologize, but I have only been doing game dev for less than 3 months! I also apologize for the long report. I did not compose that originally as a quick post to a forum like this!

    Here's report I just sent by email.....

    =====================================

    Pretty sure I already sent email. But see no reply. Very disappointing, since I am a new user. Seems like very little documentation for S-Inventory, compared to other Assets I have purchased, since starting game dev about 2 - 3 months ago. For other assets, there is usually written and video documentation from the developer, as well as documentation and videos made by users and other developers.

    On your site, I see only a few tutorials. And none of them are for S-Inventory. Beyond this, I don't see anything from anyone else (other than some info about integrating with other software).

    The written documentation on your site (if memory serves) was written around 2014. And, unfortunately, that documentation is clearly out of date, as it describes a user interface that doesn't match what I have. Specifically, there are two fields that are giving me trouble. And, of course, these are the two fields that are NOT mentioned in your out-of-date documentation: "base slot" and "bag slot parent".

    I assume you must have added these fields and upgraded your system, but didn't update the documentation.

    The most I have been able to do is to review comments from the scripts, which log errors in the Console. So, by reviewing scripts/console, I can get SOME information about what these two fields are all about. But, clearly, so far, my guesses and understaning have been wrong, because, whenever I drop something in those slots, I am still not getting the desired behavior.

    Some parts of your system were amazingly easy. Some things seemed to work right out of the box, without me doing anything other than dragging a prefab to my scene.

    Took a while, but I also managed to switch out all of your UI elements for UI matching UI I was already using (SciFi UI).

    Now, I can open/close equipment, inventory, container (bank) and crafting. I have not yet set up vending.

    But, unfortunately, I assume due to those two mysterious fields (base slot & bag slot parent), I don't see any slots in any of the windows. And I clearly see console errors.

    From what I can tell, it appears slots are created when the game starts up. So, unless I can set this up properly, guess I won't have any slots.

    I have not started yet with items, since I wasn't sure how helpful it would be to make items, if I still don't have any slots to put them in.

    So strange that you wouldn't bother to update your documentation; or that you don't have more materials to assist your users (like tutorial videos). I am not sure how I can progress without support. So hopefully you will receive this and provide VERY EXACT explanation about the objects that need to be dragged into those slots. And, if you really don't want to update your documentation, can you at least update the script comments, so that we have MORE details.

    Here is everything we have to go on, in terms of knowing what to do with these two fields. And you won't even have this much info, unless you go to the script or happen to catch the errors in the console.

    public GameObject BagSlotsParent; //The parent object that holds all the bag slots.
    public GameObject BaseSlot; //The slot will be instantied for as many times as specified.

    I seem to understand these words, but cannot figure out what object is required. Every time I think I know what object I need, I notice that object is already in another slot clearly marked for that object.

    Then we have this, from the script, specifying the console errors:

    Debug.LogError ("The 'BagSlotsParent' in the 'InventoryUI.cs' script is missing (the object that holds all the inventory slots).");

    Debug.LogError ("The 'BaseSlot' in the 'InventoryUI.cs' script is missing (the slot that will be instantied for as many times as specified in the inventory manager)");

    Only a bit more info than we got from above.

    Guess I have no choice, but to continue playing around with this. Maybe by process of elimination, I will find the right objects. But why would I have to guess? Why should I have to go into your scripts or to the console, to try to understand how to use your software? Why not simply explain these things? I suspect that you would have a better explanation had you updated documentation on your web site.

    Is it possible you no longer support this product? If so, then not sure why it is still on the Asset Store. I also believe I paid money for this software. But really hope it is still being supported, especially after the time and effort already put in. This is now the third inventory system I have tried; and really hoped that this would be the one that would work for me!
     
  49. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi @drakedane - I also see this same problem in S-Inventory 1.31 (the current version). The S-InventoryC# prefab appears to be missing the bag slots, although I too might be missing something that was changed in this version. (Version 1.31 reworked a lot of code to improve efficiency.)

    The demo scene works, however. You can look at how the bag slots are set up in the demo scene and then add the same setup to your UI.

    Also, this may or may not occur in your project, but there's a potential timing issue in the startup of the InventoryManager and InventoryUI scripts that can cause a NullReferenceException. To resolve it, swap lines 207 & 208 in InventoryUI.cs:
    Code (csharp):
    1. InvManager.Slots.Clear(); //<-- Put this line BELOW the next one.
    2. if (InvManager == null) InvManager = FindObjectOfType(typeof(InventoryManager)) as InventoryManager; //Get the Inventory Manager object/script.
    (I'm not the developer of this asset. Just sharing a few tips I came across while working with it.)
     
  50. drakedane

    drakedane

    Joined:
    May 23, 2017
    Posts:
    62
    Thanks so much, TonyLi! I pray this is the solution to my problems. I will check out the demo, as you suggest! Wish I had thought about doing that myself. I will also edit script as you suggest. Thanks again! Really appreciate it!
     
Thread Status:
Not open for further replies.