|
Post by rasto61 on Oct 4, 2018 7:25:15 GMT
I am working on a project where I need an Inventory Pro integration. I see a slight problem with Inventory Pro, although a very powerful and a very comprehensive inventory solution, Devdog decided to focus on Rucksack instead and Inventory Pro is just left in 'maintenance mode', which is not a very good sign. That's why I need an integration that is minimally invasive and relies on Invector as much as possible and makes it easy to swap Inventory Pro if things go south. This integration only requires 2 scripts and works almost out of the box. That's why I started a new thread although the equipment handler is based on Sickscore's original intergration. Setup of both assets is pretty much independent. Just setup each asset as you usually would following their quick start, easy start... Then: 1. Go to vAmmoManager.cs and on the bottom in the vAmmo add the keyword virtual before each of these: count, Use() and Use(int amout) (Invector will make these virtual by default in the future update) 2. Just create your items: -Create equippable inventory pro items from any invector melee/shooter weapon or -Add vMelee/vShooter Weapon to already existing equippable inventory pro items (basically the inventory pro equippable item needs to have the vMeleeWeapon or vShooterWeapon on it) (If you want to play the draw equip animation add InvectorInventoryProItem to the Inventory Pro prefab, and set the appropriate EquipID, and EquipDelay) 3. Add InvectorEquipmentHandler to the Equipabble Items types in the Inventory Pro Editor Equipment tab (Don't forget to set the appropriate equipment types and restrictions) 4. Replace vAmmoManager on your TPC with vAmmoManager_InventoryPro 5. Create some ammo: -Create unusable inventory pro items from any invector vAmmoStandalone or -Just simply add vAmmoStandalone to any existing unusable inventory pro item to make it an invector ammo (basically the inventory pro unusable item needs to have the vAmmoStandalone with the correct ammoId on it) You can use the vShooterDisplayWeapon_Standalone to display the Ammo amount. (It doesn't show the weapon icon just yet, ill do that once I do some UI stuff, but it shows the proper ammo counts) I still need to test more use cases, so please chime in about how it works in different scenarios. Download
|
|
|
Post by nfighter on Oct 4, 2018 17:10:02 GMT
Oh, thanks for your Inventory Pro approach! Can't wait to try it
UPD. Didn't work for me. I can pick up and drop the weapons, but can't handle it.
UnassignedReferenceException: The variable leftWeapon of InvectorEquipmentHandler has not been assigned.
You probably need to assign the leftWeapon variable of the InvectorEquipmentHandler script in the inspector.
|
|
|
Post by nfighter on Oct 4, 2018 20:30:01 GMT
What components from the Invector do I need? Do I need Invector's Item manager?
When I equip weapon it appear in the RightWeapon slot of Melee Manager component. Also it appear in my arm holder, but remain inactive.
|
|
|
Post by rasto61 on Oct 5, 2018 5:53:24 GMT
So you should not have the Invector's ItemManager component on your character.
Additionally you need to set the the equipment types in the Inventory Pro editor. LeftHand, RightHand, and RightHand_Shooter and assign them to your items, based on what they are (shooter weapons: RightHand_Shooter, melee weapons: RightHand, shields: LeftHand).
You do need the MeleeManager/ShooterManager (depending on which you are using)
What equipment category does your weapon have? Are you using only Invector's Melee? I'm setting this up with shooter, but ill check it with a sword and a shield.
|
|
|
Post by rasto61 on Oct 5, 2018 12:14:55 GMT
So the original Sickscore's integration was quite restrictive about what you could equip in what hand. I've changed the InvectorEquipmentHandler almost completely now, and its more flexible. You can equip whatever you want wherever you want (you just need to set the restrictions properly in the Inventory Pro Equipment editor). You can dual wield melee weapons and even shooter weapons, (though Invector controller doesn't handle that, but you can equip them :D)
|
|
|
Post by shadex on Oct 5, 2018 21:12:58 GMT
So the original Sickscore's integration was quite restrictive about what you could equip in what hand. I've changed the InvectorEquipmentHandler almost completely now, and its more flexible. You can equip whatever you want wherever you want (you just need to set the restrictions properly in the Inventory Pro Equipment editor). You can dual wield melee weapons and even shooter weapons, (though Invector controller doesn't handle that, but you can equip them :D) Currently working off of sickscores integration. Couple of quick questions. Did you just swap out your equipment handler and vAmmoManager? On duel wield, do you have it working with AttackID's, or does left hands attackID overwrite the right hands AttackID? Anything to tell the animator to use a differn't set of animations when duelwielding vs one handed?
Currently working on this as well with Insomnia, So look forward to contributing to the effort.
|
|
|
Post by nfighter on Oct 5, 2018 22:50:58 GMT
Perfect! Got it. Naming LeftHand, RightHand, and RightHand_Shooter did the job. Thanks!
|
|
|
Post by nfighter on Oct 6, 2018 0:34:39 GMT
I became more or less familiar with melee and going further to shooter. I can pick up the gun but the only way to use it is punching. Let's check, what could be wrong: 1) I create an equippable item with type: RightHand_Shooter from the Invector's handgun prefab; 3) I add vAmmoManager_InventoryPro instead of regular one to my character; 2) I create unusable cube item, and add vAmmoStandalone component to it. 3) I set identical ammoID to my hangun prefab and ammoprefab (I need also a WeaponName on ammo, but I don't find any place on weapon to set name)
what did I missed?
|
|
|
Post by rasto61 on Oct 6, 2018 7:09:13 GMT
I became more or less familiar with melee and going further to shooter. I can pick up the gun but the only way to use it is punching. Let's check, what could be wrong: 1) I create an equippable item with type: RightHand_Shooter from the Invector's handgun prefab; 3) I add vAmmoManager_InventoryPro instead of regular one to my character; 2) I create unusable cube item, and add vAmmoStandalone component to it. 3) I set identical ammoID to my hangun prefab and ammoprefab (I need also a WeaponName on ammo, but I don't find any place on weapon to set name)what did I missed? That's the standard Invector behavior. You have to aim to shoot. So you can either aim with the right mouse button, and then shoot, or set 'always aim' on your TPC and then you can shoot without pressing the right mouse button first.
|
|
|
Post by rasto61 on Oct 6, 2018 7:37:21 GMT
So the original Sickscore's integration was quite restrictive about what you could equip in what hand. I've changed the InvectorEquipmentHandler almost completely now, and its more flexible. You can equip whatever you want wherever you want (you just need to set the restrictions properly in the Inventory Pro Equipment editor). You can dual wield melee weapons and even shooter weapons, (though Invector controller doesn't handle that, but you can equip them :D) Currently working off of sickscores integration. Couple of quick questions. Did you just swap out your equipment handler and vAmmoManager? On duel wield, do you have it working with AttackID's, or does left hands attackID overwrite the right hands AttackID? Anything to tell the animator to use a differn't set of animations when duelwielding vs one handed?
Currently working on this as well with Insomnia, So look forward to contributing to the effort.
Yes, all that's needed to equip items through Inventory Pro is to set the Equipment Handler for those items. (other than that the Inventory Pro Items should have a vMelee/vShooter{Weapon} on them, but you can just drop an existing Invector weapon when creating an Inventory Pro item). And when using shooter then also replace the vAmmoManager. I also added InvectorInventoryProItem which you can add to an item. It just tells the handler which equip animation to play and the delay when to activate the equipped weapon. But it's not needed. If you don't add it, then the weapon is just equipped right away, which I kind of like. Currently when you equip two melee weapons it uses the right hand weapons move and attack ids. That's per Invector's melee manager though, as that doesn't handle dual wielding. But as I move forward and start adding actual items I'll need to extend the melee and shooter managers to use the dual items.
|
|
|
Post by nfighter on Oct 6, 2018 10:17:39 GMT
That's the standard Invector behavior. You have to aim to shoot. So you can either aim with the right mouse button, and then shoot, or set 'always aim' on your TPC and then you can shoot without pressing the right mouse button first. Oh, got it! I'm not quite familiar with the shooter template. Thanks!
|
|
|
Post by nfighter on Oct 6, 2018 10:23:09 GMT
Did I understand right, that I need separate slots in the InventoryPro character window to manage different handler points? For example bow and shield should be attached to different points, but we don't use Invector's manager, so we use the InventoryPro that allow only one point per slot
|
|
|
Post by rasto61 on Oct 6, 2018 12:06:19 GMT
Did I understand right, that I need separate slots in the InventoryPro character window to manage different handler points? For example bow and shield should be attached to different points, but we don't use Invector's manager, so we use the InventoryPro that allow only one point per slot You just need the 1 equip slot, but should set the Equipment Position and EquippedItem Rotation in the InventoryPro editor. You can't use the 'Position Now' right now since it throws an error that i'll fix next, but can do so manually. It then places the item correctly in the hand.
|
|
|
Post by nfighter on Oct 6, 2018 13:41:44 GMT
Did I understand right, that I need separate slots in the InventoryPro character window to manage different handler points? For example bow and shield should be attached to different points, but we don't use Invector's manager, so we use the InventoryPro that allow only one point per slot You just need the 1 equip slot, but should set the Equipment Position and EquippedItem Rotation in the InventoryPro editor. You can't use the 'Position Now' right now since it throws an error that i'll fix next, but can do so manually. It then places the item correctly in the hand. Yep, I tried. But I can't find the correlation of my weapon-in-hand rotation and numbers in the equipment editor. It's fine when they are equal to zero. But I can put .1 .1 .1 in equipment editor and my resulting rotation will be -138.19 -63.435 -63.435 Also, on the beginning of a scene, when my character loaded with a weapon in proper inventory slot - it will not appear in hands. I need to disarm and then wear it again to appear in hand. Is it a system limitation we should accept or it could be fixed?
|
|
|
Post by rasto61 on Oct 6, 2018 14:18:03 GMT
You just need the 1 equip slot, but should set the Equipment Position and EquippedItem Rotation in the InventoryPro editor. You can't use the 'Position Now' right now since it throws an error that i'll fix next, but can do so manually. It then places the item correctly in the hand. Yep, I tried. But I can't find the correlation of my weapon-in-hand rotation and numbers in the equipment editor. It's fine when they are equal to zero. But I can put .1 .1 .1 in equipment editor and my resulting rotation will be -138.19 -63.435 -63.435 Also, on the beginning of a scene, when my character loaded with a weapon in proper inventory slot - it will not appear in hands. I need to disarm and then wear it again to appear in hand. Is it a system limitation we should accept or it could be fixed? The values in the Inventory Pro editor are quaternion values. So when you place the item in the hand and rotate it as you want it don't copy the values from the inspector rotation, instead change the inspector to debug mode so it shows you quaternion rotation, and copy those values (x,y,z,w). But I already changed it so that you can use the 'Position Now' and this will be done for you. I'll update the package later. How is the weapon loaded when you start play? Is it loaded using Inventory Pro's save system, or did you add a collection auto populator to the character collection?
|
|