Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

[UPDATED] ICECreatureControl v1.4.0 - creature AI for enemies, animals, monsters, zombies ...

Discussion in 'Assets and Asset Store' started by icetec, Aug 11, 2015.

  1. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    663
    THANK YOU for sharing! I've messed around a bit with some stuff in the ICE code but this is one item that is on my list still - how to save and manually spawn entities. I currently have mine set to allow players to manually spawn NPC bodyguards using the old Photon method of placing the prefabs in the Resources folder and then calling PhotonNetwork.Instantiate. Good stuff!
     
  2. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    663
    Make sure to enable the AVOID button in the obstacle avoidance and set your collider to the correct type and size. I have overlap prevention enabled as well - not sure if this part is key to making it work but it seemed like I needed it.
     
  3. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    226
    Thank you it works now, I didn't see that in the manual but maybe I missed it.
     
    Tethys likes this.
  4. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    226
    Hi does anyone really know how interactors work like does it work from top to bottom and then loops around because I have hunt the player then once in a certain distance attacks the player. But I also have crawl and crawl attack interactors if I shoot the lower leg the zombie loses its leg then goes into a crawl coming after the player and once within a certain distance of the player it goes into the crawl attack behavior which works fine but the problem is when the crawl attack has finished its animation it will start the interactors all again so it goes back to the hunt and attack interactor which looks funny since it gets up from the crawling state. So how would I make it keep on attacking within a certain distance then if player moves away it starts crawling to the player so in missing the hunt and attack states. Sorry if no one understands this.

    I just want if its in the crawling or crawl attack state it can not go in the hunt and normal attack behaviors.


    Edit: Just worked it out. I had on the crawl and crawl attack interactor and OwnBehavior is crawl, but didn't also put or OwnBehaviour is crawlAttack. All I needed was one little thing.
     
    Last edited: May 17, 2018
    Tethys likes this.
  5. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    226
    Hi I know I have been asking a lot of questions lately but does anyone know how to link dismember and Ice creature control up. I do have it working but when the Ice creature control ends up 0% and dismember still has life well my zombie just stops with everything. I did ask the owner of dismember but it was said that its not worth it because Ice creature control is hard to use and way too buggy. So i was wondering if anyone has maybe done a bridge or something. I know i should learn to code but I'm more a visual person so coding didn't suit me.

    Edit: I worked it out the corpse wasn't getting spawn because of the dead behaviour that i wasn't using.
     
    Last edited: May 17, 2018
  6. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    226
    Hi I was wondering if anyone knows how to do a food source for a zombie, where the zombie maybe is just walking around and within range the zombie sees a dead body and so he transitions to a run behaviour and once he reaches the dead body he transitions to the eat behaviour. I did this awhile ago but I can't remember how.
     
  7. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    870
    Have an interactor with the corpse and then set up your animations as normal. You could changed all corpse tags to corpse all do it by the name of you corpse prefab.
     
  8. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    492
    Been tinkering with my own Integrations for ICE.
    While it required modification of ICE scripts, I managed to integrate Love/Hate more fully. :)
    Here, I managed to integrate Love/Hate conditions for Interactors.

    Love/Hate Conditions:
    ICE_Love_Hate_Conditions.jpg
    ICE_LOve_Hate_Temperament.jpg ICE_Love_Hate_Emotions.jpg
     
  9. Gregorik

    Gregorik

    Joined:
    Dec 11, 2014
    Posts:
    334
    Pretty awesome, I'm a Love/Hate fan myself. So how to do it? ;)
     
    TonanBora likes this.
  10. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    226
    But on the player there is that ice creature player so what do i put on the corpse so it can get registered on the creature register. the zombie just ignores the corpse though.
     
  11. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    340
    here Pit will someday appear already or not! ??! I certainly understand everything that the accident, etc. But on the forum you can write about plans for the asset, when the update will be released, etc.
     
  12. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    226
    Hi was wondering how does VC work, FOV and even OC works fine but if I use VC (TargetIsVisible is true) My zombie don't see me at all. There isn't much info for using the Sensoria. I want it where I'm in the field of view and the zombie can also see me with visible check. If i just put field of view the zombie sees me through walls which i don't want.
     
  13. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,110
    Managed to get it to work with Invectors TPC today. It was pretty painless, a few changes (character, to vCharacter) (Damage to vDamage) declarations, and a few variable changes from _damage.value to _damage.damageValue and adding using Invector; on the headers of the ICE World Damage Adapter, and associated scripts that needed it.
     
    AndyNeoman, TonanBora and Tethys like this.
  14. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    492
    Well, since I had to modify Pit's code, I cannot really SHOW you how I did it. However, if you have programming experience, I can at least point you in the right direction. :)
     
  15. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    492
    Got more of Love/Hate Integrated, this time I modified the Influences to allow for modification of PAD values, and to show Love/Hate data in the Creature Info when you have the Info button ticked: LoveHatePAD Influences.jpg LoveHate ICE Info.jpg
     
    Gregorik, AndyNeoman and TonyLi like this.
  16. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    226
    I tried this but it didn't work. The character, to vCharacter, it was already vCharacter and i changed the rest.
     
  17. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,110
    Things to try;
    player Layer is set to player
    creature has ICE Creature Body part script on hands (for melee)
    This solves the player taking damage from a melee attack (like a zombie).

    I'm still trying to work out how the creature can take damage with TPC bullets, as I believe the bullets are using line casts? Tried it with standard projectiles, but would require some code changes to how the weapons fire the bullets.
     
    Last edited: May 25, 2018
  18. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    226
    When is pit coming back, I hate to see this asset go down hill.
     
  19. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    226
    When I tried all this the errors were still there. I didn't have a scene set up because of the errors so it wasn't a matter of me making sure the player was set to player.

    Emerald AI works with invector so I'm going to be switching to Emerald AI now. Hopefully it doesn't go down hill as well.
     
    julianr likes this.
  20. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,110
    When I have time I'll go through it again with a video, even if you are about to switch. I'd like to use ICE as it has so much more functionality and flexibility, but I'm switching to Emerald myself for now and I'll probably create my own AI system at some point this year, as I find it more difficult to modify someone elses code when you don't know the ins and outs - takes time to R&D it.

    Not sure when Pit is coming back, never got a reply from an email 2-3 months back and no response to Skype, can't wait 6-12 months for an update, that is if we ever get one - I'm sure ICE CC is the last thing on his mind right now.
     
  21. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    386
    I am using ICE for AI in a 3D space game. The distances are vast, and targets are acquired at great distances.
    Is there a way to modify the Selection Range for interactions? 100m works for typical creatures, but not in my environment. Stopping distance is definable in the GUI, but not selection range? I've searched through the scripts, but have not found where the 100m (or unit) limit is defined. Anyone done this?

    Cheers!
    Mark
     
  22. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    386
    Aw cheese. Never mind. Found it in the file "ice_creature_editor_values.cs" under SELECTION_RANGE_MAX. Those darn underscores!!! Testing away...
     
  23. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    I've bought Ice Creature Control a few years back and just had the time to try it out. Installed it in Unity 2018.1.0f2 and immediately received 165 console error/warning messages. The 4 red ones are:



    Commented out the first 3 audio-related problems from corresponding scripts and the system seemed to run fine until I started using it by playing around with Behaviors and Interactors. I can't use ICE Creature Control continuously as Unity kept crashing. Anybody experienced a similar issue?
     
    Last edited: May 29, 2018
  24. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    226
    Yeah it doesn't work in unity 2018 as yet. Ice needs updating. It works in unity 2017.4.2f2 though.
     
  25. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    226
    Yep I looked into Emerald AI and its good for basic AI stuff but not complicated stuff, so I may stick to Ice and just keep on using UFPS instead of Invector.
     
    julianr likes this.
  26. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    Oh, I hope it gets updated soon because I won't be able to use it now. It looks like a very powerful and flexible tool for AI. But I noticed a lot of deactivated fields has a text value of "TODO". Are those upcoming features? I'm not sure how long I can still wait and I'm actually looking at Behavior Designer or Node Canvas. But these are just too pricey... I just need something stable that can control flocks of animals -- swimming, flying, or roaming that is connected to seasons. Any recommendations?
     
    Last edited: May 30, 2018
  27. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,110
    Maybe those TODO parts are where Pit needed to translate a description into English. The only way you would know for sure if it worked is by testing it.
     
  28. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    hmm Maybe... I tried testing but cannot fully do it as it crashes Unity 2018.1 frequently after some tinkering. Imported the system so I can give it another go. Below are the Console errors I received and what I did to install the Menu. Will check it out again and provide some more info later.

     
  29. Jacky_Boy

    Jacky_Boy

    Joined:
    Dec 8, 2013
    Posts:
    93
    6 months of practice almost everyday. Prior to this I was just looking at youtube and editing other people's code and got tired of being clueless lol. I just became competent in Python after 6 months of studying and practicing as well. Once you become sick and tired of not knowing, hit it hard for 6 months or even less and you'll get there. I studied Biology and thought I needed to be a genius to become a programmer. I defeated that attitude when I realized my game needed things that I didn't know how to do. I couldn't afford to pay a programmer so I was forced to learn to do the fancy things myself. Check out Udemy.com they have cheap courses under $20, you'll learn all the necessary components to get decent AI. Look up the instructor Penny de Byl, that's who I learned most of my AI stuff from. Take care man and good luck. Let me know if you get other decent courses on there as well that I may not catch.
     
    Gregorik likes this.
  30. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    492
    Hey Rend! :)
    Don't comment the lines out, otherwise you will not be able to add new audio clips through the inspector.

    Just open the script, and replace "new AudioClip()" with "null" and you should be golden. :)

    The issue is, that in 2018, they removed AudioClip's default constructor, which is what Pit is trying to call with the "new AudioClip()" function call.
     
  31. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    663
    Thanks for sharing and saving others who run across this a lot of time!
     
  32. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,110
    I'd be interested in finding out if anyone has successfully got this working with Invectors Third Person Controller? Or part of the way, and we can all combine a solution. Same for any other asset.
     
  33. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    492
    This.... could take you a LONG while. It is not simply enough to learn to code to create AI. This is why their are AI specialist. You have to learn to program, as well as learn about AI in general.

    6 months will not be enough to learn to program a flexible, decent AI system from scratch, with no prior programming experience. Now, you could make a rudimentary system tied to one particular game your making, but I do not recommend that. If would be far better to make a flexible system that you could then use for any other project you might make. Then, there is the Editor Scripting you will likely have to learn, and that can cause some serious headaches, especially as you first pick it up... :confused:

    However, you might as well just use ICE or another AI asset then, as it would take more time to program something from scratch, than just using a solution that already does something very close to what you want, and just tinkering with it. :)

    Not only will this method be faster, but you will likely learn MORE about programming doing it this way, as you will likely be exposed to coding styles, and practices that you might otherwise not have known about. I learned a LOT through my work integrating assets, and digging through other's code. :)
     
    Last edited: Jun 1, 2018
  34. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    663
    This cannot be stressed enough! Im a digital artist and web dev of 20 years before I started with Unity about 4 years ago. I spun my wheels pouring through different training "manuals" on C# and not getting anywhere. However, as soon as I started acquiring big packages with lots of code for me to tinker with in Unity, I learned SO MUCH MORE. This doesn't work for everyone, but for me, I need answers given up front (code) and then to disassemble and reassemble it to understand it through working examples.

    The other great point you have made here that greenhorns should take to heart is - spend time making your game, not tools(when you can and it makes sense). Take advantage of the tools others have made so you can concentrate on your features and other areas of your game, leverage what others have done before you and extend as needed. You'll also learn a lot along the way.
     
  35. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    Oh I see. Alrighty, I will try that out. Thanks for the tip my friend! :)
     
  36. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    226
    Hi was wondering how does the dynamic vital signs work. Like I want the zombies hunger start at 0 then and when it is less than or = to the creature hunger and sees a dead body it goes into run then eat state. But while its in the eat state I want the hunger go slowly up to 100 and when it reaches 100 it leaves the food and goes back to doing what it originally was doing. But while its out of the eat state I want it gradually go down to 0 where he could see food again and repeats. Is this possible to do with dynamic vital signs or is that not how it works.
     
  37. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    226
    Hi doesn't Ice Creature Control work with mechanim animator controller layers.
     
  38. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,110
    I think the amount of issues you are having, it would be quicker to use another solution (visual programming) using behaviour trees, such as PlayMaker/GameFlow/Bolt etc.

    If you use Behavior Designer from Opsive, you can use their Third Person Controller, and UFPS / UFPS 2 (soon), and they all integrate together.
     
    Last edited: Jun 7, 2018
  39. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    Haven't gotten the time to truly test ICE Creature Control as other things got prioritized in my project. I was also thinking even if I discover a workaround on the current errors, I might discover more in the future and if the author does not seem to have time to post updates for his product, it will not bode well for a project that uses this tool. Thus, I just spent the few hours I have to find alternative solutions. I'm now taking a look at the free Behavior Bricks and next will check out Unity Machine Learning Agents. I might just go back to ICE Creature Control in the future if I see it still has potential.
     
  40. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    226
    I do have behaviour designer and playmaker but Ice is the only one I have a working AI. In Behaviour designer you still need to code only they don't tell you that unless your just using an none animated AI and not a lot of tutorials that is useful to me.

    All the questions I have asked have been simple questions and most I have worked out. Even getting Ice Creature Control to work on unity version 2018. UFPS works great with ICE but it is a pity Pit has abandoned this good asset. I did try to code and I know the very basics of it but I really need human terms not math terms. A lot of time i have trouble with where you actually fit code and a lot of tutorials won't explain what is actually happening and just gets you to copy there code. I have however learnt more by aquiring a lot of assets from the store and through working through these forums.

    I have also done a lot of things on a prototype game without even learning code and when I actually get an youtube account I will post video and will also make a note that the only code I did is for a UI on the ufps player.

    Sorry for my rant but the point is if I had learnt code and did the same zombie shooter, it would have taken me years and yet without code I got a sort of working AI in less than a month.
     
    julianr likes this.
  41. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,110
    Totally understand where you are coming from. I've had to learn what I need in terms of coding and modifying other assets to my needs for the game I have been working on for over 3-4 years. If I did them from scratch I would need a team of at least 5-10 people to make that happen - one person cannot do everything! What the asset developers have produced have been a major time saver - even ICE Creature Control is good, but like you say its a shame its no longer being supported or developed, but nothing is ever bug free and you just have to work it out (providing you have time) as often its counter productive - you could spend more time figuring it out and working out a solution than making your game, which was the whole reason why you purchased it in the first place (to save time). That time spent could have taught you many things to do with coding and you could have created your own and inherited that knowledge to further your development, and produced a finished product sooner, rather than later.

    Keep at it, I'm sure you'll figure everything out.
     
    Tethys likes this.
  42. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    492
    So, it took me a while, but after some digging, and tinkering, I got Love/Hate further integrated, by allowing ICE creatures to commit deeds! :D

    Commit Deeds via Interactors:
    Interactor Deeds.jpg
    These deeds target the subject of the interactor.

    Commit Deeds via Behaviours:
    Behaviour Deeds.jpg
    These deeds target the creature performing the Behavior (the owner).

    And, I also got them hooked up with ICE's Impulse settings:
    Deed Impulse Settings.jpg
    So that a Deed can be repeatedly commited. :)
     
    nirvanajie, Gregorik, Tethys and 4 others like this.
  43. sholden

    sholden

    Joined:
    Jun 29, 2017
    Posts:
    1
    The Game Institute has a course on how to build a Zombie Survival game and they describe how to do this exact thing. From what I remember, they have a hunger variable and when the zombie's hunger drops below a certain level, it drops and eats on any bodies it finds.
     
  44. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    226
    Yeah I do have that from udemy but I haven't actually tried it yet because I have to understand c# first. You see I do want it like they have but with extra things like having bad guys in the game as well as animals too. I have pulled off close to the game institute way with just using Ice Creature Control. But I still have to work out how when the zombie feeds to make the hunger level rise and when the hunger level at 100 the zombie goes back to doing what it was doing before feeding.
     
  45. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,607
    Reminder that unity learn section is good, and free, to learn code adapted to game
     
  46. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    8
    Hi,
    I am interested it buying this asset. However, I am just wondering are you alive?
    Cause lots of people complaining about support lately.
     
    Tethys likes this.
  47. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    386
    As mentioned, doing a 3D space game. I am using a floating origin script to overcome floating point inaccuracy and minimize screen jitter, as the universe is quite large. Going past 3-4000 units makes any worldspace UI go whacky. When the player gets 2000 units from 0,0,0 the script moves the universe that same amount, in essence keeping the player very close to 0,0,0.

    When the scene shifts, the ICE creatures, although parented to the same object, seem to jump forward or backward. Does anyone know of a method to make ICE not use the world coordinate system, and just happily move along smoothly when the parent game object moves? All of its target objects are also parented, so relative distance remains the same. I've tried all of the built-in movement options, Internal, Rigidbody, etc. (I have no NavMesh, it's space...)

    Mark
     
  48. Gregorik

    Gregorik

    Joined:
    Dec 11, 2014
    Posts:
    334
    Is it just me or ICE is now completely broken under Unity 2018.1.6? Without going into specifics, I can't get rid of the red errors without deleting the ICE folder. o_O
     
  49. TonanBora

    TonanBora

    Joined:
    Feb 4, 2013
    Posts:
    492
    What are the errors?
     
  50. Gregorik

    Gregorik

    Joined:
    Dec 11, 2014
    Posts:
    334
    I'll have to reinstall ICE for that, as I admit I rage-deleted it... :oops: But most C# based assets I have did release patches for 2018.1 which of course introduced fundamental changes to Unity. If Pit never updates for 2018.1, I suspect that could be the final coup de grace for the asset.
     
    Alex3333 and RendCycle like this.