Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Ability & Combat Toolkit

Discussion in 'Assets and Asset Store' started by Mozza, Nov 2, 2019.

  1. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Glad you found it :D have a good day!
     
    UsefulWeapon likes this.
  2. Oberheim

    Oberheim

    Joined:
    Jun 4, 2020
    Posts:
    24
    HI there !
    Struggling with sizing !
    When even I want to import a new model and adapt the size of the player to the world everything gets messy, weapons are huge and player wont move.
    What am I doing wrong ?

    Also, any suggestion on how to use with mirror networking ? user will all be having the same "player" tag and won't be able to hit each others ?

    Thanks a lot !
     
    Last edited: Jul 3, 2022
  3. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Hey hey! I saw you have emailed so have replied to that :D
     
  4. LostShawn

    LostShawn

    Joined:
    Aug 1, 2022
    Posts:
    2
    Hi, I just started using this with Game Creator 2. I found that the DEMO in [Demo - GC 2 Basic Integration] did not work correctly. Error message: InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.


    How should I solve this problem? Looking forward to your reply.
     
  5. lmantock

    lmantock

    Joined:
    Feb 25, 2018
    Posts:
    4
    Hey, I had the same problem. You may be opening a normal ABC demo (these don't seem to work). There are specific demos for this in the "ABC - Game Creator 2 Integration > Demo" folder.
     
  6. LostShawn

    LostShawn

    Joined:
    Aug 1, 2022
    Posts:
    2
    I'm opening the demo you were talking about.

    This demo works, characters can move, but not attack, then error message: InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.
     
  7. lmantock

    lmantock

    Joined:
    Feb 25, 2018
    Posts:
    4
    Ah yeah you did mention - my bad. I managed to get everything working after re-importing and switching import systems a few times. Good luck!
     
  8. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Some updates from ABC:

    ABC Official Tutorials

    the first 5 official tutorial videos have been published:



    We will be uploading many more over the following weeks! :D

    Bow & Arrow Expansion

    I am happy to announce we have just released our latest expansion which will allow you to easily add bow & arrow type abilities to your projects, this is also on sale for 50% off.

    https://assetstore.unity.com/packag.../bow-arrow-abc-expansion-227344?aid=1011lcMhd



    We have also just released a new tutorial series, with new videos being added weekly:

    ABC On Sale

    ABC is officially on sale for 40% off! Grab it whilst you can:

    https://assetstore.unity.com/packag...s/ability-combat-toolkit-155168?aid=1011lcMhd
     
    Firlefanz73 and StevenPicard like this.
  9. Oberheim

    Oberheim

    Joined:
    Jun 4, 2020
    Posts:
    24
    NEW INPUT SYSTEM IS MAKING ME CRAIZY !
    I did what you mentioned but no luck, switched the integration in the ABC_Controller script but nothing changes.
    I manage to attack but no character movement ! :(
    Please help / fix.
    Thanks
     
  10. Oberheim

    Oberheim

    Joined:
    Jun 4, 2020
    Posts:
    24
    Any more specific advice ?
     
  11. Adamjm

    Adamjm

    Joined:
    Nov 4, 2021
    Posts:
    14
    Hi Oberheim,

    I am curious what the outcome was for you. I am evaluating this for purchase and if there are issues when changing scale of assets (obviously this will come up and should be supported) and if networking is not supported I'd like to be clear on that now before purchase.

    Did he clarify through your email how networking, particularly, mirror was supported?

    What was the outcome with scaling issues?

    Thanks
     
  12. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Hi,

    to use ABC with the new input system the first step is to ensure that the integration has been enabled. This can be done by clicking this button on the Controller Manager component, once added to any game object. This only needs to be done once:

    upload_2022-10-5_9-32-35.png

    With that enabled you next need to make sure you have the Player Input component attached to any gameobject in the scene. This input is used globally:

    upload_2022-10-5_9-32-55.png

    With that added you then want to make a vector2 Move action, and make sure the same name is added to the movement controller:

    upload_2022-10-5_9-33-16.png

    The last step is to make sure you have a Look action with the same name that you can add to the Camera Base script:

    upload_2022-10-5_9-33-34.png

    Hope that helps get the new input system working for you.

    Kind regards,
     
    Firlefanz73 likes this.
  13. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Hey hey :)

    I can confirm there is no scaling issues that I am aware off. ABC also does not unfortunately have any out of the box networking support. However I do know of some users that have modified ABC for network use, but I think it used a fair bit of programming changes.

    Hope you have a nice week!
     
    Oberheim likes this.
  14. Oberheim

    Oberheim

    Joined:
    Jun 4, 2020
    Posts:
    24
    Hi there !
    Where is the command line to use ability?
    Where does the "Fire" Action is used ?
     
    Last edited: Oct 13, 2022
  15. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Hey there :)

    To activate an ability from any script you can use the following code to access the ABC API:

    Code (CSharp):
    1.  //object/character to call API for
    2.     ABC_IEntity abcEntity = ABC_Utilities.GetStaticABCEntity(gameObject);
    3.  
    4.     abcEntity.TriggerAbility("Fireball"); //trigger ability by name
    5.     abcEntity.TriggerAbility(123456); // trigger ability by ID
    6.  
    7.     abcEntity.EquipWeapon("1H Sword"); //equip weapon by name
    8.     abcEntity.EquipWeapon(123456); //equip weapon by ID
    9.  
    10.     abcEntity.AdjustHealth(-20); //adjust health of entity
    11.     abcEntity.AdjustMaxHealth(200) //adjust max health
    More information can be found here: https://dicelockstudio.gitbook.io/abc-toolkit/introduction/api-and-integration-with-abc

    Hope that helps!
     
    StevenPicard likes this.
  16. Oberheim

    Oberheim

    Joined:
    Jun 4, 2020
    Posts:
    24
    Hi there !
    How to adjust the hit box of characters ?
     
  17. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Hey there!

    ABC interaction works of Unity colliders so to change the hit box you can adjust the colliders on the characters:

    upload_2022-10-18_11-18-45.png

    The collider radius for abilities can be modified here:

    upload_2022-10-18_11-19-18.png

    Hope that helps :)
     
  18. Toukis

    Toukis

    Joined:
    Aug 3, 2012
    Posts:
    1
    Hello,
    are you planning a tutorial on how to intergrate ABC with unity network for gameobjects + networkAnimator?
    I am more intersted on the ABC API data for every client and NPC, so stats and abilites remain in sync.

    Thanks
     
  19. EvilGremlin

    EvilGremlin

    Joined:
    Aug 12, 2016
    Posts:
    231
    Hey Mozza. In the description for ABC you mentioned easy integration with other controllers. I don’t see anything in the docs except the GC integration. Where would I find more information on this? How does it work? Thanks in advance.
     
  20. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Hey there thanks for your post, there is currently no out of the box functionality for ABC to be used for networking. This is something which at the moment will require code changes.

    I have seen others do this successfully before however I haven't yet done this as part of the package. Maybe something for future :D
     
  21. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Hey there! Hope you are well!

    The ABC documentation including GC2 integration details are currently in the works but for now you can see a tutorial series made by a user of both ABC & GC2:


    ABC comes with functionality to link to GC2 stats/health/mana and has been coded to integrate with the Player movement of GC2. It also comes with actions to do things such as activate abilities/equip weapons and work with the Inventory.

    I hope that helps :D
     
  22. yupengfei

    yupengfei

    Joined:
    Nov 10, 2017
    Posts:
    21
    hello, I am working on a game in a pseudo 3d view, like <Bloodstained: Ritual of the Night>, how can I keep the player's y index to be 0, and how can I twist the enemy AI to let it wander and attack the player in x direction?


    Edit:
    After read the code, I think I need to implement my own Movement Controller and AI.
     
    Last edited: Jan 16, 2023
  23. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Hey there, thanks for getting in contact. Hope you are having a nice week!

    To restrict the movement in ABC for the game you describe you will need to make a few minor tweaks to the code. I have added steps below on how to achieve this:

    1. First set your camera to face the right direction so X is the left and right view, then also make sure that enable rotation has been switched off:

    upload_2023-1-16_12-51-48.png


    2. Open the ABC_MovementController.cs Script found in \ABC\Scripts\ABC-Components. In the Update method add the following code:

    //Determine input and direction
    this.DetermineMoveDirection();

    if (this.moveDirection.z != 0 && this.moveDirection.x == 0 && this.moveDirection.y == 0)
    return;

    moveDirection.z = 0;

    //Rotate and move entity
    this.RotateAndMoveEntity();


    upload_2023-1-16_12-52-48.png


    3. This should then ensure that the character can only move in the right and left direction:

    upload_2023-1-16_12-54-11.png


    4. For AI I recommend shrinking the NavMesh so that it only allows the enemies to move on the X axis. This will require reducing the NavMesh area and doing a re-bake. You can find more infor on the Unity site here: https://docs.unity3d.com/Manual/nav-BuildingNavMesh.html

    Hope that helps :D
     
  24. yupengfei

    yupengfei

    Joined:
    Nov 10, 2017
    Posts:
    21
    For the movement
    I tried to modify ABC_MovementController.cs and make such changes and it works

    ```csharp ABC_MovementController.cs
    // if (this.inputX != 0)
    this.inputForce = new Vector2(inputX, 0).sqrMagnitude;
    // else if (this.inputZ != 0)
    // this.inputForce = new Vector2(0, inputZ).sqrMagnitude;
    // else
    // this.inputForce = new Vector2(inputX, inputZ).sqrMagnitude;
    ```
    ```csharp ABC_MovementController.cs
    // this.moveDirection = camRight * inputX + camForward * inputZ;
    this.moveDirection = camRight * inputX;
    var zOffset = 0 - meTransform.position.z;
    this.moveDirection = new Vector3( this.moveDirection.x, this.moveDirection.y, zOffset);
    ```

    Then I realized that if I want the player to work along the tower as <Bloodstained: Ritual of the Night> does, whichi is not a line, I need something else, so I use ultimate-character-controller as movement controller.

    For the navigation
    I also tried shrink the NavMesh, I tried to modify the code as this
    ```csharp ABC_Controller.cs
    hit.position = new Vector3(hit.position.x, hit.position.y, 0);
    this.meNavAgent.SetDestination(hit.position);

    this.currentNavAIDestination.position = new Vector3(this.currentNavAIDestination.position.x, this.currentNavAIDestination.position.y, 0);
    this.meNavAgent.SetDestination(this.currentNavAIDestination.position);
    ```
    it is buggy, so I switched to BEHAVIOR DESIGNER and write wander action code to get rid of the navmesh, it works.

    Another Question
    Now I am fighting against the ABC_DisableMovementComponents, the
    ```csharp
    this.HaltRigidbody()
    ```
    affacts ultimate-character-controller, with warning message on every update.
    ```
    Setting angular velocity of a kinematic body is not supported.
    UnityEngine.Rigidbody:set_angularVelocity (UnityEngine.Vector3)
    ABCToolkit.ABC_DisableMovementComponents:HaltRigidbody () (at Assets/ABC/Scripts/ABC-MiscScripts/ABC_DisableMovementComponents.cs:134)
    ABCToolkit.ABC_DisableMovementComponents:Update () (at Assets/ABC/Scripts/ABC-MiscScripts/ABC_DisableMovementComponents.cs:256)
    ```


    After commit this line, everything seems fine, is this OK? Or should I read the code and find a better solution?
     
  25. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Hey, glad you managed to overcome the problems, the workarounds look good as ABC has been designed to work with other Assets.

    Regarding your new question I can see you posted in our Discord channel so will respond there so we can discuss further :D

    Kind regards,
     
  26. yupengfei

    yupengfei

    Joined:
    Nov 10, 2017
    Posts:
    21
    OK,still waiting for you.
     
  27. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Just sent a response :D sorry for the wait!
     
    Oberheim likes this.
  28. Oberheim

    Oberheim

    Joined:
    Jun 4, 2020
    Posts:
    24
    Hi there !

    My use case:
    Using photon multiplayer solution. I would need to share the health / death value across network (server authorative for health management)
    Because of the little latency, sometimes a player hits on one client and not on the other (if he moves fast enough toward the other player and attacks).

    I would like to add a logic like :
    If (hit hasn't been received on both client)
    -> Don't take that hit

    Another solution would be:
    if(healthValue on client1 is different than on client2)
    -> set health to max between healthValue1 and healthValue2


    Any suggestions on how to do this please let me know !
     
    Last edited: Jan 24, 2023
  29. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Hey, just so you know I responded to your email with answers to the above questions :D

    Hope you have a great week!
     
  30. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    I am using the Game Creator 2 integration asset. After created a character and assigned a sword to the character. When I attack, after couple of attack I get character model separated from its component. How to fix that. Please advice

    upload_2023-2-2_16-8-48.png
     
  31. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Hey Kotor, can you double check you have the below code in the ABC_AnimationRunner file found in ABC\Scripts\ABC-Components If you don't see that then can you upgrade ABC to latest version and that should fix the issue with collider being out of sync :D

    upload_2023-2-3_14-28-12.png
     
  32. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    It looks like I have the code you highlighted. Is there any other reason ?
     
  33. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Would you mind showing me your character Hierarchy and how it has been setup? Using GC2 and the ABC character creators you should find the model under a mannequin, this one should have the animation runner component which will keep the character in sync with the position, you will notice the position resetting to 0 if everything is working correctly.

    Can you have a look to see if this is happening on your environment?

    upload_2023-2-6_15-5-32.png
     
  34. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    Here is my hierarchy :

    upload_2023-2-6_13-8-44.png
     
  35. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Thanks for the image, it all looks correct to me. Would you mind joining the Discord server so I can better assist you and together we can investigate and fix the issue.

    You can find an invite link in the Welcome Hub which can be accessed in Unity by going to Windows > ABC > Welcome Hub :)
     
  36. HyperInfinity

    HyperInfinity

    Joined:
    Jan 27, 2019
    Posts:
    2
    Hello, I'm using ABC Integration Game Creator 2, how do I create a generic enemy, the tutorials only teach how to create a humanoid enemy, please someone help me.
     
  37. scarpelius

    scarpelius

    Joined:
    Aug 19, 2007
    Posts:
    966
    Anyone tried ABC with UMA2 characters?
     
  38. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Hey HyperInfinity, If by generic enemy you mean non humanoid then you can still use the character creator:
    however you need to ensure that the 'GC2' dropdown is selected.

    You then need to replace animations with the generic ones that come with your model, similar to this video:


    If I have misunderstood then let me know and I will assist further :)
     
  39. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Should all be fine if UMA2 are humanoid in skeleton structure, let me know if you have any issues though :)
     
  40. Oberheim

    Oberheim

    Joined:
    Jun 4, 2020
    Posts:
    24
    Hello @Mozza !

    having a blast working with your plugin.
    I am facing an issue:

    I would like to give a point to a player that kills an enemy. I am trying to use the ABC_projectile for this...
    however since the ColliderHandler can't be activated only when the enemy is still alive, the system does not detect that the last hit was done by that player.

    Any suggestion on how to flag a player killing an entity ? (or in my case another player)

    Again, thank you very very much for this amazing work.
     
  41. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Hey Oberheim, really glad to hear you are loving ABC! Puts a big smile on my face reading comments like that.

    The best way to trigger code when an entity is killed by a player is in the ABC_Effect.cs file in the Activate function:

    upload_2023-2-16_12-39-25.png

    Towards the end of this function you can add code which will check if the target health has reached 0, then run some code to record the points on your player. I have added a debug example for now but from here you have all the objects needed (originator who activated the ability or the target) to add the points on:

    if (entity.healthValue <= 0) {
    Debug.Log(Originator.transform.name + " Has Killed " + Target.transform.name);
    }

    upload_2023-2-16_12-41-12.png


    Hope that helps :D
     
  42. scarpelius

    scarpelius

    Joined:
    Aug 19, 2007
    Posts:
    966
    @Mozza It did worked, though I am having issues with duplicate name bones for UMA.
    Basically the left and right arm weapon tag holders will trigger this error in UMA. I've tried to modify the names of the tagholders, but it seems they are hardcoded in scripts so. probably I will need to find a way to alter your scripts to use the tag holder by first child not by name. I'm not very keen on doing this because at the next update, changes are going to be lost.


    AddBonesRecursive: TagHolder already exists in the dictionary! Consider renaming those bones. For example, `Items` under each hand bone can become `LeftItems` and `RightItems`.
    UnityEngine.Debug:LogError (object)
    UMA.UMASkeleton:AddBonesRecursive (UnityEngine.Transform) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMASkeleton.cs:163)
    UMA.UMASkeleton:AddBonesRecursive (UnityEngine.Transform) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMASkeleton.cs:169)
    UMA.UMASkeleton:AddBonesRecursive (UnityEngine.Transform) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMASkeleton.cs:169)
    UMA.UMASkeleton:AddBonesRecursive (UnityEngine.Transform) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMASkeleton.cs:169)
    UMA.UMASkeleton:AddBonesRecursive (UnityEngine.Transform) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMASkeleton.cs:169)
    UMA.UMASkeleton:AddBonesRecursive (UnityEngine.Transform) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMASkeleton.cs:169)
    UMA.UMASkeleton:AddBonesRecursive (UnityEngine.Transform) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMASkeleton.cs:169)
    UMA.UMASkeleton:AddBonesRecursive (UnityEngine.Transform) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMASkeleton.cs:169)
    UMA.UMASkeleton:AddBonesRecursive (UnityEngine.Transform) (at Assets/UMA/Core/StandardAssets/UMA/Scripts/UMASkeleton.cs:169)
     
  43. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Hey Scarpelius, been looking into this and have found a solution to get rid of the errors. The issue appears due to the ABC tag holders having gameobjects with the same name. This can be fixed by renaming them.

    So if you direct to: ABC\Scripts\ABC-Resources\Resources\ABC-GlobalPortal\TagHolders

    upload_2023-2-23_11-3-6.png


    You will find 4 prefabs, if you open each and do the following names, then the errors with UMA will disappear:

    upload_2023-2-23_11-4-11.png

    upload_2023-2-23_11-4-23.png

    upload_2023-2-23_11-4-33.png

    upload_2023-2-23_11-4-45.png

    I have renamed these for the next version update, hopefully this helps :)
     
  44. scarpelius

    scarpelius

    Joined:
    Aug 19, 2007
    Posts:
    966
    @Mozza thanks for the reply. I am going to try it as soon as I found a bit of free time.
     
  45. scarpelius

    scarpelius

    Joined:
    Aug 19, 2007
    Posts:
    966
    @Mozza So, I had time this morning to implement the changes and it worked. I have to make two observations:
    1. After renaming the prefabs in Project, I had to go on scene view on the character and dig through bones hierarchy to manually rename ABC added bones. I did not dare to click the Create Character on ABC Global Portal window, because it does not seem to refresh the window with my character info (after drag&drop my character into global portal), e.g. the UI, Camera & Movement Setup shows Local UI, though my character use Global Full UI.
    2. I had to go into UMA Global library and refresh it (another pain in the ...) because it requires you to first remove the object then re-add it.
     
    Firlefanz73 likes this.
  46. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Thanks for the notes - now I have renamed the prefabs for future updates no one else should have to go through this again on new projects. Thanks for your assistance :)
     
    scarpelius and Firlefanz73 like this.
  47. Speedmancer

    Speedmancer

    Joined:
    Nov 22, 2016
    Posts:
    6
    Hello @Mozza

    I applied the characters created from game creator to photon pun 2 but i got stuck.

    When I control the character from machine A and press attack, the character from machine B also press attack. I want to edit please help me

    thank you
     
  48. Mozza

    Mozza

    Joined:
    Nov 29, 2012
    Posts:
    135
    Hey Speedmancer, thank you for your post. Unfortunately ABC does not yet support Photon networking, this is something which I want to add in the future.

    I do believe that some users of ABC have modified the code for networking but it does require some programming knowledge.

    Hope you have a great week!
     
  49. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,314
    Is there some bonus scene or demo for someone who bought both addons (Bow and Two hands?) :)

    A demo scene would be great with two human players, without a mouse maybe WASD and Cursor keys or joystick... top down view or similar :)

    And can I get UMA working easily, is there an update to support it or do I have to follow the steps above?

    I am currently finishing my current project and will work with ABC soon, the existing samples are great!

    Thanks
     
  50. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,314
    And an idea for a new addon, I would pay for that, I think it could be helpful for others too:

    Have 4 legged animal / beast enemies. With a demo scene like the other fight scenes but the enemies are 4 legged ai enemies. Would also be great if they could handle the "stay on ground problem" if the ground is not straight (if possible).

    That would make it perfectly complete in my opinion :)