Welcome to Advanced Jigsawy Inventory system available in the marketplace
You can get it here: https://www.unrealengine.com/marketplace/en-US/slug/advanced-jigsaw-inventory-system
If you have any questions please contact me at: trafalgamer@gmail.com
This blog is work in progress, I will add as many tutorials as possible.
Jigsaw gives you the ability to create any inventory style you want, the included example are a nice starting point and can be used however you can totally create your own setup and handle everything yourself.
Learn the basics of Jigsaw inventory and create your own setup by following these video series
This tutorial explains how to work and modify the included example
Note: in 4.25+ there's a completely new example which is much better so we recommend that you work with 4.25+
The above videos are more than enough to get you started however if you need more here's my old videos if you want to check them out.
Feel free to contact me if you need help or clarification on anything.
Adding Jigsaw inventory to your project
Adding the files is simple, open epic launcher, you should have the product available in your vault simply click on add to and select your project, I strongly recommend using the latest engine version so you get my latest updated files.
Creating an inventory widget
Jigsaw inventory is made of simple widgets you can add JSIContainer to any widget and it should work with no issues. Once you add a JSIContainer you need to select it and look at the details panel there you will find some settings to change, for example what item types are allowed in this container, scroll down and you can find a permission settings, this allows you to limit certain features in the container like disable dragging or moving items which could be useful.
One very important permission is: Handle Container To Container drop later we will see how we can use this to prevent moving an item from a container to another automatically, this permission is especially useful in multiplayer where you need the server to approve that action.
Equipping and dropping items
JSI container has multiple events for when something happens one of those events is triggered when an item gets equipped or un-equipped, as shown in the video once you create the inventory widget you need to handle certain events.
In this video we will take the helmet container and handle the Equip change event, if the helmet is equipped we will equip a helmet to the character. The main point in this is that you can use the event to determine what should happen when something get equipped or un-equipped.
Dropping items is simple, as shown in the video you need to add the DropItemBackGWidget make sure it's the first thing in your widget tree so that it's at the bottom, now all you need to do is handle the DropRequest event, this event will return the item dropped and its container, from there you can get the class of the pickup (you can set that in the data table) and spawn the item.
Creating an action bar (Unhandled event)
Creating the action bar is just about creating another widget and adding the JSIContainer to it, make sure the type of the container is set to EquipTo.
Make sure you set the Zorder to something higher when adding to the viewport so that it's not under the main inventory.
So the most important thing in this video is the permission section of the container, in the video we've seen that with the normal settings the item would simply move from the main container to the action bar, but sometimes we want to create a copy of that item or maybe we simply want to know that that action happened and we want to handle it ourselves.
The first thing you need to do is select all your container that you want to handle yourself, in our example the action bar, go to the permission section and disable Handle Container To Container Drop if you have this unchecked if you drop something on that container nothing will happen but an event will be triggered allowing us to know and handle that action ourselves, this is usually used in multiplayer but it's also used in examples like this.
The event that should trigger is named: Drop Container On Container unhandled this event should trigger once you drop something on the action bar.
In the video we've seen how we handled that event, first adding the action bar to an array so we can simply use the Contains function, so in the event we have the item dropped, the FromContainer meaning where that item is coming from and ToContainer is the container that received the dropped item.
From there it's simple checks, is To and From are both action bars ? if yes we equip the receiver and unequip the FromContainer, if not is ToContainer an action bar, you could also check if FromContainer is the main container, you can also check ContainerID if you've set that.
In the permission settings we have another setting related to this unhandled event, the setting is called Receive All Unhandled Event usually the container who received the drop is the one that triggers the Unhandled event however with this setting the one with Handle Container To Container Drop disabled is the one who will trigger it, unless if From and ToContainer both have that setting off then the one who received the drop is the one who will trigger it.
Creating a simple pickup system with Jigsaw
In the latest updates Jigsaw now uses multiple data table, with that you can put your weapons and armor etc in separate data tables, in this video we will create a new data table by coping one of the existing ones.
The pickup class used here is fairly simple the important thing is the main class settings, item name and data table, which is all we need to get that item from the data table, I used a simple overlap event to request adding or equipping the item by getting the name and data table I attempt to add the item to the inventory if that goes successfully then I destroy the item.
Merging the multiplayer example with Advanced Locomotion V4
This video explains how to merge ALS V4 with Jigsaw multiplayer example, if you're new to UE4 you will also learn a few things about parenting and animation montages.There will be a follow up video to finish the setup.
Integrating the multiplayer example in Advanced locomotion V3
This video has some useful information about integrating the multiplayer example into other project and also some of its features.
More is coming, like multiplayer and other topics.
You can check out the old tutorials in this playlist: https://www.youtube.com/playlist?list=PL2JrJiB-UkaVaEwSlZJZl4A8wYMfKoQLt