Okay, so I use a single inventory, except for the stash which operates partially on own functions. Providing an entire extra inventory for the hotbar feels not very efficient.
If you don’t mind. All I want is that you can drag items like potions and food and such into the hotbar and use the numbers keys to use the corresponding slot. As for now, I can’t drag Items from and to the inventory nor equipment panel but can drag from the container into the inventory and equipment panel. I know it was possible before I fixed that issue with the inventory slots being all white so you couldn’t see the icons. After I fixed that according to this forum, dragging and right clicking in the equipment panel to unequip stopped working. And I fixed my issue that the inventory stopped being displayed. Turned out it was the equipment panel which I extended to 20 slots that caused the problem.
The way this inventory work is, the equipment slots are counted first, thus when you increase the size you have to adjust also the equipment slots, for example inside the
HUD Inventory Layout / EventGraph. Will post my hotbar later.
Hotbar and Hotbar Slot example Blueprints, and the InventoryLayout, in case you adjust the amount there.
The hotbars are basically copies of the Skillbar and Skillbar Slot. Let me know if you have any questions, or want to see a specific blueprint.
Hello Everyone, I finally got around to working on setting up this system into my game and fortunately got it all working with a bit of troubleshooting. I added in a new item which pops in properly, connects to the socket and has a proper icon for it. My only issue now is that my item is rotated about 70 degrees in the wrong angle (and needs to be moved about 10 on the z scale so the hand grabs the handle at the proper location). I had tried adjusting the skeletal mesh and that particular item BP itself but neither seem to reflect the changes when equipped within the game.
Is there any way I can make this rotation without needing a third party modelling tool by any chance? (I have no idea where even to start with things like that)
Any help would be greatly appreciated.
@Scyclone not 100% sure what your problem could be as there are no screenshots, but i’m guessing your item is not rotated and positioned correctly with it’s ‘world origin’ at 0,0,0 (it’s transforms all at zero in other words).
- A quick UE4 hack that may work for you is to drag the item into a level, any level will do.
- Set the location to 0, 0, 0 in the Transform section.
- Make sure the item is rotated correctly, vertical for melee and horizontal for guns.
- Where ever the pivot point is will be where your character ends up holding the item, so adjust as you see fit.
- Right click on the item and select Merge Actor
- Under Mesh Settings make sure the box ‘Pivot Point at Zero’ is ticked.
Your new static mesh will now have the pivot point set to zero and you should be good to go. This will only work if your items pivot point is at 0, 0, 0 on the level in step 1 when you place it.
Hope that helps.
Heya @Mahluus7 , you make a fair point - a picture is worth a thousand words
Essentially, the axe is attaching to the socket - it just looks wierd in terms of rotations and such. I mean that could lead to a very painful circumcision I’d imagine :P.
Would the information above apply to that?
As an unrelated note, I’ve been working with adding in new stats and such to my items. And I have had ‘some’ success thus far.
I added in Damage (Objects) to items that are designed for harvesting (Axe/Pickaxe/etc), as well as Constitution. I updated the itemlist, updated all relevant structures that I can think of and from a mechanical standpoint. It does apply the statistics to the item because it is populating into my equipment screen. For the screenshot example, I have put in 2 constitution for the bladed shoulder piece.
I have narrowed down the issue in that it doesn’t seem to populate “ItemToolTipInfo” with the data on my item’s constitution bonus. I did a test on the visibility (and basically set it always visible) and it returned a blank line [further showing me that the ‘BreakToolTipInfo’ for Constitution is returning me no value]. Is there some extra step I missed somewhere or something I can do to correct this issue?
Shoot… I came here for the exact same issue. I added a Hunger value, but it keeps returning 0. If I find a solution, I will post here and send you a message.
Okay so I found out where else you needed to hook up your new entries. You need to open the Inventory_Slot, Container_Slot, and Hotbar_Slot and open the Get_ToolTip_Widget function. You should see there where you need to hook things up. Hope that helps.
hi i in need of help…so i’ve integrated arpgis and als v4 (https://github.com/dyanikoglu/ALSV4_CPP) into my project…i wanna do when i equip a specific weapon,it will play that weapon aniamtion overlay state…what i’ve tried so far is in inventoryitem struct,i added a new element called “OverlayState” of type alsoverlaystate…what this do is when i define the item properties,i can set the weapon to use its overlay state for example,if i equip a bow,it will play that bow overlay state…after that in equipmentinventorycomponent,inventorymanagercomponent in the equipitem,unequipitem,updateequippedmeshes and updatemainhandweapon,i break the struct of inventory item and i set the overlay state( picture below)…i thought this should play the weapon overlay state,for bow it will play the aiming overlay…but it didnt and i get this error…anyone know any solution i can do?ping me
Just wanted to say Thanks for this! I have the inventory working fine, but do you think I could work out how to add a bloody item via blueprints - all good, works so thanks again
It’s been 5 years since your original reply to this question. I was wondering if you had ever gotten a chance to re-visit this?
can you please show a tutorial of how to convert a mesh that isn’t made with the ue4 skeleton to one that will work with this system?
i took a look at the items provided and for example, the helmet is floating in the sky (not at 0,0,0) and has some spine bone references??
i did a search and pirate said that it was because it’s more professional that way…but doesn’t UE kind of moves attached items along with the bones now?
We did enable saving and loading the inventory and various character stats (location, health, and so forth) to a DB through a java socket server ( via the LE Socket Connection plugin). The socket server is fast but this might more readily be done with some of the modern web methods.
Because of the overlaps between the AdvSocSys and ARPGIS, we encountered many incompatibilities and removed the AdvSocSys. In our application, chat and the player groups should be handled by separate servers and there are much better chat solutions now available
RL has kept me from working on any programming for about a year now and all of this is rusty to me and I’d have to do a major review to recall any of the details.
i was wondering if there is some option how to turn on/turn off the saving system. It´s included in this? I am really not sure. If it´s not, how to save all whole inventory?
I’m at a bit of a crossroads here. Whilst trying to utilize the inventory system, I ran into a snag. Note that in my controller, if i enable the Play Game logic as shown, the character drops into the world and all is well… then it displays my login screen and character selection (which is bad). This means the systems work and don’t break anything. Ruling out any issues with the UI elements that are being fired. All that’s happening from a gameplay standpoint is grabbing the character from the db and setting it as a struc in the playercharacter.
But if I disconnect Play Game (which fires after the character selection phase after CLT_DisplayLogin), this delays the initialization of the inventory system until after a character is selected. There’s no other magic happening, just a bunch of UI mumbo-jumbo beforehand. It gives the following errors, which indicate that the server is not initializing properly and setting references to both the playerinventory and that characterreference.
This baffles me, because if I fire it manually tied to event beginplay, it works fine. However, if I let the UI make the call later, the errors come up and inventory doesn’t work. The only thing that’s non-standard is that I’m not calling the hud into the viewport until initialization of the inventory system.
It’s pretty simple, but has me stumped, it’s almost like I’m waiting too long to initialize the inventory and something’s happening through replication or delayed and I can’t for the life of me find it.
I initially thought that I was re-writing a variable at some point, but narrowed it down to timing. Play Game fires off your initialization like in the marketplace project. If called manually up-front, we’re fine but the entire login/character creation/selection happens after entering the world, which won’t do.
The ONLY difference is removing the connection from Play-Game in the playercharacter below.
I have tried absolutely everything I can think of, even removing pieces down to just firing a login widget then calling playgame and it still fails without any of the login logic happening.
I know this may be silly or simple, but I’ve spent a couple days debugging this and following variables to try to find out where the breaking point is, ruling out the entire entry UI system. The only way that I can get it to work is if I initialize the inventory and drop the character into the world immediately, anything else results in referencing bad variables.
As a side-note, I have a thorough knowledge of the inventory system and have dug into it pretty deep in the last few weeks. In the screenshots below, it works (wrong, but it works). In a perfect world, the playgame function would not be called from the playercharacter, this is a work-around to make it work until I find a good fix.
This is the call from My UI to the PlayGame logic:
Update: Found out that a second player borks it also.
Background: I have a login, server selection, character creation and world.
During initial testing, I had two servers and one client, separate projects, they have been consolidated for ease.
I have a dedicated server build as well as client build.
I moved the sql into a savefile, since resetting it was easier than wiping sql each iteration. (so basically everything’s really simple presently)
So the flow currently is:
- Client connects to the server (fake loading level fired event)
- Server displays login (widget mumbo-jumbo, sets account variable in playercharacter)
- Then character creation/selection (widget mumbo-jumbo, sets my characters array and current character variable in playercharacter)
- Then Play Game (inventory initialization happens here) -> multicasts current character to all other players actor renders (updates nameplate and cosmetics)
- Streams the starting zone level to the player and teleports them to the correct spot (or last saved coordinates).
If play game fires before the login screen (and transfers execution to it), it works. (what this means is that the game starts and the login screen displays with a blank character) Once the character is created/chosen, it updates the character in-game).
If play game fires normally, login and character selection takes place, then when you drop into the game, inventory doesn’t work.
Either way, when a secondary player joins, inventory fails as soon as it initializes (before or after login).
I hope that makes sense.
Has anyone had any success with trying to change out the player controller responsibility to a player state or character? Been working on this for about a week now (been too timid to until now lol)
I’ve nearly got it but I’m not generating an inventory. I’m wondering if a player state is not able to do this
Update: I’ve managed to get the inventory grid to generate from the player state instead of the controller. The controller just calls the UI elements now. Throwing some errors trying to generate the equipment inventory (player inventory) from the player state though. For some reason it is not a huge fan of the idea. Going to do some more tinkering
this project does not have a save system
Scyclone, unsure if you’ve fixed your issue yet, but the most effective method to fix this problem would be to export your custom weapon mesh to a 3rd party program
such as Blender and manually adjust the rotation of the skeletal mesh and then reimport. Hope this helps