Search Unity

[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. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    ... please check also the demo scene ...
    https://forum.unity.com/threads/upd...-monsters-zombies.347147/page-63#post-3262428
     
    Ryuichi173 likes this.
  2. Gamarray

    Gamarray

    Joined:
    Apr 21, 2017
    Posts:
    4
    Hi,

    Is the Dynamic Visual Sensor Position working? I have set it to different objects but the visual range, and Field of View of my creature always seems to be the center of the creature itself.

    What I want to archive is that if my creature rotate its head, it can see its target, but that is not working

    I attach an image where, even the cat creature is directly looking at the target, the target appears to be outside its Field of view

    Thank you!
     

    Attached Files:

  3. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Ryuichi173 and icetec like this.
  4. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    228
    No this is wrong the asset is installed, I have only the invector and ice and done all the integration but it doesn't work and with the realistic fps prefab project just the impacts dont work but i can kill the AI so this post wasnt helpful
     
  5. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    @icetec
    I got ranged weapon working with RangedWeaponFireOneShot and projectile mode.

    But there is a bug RangedWeaponFireAutomatic doesn't work, when the game is running it becomes disabled parameter.
     
  6. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    876
    Hi Pit, do I need special access to get to these forum threads? Link says I do not have access even though i am registered. I will PM my invoice, let me know if this is ok or you need it sending somewhere else. Thanks.
     
  7. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    404
    @icetec Same result here. Tried registering, says my account exists. Log in, and get same access denied error.
    Mark
     
  8. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    342
    Wrote you, but you do not answer. Is the problem with the visibility of mobs solved in the new update? (ufps mp) (photon)
     
  9. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    286
    So does this work with UNET and uMMORPG now since it's 1.4?
     
  10. anunnaki2016

    anunnaki2016

    Joined:
    Jun 16, 2016
    Posts:
    92
    why my corpse dont work more if i update for 1.4? i try find problem, but in 1.3 is work perfect
     
  11. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,135
    Same for me. Right now I need to finish other quests first but I want to give ICE 1.4 a try soon :)
     
  12. froslie

    froslie

    Joined:
    Apr 20, 2015
    Posts:
    18
    Hello, I am seeking advice regarding A* [ AStar ] integration. Using ICE 1.4 I am able to integrate the adapters. With a reacast graph, it seems I can get an object moving with RichAI. The difficulty is that the test creature just walks in place... doesn't follow the path. Any suggestions/ resource links would be greatly appreciated!!

    I am also curious if someone could clarify the advantages to using A* over the NavMesh/ agent, as I've gotten this to work.

    Thank you
     
  13. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    Hi froslie,

    I'm an user of ICE.

    There are some advantage of using A* and of course there are concerns, too.
    Biggest advantage is speed. A* performance still better than Navmesh with dynamic recasting and obstacle avoidance.
    Second, ICE "had" sliding problem while using Navmesh, but it seems has been solved.
    Third, there are a lot of options compare than Navmesh.

    On the other hands, A* is not easier than Navmesh for non-programmer and newbies.
    And it seems that A* is not work great on some of mobile platforms.

    In conclusion, if you already have A* pro license, then you should be start learning how to use from reading here.
    But if you have no license and you don't feel any inconvenience to Navmesh, you may better to use Navmesh.

    EDIT:
    Oh, I've forgotten to tell you that A* have ability of multithreading. It meaning that pathfinding never cause of freezing mainthread.

    Best,

    Ryuichi,
     
    Last edited: Oct 31, 2017
    icetec and froslie like this.
  14. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    785
    I own A* and really appreciate its rout calculations. But I saw the procedural example of A* does not use recasting navmesh, and the method it uses is a bit slow.
    Need some advice about using A* with ICE for a procedural generated terrain(multiple terrain tiles).
     
  15. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Hi @icetec ,

    I have my own player controller and camera, after attaching the IceCreaturePlayer, when i have game over the camera is no more moving and fixed.
    I would like for a future update to have some option for IceCreaturePlayer to no more control any camera (and let me do that my own way).

    Thanks.
     
    Ryuichi173 likes this.
  16. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    Hi Harekelas

    In my understanding, a prebaked A*Navmesh is needed for using Recasting in most purpose.
    Recast meaning change baked-Navmesh at runtime when path had been bothered by event like doors closed or buildings broken.:)
    I think it might be better to use ICE original pathfinding for some of creatures if you are creating procedural open world style games.

    In other cases, you can try baking the whole Navmesh when building the procedural worlds on initialized, or made worlds with pre-baked Navmesh and update A*Navmesh using navmesh cutting.
    It is written in here "Graph Updates during Runtime" and here "ScanAsync".
    About Recasting and Navmesh Cutting is here.

    But I have no experience with largescale procedural generated terrain, so it might be better to ask A* developer about that...:(


    EDIT:
    "baking the whole Navmesh" is not meaning baking Unity Navmesh but baking A*'s Recast Navmesh by script calling.

    EDIT:
    I thought that "first time" is not suit words for what I wanted to say, so changed to "initialized".
    What I want to say is you might need "bake" process for using A*.
    As like Tethys mentioned below, ICE pathfinding is strong at open place.

    But for complex scene like in the dungeon, A* pathfinding system really shine, because it is much faster and efficient than Unity's default navmesh.

    Best,

    Ryuichi.
     
    Last edited: Oct 31, 2017
  17. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    669
    We procedurally generate our entire world at run time. Not using any pathfinding or navmesh and our AI agents navigate the world just fine without them. It's actually why we chose ICE because we can't/don't want to use and have the overhead of pathfinding or dynamic navmesh generation on top of real time world generation and ICE does not require it since it has its own way of navigating the environment. Set up avoidance layers and such and good to go.
     
  18. froslie

    froslie

    Joined:
    Apr 20, 2015
    Posts:
    18
    Thank you for the response, Ryuichi... it is very helpful. Have had luck with A* today, and continue to understand it more.

    I have a new question. Adding turn animations to the creature, so I have been shifting the behavior animation from direct to "advanced"; Following Tonan Bora's tutorial here. Strange results occur.... if I save the scene the enabled parameters disappear. I am able to save the settings and reload them, but only after switching animation controllers for the creature. This must be a bug? Unity also warns me "animator is not playing an animator controller".

    Finally, if I do not enable "movement"... the creature does not appear to move toward home.

    Again, thank you for your assistance
     
    Ryuichi173 likes this.
  19. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    Hi froslie,

    Thank you for your kind words and I'm happy to hear that my response was usueful.:)

    Hmmm, it is strange. I cannot figure out what occurring on you. I'm busy for my another works that broadcasting animation project for now, so I cannot dig in to your problem right now.:(

    I guess it might be problem depend on ICE side. As long as I know, ICE has completely rewritten a lot of ways compare to the 1.3.6, so there are might be bugs.
    It might be better send your scene to the Pit and ask about your problem.
    So sorry for inconvenience...:(

    Best,

    Ryucihi.
     
    froslie likes this.
  20. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    669
    We started to use fuse a couple of months ago, with a part time animator doing the work. The base male and his base clothes and textures are almost complete. Once they are, we will be able to export all the character and items individually without the (PC) poke through clothes issues that plagued us. We can morph characters with clothes inside of Fuse and export out in endless variations. Since we also need a variety of NPCs, this is going to be a time and money saver, and not just an effort to hit AAA quality. However, the character textures that came with fuse do look pretty good.

    I hope ICE 1.4 can do a good job driving our Fuse NPCs and our animals.
     
    Last edited: Oct 31, 2017
  21. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    785
    @Ryuichi173 and @Tethys
    Thank you very much for your advice!
    I found sometimes ICE's internal pathfinding can get the animal stuck in a loop if the destination is not reachable. It only picks destination depend on the slop of that point but not able to detect if that point is surrounded by unreachable slopes or obstacles.
    Also with obstacle avoiding, the animal can stuck, it especially happens when the animal is at a high speed and the obstacles are close to each other, a narrow space.
     
    froslie and Ryuichi173 like this.
  22. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    404
    I now have access, however, when I download the files, they are all .XML format. I changed the interaction file extensions to ".cc_interactions" and the individual behaviors to ".cc_behaviours" so that ICC would read them. I also tried setting them to ".cc_preset". None of these seem to work. I get:

    InvalidOperationException: <InteractorObject xmlns=''> was not expected
    System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot (System.Xml.Serialization.XmlTypeMapping rootMap)
    System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot ()
    System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.Serialization.XmlSerializationReader reader)
    Rethrow as InvalidOperationException: There is an error in XML document.
    System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.Serialization.XmlSerializationReader reader)
    System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.XmlReader xmlReader)
    System.Xml.Serialization.XmlSerializer.Deserialize (System.IO.Stream stream)
    ICE.World.EditorUtilities.ICEEditorIO.LoadObjectFromFile[InteractionObject] (ICE.Creatures.Objects.InteractionObject _object) (at Assets/ICE/ICEWorld/Scripts/Core/Editor/EditorUtilities/ice_editor_io.cs:55)
    ICE.Creatures.EditorUtilities.CreatureEditorIO.LoadInteractionFromFile (ICE.Creatures.Objects.InteractionObject _object) (at Assets/ICE/ICECreatureControl/Scripts/Core/Editor/Core/EditorUtilities/ice_creature_editor_io.cs:366)
    ICE.Creatures.EditorUtilities.InteractionEditor.Print (ICE.Creatures.ICECreatureControl _control) (at Assets/ICE/ICECreatureControl/Scripts/Core/Editor/Core/EditorUtilities/ice_creature_editor_interaction.cs:58)
    ICE.Creatures.ICECreatureControlEditor.OnInspectorGUI () (at Assets/ICE/ICECreatureControl/Scripts/Core/Editor/Components/ICECreatureControlEditor.cs:99)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1240)
    UnityEditor.DockArea:OnGUI()

    Is there a way to zip the files with the correct naming conventions and re-post rather than raw XML?
    Mark
     
  23. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    404
    @icetec I see, I have to create the behavior or interaction first, then load it. Can I suggest a few actual .cc_presets? The entirety of a character's settings? Example only. Not because I can't create a working character, rather to demonstrate how a character can be setup to take advantage of the advanced features of the asset and show how the settings inter-operate. Seemingly simple things still puzzle me somewhat, such as Priorities, Missions, Movement, and all of those Status options. And why a zombie seems to always believe that it is an "ICEAvoidFireCampfire" in Quick Selection.

    Having a few full presets would demonstrate to me how a setup for a grazing herbivore would differ from an aggressive wolf, an intelligent ranged/melee soldier, or a rather dumb melee only zombie.
     
  24. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hi everybody,
    here is the tutorial for UFPS integration. Basically, the handling is the same for all supported assets. But I also do special videos for Invector, RFPSP etc. and of course for the different environment integrations.



    ... and here the demo scene ...
    http://icecreaturecontrol.com/files/ICECreatureControlUFPSDemo.unitypackage

    Hope this will be helpful to you.

    Have a great day!

    Pit
     
    Hormic, julianr, zenGarden and 2 others like this.
  25. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hi Mark,
    here you can find the whole scene but also the requested presets for the used characters ...
    http://www.icecreaturecontrol.com/forum-news/?view=thread&id=102

    Hope this will be helpful to you but please feel free to contact me again whenever you have a problem with ICE and in urgent cases you can contact me also in skype, so I'll try to support you in realtime.

    Have a great day!

    Pit
     
    Teila likes this.
  26. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hello froslie, have you already tried the Mecanim Locomotion Tutorial in the tutorial folder? This tutorial shows the settings of the animation controller and the ICE animation behaviour options.

    Typical issues here are mostly based on mixing different behaviours with direct and advanced modes, e.g. if a state was triggered by a parameter in an advanced mode but the next behavior mode set another state by using the direct mode, the previous parameter will not reset by default and will trigger the associated state again. Therefore it's important to reset the parameter at the end of the triggering behavior, by using the parameter again with the END flag. By doing so a parameter will be set at the beginning of the behavior but also reset at its end.

    But this just as additional information. If Unity fires a warning because of "animator is not playing an animator controller", it seems that the used animator controller isn't valid or rather not initialized. In this case, each try to change parameters will result in the mentioned warning.

    Could you give me some more information about your settings and the used animator controller? Best would be if you could send me a prefab (just the prefab without models and animations - states and settings are enough).

    If you want, you can also contact me in Skype so I can check the issue and support you directly.

    Have a great day!

    Pit
     
    froslie likes this.
  27. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    669
    Greetings fellow devs and @icetec . Having an issue with spawning mobs in designated areas, wondering if I have found a BUG or just misunderstood functionality. If the Spawn item is not in the scene for a particular mob..... it just spawns the mob anyway and the mob sits there doing nothing, like its not activated. I think this kind of ignores the entire reason for picking a spawn point in the first place. :p For example, we want certain mobs to spawn on certain biomes, in caves, etc. So we have placed the designated spawners in the areas we want - in this case CAVES. Since I am not close to any caves, there are no cave spawnpoints.... yet the mob that is supposed to spawn on the cave spawnpoint just spawns on the terrain stuck in an idle animation lol. THIS IMO seems like incorrect functionality or a BUG. What should happen is the creature should not spawn until spawnpoints are recognized in the register, then the creature spawns on that spawn point and does what they are intended to do - rather than staring off into space confused because they spawned in an area that has no home or spawnpoints.
     
    Last edited: Nov 1, 2017
  28. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hi Harekelas, in fact, a creature can get stuck, especially in difficult terrain or even if multiple creatures block each other. To prevent such situations as far as possible, the Obstacle Avoidance, Overlap Prevention and Deadlock Prevention can optionally be activated. The first two options can be helpful to prevent getting stuck, but in cases where a creature gets stuck, the Deadlock Prevention will detect the stuck and can react in different ways, e.g. the creature can change its behavior or its move position or the creature can die.
     
    Tethys likes this.
  29. froslie

    froslie

    Joined:
    Apr 20, 2015
    Posts:
    18
    Thank you, Pit! I am traveling now for two days, but will contact as soon as I am settled again. I have been working ICE for the past few months and am pleased with the recent 1.4 update.... appreciate your willingness to support directly.
    cheers, Froslie
     
    icetec likes this.
  30. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Hello Tethys, if a spawn point is not available, the CreatureRegister simply uses the transform position of the given reference creature as origin position and if a spawned creature does not have a target, it does not know what to do, switches to its IDLE behavior and will waiting for a valid target. So it seems you get your mentioned situation because you are using the same non-existent GameObject as spawn-point but also as Home Location for your creature.

    That means the behavior of the creature is correct because a creature always needs at least one valid target and if this isn't given the creature will switch to its defined idle behavior. What else should the creature do without valid instructions?

    With regard to the spawning without a valid spawn point, it may be in fact helpful to pause the spawning process in cases the defined spawn point is not valid. I'll go to change it so a spawn point must be active in the hierarchy, otherwise the spawning process will be interrupted - okay?

    Have a great day!

    Pit
     
    Tethys likes this.
  31. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    669
    Hello Pit. I get why they don't do anything when the home isn't present and is expected - I was just pointing out that the result looks not correct due to the spawning when there isn't a spawn point, resulting in a domino effect that looks like a bugged out situation to the developer (IMO - to keep a mob confined to an area we set the spawnpoint and home as the same item). Thanks for being open to changing how spawning works on spawnpoints - this will actually make sense now once the change is in place and work as intended. I have added the script to the spawnpoints so the register will be aware of when they enter the scene.
     
    icetec likes this.
  32. Winseral

    Winseral

    Joined:
    Jul 9, 2017
    Posts:
    11
    Hi Pitt,
    Could you do a demo of how to use ICE Creature to randomly change shopkeepers reaction to the player, I am mostly interested in the advanced behaviour and how to you can use these stats as hooks to other actions. IE - if the Shopkeeper is tired or hungry or angry, he may ignore or may increase the price of equipment for the player.

    Key demo requirement -
    Click on Human ICE Creature, get the debug log of advanced behaviour outputs, Hungry, Thirsty, Angry, Tired. - show the script where these stats are stored.

    I enjoy the is asset very much and will continue to use it in any games I develop.

    Thank you
     
  33. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    669
    I have another question folks. :p Been putting the ICE system through the ringer as I am trying to get it into one of our live Steam projects. Anywho - found a little quirky deal, wondering if there is a setting to change. So I have set my mob to have 30 health(durability). 30, 30, 30 across the board. I have a weapon that does 10 damage. I send out a debug to tell me every time I hit how much damage I do. I have confirmed, 10 damage everytime. When I do 30 damage, however, the MOB does not die - confirmation of the attributes show me he has Health of 0.001 %, so they don't die when taking 30 points of damage, despite the fact that they only have 30 points of health. I have a health bar that displays the health points, so it gets confusing as it looks like the mob is dead, should be dead, but requires one last hit to take down.

    Is there some setting somewhere that is regenerating or somehow making it so 30 points of damage to 30 points of health would allow the mob to retain 0.001% life? I tried to set the health to 29.9 but cant set a float it rounds it.
     
  34. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    785
    Thank you for the reply!
    I'll try these in v1.4 when I got time :)
    But in the previous version (1.3.7) the deadlock seems only work fine with the "Dead" option, I've tried "Update" and it doesn't seem to change anything when the creature is stuck. Don't know if there are some improvements in the new version.
    Or maybe I can set a "Flying" behavior for land animals for the "Behavior" option.
     
  35. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    342
    ?????????
     
  36. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    669
    I'm not sure about UFPS but I do know the Photon stuff got fixed because I am using it right now successfully - though I have yet to test the build. ;)
     
    Alex3333 and Ryuichi173 like this.
  37. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    Hi Pit and guys,

    I just wondering if there are option that managing AI system like "Assassin's Creed Unity"'s "bulk system".
    Perhaps I can imitate the managing AIs system like that if I edit ICE carefully, but there are limited information about it even if I read the manual.
    To managing a lot of AIs, I think managing AI's LOD and managing AI by units of herds is must to do for reducing CPU cost.

    For doing that, I want to omit or gradually reduce part of coroutines update frequency according by distance from player.
    Is ICE has options for enabling that?

    Best,
    Ryuichi
     
    Last edited: Nov 3, 2017
  38. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,114
    You could try cloth physics, to prevent clothing issues with underlying mesh causing issues, or you could use Moint Points asset.

    How are you finding fuse? I've used them for a long while. Its a shame that Mixamo sold out to Adobe as they seem to not want to support game development or reduce its functionality. I always found that the bones in the hands on Mixamo characters do not animate correctly.
     
  39. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,114
    Do you have a rule/condition to check when Health < 1, then go to the Death behaviour?
     
    Tethys likes this.
  40. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    669
    I could write a book on this, but thanks for your comments and here are my thoughts. Yes, we tried cloth and we own Ooti's Mount Points. But for our player character, that can switch weapons and individual articles of clothes, the way we like is make clothes modeled carefully for the character and then use Inventory Pro to attach the clothes in game. We broke our character into parts, and can remove body tries under the clothes, if we must. But the key for us was taking the fuse character and very carefully creating clothes, a band of rectangles at a time, around the character. The clothes and character are in fuse, but can be exported separately.

    While waiting for the base clothes, I have the fuse character in a scene controlled by Invector TPC using the Invector animatons and it looks good so far. I will take a closer look at the hands as we go. Once we have the fuse character and clothes working with Inv Pro and Invector, we will make variations of our base characters and clothes in fuse, saving time, and pop them out as NPCs. That's when ICE enters the picture to drive the NPCs and other creatures. The NPCs will only have one set of clothes and underlying body mesh removed to prevent any poke throughs. Fuse solves many problems and will save a lot of time. We are new wifh Fuse,but so far so good.
     
    julianr likes this.
  41. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Why not manage each group of creatures by it's Home position, you could move Home position for force unpooling ( so deactivate creatures ).

    If you use pooling creatures are deactivated or re activated depending on parameters, you could move manually some creatures out of range to de activate them auto with pooling, why do you need top do it yourself and bother about co routines ?

    Anyway , AC game population system is beyond Ice Creature plugin , and i am not sure the plugin is the right too for such system.
    You can try it indeed, or perhaps you'll need to write your own code using some existing pooling plugin.

    There is also some dedicade plugins
    https://www.assetstore.unity3d.com/en/#!/content/71314
    More expensive and not fure it deos better lol
    https://www.assetstore.unity3d.com/en/#!/content/59820
     
    Last edited: Nov 4, 2017
    Ryuichi173 likes this.
  42. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    669
    There isnt any sort of global conditions though correct? I mean, great idea... the only way to implement would be to add a third act for each mobs interactors that just checks health during combat correct? If it was a third act, for example we have Run(target is in visual range), Attack(target is in attack range). So now it would be Run, Attack, Dead? Just talking out loud - I guess maybe in the 2nd act have a health check to stop them from attacking when health under 1, then go to third act that is set for Behavior Dead. I can see some potential problems with this - Ill put it through the ring and let you guys know the results in case any one else needs a similar solution. I would rather just know why 30 points of damage to 30 points of health to a mob doesn't = 0% health instead of 0.01%. =)
     
  43. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    876
    I would just put death on its own behaviour, with advanced rule if health <1 the it's true, with 100 for priority.
     
    Last edited: Nov 3, 2017
  44. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    669
    Every ICE entity already come with a Death behavior that does just that. You also cannot put an Advanced Rule on a behavior. Again, the issue isn't that an mob cannot die, the issue is that a mob with 30 points of health, when taking 30 points of damage, still has 0.01 % health. Hitting again kills it and death plays fine.
     
  45. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,114
    Try adding a Creature Message .... Command with Health = 0 (on the death behaviour) see if that does it. Something must be upping that health, do you have anything that restores health of the creature over time?
     
  46. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,114
    I went for SECTR Stream in the end, even though I have both (World Streamer + SECTR). SECTR fitted my needs quickly as it enabled me to still see the objects in my scenes, even after export and also at run-time in the editor. World Streamer looked a bit more complicated and it appeared that you needed to add everything into one scene/gameobject (correct me if I am wrong) - but didn't have much time to go into it as SECTR Stream (CORE) had me up and running within an hour of testing. Then maybe a day or two to apply it to the development game - best test it out on a temporary project first.

    Tip: Just be careful if you create a loader script to load up each of the scenes into one big open world (to prevent any memory issues) is that if you load up the exported SECTR scene on the build the objects will be there instantly and you will wonder why its not streaming in. Include the scene in the build, but make sure you remove it from any loader (or scene loader script).

    My procedure was to have a region loader (still may test others) on the player - this enabled me to load up areas in a radius that the player was in, in addition to this you could use SECTR VIS so that it only shows what is in the camera view. However I've yet to see if I can make some custom changes to VIS so that I can either disable the ICE Creature when out of view to conserve processing/fps power, or to remove them and respawn them again with a random offset so they are not in the same location when you return.

    I tested a few objects (that we're on the heavier side) streamed in and out of the game world it soon increased my FPS from 14 in some areas to over 50 fps, and with greater optimization I could probably get this up to 60-80 fps on a mid-range card.

    One of the features that I've yet to test is the Chunk Proxy - which enables you to create a really low poly version of a town and place it there for great distance, so you don't have an empty scene when you go out of range and look back. Alternative is to create LODs on buildings and the last one have a box shape with some detail and then cull it when its way beyond the visible eye.

    Tips for SECTR Stream setup, for multiple scenes is to do the following;

    Work on a development environment;

    1) Add the SECTR Stream scripts to the gameObjects you want to export
    2) Add a Loader to the Player
    3) Save your project, make a backup.

    Work on a Stream export, but only temporarily;

    4) Make a 2nd copy of your game and then work on this copy to export your gameObjects with SECTR Stream - this will create a scene with all of your exported objects so they can be imported into the game.
    5) Make sure your scenes are added to the Build settings.
    6) Create a Build on your Stream Export.
    7) Test

    Once you are done with your Stream export environment then you can delete it as you'll be working off your development environment for any changes - this way you will know its always up to date and you don't need to import the gameObjects each time you want to see them in the editor to make changes to them, or access the exported scene to make changes.
     
    Ryuichi173 likes this.
  47. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    SECTR VIS is not as good as Unity occlusion baking, and it works only for particular and simple scenes.
    I am not so sure about the whole SECTR and performance solution lol

    Many stuff like LOD grouping and mesh representation as you said is something we can do.


    Or make some world octree system loading meshes as you change zone using Unity additive scenes loading for example; like it is made in some Unity mmos games.

    Anyway, perhaps SECTR will do good for your game, i would be interested about performance results.
     
    Last edited: Nov 4, 2017
    julianr and Ryuichi173 like this.
  48. Ryuichi173

    Ryuichi173

    Joined:
    Apr 12, 2015
    Posts:
    141
    Hi zenGarden
    Thank you for reply and advises!

    I think your idea is one of the good answer for increase performance.
    But I don't want creatures to be deactivated but want to add interval time of Reaction and Perception process when it is needed.
    AC Unity's population system has similar feature like I mentioned above.

    I'll try to find another way that don't editing coroutine.
    Perhaps, editing Reaction and Perception time in runtime is more clever way compare than editing coroutine I think.

    Best,
    Ryuichi.
     
  49. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Ask that to @icetec , i think performance increase by adjusting the rate of perception and reaction co routines would befenit anyone using the plugin :)

    Why not several advanced adjustable values ?
    - near range : hight values perception and reaction
    - mid range : med values
    - far range : lowest values

    By default the values would be the default ones, until the users decide to tweak values.

    I use such task systems already, for example a character AI will need 8 raycast, instead of launching all at the same frame, for performance reason, the task is divided per frame numbers, like one raycast each 5 frames until all 8 raycasts are performed.
    It's very usefull whern you have many characters AI doing advanced environment and player detection , while keeping good performance.

    Anyway, your idea is good for the plugin , but i don't know how much work it involves and if it is possible , after 1.4 has been released i don't think Pit will want to screw it all lol
     
    lawsochi and Ryuichi173 like this.
  50. lawsochi

    lawsochi

    Joined:
    Oct 24, 2016
    Posts:
    107
    the fastest code, this is the code that is not executed .. :) it would be fine not to perform all the long-range behavior check every frame. let's all ask Pit to consider this possibility.
     
    wood333 likes this.
unityunity