Search Unity

Assets [RELEASED] FSM AI Template by Invector

Discussion in 'Works In Progress - Archive' started by Invector, Jul 12, 2018.

  1. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    invector-logo_v1-3d.png
    ___________________________________________________________________________

    After a long time of continuous development on our [Third Person Templates] we created a new template but this time AI is the focus. We already have a pretty cool AI in the Melee Combat Template but that was just a bonus so you can have a target to throw a few punches, but this one is a whole new thing.

    Design from scratch with the goal to be customizable and expandable, this AI works with an FSM Node Editor that allows the creation of new behaviors easier with our built-in Actions & Decisions, advanced scripting knowledge is not necessary to create unique behaviors. It's not a traditional Behavior Tree neither a Scriptable Object concept but a new approach that combine some features from both.

    It was designed with Third Person Templates in mind and it works great with, but it also works without the templates so you can use it in your FPS or VR project.


    ___________________________________________________________________________

    Try the Demo: [DOWNLOAD]
    Beta is now Available:


    vStore: [Purchase now!]
    AssetStore: [Purchase Now!]

    Shooter Users (vStore): Check your email, we send instructions on how to grab your free copy of the AI Template but hurry up, the offer ends on August 1, it's plenty of time but make sure to grab it before it's too late!

    Shooter Users (AssetStore) We're trying to contact the AssetStore support to see if we can create a free upgrade option for customers who bought before the release.

    ___________________________________________________________________________


    - Advanced Waypoint System
    - Flee Behavior looking at the damage sender
    - Hitbox Melee Combat System
    - Ragdoll System


    - Shooter Combat
    - Create States like Suspicious and go investigate



    Advanced FSM Node Editor that works with Actions & Decisions


    Real-time FSM State Debugger


    Visual FOV Debug

    features.png

     
    Last edited: Oct 9, 2018
  2. InstinctDevs

    InstinctDevs

    Joined:
    Jul 6, 2018
    Posts:
    105
    This looks fantastic just like your third person controllers. I tried the basic locomotion lite and it was so smooth and amazing. Any chance this ai template is gonna have a lite version?
     
  3. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Thanks! Hmm I don't think so, the lite version of this would be the AI that we have today on the Melee Combat Template, which does the job but has limited inspector customization.
     
  4. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    AI Template Beta is now Available!

    vStore [Purchase now]
    AssetStore [Waiting for approval]

    Meanwhile, you can get a kickstart by watching our Introduction Tutorial Playlist
     
    sjm-tech likes this.
  5. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    In this tutorial, you will get the idea of what the AI Template is actually able to do :D

    Introduction to the FSM Node Editor

     
  6. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Is there a video of the AI in action or a stand-alone demo? It's hard to know if this will work well without some visuals.
     
  7. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    I second this. A demo would be nice.
     
  8. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    @Invector

    I have few questions.
    1) is the red arrow in FSM some priority event ? Are they easy to define ?
    For example health below 10% priority is take health potion, no potion condition would be flee action
    2) does AI uses raycast addition to cone of view ? An enemy could be lower than player or a floor below.
    3) can AI investigate some time, a radius around the last position it seen the player ?
    4) can AI alert other AI around in a radius when AI has not been alerted already and sees the player ?
    (alerting already alerted AI has no effect indeed)
    5) Are randomness and priorities possible among actions ?

    I used some other AI technique to random patrol, i don't know if it would be a good idea to include it ?
    I dispose some small collision spheres on the map that are patrol points.
    The enemy has a big detection sphere collision detecting patrol spheres, it takes a partrol point randomly as destination , when it reaches that patrol point, it uses the sphere collision to detect other patrol points around and take randomly one as new destination.

    The Events, decision, actions FSM seems to let anyone create advanced AI.
    I think this is what Emerald 2 was trying to do , but it lacks an FSM.
    I like the ability to be able to create our own FSM actions and decision.

    This is very promising :)

    Will the FSM editor get another version plugin that would be more general and able to work without Invector plugins ?

    +1 for a good AI demo (alert, investigate, complex decisions)
    Or a video showcase, for example some infiltration and gunfight example.
     
    Last edited: Jul 20, 2018
  9. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    1- What red arrow? We do have a CheckHealth Action that you can do that behaviour
    2- Yep, you can set from 1 to 3 raycast that grab from top to middle and bottom of the target capsule collider ;)
    3- Yep! we have a example of the on the Shooter area
    4- not right now, but we do already have a prototype of this feature
    5- Anything is possible with this FSM, you just need to create actions and decision if the included ones can't do exactly what you have in mind, but I can say that you already can do a lot with :)

    I think you didn't read the first post, the AI Template already works without the Third Person Template out of the box, so you can use it on a VR or FPS project, but it also works beautifully with the templates :)
     
    zenGarden likes this.
  10. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Btw, a Demo is coming soon guys :)
    I'm focused on create video tutorials right now for users that already purchase the Beta in the vStore and are already exploring the possibilities of the AI Template :D
     
  11. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Take your time and make a good level demo :)
    (having alert featured in the demo would be even more great)
     
  12. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    736
    Hey @Invector -

    Got a request this system - Would it be possible add a optional light based detection system to this? Similar the game thief by looking glass studios.

    Also I just purchased the Shooter system from the VStore like yesterday . How do I get the free version from there?
     
  13. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Is it possible to create Boss / Enemy AIs simply through predefined templates without any GUI? (Scriptable Objects etc?)
    It's often faster and more effective to use some predefined templates with Casting Timers etc. so you can copy and paste them and change some spells / dmg / and timers. If the templates are well documented and clear you don't need any Coding experience at all.

    A pretty good example of good AI templates are the Scriptdev2 AI Scripts of the WoW PServers like this one here for Azuregos which is pretty easy:
    https://github.com/scriptdev2/scriptdev2/blob/master/scripts/kalimdor/boss_azuregos.cpp

    Do you have something like this in mind with your new AI template?

    Cheers
    Ronny
     
  14. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    You can create your own actions and decisions for FSM, so it's infinite possibilities when you can code.
     
  15. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Hmmm I think it can be done, there are a few ways to do it you just need to be creative.
    Thanks for the support but actually the AI Template only goes for users that already purchase the Shooter before the AI Template release ;)

    Actually, with the Actions and Decisions that we ship with the package, you can create a LOT without writing a single line of code just being a creative designer ;)
     
    zenGarden likes this.
  16. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Thanks for your fast response zenGarden.
    I mean if the AI Update will ship with some predefined templates which are not GUI / Node based. Like something like "generic_creature", "generic_archer" or "generic_mage" csharp file which can simply be attached to a creature / boss and already has functions like for example OnDeath, DoCast etc definied so you can simply take those and change them for your project.
    Ofc you always can do a lot of stuff by coding but for me it's important to know if I have to work with the node based gui or I also get the possibility to create specific creature AI by using templates. Emerald AI is working on that using scritable objects for example but right now there is not any news about that.

    This would be pretty cool because the Invector Community or also Unity community will be able to share templates for different creatures / bosses etc. (Like Scriptdev2 above)

    Another thing:
    I don't see any DoCast, OnHealth Method in the screenshots. I suppose the AI will have those functions or similar functions to create casting / shooting creatures with different Health phases, beside just let them hit you normally?

    Thanks a lot
    Ronny
     
    Last edited: Jul 25, 2018
  17. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Can you create your own custom actions that will be available in the editor when you select actions?
     
  18. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I don't own FSM , it's not in the Asset Store to test it , we have to wait a bit.

    From what i understand, FSM is made to avoid you coding and re use existing FSM nodes and events.
    For example the generic melee creature can be made with ease using existing nodes.

    While archer is the same as a shooting npc, both adjust and keep distance, and both fire (raycast or physic projectile), again you should have all needed action and event nodes to create those, and i think @Invector will provide those basic distance enemy AI.
    What is great is with FSM you don't need to code to alter their behaviour, for example add energy shield action, or add a random secondary fire, or the way the character moves around the player or use items.

    To make boss characters fast , FSM will be of great help, you can make "action phases" , for example when it's health is below some treshold it will use new moves or move faster. All without coding ,only code when you need to make a new action that does not exist.

    Working with FSM is working with nodes, if you need to code it's like coding at micro level, for example code new actions that will be available in the FSM, or code new events or new decision that will also be available in the FSM library.
    You finally drop the nodes you need in the FSM and connect them to make the npc AI behaviours you need.
    You'll spend more time choosing the nodes, connecting them, adjusting variables instead of coding, this is FSM purpose.

    We will be able to share FSM and nodes, so we should see lot of varied AI for any kind of AI , giving lot of power to people that don't know to code also.


    FSM should have all those simple events to make AI, for example onHit connected to a action node playing a hit animation and sound, if there is some missing you can still ask for them.


    Yes.
    As @Invector said , you'll have infinite possibilities, because you can code your own action nodes that could be anything.
     
    Last edited: Jul 25, 2018
    RonnyDance and magique like this.
  19. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Watch these 2 tutorials so you can see how easy it is to customize a behavior without writing a single line of code :p



     
    zenGarden and magique like this.
  20. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Deep AI with no limitations while no coding required, it's an awesome plugin :)
     
    Invector and magique like this.
  21. Luistrotamundos

    Luistrotamundos

    Joined:
    Mar 9, 2017
    Posts:
    17
    incredible, I can not wait to try it
     
    Invector likes this.
  22. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
  23. darkl4805

    darkl4805

    Joined:
    Jul 28, 2013
    Posts:
    5
    Last edited: Aug 7, 2018
    Invector and RonnyDance like this.
  24. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Yeah I am also irritated. Thought Shooter Template users will get the AI for free or for a really small price... Was this idea changed? Since Shooter Template already offers a "not so powerfull" AI I thought that the new AI update will simply replace the old one...

    But well perhaps I misunderstood somethin. Anyway congrats for the first beta release.
     
  25. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Well, the minimum amount that the AssetStore allows us to publish this upgrade is $1 dollar so it's available right now.

     
    Weblox, RonnyDance and darkl4805 like this.
  26. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    320
    Do you plan to provide an integrated demo of the third person controller and AI template? Then when?
     
  27. Weblox

    Weblox

    Joined:
    Apr 11, 2016
    Posts:
    277
    Upgraded. So just to get things clear, we will keep the TPC Shooter Template in our Project and add the AI Template to create Enemy AI? Will our Emerald AI Integration still work along both Systems? :confused:
     
    Last edited: Aug 9, 2018
  28. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    The AI Template works with or without the Third Person Templates ;)
    You can use it with other controllers such as FPS or VR projects and Emerald should work just fine since it's another asset.
     
    Weblox likes this.
  29. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I missed it as i was in holidays, anyway congrats on the release.

    Is the alert system and a demo coming soon ?
     
    Last edited: Aug 13, 2018
  30. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    We do have a prototype, it will probably be implement soon in future updates ;)
     
    zenGarden likes this.
  31. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    New tutorials available on how to set up AI using Generic models :D



     
    Weblox likes this.
  32. psych77

    psych77

    Joined:
    Mar 1, 2017
    Posts:
    55
    Hi,

    Is it possible to use A* Pathfinding with this somehow?

    Imo, Unity`s Nav Mesh system is really horrible :(

    Its horrible on terrains, heightsteps, and its horrible when it comes to local avoidance.
     
    Last edited: Aug 19, 2018
  33. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Is there some special setup required to get the AI to work correctly? I tried some of the example scenes and the AI seems to be extremely passive or unresponsive to being attacked. In The AI_Examples demo, I can often shoot AI without them ever responding at all. When I got to the boss with the big gun at the end, I just shot him repeatedly until he died and he never responded to my attacks. He just kept walking around the area below the big V symbol.
     
    Last edited: Aug 23, 2018
  34. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    You could add this generic AI to the plugin, it should be a good start for people making non humanoid AI.

    Demos should work , would it be related to settings or Unity version ?
     
  35. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    It should work just fine out of the box, what Unity version are you using it? Perhaps it's a conflict with tags & layers
     
  36. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Unity 2018.2.

    I checked the layer and they look correct. AI isn't broken completely. It works in most cases, but just seems extremely passive and in the case of the boss it just doesn't seem to care that it's being blasted at all.
     
  37. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    I think you're dead and didn't notice xD
    We didn't create any verification to restart the scene, so you will continue playing after dead and that's probably why the AI won't notice you. I already fixed that on the next update the scene will restart if you die.
     
    magique likes this.
  38. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    New skin for the FSM Node Editor coming soon in the next update



    If you don't like it, you can customize the colors of everything to match your taste




    Also, we add the option to Mute a transition, it's very useful to test different transition and behaviors without the need to delete that transition.

     
  39. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    It's progressing well.
    Could you make some Metal Gear Solid infiltration demo ? This would be a good demonstration.
    A small map, places to hide, and same soldiers AI able to alert, search some time, stand and patrol.
    Some real game use case.
     
    Last edited: Sep 24, 2018
    Invector likes this.
  40. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    I could create something like the Shooter Tech Demo extended tutorial using third party assets and our latest Stealth Kill Add-on :)

    ps* btw I forgot to post about the Stealth Kill add-on here :eek:
     
  41. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Official Add-on Stealth Kill by Invector
    (sellfy.com/p/9agY/#)





    Stealth Kill Add-on is now available and it's... FREE
    Animations included and it's all done using the vGenericAction, vTriggerGenericAction, and Events.

    * Require Third Person Basic Locomotion v2.3.3
    * Require AI Template v0.2

     
    zenGarden and magique like this.
  42. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    You don't need to focus on graphics :), good functionality is always better.
    Some infiltration demo, with features like alert, search around last seen position, after some time enemies return to their routine.


    The addon is cool. Can you drag anywhere the enemy you catched while walking ?
     
  43. Justin_Wingfall

    Justin_Wingfall

    Joined:
    May 15, 2014
    Posts:
    125
    why do i feel like push boxes addon has been abandon, its no where in roadmap, and i was looking forward to that the most.what the hell....:(
     
  44. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
  45. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    The problem with features like that is that we don't have the necessary animation, even to prototype correctly :/
    It still in our plans to create a push box though, sometime in the future.

    That's one gorgeous model!
    The FSM Editor is a feature of the AI Template (which works with shooter or melee) ;)
     
  46. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    You could those to make better plugin promo videos.

    I'm very interested in FSM, it's the best proposing both common functionality ready to use and unlimited ai customization.

    I need some convincing infiltration tps demo with alert and seek around last seen position :)
     
    Last edited: Sep 28, 2018
  47. Justin_Wingfall

    Justin_Wingfall

    Joined:
    May 15, 2014
    Posts:
    125
    maximo has free pushing animations for free though.
     
  48. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    A downloadable Demo is now Available :)

    [Download]​
     
  49. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    @Invector
    The zip doesn't open, i'm suprised it's only 38 Mo (while it's a good size to download).
     
  50. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Hmm the size is correct, I just exported another build... please try again.
    If that also doesn't work, I will try exporting using 2018.x since I did with 5.6.2 right now