Welcome to the most advanced inventory engine on scratch! This is a very complicated engine that displays and formats clusters of squares that make up your inventory. You can (pretty) easily add this to your project by following the steps at the bottom of this page and changing the character and items! ------- Scroll Down ------- Controls: WASD or Arrow keys to Move the Cat Around! Space to Spawn a Random Loot Item F or Slash to Pick Up Items E to Open your Inventory Click and Drag to Move Inventory Items Around Press R while dragging to rotate the item Hold Enter/Return and Click an Inventory Item to bring up actions 1 to Delete all Inventory Items 2 to Delete all Items 3 to Toggle-Show all of the Techy Stuff (lists and variables) Features (So far): -Moveable character with scroll controls -Items that you can create inside an inventory (See Inside at bottom of the Inventory sprite) -You can swap the same size or bigger item with another -Snap-together physics -Anti-stuck algorithm -Inventory Scrolling for more gear spots -Grabbable loot -'Inventory Full' Detection -Equipables -Rotatable Items! -Item Stacking and Extra Data! -Item Containers and Actions -Item Stacking and Splitting -Cool Drag Features: -If you drag an item onto another item that is a container the item will automatically fit into the container -If you drag an item onto another similar item you can stack them -If you drag an item onto a cluster label the item will automatically fit itself into that cluster -Lots of Data slots for remixes that you can incorporate (See top of 'Inventory Engine' sprite) Features That I'm Working On: -Fixing bugs and polishing everything together! For remixing: 1) Go to the "Inventory Engine" sprite. This is the main sprite so it will take a bit to load the scripts! 2) At the top of the 'MakeInventoryClustersForContainers' custom block about 1/3 of the way down on the scroll bar, change the third use of "i13" to one in the block "Set i13 to 1." Right below that block, delete the "Minus 1" part of the block "ThisContainerID - 1". 3) Inside the big IF loop inside the 'DoInventoryLabels' custom block about 3/4 of the way down the scroll bar, delete the NOT and AND operators as well as the (Costume=PocketsLabel) operator (But not the operator on the left) inside of it where it says: "StopDrop = 0 AND NOT costume name = PocketsLabel". 4) Change up the Inventory Items and Loot Items and add a few more containers by adding an operator to the script that creates loot items and by adding another set of container data to the 'ContainerData' list, and you're ready to play!
All art that's not by scratch is by me! All coding is by me! (Including the distance formula that I finally memorized :P) Update Log: 11/7/21 Added the basic scripts for selecting multiple items/clusters so now they light up! 6/3/21 Updated scripts for setting the y-position of the clusters! When you hide a cluster that isn't the last one down other than the vicinity, the vicinity moves but the other clusters do not! I also split the huge "DoInventoryItems" script in two and fixed a weird bug as a result of that that deleted any item containers right when you spawned them. 6/1/21 Fixed more bugs here and there, getting ready to code multiple item selection, and I fixed that the item clusters to the containers are inside of each other when you search multiple items at once! 5/26/21 Fixed most of the bugs with joining and the buttons, updated the containers and cluster labels a bit! I also added item splitting to split stacks! 5/24/21 Fixing some more bugs with the button result detection, updating complex join code! 5/22/21 It took me quite a while to add little comments to each script inside the inventory engine! Annoyingly, a whole bunch of bugs popped up because Scratch did something to the lists that made them show up differently, but now for example the loot items list is set to only the inventory engine sprite can see, but the actual global list the inventory engine sprite cannot see, which causes numerous bugs related to values in lists. 5/14/21 Well, I'm not entirely finished! I'm working on putting different item attributes into lists for easier remixing, and I forgot about joining and splitting stacks! I finally added a thumbnail! 5/13/21 Well, I think I am finally finished! It has been a long, fun journey with many challenges along the way! I really like how it has turned out! 5/12/21 Major advances with container storage! I added a lunch box as a container that you can put stuff in but not equip, and the container system is very flexible when it works! 5/6/21 I have finally put together the container and search part! You can now store items in containers and come back later to equip them or look inside the container! I also added that you can put items into containers that are in your inventory by simply dragging the chosen item onto the container! 5/4/21 I finally got the courage to work on this project some more! I updated the buttons though they are still buggy, and made a custom slider so you can choose how many of something to pick up! 4/1/21 Happy April Fools! I made a few breakthroughs with the algorithm so now it should work much better and some fixes with the Vicinity item-swapping! 3/31/21 I almost forgot about this update log! Adding Vicinity, more item drag features, more work on the item containers, and more! 3/8/21 More bug fixes with the new format and finished all of the item data that I know I'm going to use in future games! 3/5/21 Fixed a few bugs with the new format, and one new strange bug popped up where if you pick up a second item, the cluster label switches positions from the top of the cluster to the bottom! 2/26/21 Many struggles with getting all the new clusters to fit together nicely, but I've finally got it! 2/8/21 Fixed numerous bugs with the algorithm when you swapped using items with different directions, going to change the layout a bit! 1/20/21 After a little break I am going to take the whole inventory thing to the next level! Starting containers can be moved around like items and hold items inside them, making things a lot more interesting. 1/7/21 I FINALLY PERFECTED THE ALGORITHM! Sorry I got a little excited there ;) No more item clips! 1/7/21 Working on Cleaning up a bit, some breakthroughs with the anti-stuck algorithm! Also added FPS cause why not :P 12/7/20 Fixed more inventory bugs, added item rotation! 12/3/20 Increased performance, better item checking, and updated Grab and Drop scripts to minimize bugs! 11/17/20 More bug Fixes like item dropping glitch and added some sound effects! 11/12/20 More Bug fixes for items glitching and added inventory grabbing 11/7/20 Added Scrolling and edited square scripts for more compatibility 11/6/20 Release! #player #inventory #engine #cool #complex #simulate #Don't Eat Cheetos! #cheetoman23