Skill Bar

blaurain

New member
Hey there, I've spent the whole week working on adding a skill bar to my integration of UCC and UIS. The idea is that you can use these magic spells/skills at any time with other items equipped in the main slots. I read every other post I could find related to this and saw the general advice is to create new slots to house something like this and also a new set of equip/unequip skills to deal with those. My plan is to assign these three character spells to slots 2, 3 and 4. I converted my spells over to item objects and created a cast item action to cast from the skill bar and all that, I wont go into everything I tried, let me know if you have any questions here's what I have it's close to working but not quite there... I need help figuring out the rest please :)
skillbarmain.png

You can see my bar at the bottom, I inherited from hotbar and cloned all that to create my own skill bar (hot bar is still active on the top, I didn't mess with any of that). I've been able to "equip" my spells (you can see them in the"equipped" item collection of the database and in the character's inventory, but only the rifle says "(slot x)" next to it)."Spell" category is equippable but I circled where it says"IsEquipped" is still false. How do I properly set that isequipped flag to true, what am I missing?

I know it's overkill but here's all I ended up doing to equip one of the spells in my skillbar setup logic:
Code:
         var item2 = InventorySystemManager.CreateItem(Slot2);
        item2.AddItemCollection(m_Inventory.MainItemCollection);
        m_Inventory.GetItemCollection(ItemCollectionPurpose.Equipped).AddItem(item2);
        var itemInfo2 = (ItemInfo)(1, item2);
        m_Inventory.gameObject.GetComponent<Equipper>().Equip(item2, 3);
        EventHandler.ExecuteEvent<ItemInfo, bool>(m_Inventory.gameObject, "OnItemActionEquipUnequip", itemInfo2, true);
        m_Inventory.AddItem(itemInfo2);
skillbarcategory.pngskillbar2.png
 

blaurain

New member
Part 2 of my question is how do I trigger the use properly on slots 2, 3 and 4. I read other posts and created new skills to use the new slot IDs and equip/unequip the new categories (spell, castable), and I'm triggering my new slot 2 use in the same way I trigger the other one (TryStartAbility). I follow the debugger all the way through and it seems to be setting the new use skill to active but nothing changes visually and the character doesn't move.
skillbar1.png

Thanks for your time and your help!
 

Sangemdoko

Moderator
Staff member
Hi @blaurain

I like it when people try out advanced functionalities :)

For the first question. The integration should be setting the IsEquipped attribute automatically for you, if the spell was correctly equipped that is. There might be something preventing it from equipping correctly.

There are a few things in your code that seem a bit off.
One thing I wanted to point out is that line
Code:
m_Inventory.gameObject.GetComponent<Equipper>().Equip(item2, 3);
The Equipper component is a UIS component which has nothing to do with the integration. So specifying the slot index here won't tell the integration where to equip the spell.

Your also adding the items directly to equipped collection, That's a bad idea because you bypass the integration code, that means the UCC part doesn't know that the item was equipped.

This should be enough. Simply create the item, add it to the inventory and then equip it.
Code:
 var item2 = InventorySystemManager.CreateItem(Slot2);
 var itemInfo2 = (ItemInfo)(1, item2);
 m_Inventory.AddItem(itemInfo2);
 EventHandler.ExecuteEvent<ItemInfo, bool>(m_Inventory.gameObject, "OnItemActionEquipUnequip", itemInfo2, true);

But it seems that you can't specify the slot to equip the spell to. That might be an oversight from us. @Justin Could you confirm my suspicion or maybe there is something I am missing?

Just to be sure, you are using the UCC magic spells correct? If that's the case I may look into implementing it in the integration demo scene in the next update. This way I can be sure that the integration actually support your use case.

For question 2 I would assume it is not working because step 1 didn't equip the item correctly.
 

blaurain

New member
Thanks for your quick reply! For equipping, yeah I just threw everything I could find in there to try getting it to equip right I literally spent all week stepping through the code too to try and see what I was missing, it was a great way to get to know the integration.

But for the magic spells I've had that working correctly for a few months before installing the integration for UIS so I'm confident those are set up correctly if they were triggered to be used (they were being used in slot 0 successfully I mean, have not set up successfully in the integration yet)

Thanks again for looking into this @Sangemdoko & @Justin you guys are the best I love the whole system you've set up here! :)
 

blaurain

New member
Any update on this? @Justin
I trimmed down my equip code to just what @Sangemdoko suggested and it has the same results of being "equipped" but not to any slots

But it seems that you can't specify the slot to equip the spell to. That might be an oversight from us. @Justin Could you confirm my suspicion or maybe there is something I am missing?
 

Sangemdoko

Moderator
Staff member
@blaurain I discussed it with Justin and I will be implementing this in the integration demo some time this week or the next, this way I'll be sure whether the bridge component is missing features or not. I'll let you know how it goes.

In the mean time I would suggest you work on other parts of your game such that you do not get stuck longer than necessary on this issue.

I'm sorry for the inconvenience.
 

Sangemdoko

Moderator
Staff member
Hi @blaurain , After looking at this in depth it looks like this is not something that can be done right now, even in a pure UCC setting. Therefore it will take some time to implement.
@Justin will first implement it in UCC and then I will use the same solution in the integration.

Currently spells can only be equipped on slot 0 because of how the animation layers are set up. But I'm sure we can find a solution around that
 

blaurain

New member
Thanks again @Sangemdoko for looking into that! @Justin Do you guys have any guess how long that would take? Just so I can adjust my schedule around that a bit, unfortunately spells are a pretty critical part of what I'm making.

These may be dumb questions but I assumed grenades could be thrown while another weapon was equipped in slot 0, can't we use a similar itemset strategy here? And if it's going to take enough time to implement the update, would creating individual abilities for each spell and assigning them at runtime be a good workaround?
 
Last edited:

Sangemdoko

Moderator
Staff member
It shouldn't take that long. We plan to implement it either in the coming release next week or the next. So early next month at the latest. And we'll keep you posted on the solution so that you can try it out before it actually gets released. No need to create your own individual abilities for now.
 

Sangemdoko

Moderator
Staff member
@blaurain Sorry for the delay. We've implemented the spells in the hotbar a few weeks ago but it required some changes on the UCC side.
So we're waiting to get enough updates on the UCC side to make the update worth the investement time of releasing all 8 versions of the character controller.

As V1.1 of UIS is approaching we decided to wait for that to be ready to make all the updates at the same time.

V1.1 is scheduled of November/December. I know it's a long time to wait but it will be worth it.
 

blaurain

New member
Sounds great, can I still please get a copy of the solution before V1.1? I'm supposed to release an early version of the game in january so ideally I'd like to have combat working before then haha
edit: @Sangemdoko I'm comfortable working through most the source at this point if you gotta give me an update dump for the whole thing or whatever I'm not sure how this works, I can figure it out as long as I get unblocked, thanks again!
 
Last edited:

Justin

Administrator
Staff member
All in all it ended up being a pretty decent amount of changes to both the scripts and setup of the database/character. We are getting close to releasing a new UCC update and with that we should be able to release the new integrations.
 

blaurain

New member
@Justin Thanks again for making those changes! So it sounds like you're closer to releasing the changes than the November/December time frame? I did quit my job to focus on getting this game out the door so another month would be a pretty significant delay.
 

blaurain

New member
It shouldn't take that long. We plan to implement it either in the coming release next week or the next. So early next month at the latest. And we'll keep you posted on the solution so that you can try it out before it actually gets released. No need to create your own individual abilities for now.
@Sangemdoko @Justin Can I test out this release before it has everything else in it? I'm going to need to update my database structure anyway it sounds like, so I'd rather get that started now
 
Top