questions about the integration

Marcus

New member
Hello, I'm new here obviously, I bought the TPC a couple weeks ago on a whim just to play around with it, the first day I was completely overwhelmed
with it, by the end of the week I had modified the hell out of it making it nearly completely unrecognizable. I was very quickly able to bring in my personal models, skinned mesh equipment and weapon models, animations and add attributes threw the attribute manager like stamina that effects many other abilities such as swinging a bat or running and many many other things. I'm a 3d artist and not a programmer but I can code a little and I can normally read threw code like on the TPC controller and figure out what its doing and modify it or make it do something little different.. I believe I touched on nearly every part of the character controller and had little to no real problem, this is a fantastic product and I'm gonna review it from my personal scope soon.
this brings me to the UIS, by chance about a week after I bought the TPC I got an email from unity, I clicked on it and it brought up Opsive UCC and UIS
and I seen UIS for the first time and realized that it was made by the same people.. I had a look and seen it said that an integration also made by Opsive was available and after watching the video for the UIS I bought it immediately. I had no plans to use UIS on its own for anything I was only interested in the integration with TPC, again I was overwhelmed but after a couple days messing around with it, I had figured out and had working nearly everything, I read threw the documentation I set the integration up, created the data base, added a weapon I can equip threw the UIS added a consumable item, added a skinned mesh equipment item that can be equipped and works, I played with changing the inventory layout and design and everything was going kinda great until I wanted to make an equipment item (in this case a Jacket) modify the TPC Attribute (in this case Health.MaxValue) when equipped and un-modify it when unequipped. Im the kinda person that doesn't ask for help often in life, I will fight push and pull until I figure out an issue, I had many issues with TPC and UIS, and I went to work to fix those issues by spending time in the documentation & watching the videos or looking threw the code literally whatever it takes. the both of these products have selling points that these can be used by non programmers in the case of the TPC, I agree 100% their is enough information (documentation and Videos) on nearly all the systems and features that you really should be able to work out most problems you come across
but the UIS not so much. lets take for instance, in the video for the UIS and the DEMO you can change stats when equipping gear, but in the integration this isn't touched on at all, and after searching I end up with statements from Opsive like, (the UIS is an inventory system and a Stat system is out of scope) I actually agree with that.. but here lies the issue, the video feels bit misleading when you show the system modifying stats which is whatever I guess, but as a artist, this Inventory system is completely useless to me, because in the scope of the integration I expected at the very least a working example of how to use the inventory and not just set up an item that changes the appearance of a character and nothing else. with just TPC I was able to get skinned mesh equipment working that when the character collided with the equipment he would put on automatically and that equipment could modify an attribute stat and un-modify when I put something else on.. with UIS I pick up the item in an inventory and I can equip it and it appears and works great, but I can not find any information anywhere about how I can get the item attributes values so I can apply them to another variable somewhere else in the code, I can't even figure out how I can even tell when that item is equipped / unequipped(outside the visual inventory icon) in code so as to know when or where I can inject my own code to change
other variables, I have tried using the itemActions themselves, I created new item actions just to see if I could change something like an TPC Attribute.MaxValue when equipping an item and I did get this to work but its a terrible solution that I believe just shouldn't be done. I am beyond stressed out with this problem, and the lack of a simple example I just can't work threw it.. I just want to be able to know two simple things, how can I tell when an item that is not a weapon (I understand how to use the shootable weapon binding and the item attributes to change things on the weapons) is equipped, what that code looks like and how to then get a Item Attribute from the UIS item.. a simple modify say the single attribute TPC comes with Health on equip and Unequip in the UIS, would go along way for me. I don't need or care about stats, if I can figure this out I can write my own stat system because Ill know how to effect them when I equip an item and be able to use the item attributes to set those values..


UCC has a great attribute system its very powerful easy to use and just plain cool, it just seems to me that the integration with UIS should have a example of at the least changing one attribute on equipp/unequip of one item so people like me have a way forward.

I'm so sorry for this post lol I think both of these products are ACES. truly cool engineering. I'm just frustrated.
Ive only ever bought art tools, like Gaia, I'm not making a game and I don't intend to try making a game, I'm just that guy
that makes alot of cool art and wanted to just play around with it with little more then what I get from modifying the unity character controllers
like I have done for years.. this problem of mine, I know Is a Me problem, you guys are good at what you do and you could do this with your eyes closed
but for me everything I do with code comes at a huge effort which is why TPC is so cool, I feel like I can make the controller do anything I want it to do.
 

Sangemdoko

Moderator
Staff member
Hi Marcus,

I'm glad you like UCC and UIS. I've noted your concerns and I'll see if we can simplify those things in the future. If you come accross some issues do not hesitate to write a forum post, we are happy to help.

