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

RAIN{indie} Free, Powerful, AI Engine -- Released

Discussion in 'Assets and Asset Store' started by RT_Jester, Jan 25, 2013.

  1. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    EDIT** We have a new thread for RAIN 2.x located here: http://forum.unity3d.com/threads/ra...-engine-v2-1-more-powerful-still-free.262579/


    Hello All,

    I would like to move all RAIN{indie} users to this thread so they can find all things RAIN{indie} related in one place.

    The support resources available include documentation wiki, sample projects, code sample, monitored Unity/Rival Theory forums, and the Mod Community on FPS Control.

    Download RAIN{indie}: http://rivaltheory.com/downloadindie
    Support Site: http://support.rivaltheory.com/
    Community Generated Tutorials: Click Here
    Rival Theory Forums: http://support.rivaltheory.com/forums
    FPS Control: http://www.fpscontrol.com/
    RAIN{indie} FAQ: http://support.rivaltheory.com/faq

    Of course, any questions you have feel free to DM me, email (best way Jester@rivaltheory.com), or post here.

    Best,
    Jester
     
    Last edited: Nov 20, 2014
  2. PsychoG

    PsychoG

    Joined:
    Jan 11, 2013
    Posts:
    42
    I'm slowly learning how to use this. I feel like it has so much potential!
     
  3. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    I just spent a couple hours today playing with RAIN{indie}. Looks fantastic. I am just not quite sure how to start building a Behaviour Tree Mind. I googled for tutorials, and searched the rivaltheory website, but could not find anything that takes you through a step by step building of a Behaviour Tree Mind.

    If you know of a good Behaviour Tree Mind tutorial, please let me know where to find it. Thx in advance.
     
  4. PsychoG

    PsychoG

    Joined:
    Jan 11, 2013
    Posts:
    42
    I'm also looking for the same thing, I can't get the behavior tree to work.
     
  5. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Thanks so much for the compliment! make sure you check my signature for our support site (Wiki, Forums, Sample Projects).

    Hello Zaddo67! Thanks for exploring RAIN{indie} and the compliment. Any feedback is welcome. We worked really hard to make it powerful and as easy to use as possible.

    On our support site we have a Wiki that goes over behavior trees.

    Here's the page: http://support.rivaltheory.com/rainindie/wiki/doku.php?id=behavior:behaviortrees:start .
    Behavior Tree Nodes Explanations: http://support.rivaltheory.com/rainindie/wiki/doku.php?id=behavior:behaviortrees:behaviortreeeditor
    Here's another great article: http://aigamedev.com/open/article/bt-overview/

    That whole section gives an overview of our behavior tree system, so visit multiple pages. Since there is so many different ways to make a tree, we have also found that AIGameDev has some amazing resources about learning how to achieve your goals. http://aigamedev.com/?s=behavior+trees

    Let me know if this helps!
     
    Last edited: Feb 6, 2013
  6. PsychoG

    PsychoG

    Joined:
    Jan 11, 2013
    Posts:
    42
    Could you give a quick step by step instruction of how to make one object follow another object tagged with an Aspect?

    I feel like I am doing everything right (it should be pretty basic), I think it is detecting the object but it doesn't move at all. Sorry if this is asking for too much, I followed the wiki but it seem's like I'm missing something.
     
  7. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello PsychoG! The Sensors and Aspects tutorial we made (a long time ago) should give you some insight on how to achieve your goals.

    Keep in mind that this tutorial is older. However, the Sensors and Aspects part of our system has not gone through any major changes. http://www.youtube.com/watch?v=wb7vbU9hldw

    Let me know if this helps!
    Best,
    Nick
     
  8. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Seriously? Free? I seriously need to try this now.
     
  9. PsychoG

    PsychoG

    Joined:
    Jan 11, 2013
    Posts:
    42
    Awesome! Turns out I didn't have it set up right (I just re-imported and everything worked.) The video was helpful too! Now to get this working for a 2D game :p

    Edit: With the click of one button. Thanks so much! This is awesome!
     
    Last edited: Feb 7, 2013
  10. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    That's great to hear! Thanks for the follow-up :) Let us know how your game is going.

    Best,
    Jester
     
  11. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,152
    i get this error. how can i solve it? i tried redownload and reimport. i got all files that looks on asset store package contents.

    Assets/RAIN/Editor/ScriptTemplates/ActionTemplate_CS.cs(15,34): error CS0505: `ActionTemplate_CS.Start(Agent, float)': cannot override because `RAIN.Action.Action.Start(RAIN.Core.Agent, float)' is not a method

    Edit: i found problem there was a monobehaviour named Agent on my project. i deleted it now it works.
     
    Last edited: Feb 8, 2013
  12. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Great news :) Post here if you have any more questions!
     
  13. PsychoG

    PsychoG

    Joined:
    Jan 11, 2013
    Posts:
    42
    Is there an example of how to use custom action scripts? Sorry for all the questions but I really enjoy learning!
     
  14. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello PsychoG,

    The BootCamp demo show how to make custom actions. Check it out here. http://support.rivaltheory.com/sampleprojects

    Best,
    Jester
     
  15. tklarenbeek

    tklarenbeek

    Joined:
    Jan 18, 2013
    Posts:
    2
    I've been working with RAIN and it's working great except for one problem: movement. In my behavior tree, the NPC just looks for the player, and once they've been detected, they face the player and move towards them. While this is working, it's not working very well. The NPC stays facing the same way unless the player moves directly in front of them. After that, they rotate fine. Also, the movement speed wasn't matching my animation, so I tried to speed it up, but changing the speed variable has no affect, with integers as far apart as 1 to 10000 producing the same speed. I even went into the behavior tree demo provided in the documentation and tried editing the speed of the hamster, but I had the same problem there. Is there something I'm missing that I'm also supposed to change?

    Here's the movement portion of my behavior tree (the target variable is the player):


    Nevermind on the movement speed, I found the problem there. I didn't realize I also had to edit the RAINAgent script variables. However, I'm still having the problem of the NPC not rotating until the player passes in front of them. Anything I need to change there?
     
    Last edited: Feb 15, 2013
  16. PsychoG

    PsychoG

    Joined:
    Jan 11, 2013
    Posts:
    42
  17. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
  18. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello tklarenbeek,

    Here are some tutorials you might be interested in by Jake Casper. http://www.youtube.com/channel/UCNvNzTBSlHeORizaw2-KIFA/videos?view=0&flow=grid

    Best,
    Jester
     
  19. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    @tklarenbeek I don't know why that would be happening, could you send me a sample project to jester@rivaltheory.com?

    Thanks,
    Jester
     
  20. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Is there any ETA for this to be on asset store?
     
  21. oxl

    oxl

    Joined:
    Nov 21, 2008
    Posts:
    325
    It's already there.

    But no version for us 3.5.x users. Any chance for that ?

    Cheers,
    oxl
    --
     
  22. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
  23. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Thanks for answering this, I didn't see your response. There is a Unity 3.5.x version!

    Here: http://rivaltheory.com/downloadindie

    Check at the bottom of the page where is says, "Still using Unity 3.5? Download RAIN{indie} for 3.5 instead."

    Unity 3.5.x Sample Projects: http://support.rivaltheory.com/sampleprojects

    I hope this helps.
    Cheers,
    Jester
     
  24. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello Community,

    Thank you to everyone that has supported RAIN{indie}. Since RAIN{indie} released we've seen thousands of downloads. Some community members have gone the extra step to create tutorials and how-to documents that showcase the power of RAIN{indie}.

    Here is the link: http://support.rivaltheory.com/forums#/discussion/390/community-generated-tutorials-and-documents-

    If you have some content and want us to link to it from our website, please comment or contact jester@rivaltheory.com.

    Best,
    Jester
     
    Last edited: Feb 20, 2013
  25. Gigabeat

    Gigabeat

    Joined:
    Feb 26, 2011
    Posts:
    85
    This looks great. I'm actually tempted to start a new project just to see how well it works.
     
  26. PsychoG

    PsychoG

    Joined:
    Jan 11, 2013
    Posts:
    42
  27. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    PsychoG,

    Great tutorial. I think RAIN{indie} users will certainly benefit from this. I added you to the thread "Community Generated Tutorials and Docs" found in my signature.

    Thanks again. I will add them as they are made.

    Best,
    Jester
     
  28. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello Community,

    Our partners the Tornado Twins just released a new tutorial for the FPS Control mod tool featuring RAIN{indie}. I’ll keep updating as they release more parts. Enjoy!

    "In this tutorial we're using FPS Control's embedded AI system RAIN{indie} to give a character a smart brain." -Tornado Twins

    FPS Control Mod Tool Tutorial #4: Pro AI in Unity3d using RAIN{indie} FPSControl.com. [8:47]
    http://www.youtube.com/watch?v=ClZWgUsFqyA

    Tornado Twins Youtube Channel: http://www.youtube.com/user/TornadoTwins?feature=watch
    FPS Control Free Download: http://www.fpscontrol.com/

    Best,
    Jester
     
    Last edited: Feb 21, 2013
  29. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    Hello,

    Does RAIN{indie} work with mecanim animations? if yes please advise how we can achive it?
     
  30. tklarenbeek

    tklarenbeek

    Joined:
    Jan 18, 2013
    Posts:
    2
    Well, I solved the issue with turning. It turns out just taking the look part out fixed it. But I'm now having a more complex problem. I'm trying to make a tree similar to the one in the BTdemo with the hamster. Right now I'm starting simple by trying to make my character play an eating animation once its hunger variable has reached a the value of 1. I have the hunger variable set so it starts at 0 and increases by 1 every second. If the hunger precondition is left out, it works fine, however, if i put in the precondition "hunger >= 1", my character just sits there doing nothing. What am I doing wrong?

    Here's the xml for the behavior tree: https://www.dropbox.com/s/5k8kp0bt9q5v377/velo_AI.xml?m

    EDIT: Nevermind, I figured out the problem. It turns out I missed the part in the demo where parts of the tree were set to run forever, so the hunger meter never got added to before the animation code ran.
     
    Last edited: Mar 4, 2013
  31. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    thlarenbeek,

    Thanks for the follow-up. Variables and preconditions can be tricky, I'm glad you figured it out. Let me know if you have more questions, any feedback is always welcome. :D

    Best,
    Nick
     
  32. Mr-Knieves

    Mr-Knieves

    Joined:
    Mar 7, 2013
    Posts:
    41
    I've been looking for an answer to this but I have not been able to find it anywhere, either that or my Google skills failed me.

    Is there a way to create a "mind" or manipulate the mind or agent by using C# at runtime? I have looked for examples but couldn't find any. The BehaviourTree seems powerful but for a coder it seems so limited.

    Thanks!

    EDIT

    Wo00T When there's a will there's a way, I just needed to poke some more :)
     
    Last edited: Mar 8, 2013
  33. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    I have been following the Tornado Twins tutorial to make my NPC move to my location.

    I have a problem when the terrain is uneven. The NPC does not follow the terrain, it stays at a constant Y height.

    I have tried adding a rigid body which does make the NPC fall to the ground, however it also falls over because the capsule collider isn't stable.

    I expect there is an easy solution to my problem. It would save me a great deal of time if you could provide me with a solution or at least point me in the right direction.
     
  34. devilshaircut

    devilshaircut

    Joined:
    Feb 17, 2013
    Posts:
    4
    Can you not lock the rotation over the X and Z axes in the Rigidbody inspector?
     
  35. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    Thx. Worked perfectly ..... Why didn't I think of that .... :eek:
     
  36. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello Unity Community,

    I wanted to let you all know that we will be chatting live about the creation of RAIN{indie} artificial intelligence engine on March 15th 4PM EST!



    If you have questions you always wanted to ask about AI, our company, or our tech-- now is your chance. :)

    Livestream will be here, conducted by ETeeski.

    See what time 4PM EST is in your neck of the woods with the World TimeZone Converter.

    See you all on the 15th!

    -Jester

    Side Note: Frequently check the "Community Generated Tutorials" link in my signature. We just recieved a new batch of tutorials thanks to CodersExpo!
     
    Last edited: Mar 13, 2013
  37. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    CodersExpo (an AWESOME community member) delivers a great video on how to use Custom Actions in RAIN{indie} using code.

    He teaches how to get an AI to select a random waypoint to patrol until it detects the player. Once the AI detects the player it moves toward it and stops moving once it can't see the player.

    If you have any videos using RAIN{indie} please message us! It helps the community and we would love to give you a shout-out!

    Videos at the bottom of the thread Custom Actions in RAIN{indie} Using Code #1 and #2

    Let me know if you guys have any questions/requests, comments, or if you'd like to meet up for GDC! We will be there the 26th-29th!

    Best,
    Jester
     
  38. chrisall76

    chrisall76

    Joined:
    May 19, 2012
    Posts:
    667
    Question. Let's say a enemy was to detect me and had others around him. How would I make him send them a signal to star chasing me also?
    And then since I have a FPS how would I make the enemies attached to sound (when I shoot I make a sound that alerts nearby enemies)?
     
  39. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello Chrisall76,

    Thanks for the question and please accept my apologies for not addressing this sooner.

    One way to do this is to use a sensor on the enemy to pick up other enemies. The actual calls would have to be done in a custom action, with a little setup before hand.

    On the sensor you want to use, you'll need to set the Focus of Attention field to be the aspect you want to pick up, The behavior tree does this automatically when you use the Detect primitive, but since we're going to use a custom action we'll have to set it ourselves. You can then use a custom action to pick up all of the enemies that were within the sensor's collider.

    Here was my custom action to grab any enemies nearby:

    public override ActionResult Execute(Agent agent, float deltaTime)

    {

    GameObject tFriendTarget = null;

    GameObject[] tFriends;

    agent.Mind.GetAllObjectsWithAspect("friend", out tFriends);

    for (int i = 0; i < tFriends.Length; i++)

    {

    RAINAgent tFriendAgent = tFriends.transform.parent.gameObject.GetComponent<RAINAgent>();

    tFriendTarget = tFriendAgent.Agent.actionContext.GetContextItem<GameObject>("movetarget");

    if (tFriendTarget != null)

    break;

    }

    agent.actionContext.SetContextItem<GameObject>("friendsmovetarget", tFriendTarget);

    if (tFriendTarget == null)

    return ActionResult.FAILURE;

    return ActionResult.SUCCESS;

    }

    In my behavior tree I had two parts of the tree, one trying to find my enemy directly, and if that failed running the above custom action to see if my friend had found someone.

    As for the gunshot question, you should be able to make a subobject on the character firing the gun, and on that subobject put an aspect (with a sphere collider as large as you want the shot heard). By default have the object disabled, and when firing the gun enable the object for a period of time.

    Let me know if this help!

    Best,
    Jester
     
  40. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello Community,

    We have had a lot of questions about how to integrate RAIN{indie} and Mecanim. While RAIN won’t prevent you from using Mecanim, you can create custom actions to play animations to interact with the state machines. We know the process could be easier.

    We are working on a patch for RAIN{indie} to provide direct support for Mecanim integration. We don't have an ETA yet on when it will be released. The patch will allow RAIN{indie} and the Behavior Tree system to access Mecanim state variables, and to automatically assign user-defined Mecanim variables related to movement and animation requests.

    We want to open up this forum to get feedback from you. http://support.rivaltheory.com/forums#/discussion/428/rainindie-for-mecanim

    We are looking for your suggestions and feature requests.

    Best,
    Jester
     
  41. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello Community,

    We are releasing a RAIN{indie}/Mecanim beta in the next few days to our newsletter list. To get the beta, sign up here: http://rivaltheory.com/downloadindie/ (Step 2)

    We look forward to your feedback!

    Best,
    Jester
     
  42. zeeawk

    zeeawk

    Joined:
    Sep 12, 2012
    Posts:
    67
    Very cool. This should save me from using custom actions. :)
     
  43. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    You are absolutely correct! Have you signed up for the beta? :D
     
  44. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Hi,

    I'm using rain indie and I'm wondering how I can adjust the close enough distances.

    When set to .1 the enemies are too close when they trying to shoot so I set them to 3 or 4. This makes them run into things and get stuck when using the move action. How can I switch between .1 for chasing and 3 for when the enemy gets to a certain point, such as 3 or 4 when they're close enough to start shooting my player?
     
  45. Prime

    Prime

    Joined:
    Jul 22, 2011
    Posts:
    39
    ---

    Close enough distance is mainly used to avoid hitching during pathfinding and keep from oscillating at the end of the path. You should not use it for determining the final movement position of the AI when the path target is an enemy, but instead should calculate a move position manually. For instance, if you are using a Sensor to detect an enemy, you may want to add a customAction to calculate a moveto position that is some distance back from the target. You can do this by calculating a vector toward the target, then subtracting back some amount. The risk there is that your calculated position may not be in a walkable area. We've resolved this in the past by letting the pathfinding system calculate a path to the target, then set a movement position at some distance along the path. In RAIN, you can do this in code by calling PrePath to calculate the path, then with the returned path call path.GetPositionOnPath(path.GetLength() - backoffdistance)
     
  46. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
  47. Prime

    Prime

    Joined:
    Jul 22, 2011
    Posts:
    39
    RAIN{indie} 1.3.4 with support for Mecanim is now in Beta. If you don't have access, you can sign up for updates here:

    http://rivaltheory.com/newslettersignup/

    The full release should be available within a week or two from the Rival Theory website, and shortly after that from the Unity Asset Store.
     
  48. SimtropBuggi

    SimtropBuggi

    Joined:
    Feb 15, 2013
    Posts:
    98
    Saw Rain{Indie} covered by Game Developer mag, congrats!
     
  49. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Thank you so much! We're very lucky to have such an amazing community of users that have helped us get to this level :)
     
  50. acehwk

    acehwk

    Joined:
    Apr 27, 2013
    Posts:
    11
    Hello. First of all, I just want to say thanks for the awesome free tool. I've had a lot of fun playing around with it and learning all of its different uses.

    One problem I've run into and haven't been able to fix no matter how much I tinker with it is that my AI seems to only move when the player stops moving.

    Update: Well I spent hours the other day unable to fix that problem yet 5 minutes after making this post I seem to have fixed it by adding a kinematic AI controller.

    I am having another problem of my AI standing still whenever the player stands right up against an object (a tree)
     
    Last edited: May 9, 2013