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. RealSoftGames

    RealSoftGames

    Joined:
    Jun 8, 2014
    Posts:
    220
    Hi following the documentation there is no Bag or Currencies selection when adding items it just has 0
     
  2. RealSoftGames

    RealSoftGames

    Joined:
    Jun 8, 2014
    Posts:
    220
    hi im having some issues setting this up, is their a video tutorial to follow or some information, the Documentation just briefly explains what things do, but not what to actually do with them.
     
  3. SuperNewbee

    SuperNewbee

    Joined:
    Jun 2, 2012
    Posts:
    196
    This sounds like a good idea. This will make it so much easier for us non coder users of RFPS prefab to purchase your asset. You may as well add S-Quest to your empty project as well)
     
  4. yummybrainz

    yummybrainz

    Joined:
    Jan 14, 2014
    Posts:
    69
    healthToRestore is a variable at the top of the class that defines if it should add health. There is probably something else causing your error since that is part of the RFPS component.
     
    RealSoftGames likes this.
  5. RealSoftGames

    RealSoftGames

    Joined:
    Jun 8, 2014
    Posts:
    220
    agree, i patched it but kept running into errors so i had to scrap the project after it broke, ill ahve to start a new project and try this all over again. must be doing something wrong
     
  6. yummybrainz

    yummybrainz

    Joined:
    Jan 14, 2014
    Posts:
    69
    It's probably a good idea to just create a new project with only RFPS and S-Inventory. That way you know the errors are only caused by those two. It's easier to start simpler then work you way up from there.
     
  7. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    I don't know what you are aiming for. The AddItem function doesn't destroy the item, it just hides it from scene view and moves it to the inventory manager object. Are you trying to keep the items activated and at their positions when you pick them up?
     
  8. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    It will be awesome to share what you need to modify in order to link S-Inventory and Realistic FPS Prefab. Maybe you can write a tutorial on a forum post or your website? Or just send me the tutorial steps in an e-mail and I'll add it to the main post.
     
  9. yummybrainz

    yummybrainz

    Joined:
    Jan 14, 2014
    Posts:
    69
    I was working on creating an example of how to addItems for farming. So if for example you are collecting wood you are adding a certain amount of items per hit with an axe. In that case you do not want the object to be removed until you have completed the process. I was thinking maybe you could add instatiated items instead of the parent object. Maybe I just complicating things farther though :)
     
  10. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    There's an easier way to do all of this without changing anything in the code. The wood object (the tree for example) must have an item script with an amount set to 10 for example. Every time you want to add hit the three, simply call AddItem(WoodObj, 1); The script will automatically initiate another wood obj and store it in the inventory.
     
  11. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    I'm currently working on the new update. A whole new container system will be added. You will be able to container infinite containers and store items in them. More information about this new feature and screenshots will follow later today.
     
  12. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    The container system update has been submitted to the asset store. It will be available soon. Here's a screenshot of how the container UI window looks:

     
  13. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    Fantastic! I am glad to see you so active in furthering your app. Thank you.
     
  14. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Glad you like it. I'm always looking forward to your suggestions to make S-Inventory even more better!
     
  15. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    The containers update has been accepted. Hope you like it!
     
  16. ZodiaXCorpX

    ZodiaXCorpX

    Joined:
    Sep 16, 2014
    Posts:
    5
    Hello how would i go about removing an item from my inventory after using/equipping it? in the Inventory events i have a piece of code saying

    if (ItemName == "CynderBrick") {
    Transform rocketInstance;
    rocketInstance = Instantiate(rocketPrefab, barrelEnd.position, barrelEnd.rotation) as Transform;
    //How to remove the equipped / used item now that its a physical form??
    }
    Thanks!!

    Code C#
     
  17. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Hello, what are you exactly trying to do? The item gets automatically removed from your inventory when its equipped/used and gets moved to the equipment array, vendor or the skill bar (depending on the item's use). Do you want to remove the item completely when it's used like dropping it instead of moving it somewhere else?
     
  18. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
  19. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Yes, I already bought it and I'm going to post a tutorial on how to make it work with S-Inventory.
     
  20. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    The thing to do is to make a folder in your project and provide third party support instead of writing/filming tutorials.
    Make a simple example with each for that plugin. Take a look at how the Dialog system does it. Many developers use his kit as much of a hub because he has support for so many other app's.

    I tell you this because there are so many including his the dialog system that could use a system like yours. Make support for as many app's as you can and you grab sales from all thier clients.
     
  21. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Thank you, I will keep that in mind!
     
  22. ZodiaXCorpX

    ZodiaXCorpX

    Joined:
    Sep 16, 2014
    Posts:
    5
    Yes after equipping the item to the player i want it to be removed completely, from the equipment array too, like using a health potion.
     
  23. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    PM me your e-mail + invoice number and I will send a modified equipment code to do what you want.
     
  24. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    S-Inventory is at 50% off! Grab it while you can!
     
  25. JuZtchillin

    JuZtchillin

    Joined:
    Nov 6, 2014
    Posts:
    9
    Hello SoumiDelRio,

    I just bought your S-Inventory System about a week ago. I find the code very clean and easy to understand. However I would like to know can your S-Inventory system be integrated with photon networking. I could be wrong but when your inventory system adds an item which is not present it sets the transform to the inventory transform and then disables the item. Which in photon you would normally go if(PhotonNewtork.isMasterClient) { PhotonNetwork.Destroy(gameobject)}.

    What I want to do is when an item is added to the inventory it is destroyed on all other clients and them when one is removed it is instantiated on all clients.

    So I would just like to know would would your ideas on integrating this be?
     
  26. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    I feel indebted to point out the typo in the main poster.

    Adavnced Should be Advanced

    In case no-one had noticed. Thought you might wanna change it.

    Thanks for the thing. I bought it.
     
  27. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    I'm sorry but I have no experience with Photon. But one customer was able to implement S-Inventory with Photon by modifying the code, I will e-mail him and ask him for instructions in case he wants to share it and I will contact you back.
     
  28. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Thanks for the correction! I hope you like the asset.
     
  29. JuZtchillin

    JuZtchillin

    Joined:
    Nov 6, 2014
    Posts:
    9
    Thank You.
    Much appreciated.
     
  30. AndyMul

    AndyMul

    Joined:
    Jul 13, 2013
    Posts:
    41
    Hi,

    I bought and downloaded the asset from the asset store.
    When I opened it, there is no demo scene. Am I missing anything, like a sub package somewhere?
     
  31. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Thanks for purchasing the asset! I couldn't upload the demo scene because it includes game objects types that that can't be included in the asset. Please e-mail me ( www.soumidelrio.com/contact ) your invoice number and I will send you both of the demo scene.
     
  32. AndyMul

    AndyMul

    Joined:
    Jul 13, 2013
    Posts:
    41
    I see. Will email you shortly.
     
  33. AndyMul

    AndyMul

    Joined:
    Jul 13, 2013
    Posts:
    41
    Okay. I've sent you the request and the invoice number using your contact form.
     
  34. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    I have sent you the demo scenes, check your e-mail please.
     
  35. AndyMul

    AndyMul

    Joined:
    Jul 13, 2013
    Posts:
    41
    Yep, got it. Thanks!
     
  36. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Hi, SoumiDelRio

    I have to say I was hoping to use this on Android so immediately went for the "Inverted Portrait 10x16" however I am struggling to get your example files to resize to 350 wide by 400 high and still be easy to use (I almost have this, so... don't worry about it)


    But please how do I: A) stop widows being draggable and give them a default location
    B) make the inventory window draw the names UNDER the items not in the middle.

    Thanks.
     
  37. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Hey Twobob,

    A) To stop windows from being dragged, you just have to un-check the "Is Movable" option from the Inventory UI inspector. Then pick the window's default position from the same script. You'll have five options to choose from: Middle screen, top right corner, lower right corner, top left corner, lower left corner.
    B) The current inventory system doesn't actually draw names under the items nor in the middle. Mind explaining more?
     
  38. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    hmm.. The thing where you equip the stuff.

    Here's some pictures of what I am struggling to do.

    Align the skillbar. The Border and Margin don't do what I would expect, in fact so far I haven't got them to anything. How do I align stuff manually? And I know how to code, I'm just asking best practice via your interface.

    skillBarMiddling.jpg

    Having a TOP MIDDLE alignment would be very handy.

    InventoryTopCenter.JPG


    Make the windows mutex each other, is there a switch for that? I don't see one...

    MutexWindows.JPG

    Here is where I would like to have underneath alignment.

    EquipmentAlignedUnderneath.JPG

    Thanks.
     
  39. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Hello, do you want the code modification to be in JS or C#?

    P.S: Top middle and lower middle alignment will be added in the next update for everyone. Equipment slots names position will be editable from the inspector to support placing them in the middle of the slot.
     
  40. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    c# please sir.

    Excellent news then!

    also I think the crafting interface would work better using the XBOX360 minecraft approach "I have the resources, let me build one", rather than the PC minecraft approach "craft the relevant ingredients here, then press GO".

    At the very least you would require a "+CRAFT" option in the Inventory window to prevent the drag/drop requirement to make this mobile friendly.

    Just a thought, thanks for your time on this.
     
  41. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Please PM me your e-mail + invoice number so that I can send you the modified code. One last thing, did you mean by making the windows mutex each other to have the equipment window hidden when the inventory window appears and the other way around? (I have made the changes you requested me to do, I'm just checking the mutex thing).
     
    Last edited: Nov 23, 2014
  42. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Yeah. I already did the invoice number thingy, But Ill send it again if you really want :)

    About the mutex. Probably a logical toggle. just toggle the visible windows (there are 3 possibilties I think, including crafting?) to be down and the new one to be up. Thanks you kindly :)
     
  43. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    That sounded really ungrateful. Thanks very much :D
     
  44. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Just sent you the modified code in an e-mail. Let me know ASAP if it doesn't work or if you need anything else.
    Thanks for the suggestion about the crafting system as well, I will consider that in a future update.
     
  45. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Excellent. I'll go check it out right now. Project all lined up :)

    EDIT: okay so the changes are great :)

    I attached a pic for a "nice-to-have" out-of-the-box mobile 16:10 portrait layout.
    [C] would be a crafting button. 3 skill slots.


    Love the mutexing windows, love the centralised names, love the top middle on the window that has it.


    Also attached two pics, One of the Equipment screen, and one of the Inventory. Looking nice now :)

    would still love to know how to move the skills bar.
     

    Attached Files:

    Last edited: Nov 23, 2014
  46. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Speak of the devil! (Though I've been called worse. ;)) The Dialogue System version 1.3.9 was just released. It's available on the Pixel Crushers customer download page, and it should be on the Asset Store in a few days. This version introduces support for S-Inventory. It also includes a sub-package that integrates S-Inventory with Realistic FPS Prefab without having to modify any S-Inventory or Realistic FPS Prefab source code. It was a little tricky getting them to play nicely together without touching source code, so if you notice any issues or have any feature requests, please let me know!

    EDIT: In case it's helpful to others, here's the integration package. It includes source code and example scenes. It doesn't include any S-Inventory, Realistic FPS Prefab, or Dialogue System files, so it won't compile as-is unless you have those packages installed. But the source code might be helpful to look at anyway if you're trying to get S-Inventory and Realistic FPS Prefab to work together. The documentation for the package is here.
     
    Last edited: Nov 24, 2014
  47. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    Seriously....

    how do you move the UI elements around?

    the only settings I have found so far , do nothing, in any context I have tried to use them.
    I must be misunderstanding something... for example as shown here setting all of the values to a bottom offset does nothing.

    if this dialog refers to text only assets a label would be nice.

    basically none of the layout parameters seem to visually change any part of the componentry.
    So I am stuck a little bit.

    I am only trying to make very simple manipulations of locations.
     

    Attached Files:

  48. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @SoumiDelRio - I enjoyed working with S-Inventory. May I request a few additions to InventoryEvents.cs?

    1. Would you consider using SendMessage() to notify other scripts when an event occurs? I understand you maintain UnityScript and C# versions, so I won't request C# events. This way, we can write handler scripts without having to directly modify InventoryEvents.cs/js.

    2. Please add events when the player picks up or drops items.

    3. If an Item's equipment slot is blank, would you send an OnItemUsed message when the player selects Use/Equip? This way, our code can handle usables as appropriate for our projects. For example, with the Realistic FPS Prefab integration, I'd like to be able to pick up a medkit and, at a later time, open my inventory and select Use/Equip to heal myself.

    4. Can we assign trigger keys/numbers to the skillbar?

    If any of these are already implemented and I just missed them, please let me know! Thanks!
     
    twobob likes this.
  49. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Those buttons' positions can be modified in InventoryGUI script at lines 580, 594 and 610. The problem about UI elements positions in screen is that the system require a lot of GUI coding so it's hard to locate the rects of the UI elements in scripts. This would improve hugely when the 4.6 version is out. However, I would be more than happy to assist you with any modification in the asset.
     
  50. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    okay - thanks - that was probably the tip I needed.

    I'll just hardcode.

    :D
     
Thread Status:
Not open for further replies.