As you mentioned the Inventory System does not come with a stat system. But there are a few ways you can get attribute values from items (and equipped items). We have a documenation page about using attribute as stats here :

As for knowing if an item is equipped or not, we simply check if the item is part of the specific itemCollection. You can have many item collections. One for your bag, equipment, weapons, pouch, etc... so simply checking does that collection contain that item, tells you if you have it equipped. Unique items can only part of a single item collection at a time. Here you can find some code examples about itemCollection:

I assume you've already read about the Equipper component for equipping clothes:

The Equipper component has a function for getting a sum of the equipped item attributes that have the same name, as mentioned in Item Stats.

So between the ItemBinding component which can be used on any component and the Equipper script. It should be possible to get the attribute values without to much complication.
For more advanced use cases you can get the attribute values directly in code using the "myItem.GetAttribute<Attribute<MyType>>(attributename)" function.
You can find some examples here:

If you think there is anything in the documenation or within UIS that we can improve do let us know and we'll do our best to add it
 

Marcus

New member
Hey Man Thanks for taking the time to respond to my bullshit.
I have wen't threw all of the links you supplied both before my Original post and again after your post.
I'm sure there is an answer located in all that information for Programmers, but I'm not a programmer, despite that I spent
days trying to work threw this problem and I'm just not having any luck with a solution. I have tried even to circumvent the entire
inventory items attributes completely and just use a script on the skinned mesh that changes the charattributes when the skinned mesh
becomes Enabled when the mesh is equipped and sets them back when they become unequipped by Ondisabled. (which works but isn't really what I want)
I've tried writing custom ItemActions to do this as well, I got this to kinda work but it was just a bad idea,
the issue I'm having is that for all this information, there lacks a working example, most of this code examples doesn't do anything, im sure in some context in some code somewhere when added correctly with the correct namespace and attached to the right object or whatever the case maybe, they all work. but that's only helpful if you already know what all those things are.. Most of the things concerning modifying a variable when something is equipped using the item variables does not have a working example.
for instance you said:
The Equipper component has a function for getting a sum of the equipped item attributes that have the same name, as mentioned in Item Stats.
and the documentation says pretty much the same thing, however the code supplied underlines that function in visual studio and says it doesn't exist in Equipper. now of course I open Equipper and have a look around that script and I find two functions similarly names
one that end with INT the other with Float but not the function referenced in the example code on the documentation page. this leads to frustration, because even if I figure out this problem this code still doesn't work, their are no mentions to the namespaces that are needed, what this code should be attached too, how it should be used or anything and by the time I work threw all this stuff I'm frustrated because it still doesn't work..
I rewrote this example and worked threw about 20 different issues until it would finally compile and it still doesn't work.. it doesn't error
there is seemingly no issue with any of it so far as visual studio is concerned or Unity but it doesn't do seemingly anything. and I know that its probably a ME problem but I just haven't been given the information, I'm having to guess.
generally im use to unity documentation where there is nearly always a working example with a explanation, I can copy the code if need be load it up in unity and run it and it works, I know then what it does and how it does it, I can play with the example change somethings and then when I feel like I understand it I will start using it in my own scripts.. I'm still working threw this documentation and I'm still trying to figure this out.. maybe I fucked up something somewhere else in my setup and that's causing this not to work
but I'm not getting any errors in unity and everything else seems to work fine, my skinned mesh appear and work when items are equipped my weapons appear and work as intended, their is an example for using shootable weapon binding so I understand how that's done and have no issues with it.. if I had confidence in the example code and I knew it should work, then I'd be probably trying to find the problem somewhere else, but since the example code doesn't actually work I'm assuming it was my implementation of that code is the reason it doesn't work lol

this is the only issue I have had with UIS TPC and the integration, literally I have touched on everything else and am able to do everything with the supplied documentation.. but I'm not sure if im gonna be able to figure this out..

cheers
 

Marcus

New member
Jeez man, I'm sorry about this huge shit wall of poor grammar and English, and I hope I don't sound like I'm trying to say this
is a problem with your products or anything like that, I know this is a problem with how much I know about programming and believe me
when I say I have been studying the documentation, and using every resource at my disposal to figure this out. I learn faster when I see something work, I am a visual sorta person, I'm an artist. I can most of time figure out what a script is doing and sometimes its over my head. I think I did pretty well with UIS and TPC and the integration, I was able to figure out nearly everything and I didn't have to ask anyone for anything. That's the way I prefer it, but there is no working example here, I tried many different ways to do this but I just don't know enough to do it the right way, and I have no idea what the right way is.. I'd very much like to know and I'm gonna keep hacking at it
maybe I figure it out, I'm just playing with this stuff for fun, its not the end of the world if I don't but I'm obsessive compulsive, so I have a hard time just walking away from something..
 
Top