Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Combat Framework

Discussion in 'Assets and Asset Store' started by username_unity_of_my, Aug 29, 2016.

  1. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275
    Hi,
    I will update in parts, so first player ranged, after that human npc ranged, then cover, then vehicles.
    There are already ranged mechs in package.
     
    Prefab likes this.
  2. JeffG

    JeffG

    Joined:
    Oct 21, 2013
    Posts:
    12
    Has anyone had luck using UMA characters? My UMA character tends to go flying through the sky on the startup of the project. If I then disable the AttackSweepCollider the character plummets to the ground.

    Note: If I disable the AttackSweeoCollider before startup the character works correctly.
     
    Last edited: May 15, 2018
  3. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275
    Did you click on the 'Setup Project Reqiurements'.
    What layer is AttackSweepCollider - it should be 'EnviromentCollision' and that layer must not collide with player, only enviroment.
    'Setup Project Reqiurements' sets up physics matrix also.
     
  4. JeffG

    JeffG

    Joined:
    Oct 21, 2013
    Posts:
    12
    Thanks. I will double check my settings. I did get a change in behaviour but my character is now falling through the terrain. lol I am guess my old physics settings and the new are a touch off. But thanks for the place to look, saves me time.
     
  5. Prefab

    Prefab

    Joined:
    May 14, 2013
    Posts:
    42
    That's very exciting, I look forward to it. Keep up the great work on this asset!
     
  6. JeffG

    JeffG

    Joined:
    Oct 21, 2013
    Posts:
    12
    Yes. Fixing the Physics settings and cleaning up the layer list (and then fixing Item layer selection) has fixed my issues.

    Thanks
     
    username_unity_of_my likes this.
  7. Prefab

    Prefab

    Joined:
    May 14, 2013
    Posts:
    42
    Hi @username_unity_of_my , I have just purchased this and was looking at the scenes with the npc jumping over obstacles via off mesh links. I was wondering is it possible to control the transition of an npc from running to jumping over obstacles? It appears that there is a short pause when an npc reaches an off mesh link as oppose to running and moving straight into the jumping animation. I couldn't find any setting that controls this.
     
  8. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275
    Hello,

    Here is video of npc obstacles in current version:


    In older versions npc would stop before obstacle jump but now its smooth transition from walk or run to jump.
    Video on my youtube channel is showing older version.

    You can see in Trigger Creator video smooth obstacle traversion also:
     
    Last edited: May 19, 2018
  9. Prefab

    Prefab

    Joined:
    May 14, 2013
    Posts:
    42
    It appears to be only when using the jumpdownshort trigger. In the GenericTestScene, when the npc goes down the series of steps he appears to pause between the run and jump, just before jumping down the step. See in the screenshot below the npc is neither running nor jumping, it is sort of an in between walk. I'm not sure if this is more related to the animation then the off mesh link code?

    upload_2018-5-19_22-52-29.png
     
  10. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275

    You mean this ?


    Npc just slows before jumping down ( transition between one animation to the next )
    It really depends on your animation. You can create different jump down animation and scale trigger as you want - and player will use different jump down animation.
     
  11. Prefab

    Prefab

    Joined:
    May 14, 2013
    Posts:
    42
    Yes that's it, I thought it might have been an animation issue. I will play around with the animation controller, thank you.

    One more question please; I have noticed that the NPC characters have one attack animation, are there any plans to expand this to for example have different attacks based on certain conditions eg. a short range attack, a long range, an attack against a crouching opponent etc?
     
  12. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275

    Well, I'll come to that eventualy, I have working on other stuff currently.
    But that is very easy to implement:

    Look into NPCScript._chase_state() method.
    At the place : m_Animator.SetBool(HashIDs.Attack1Bool, true); which starts attack.
    There you can, after you create more attack states, crossfade or by using parameters, switch to random attack state or based on any condition you want.

    BTW, big mechs have two attacks: ranged and melee.
     
  13. Prefab

    Prefab

    Joined:
    May 14, 2013
    Posts:
    42
    OK thank you
     
  14. MaximilianPs

    MaximilianPs

    Joined:
    Nov 7, 2011
    Posts:
    199
  15. Nikodemus

    Nikodemus

    Joined:
    Nov 28, 2014
    Posts:
    19
    Any ETA on 4.0?
     
  16. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275
    Hmmm, I cant say exactly.
    Lots of work came in on updating all packages to 2018 so it detoured me a little.( and some other stuff )
    But about 95 % is done of next CF update.
     
  17. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    171
    Whens the next update?
     
  18. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275
    Im working on it.
    I dont want say date and not deliver.
    Roughly a month if all goes without any wall hitting.
     
  19. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    171
    Will it have teams?
     
  20. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275
    Not yet, Im afraid. Ranged combat is next
     
  21. sewerstyle

    sewerstyle

    Joined:
    Dec 17, 2012
    Posts:
    17
    Hello,
    I know, its melee and archery combat framework, but what action roleplaying game without fireballs? =)
    So, I want to add magic spells casting in addition to melee and archery both for player and bots.
    Any suggestions from what should i start?
    Also, I have melee attack sequences as separated animations, can I add them instead of current sequences in single animation clip?
    Thanks.
     
  22. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275
    Hi,
    Well, there is no magic system for now. But you can add magic system along with melee ( and ranged soon ). Add magic animations, start them ( use any kind of collision you want - raycast, spherecast, sphere overlap or other ) and call attack_hit_notify on receiver.

    You can place multiple attack animation to play one after the other, there is no difference then single animation with combo. People are already using this method. Just place attack events and place combo end event at the end of last animation.
     
  23. BryanO

    BryanO

    Joined:
    Jan 8, 2014
    Posts:
    171
    Has anyone made any addons for this package --- looking for teams and pets.
     
  24. Ikey-Ilex

    Ikey-Ilex

    Joined:
    Apr 4, 2017
    Posts:
    4
    I'm eagerly awaiting the next update. This is really cool to work with so far.

    That said, having used it a bit, I don't know if you're up for constructive criticism, I'd be glad to share some thoughts over PM if that would be preferred.

    I did experience a bug in the current version, a few times. When playtesting, the character will sometimes die immediately when falling from a completely reasonable height, and will sometimes fall off a high place and not get hurt. I've tried looking through the code, but I'm not sure what's causing the problem.
     
  25. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275
    Player dies if velocity when falling reaches certain limit.
    You can assign that limit in PlayerControl component 'Fall Die Velocity' field.
    Increase or decrease as you wich.

    Im always for constructive criticism!
     
  26. Ikey-Ilex

    Ikey-Ilex

    Joined:
    Apr 4, 2017
    Posts:
    4
    Awesome! Thanks.

    I understand that it's based on velocity, but it doesn't seem to be consistent. Try making a drop of 2.0 units, and another drop of 200 units. Usually on the first load, you can walk off the 2u drop without issue, and the 200u drop will kill you (As they should). However, when the scene reloads, sometimes the 2u drop will kill the player immediately. I set my spawn point 1 unit above the ground, and that player died upon respawn.

    Just did some more testing, and it's important to note that I've mainly observed this with player models shorter than the default player included with the pack.
     
  27. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275
    H

    Hmmm, maybe, upon spawn, player somehow gets velocity by setting its position from one place to another.
    Try, when your player gets spawn, to set rigidbody.velocity to zero.

    I'll will take a look.
     
  28. Ikey-Ilex

    Ikey-Ilex

    Joined:
    Apr 4, 2017
    Posts:
    4
    I spent most of today trying to get a video of it for your reference, but unfortunately, it never happened when I recorded. It happens frequently, almost constantly when I'm not recording, but when I try to get it on video it never happens.

    Either way, the symptoms are simple: Sometimes, the game will kill the player for falling even less than 1 unit, other times my player can fall from a buildingtop and land unharmed. This is with the kill velocity set at 20, the default.
     
  29. Ikey-Ilex

    Ikey-Ilex

    Joined:
    Apr 4, 2017
    Posts:
    4
    Sorry for the double post, but I do have some suggestions pertaining to controls, and the dying bug is quite separate.
    I was playing Breath Of The Wild with a friend the other day, and I realized that this engine is extremely, extremely close to being controller friendly. There are a few code nuances, some of which seem kind of arbitrary, but wouldn't take too long to patch up.

    Have you considering tweaking the engine to be controller friendly? I have an XBox 360 Controller for windows, and I could help with that.
     
  30. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275

    If you have any better ideas on how to setup input for controllers I would take your suggestions.
    Can you please contact me on email ( mariolelascontact@gmail.com ) to discuss more on that
     
  31. Nikodemus

    Nikodemus

    Joined:
    Nov 28, 2014
    Posts:
    19
    How Close are we to 4.0?
     
  32. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275

    Its done. Im creating videos, documentation etc.. Keep an eye on my youtube channel - I should start putting up videos soon.
     
    Nikodemus likes this.
  33. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    276
    I love the asset. And the support is great too. But im curious if anyone out there has been able to successfully intergrate emerald ai. Or ai designer pro? And if so, how.
     
  34. MAeStROx

    MAeStROx

    Joined:
    Mar 20, 2015
    Posts:
    13
    Hi, cool asset!
    Seems like what I am looking for, got one question though:
    Any plans for a future upgrade to integrate with unity's new ECS system, for parallel performance?
    I'm asking because I'm thinking to try it with many(many) characters in an online game.
     
  35. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275
    Hmm, I can't tell you for now.
    After I implement all planned features in the system I'll think about what's next.
     
    MAeStROx likes this.
  36. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,652
    Has 4.0 been submitted to the store yet? I saw the 4.0 setup video and the shooter weapons video. What else is in 4.0? I remember on page one of this thread you talked about the following features coming sometime after 3.1:

    - add inventory system
    - add saving & loading
    - character customization ( armor, helmets, pants/greaves etc. )
    - counterattacking
    - swimming
    - horse riding
    - improving animations & npcs & system overall
     
  37. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275
    Im creating tutorial videos and docs.
    I'll be adding features one by one.
    In 4.0 I added ranged weapons ( most requested ) and some other things.
    Inventory is on top my TODO list. Next update I think.
     
  38. akalabeth0

    akalabeth0

    Joined:
    Sep 22, 2013
    Posts:
    8
    Hello, Mario. My compliments for your fantastic framework.
    One question: is the version currently available on Asset Store compatible with 2018.2,7?
    I thank you in advance.
     
  39. akalabeth0

    akalabeth0

    Joined:
    Sep 22, 2013
    Posts:
    8
    Ok, I've purchased the current version. When it is imported, the compiling phase goes well, but when I launch an example scene, after some seconds, a huge number of errors arrives and then it's not possible to move the player character anymore. Need to come back on the 2017 version, let's check with the last version..
     
  40. akalabeth0

    akalabeth0

    Joined:
    Sep 22, 2013
    Posts:
    8
    The last version of 2017 works :)
     
  41. akalabeth0

    akalabeth0

    Joined:
    Sep 22, 2013
    Posts:
    8
    Sorry, Mario, but I have issues even in the 2017 version (specifically 2017.2.0f3).
    If I launch any of the demos, they work correctly. If I create a new scene, I put the same character you used in all your tutorials and scenes, and I make follow the instructions in the first tutorial and I create a new player, it makes it but if I run the scene, a huge number of errors (more than 1k) come. In this state, just like I launched your scenes in the 2018, I may do nothing with the input from keyboard and mouse, and the character remains in the idle mode forever.
    Attached you may find a look at the errors.
    Is the 2017.2 compatible with the current version of your asset? Combat Framework error.png
     
  42. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275
    Scroll up to top of console.
    It should display actual error in initialize function.
    If initialization fails then it will throw error every frame thus so many errors displayed

    I see you have 2 audio listeners - why?
    Can you tell me steps you did when creating player..

    Or better yet, why dont you contact me on email and we'll go through this?
    OK?
     
  43. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275

    Now that I look at the error image I see some things.
    What model did you use to create player ?
    I see error on ChallengerGenericNPCAdvanced component ItemPicker.
    ItemPicker is player component but ChallengerGenericNPCAdvanced is generic rig - you cannot create player with generic rigs, only npcs.
    Also I see error in script PlayerControl and PlayerControlBase also on ChallengerGenericNPCAdvanced - which are also player scripts and dont go on generic rigs.

    Try create player with humanoid rigs. Also use player creator - dont assign scripts manualy because you'll have create and add to player some additional scene objects ( UIs, scene controller etc.. )
     
  44. akalabeth0

    akalabeth0

    Joined:
    Sep 22, 2013
    Posts:
    8
    1.png Thank you for the soon replay and sorry, I don't see where I can find your email. Is it somewhere in the folders of the asset?
    Anyway, I installed it into another computer, in four different projects (in which there is for each a differnt series of other assets installed), and all of them have a different behavior of the asset. Because I have no time to try to guess the reasons, I started working with the one in which the demos you made works (a Unity version 2018.2.6f1). What now is not working is that if I add a new weapon (i tried with 5 different ones), when I use to let the character take the weapon, it takes the weapon in a wrong mode or the weapon is distant from the character's body (one example is the one you see in the attached image). I've tried with unity assets, or taken outside as FBX. The result is always wrong. A question: I don't know why, but your weapons in the demo scenes does not have the any of the weapons have the Mesh Filter and the Mesh Renderer, while the ones I found have all of them. Can this be the reason?
     
    Last edited: Sep 20, 2018
  45. kadykov

    kadykov

    Joined:
    Jun 18, 2014
    Posts:
    3
    Hello, sorry for my english.

    I like your package, but there are a few questions:

    1 Application.LoadLevel (Application.loadedLevel); How to do it correctly?
    2 Where does the timer show that the corpse of the player is displayed for a long time?
    3 At a time when the camera disappears on the stage, an ugly inscription appears, can you somehow avoid this (do not delete the camera or something else)?

    Thank you
     
  46. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275

    Did you setup player equipment bones / transforms. When you create player weapon ( transforms at which weapons are attached ) need to adjust based on your model ( models can have different bone orientations and positions so you must adjust them manualy to fit )
    Look in EquipmentScript.bones - there is an array on weapon transform on which weapons are attached.

    Here is video on how to create weapons:


    My email is mariolelascontact@gmail.com
     
  47. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275
    1. Hmmm, current CF versions are made for Unity 5.5 upwards which all use SceneManager.LoadLevel.
    Old CF versions which were made for previous Unity versions were using Application.LoadLevel.
    Can you tell me which script uses Application.LoadLevel ?
    2. I added delay time upon death after which restart starts in next update
    3. This is not displayed in release. It just notify that camera is missing during brief time of restart.
    But ok, I fixed that in next update.
     
  48. kadykov

    kadykov

    Joined:
    Jun 18, 2014
    Posts:
    3
    1 You do not have a scene in the scene: Application.LoadLevel (Application.loadedLevel);
    But the scene is overloaded when the player is killed. This works correctly.

    How to reload the scene from my script without killing the player, for example: MLSpace.SceneControl ....

    LoadLevel is working correctly, but ChallengerTPPLAYER is duplicated.

    How to access a function that changes a player's health?


    I just do not know how to access your functions from my script ( C# ) MLSpace....
     
  49. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    275

    Oh that. Look into scene 'StartingHub' - its in folder 'Scenes/ThirdPersonScenes/Hub/'

    So you dont drag player to the scene but assign player to be loaded in SCENECONTOLLER object component 'SceneControl' field 'Player'

    Player/npc health is in Stats component.
     
  50. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,652
    @username_unity_of_my Is it possible to integrate 3rd party AI assets with CF? I was trying to make Emerald AI work, but am also interested in using Tactical AI Shooter once the shooter upgrade comes out. The problem I saw was that it assumed targets were built using the CF interface for characters where it gets the health and other stats from. Aside from implementing that interface for the third party AI, do you see other ways to handle it? Implementing the interface is not impossible, of course, but it's a big interface with a lot of stuff just not needed to make this work. Should I just implement only the interface functions I need and just leave the rest empty functions? I'm probably answering my own question here, but if there's a better way then I'm open to improving the idea.