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

ICode (AI For Mecanim 2.0)

Discussion in 'Assets and Asset Store' started by DevionGames, Dec 18, 2013.

  1. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    ICode - Visual Scripting

    Requires Unity 4.6.3 or higher.

    Quickly make gameplay prototypes, A.I. behaviors, interactions between GameObjects and more. The interface and workflow is similiar to the mecanim system, no need to study completely from scratch. Hundreds of actions and conditions are already availible and more are coming regularly.

    Examples
    Documentation

    Asset Store

    Third Party Integrations:
    • PlayMaker
    • UMA
    • MasterAudio
    • Core GameKit
    • NGUI
    • Photon Cloud
    • SoundManagerPro
    • UFPS
    • Behavior Designer
    • A* Project
    • Apex Path
    • uGUI for Unity 4.6
    • MySQL
    • DOTween
    • Energy Bar Toolkit
    • Easy Touch 4
    • And others.








     
    Last edited: Oct 27, 2015
  2. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Removed old Demo
     
    Last edited: Jul 28, 2014
  3. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    Looks awesome! Sadly so close to xmas iam broke :( Will purchase it January!
     
  4. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Thank you, i just submitted an update to the asset store with a PlaySound action, that was realy missing hehe. The update is already in my own store.
     
  5. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
  6. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
  7. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    Killer AI system. I am glad you got an asset on the store.

    I cant wait to see this added you your other kits. Great for boss fights.
     
  8. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Thank you, the update was just accepted.
     
  9. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    I though it is against Asset Store's EULA to sell cheaper on your site while on Asset Store it is still 70$...
     
  10. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,408
    i dont see that the problem is, its nonexclusive license and many authors do have temporary direct sales / discounts on their sites and other places they sell their assets. in fact many authors right now selling the very same assets they sell in the unity store 50% of less cause of chrismas/winter. you can see all the advertisements in this forum. its hard for them to do a 50% on unity asset cause in addition they close 30% to unity... the only question is what about differences in license rights/limitations, ect and what about updates, unity asset store u get all the updates without having to pay more, and if you buy directly from them you have to get your updates from them and it wont be registered / showing up in unity asset store.
     
    Last edited: Dec 22, 2013
  11. Doddler

    Doddler

    Joined:
    Jul 12, 2011
    Posts:
    269
    This seems incredibly useful, but I had a few quick questions:

    1) How extensible is it? Is code included, or is it a dll plugin?

    2) How much access do you have via code to change the current AI state?

    3) How resource intensive is it? Compared to writing your own state machine?
     
  12. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    This is not the regular price on my store, it is for a limited time, if unity would put my asset to the 24 hour sell or winter sell, i would be also happy.
     
  13. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    1. You get the source code, there is one dll file included, but it is just my often used static methods and you get also the source in a zip for it.

    2. Well you can fully change a state or extend the state.

    3. The AIRuntimeController does not take that much resources, it is just a holder of a List with states and executor. There is not mucch diffrence beween writing a simple state mashine and this one. However the editor makes some more calculation, in my opinion it is not that much important, since it has no influence to runtime.
     
  14. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    Definitely intrigued. Can the machine evaluate expressions? I.e. can state attack transition to state retreat if (health + armor) / confidence is less than value retreatAt?

    I'm also curious if the state machine state is visible at runtime the same way Mecanim is (for debugging).
     
    Last edited: Dec 22, 2013
  15. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    There is no formula editor but this is a great idea, i am going to implement that. For now you can just check something like this:

    If health is less then x% and other attribute is less then y % transition to z state(do healing or something) transition back to attack state.

    I am going to see if i can integrate a formula editor.

    Edit: Formula editor is integrated and this can be achieved now.
     
    Last edited: Jan 8, 2014
  16. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Currently it is not visualy linked.

    Edit: Integrated visual debugging.
     
    Last edited: Jan 8, 2014
  17. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    The demo, when the character is attacking while I move away, it will slide forward while attacking. Is that intended?
     
  18. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Last edited: Dec 23, 2013
  19. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Version 1.1b is availible in my store and submitted to the asset store.
    • You can now add a custom formula.
    • Changed Animator Actions to Update, Update contains the same actions
      as in the state actions, howerver WaitForSeconds will be ignored.
    • Added conditions for Formula, IsName, InTransition.
    • Added dropdown menu where possible.

     
  20. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Hi, I'm looking at your Attack example. So it does a distance check against a Target. How do you use a Trigger, e.g to set the Target?
     
  21. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    I have set the target in the Idle state only once and then you can just use "Target", if you want to search for another target you can call SetTarget.

    Trigger, Float, Int and Bool are animator prameters which you can create in the animator controller and the set them in the properties of your state with SetTrigger, SetFloat, SetInt, SetBool. So the "Attack" in the screenshot above is a trigger created in the animator controller.
     
  22. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    Zerano, I have already purchased your AI System from your website. I have some questions ?

    1) Will the updates is going to be free ? If yes how is going to work since I bought the assert from your site.
    2) Can I use the models provided in the package in my own game or do I have buy them separate ?
    3) As I was implementing kinda wander and attack behavior, how to implement the line of sight check to see if the objects in the line of sight.

    Overall, everything seems to be working. I will leave my review once I have played with it little more

    Thanks
     
  23. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Hello, thank you for the purchase!
    1. Yes all updates are free, you can just go on my site login into your account and redownload the package. I always change the name of the package and at the end there is a version number.
    2.Yes you can use those models for your game.
    3. You can use the "View" condition for this.The first parameter is the angle the second one is the layer mask that we want to check. There is an example scene/ai controller called also "View" included.
     
  24. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    Thanks for replying.

    I have another question just to clarify how to implement line of sight check. I have looked at the view scene that you have provided, it has a view but you have not used the layer mask. So if there is wall obstructing the view How do you check the line of sight check?

    It will nice if you included debug feature just as in Animator Controller ? for complex AI behavior

    Thanks
     
  25. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    Sorry, I have one more question. I used your Attack AI controller. Whats happening is when enemy attacks I see him sliding a little between attack and follow player states ?

    Thanks
     
  26. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    I would create an extra layer for the enemy and exclude it in the layer mask. Basicly you would include the wall layer(maybe just the default layer ) and the player layer in this mask. So if the raycast is done and a wall is between enemy and player, the condition will return false.

    Yes, i will try to implement it in the next updates.
     
  27. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Do you got the latest update? The latest update is version 1.1b where you can add a IsName and InTransition condition, which should fix it.
     
  28. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    Yes, I have the latest build. IsName and InTransition are both present. There is a checkbox in front of them. Those check boxes need to be checked ? I know what isName does, it checks to see if you are in that state. What IsTransition does ?

    Thanks
     
  29. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    No the checkboxes does not need to be checked on both, it means it will return false if it is "IsName" or "InTransition". InTransition is this one : http://docs.unity3d.com/Documentation/ScriptReference/Animator.IsInTransition.html
    It checks if the AnimatorController is in transition. Do you use both of this conditions and your agent is still sliding? Could you check the Demo on first page and let me know if the sliding is also present in the demo. If it is in the demo i would try to find it and fix it, otherwise i can also check your AIController, if you could make a unitypackage just with your AIController included.
     
  30. Apiweb

    Apiweb

    Joined:
    Nov 26, 2011
    Posts:
    57
    I use SoundManagerPro plugin to manage sounds. And I saw that in your plugin already exists an option to work with sounds, I could use SoundManagerPro with your plugin?
     
  31. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    I do not have SoundManagerPro, so i can not realy say about that, i am going to get it and implement an action for it, however i still wait until the update 1.1b is accepted in the asset store.
     
  32. bbsbot

    bbsbot

    Joined:
    May 23, 2012
    Posts:
    84
    mecanim ai, that sound cool. but what's the difference between your simple ai and this mecanim ai?

    does it can alt enemy's view distance? [when i hide in darkness , the enemy can not see me, when i run into light area the enemy found me as soon as he look around]
    does it can hear? does it can call his partner?

    does it can use ragdoll to show get hit effect when hit by arrow, and use animaitons to show get hit effect when hit by sword? toggle ragdoll effect off then on freely?
     
  33. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    The diffrence is that this system is much easier to use and so the workflow is very small to get an ai running. Also this system supports mecanim like the name shows. Simple Ai can be used only on lagecy animation system. Light areas are not supported yet, but this is a great idea.

    Currently it is not possible to call partners, i know how to implement it, but i am still thinking on how to implement it in a good way.

    I am not that much experienced with ragdoll, better to say i never used it, but i am going to have a closer look at it.
     
  34. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140

    Zerano,

    As you have asked, I have looked at your Demo Attack AIController and don't find any noticeable sliding of the character. In my case my Dwarf character sliding when trying to hit if the player moves at the same time. I tried to follow your example as much as possible. Please advice.

    Just you know my background, I am a professional .NET developed (C#, vb.net). I am just getting into game development.

    I am attaching unity package.

    Thanks
     

    Attached Files:

  35. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    It seems like a bug, i will try to find it, for now you can avoid it using an Animator Controller like this.
     

    Attached Files:

  36. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Version 1.1b is accepted by the asset store.
     
  37. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Version 1.1c is availible in my store and submitted to the asset store.

    • Added SetFloatRandom, so you can do for example random attacks(this
      float will be rounded to int)
    • Added ExitTimeRandom
    • Internal improvements especially in AttributeChanged condition.
    • Added visual state debug in editor play mode.
    • Fixed Instantiation offset to controller/target, it was relative to world.
     
  38. bbsbot

    bbsbot

    Joined:
    May 23, 2012
    Posts:
    84
    suggestion
    1
    add guild base ai that can make any member of guild A attack any member of guild B.
    such as wolf can attack rabbit. guard search and attack bandit.....a dynamic world.
    for example, developer can add new guild, then set the guild's enemy guild and friend guild, then attach this guild to any charactor.
    2
    hide. make such a state for developer can make sneak like game easier. for example, once a character sneak in bushes or someplace darkness, developer can active a hide state[set hide to 1] that other characters can not see this character. once the character move out, set hide to 0.
     
  39. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    Zerano, I was wondering how to use visual state debugger in editor play mode.
     
  40. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    How to use Visual State debugger in editor play mode.
     
  41. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Hi, you can just open the ai controller, then when you are in play mode you need to select the enemy you want to debug in the Hierarchy to link the ai controller with the editor.

     
  42. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    In theory this is possible, but would require some more states, i will see if i can make it easier.

    This is possible, just create a trigger for a dark place where you change the tag of your character to maybe PlayerHidden and when he exists the dark place change it back to Player. Same for sneak, if player is in sneak mode change his tag...You can research the enemies target with SetTarget.
     
  43. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,709
    Hey Zerano great Job! we need more Mechanim Assets, and this is one seems it will be a good one!
     
  44. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    Thanks for your help. Regarding the enemy sliding. I am still seeing the enemy sliding after using your modified Animator Controller. Let me know when you find a solution.
     
  45. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Hmm, have you tried the default animator controller with only changing the animation clips?
     
  46. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    What do you mean ? you mean without the blend tree ?
     
  47. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    No, i mean i included an animator controller, and if you change the animation clips in it to fit your model, does it still sliding with your ai controller.
     
  48. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Version 1.1c is now also availible in the asset store at a reduced introduction price!
     
  49. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    I just integrated Animator.CrossFade and reimported your Animator Controller. Using CrossFade to trigger the attack works without sliding(You still need to use IsName and InTransition), but your animator controller works great without any changes now. I also have a suggestion, create a blend tree for the random attacks with a float parameter and use SetRandomFloat before using the SetTrigger or soon CrossFade.

    I am going to update the package in my store today with this new action. The asset store package will be updated later, because it needs arround 1 week to be accepted and i want to integrate some more things before submitting it.
     
  50. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Removed old video.
     
    Last edited: Jul 28, 2014