Poll

What feature are you looking forward to the most in v5?

Ecumbrance System
4 (3.3%)
Item Stacking System
8 (6.7%)
Events (?)
11 (9.2%)
Item Durability / Degradation Over Time
3 (2.5%)
Crafting & Item Forming
25 (20.8%)
Smelting with the Furnace & Crucible
0 (0%)
Vehicle Storage
13 (10.8%)
Display Bricks
2 (1.7%)
Storage Locking & Lock-Picking
7 (5.8%)
Backpacks & Containers
16 (13.3%)
Hybrid Item / Brick Planting
0 (0%)
Shops & Integrated Loot System (?)
5 (4.2%)
Item Modding & Repair (with the Anvil)
3 (2.5%)
Hunger, Thirst & Armor Support
23 (19.2%)

Total Members Voted: 115

Author Topic: ☐⇄☐ Item Storage (Alpha Released!)  (Read 120791 times)

Could you add "OnStorageOpen" and "OnStorageClose" so you can make a chest open when you look at the storage. on it and close when you exit it.

I'm making progress on the update: Events will now be handled through the "Self" brick target, which will allow you to use the brick name as the storage inventory name, enable/disable remote access (such as for personal inventories for NPCs/Bots) and will allow the option of cancelling event schedules that fail the spam check filter (I still need to figure out how that will work first).

Output events will now include ISStoreItems, ISAddItems (adds a specified item to the next available cell), IsSetItems (overwrites existing items with the item you choose and the cells you specify) and ISTakeItem (which searches a brick's inventory, removes the specified item if found, then adds it to the players inventory if there's an available slot - or vice versa; very useful for setting up a store). The latter three events update all player's GUIs in real-time (if they are viewing the brick's inventory); ISAddItems and ISSetItems give you the option of adding random items to inventories, and ISTakeItem gives you the option of taking the next available item, in addition to searching for a specific one.

Conditional events will also hopefully be included, such as comparing the main brick's inventory against another brick's inventory (which can be used for a crafting system, i.e. comparing a player's arrangement against a recipe save) and checking if a certain item is present either in the player's or the brick's inventory (also useful for setting up a store). In addition to that, input events for detecting if an item is added, removed, or moved by the player in the GUI will be included; the former is already working to some extent. Still a lot to do (especially with the backpack item/scripts), but the next update should be quite epic.



Thanks, super useful for my medieval RPG
Fantastic! Thank you so much for this :D
No problem. :)

Make it so if you try to put your backpack in your backpack, the player explodes and gets a message stating they just experienced a paradox

lol
That would be interesting...hmm

Could you add "OnStorageOpen" and "OnStorageClose" so you can make a chest open when you look at the storage. on it and close when you exit it.
Sure, I'll try to include events for opening/closing the GUI.

Edit: Nevermind, I'll make it check if no one else is viewing the brick's inventory before executing the close event.
« Last Edit: October 19, 2013, 01:47:09 AM by [GSF]Ghost »

Does the CLIENT need to have the add-on as well for it to function?

Yes; it'll work fine for the host, but other players will need to download the file themselves to use it on your server.

This will be very useful for my RPG. I will have you in the credits for this mod. Very nice work.

I was planning to work on this as well, until someone made it.

Here's a preview of the new input and output events (they're pretty much finished and should allow for greater versatility):




This will be very useful for my RPG. I will have you in the credits for this mod. Very nice work.

I was planning to work on this as well, until someone made it.
Thank you; I'm glad you found it useful. :)

Can you rename ISTakeItem to ISTransferItem for clarity, since it appears to be able to go both ways.

Sure, it's been renamed.

If y'all need anymore events to be included let me know.

If y'all need anymore events to be included let me know.
An event to check if a player has the add-on would be nice, so I could have it inform people that they can download it on RTB.
Or maybe just a RTB pref to inform people if they don't have it. Thanks!

please please please PLEASE make some kind of player storage system so we can carry things outside of our quick inventory.


please please please PLEASE make some kind of player storage system so we can carry things outside of our quick inventory.
I'm already working on a backpack item / inventory system; it'll be included in the next update.

An event to check if a player has the add-on would be nice, so I could have it inform people that they can download it on RTB.
Or maybe just a RTB pref to inform people if they don't have it. Thanks!
That's certainly possible. I'll probably use an onPlayerSpawn script instead though and message players if they try to use events and don't have the add-on. And no problem. :)
« Last Edit: October 23, 2013, 09:34:38 PM by [GSF]Ghost »

...backpack item / inventory system; it'll be included in the next update.
first off: OMGAWDAWESOMEPLZPLZPLZRELEASE EE
*ahem* second: so any idea when the next update is coming out?

Hopefully by next week - I'm about 70% done. Pic for proof (I might add more variety in backpack models / GUI styles later on too):



List of all major changes / new features to be included:
-backpack inventory system (with a smart-mounting system and seamless brick inventory menu integration)
-instant access value updating (will also affect event-permissions)
-remote access option (to prevent or allow accessing a brick's inventory from other bricks)
-input and output events (that will allow for automated stores, bot pick-pocketing / npc inventories, crafting systems or anything else that requires item-combination patterns, etc.)
-Instant updating of GUI info for all players viewing a modified inventory save (such as access button, owner (if changed) and number of players viewing the brick's inventory)
-resaving deleted saves with you as the owner (if you are viewing a brick's inventory while it gets deleted)
-improved script performance. The item authentication filter is no longer needed, which should put slightly less stress on the server; players now send the cells edited to the server and it sends the two corresponding items to the player GUIs. Also, items not longer have to be loaded every time a GUI is refreshed.
-new inventory saving system that divides save files into individual letters (which should be slightly faster and allow for more items on the server).
-event spam-blocking script with toggle option for host
-script that detects if a player has the add-on downloaded and messages them to download it from RTB if they don't (if they try to use the events or server cmds).
-new host GUI feature to list number of items in each returned save
-new custom message box script that prevents message boxes from appear under the inventory GUIs
« Last Edit: October 25, 2013, 06:53:24 PM by [GSF]Ghost »

Thank you so much for this, I can't wait for the next update :)