Search Unity

[RELEASED] Ultimate Survival - The Complete Survival Template

Discussion in 'Assets and Asset Store' started by AngryPixelUnity, Nov 20, 2016.

Thread Status:
Not open for further replies.
  1. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    Hey :)

    * A few assets which will be integrated with Ultimate Survival in the future, but can be used now without problems:
    - For terrain generation, Gaia is one of the best: https://www.assetstore.unity3d.com/en/#!/content/42618
    - A cheap water solution is Aquas: https://www.assetstore.unity3d.com/en/#!/content/52103
    - A more expensive, but complete solution is PlayWay Water System: https://www.assetstore.unity3d.com/en/#!/content/47961
    - For weather effects, you have Unistorm: https://www.assetstore.unity3d.com/en/#!/content/2714

    * You can also use the water system from the Standard Assets, which comes with Unity.

    * Tutorials on creating a cave system, in Blender:


    * To add more blood when something's hit, go to the blood prefab (type "blood" in the Project's search bar) and increase the "Start Size".

    * We're working on new AI for v0.2, it'll be easier to use, and also smarter.

    Let me know if you need more detailed help, for most of the stuff you wanted help with, there are many assets which provide great functionality at a great price.
     
    Last edited: Apr 2, 2017
    TheSeawolf likes this.
  2. mopgoff

    mopgoff

    Joined:
    Apr 2, 2017
    Posts:
    7
    thanks, looking forward to the next update
     
  3. ShatterGlassGames

    ShatterGlassGames

    Joined:
    Jan 14, 2016
    Posts:
    135
    In regards the Weather effect system, tenkoku is a nice option to but is the Unistorm system easier to integrate?
     
  4. Old_Wolf

    Old_Wolf

    Joined:
    Apr 3, 2017
    Posts:
    38
    You have made a fantastic asset here Winterbyte, well worth the asking price. As suspected the Unity 5.6 update broke a lot of things. Nothing unusual there...seems like every other week we get to recode all our projects from the ground up. So subsequently, at present, about three quarters of the asset store is non functional. They used to at least TRY and provide backwards compatibility....now it's just 'deal with it'. Looking forward to 0.2 update, and new toys to play with. I have coded my own versions of some of this, and it's frustrating to get it to all work together seamlessly. I was delighted when I saw your asset, you have literally saved me hundreds of hours on my projects.
     
    AngryPixelUnity likes this.
  5. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    We haven't got to integrations yet, so I can't tell which is easier.
     
  6. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Tenkoku was a breeze, so was ToD. Unistorm has never been simple to work with just due to the split of JS/CS files that just makes for a messy source, but I haven't played with it in a couple years now so it may be different. I simply took their (Tenkoku/ToD) output values, made them into events (custom class that compares times so when they change the raise events), and have that event drive the time of US through the TimeOfDay script instead of letting it manage itself. I just removed the sun/moon/ambient objects from the time script, turned Update() into event driven, subscribed to the timechange event, and that seemed to do the trick. I will see about putting my changes up to show how I did it so it can be abstracted out for anyone else to control through their own time system.
     
    AngryPixelUnity likes this.
  7. Reiner

    Reiner

    Joined:
    Dec 2, 2012
    Posts:
    214
    Ready for Unity 5.6?

    Greetz Reiner
     
  8. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    Not yet, works with 5.5 only. We'll start converting 0.1 to Unity 5.6, will be available in a few days if no critical error arises.
    I will post info on that.
     
  9. ShatterGlassGames

    ShatterGlassGames

    Joined:
    Jan 14, 2016
    Posts:
    135
    If you have the time and can show how you did it will be great, I have tenkoku and I would love to use that as my day/night and weather system. I'm sure Winterbyte will eventually come up with a solution in one of the future upgrades but any help will be appreciated.
     
  10. Reiner

    Reiner

    Joined:
    Dec 2, 2012
    Posts:
    214
    oki thx :)
     
  11. rerwandi

    rerwandi

    Joined:
    Dec 8, 2014
    Posts:
    544
    @Winterbyte312 do you have a fix for Unity 5.6 ? The crafting list seems broken
     
  12. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
     
  13. csharpstudios

    csharpstudios

    Joined:
    Nov 21, 2016
    Posts:
    73
    I also noticed this, and I explored around and found it to finally work on unity 5.5.3
     
  14. Gabilech18

    Gabilech18

    Joined:
    Apr 3, 2017
    Posts:
    1
    Will 100% buy it if there is multiplayer pvp/coop, and is vehicle compatible, and if u can change 3d models?
     
  15. ShatterGlassGames

    ShatterGlassGames

    Joined:
    Jan 14, 2016
    Posts:
    135
    I don't know about Vehicle but multiplayer will eventually be included in the future.
     
  16. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    We'll let you know today if the conversion to Unity 5.6 can be done quickly, so we don't eat tons of time from v0.2's development. I'm gonna try today to convert 0.1 to Unity 5.6.

    Multiplayer is coming in v0.3, see the roadmap: https://trello.com/b/gmNow8UL/ultimate-survival
    Vehicles... we'll probably not going to add vehicles in this asset. But we want to split US in US : Wilderness and US : Post Apocalyptic, in the latter we'll add vehicles. We'll do our best to do so, hopefully we'll be able to follow the plan.
     
    stalkermustang likes this.
  17. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    hi,

    look nice.

    is it plan to add attributes and skills ?

    +++
     
  18. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    Hi, thanks. If you're talking about the player then yes, easy creation of attributes coming in v0.2. Skills...we might add them in v0.3.
     
  19. Dramamine0001

    Dramamine0001

    Joined:
    Mar 23, 2014
    Posts:
    84
    So, current US becomes Wilderness and then you'll create a Post Apoc upgrade/add-on/separate asset?

    I like this idea, but recommend focusing on current until it's more or less complete.
     
  20. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    That's the plan, to complete this one and then create another with similar codebase but different gameplay features and logic. But that's after 0.3 or 0.4 for the current US.
     
  21. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    both :) top down and third person
     
  22. ShatterGlassGames

    ShatterGlassGames

    Joined:
    Jan 14, 2016
    Posts:
    135
    Can't wait for v0.2. If only time will pass faster :(

    I've been breaking my head trying to get a weapon bench to work and and it's not easy since the recipe inspector doesn't seem to work properly with a 2nd Crafting windows (even if I create a 2nd Recipe Inspector just for the weapon bench). Hopefully Messy can figure it out since he has more knowledge than me.

    @Winterbyte312
    I know 0.2 is coming in about 1-2 months and perhaps a working workbench will be implemented but if you can share some light into this would be great. Just a clue at least LOL!
     
  23. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    Working bench? for what exactly? You mean like the Minecraft's crafting table?
     
  24. rerwandi

    rerwandi

    Joined:
    Dec 8, 2014
    Posts:
    544
    @Winterbyte312 How is the conversion ? I added a lot of stuff without noticing the crafting list is broken in Unity 5.6 :/
     
  25. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    I'm working on it at the moment. Stay tuned I might be able to send a script or info on how to fix it, so you don't have to wait for the asset store version to be submitted / accepted.
     
  26. rerwandi

    rerwandi

    Joined:
    Dec 8, 2014
    Posts:
    544
    Great because if not, i have to go back to my backup and redo all the things i did from sleepless night :D
     
  27. ShatterGlassGames

    ShatterGlassGames

    Joined:
    Jan 14, 2016
    Posts:
    135
    yes yes,

    I disabled the weapon and ammo from the standard crafting windows and created a whole new crafting window with only Weapon, and Ammo. But i would like for it to work when i click on an Anvil for example. Now i can get it to open when i click on the anvil and the recepie opens when i click on a weapon icon. But when i click on craft or any of the arrows on the item inspector, the 2nd recipe inspector windows I created just for the bench closes.
     
  28. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
  29. ShatterGlassGames

    ShatterGlassGames

    Joined:
    Jan 14, 2016
    Posts:
    135
    Ok so let me explain exactly what i did and maybe you can see when messed up.
    1. I created a whole new Crafting windows and a new Recipe Inspector (11-Weapon Crafting, 12-Weapon Recipe Inspector) - I figures that in order for the recipe inspector to work you will need a second one since it needs to be attached to the correct (Crafting List).
    2. I changed the state of the new Weapon Bench to Anvil so it will open only when you click on the Anvil (That way you get the Weapon Repair windows as well). and it works!!!!
    3. now comes the problem - When you click on any of the weapon or ammo icons the Recipe Inspector opens but when you click anywhere the recipe inspector closes. Messy and I believe it has something to do with the Animations but i can't figure out.
     
  30. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    Ah, should be simple. Go to In-Game GUI (the root). Observe the "Selection Keepers" list, drag in the rect that you want to keep the selection. In your case, the "Window" rect of the "Weapon Bench".
     
  31. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    Important!
    After trying Unity 5.6.0f3 with Ultimate Survival, I decided to not do the conversion, since there are are a few critical bugs that break the asset. We're waiting for the next versions to see if there will be an improvement.
     
  32. ShatterGlassGames

    ShatterGlassGames

    Joined:
    Jan 14, 2016
    Posts:
    135
    OHH YEAH! THAT WORKED!

    new issue :) the items when it's sent to queue it's only visible in the normal crafting window queue. How can i make it visible in the new bench queue?
     
  33. ShatterGlassGames

    ShatterGlassGames

    Joined:
    Jan 14, 2016
    Posts:
    135
    I'm ok with that. :)
     
  34. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    Check InventoryController's CraftItem attempt. See all the referenced stuff. I'm vague atm but dive in the code a bit more and ask more questions if you need help.
     
  35. ShatterGlassGames

    ShatterGlassGames

    Joined:
    Jan 14, 2016
    Posts:
    135
    I tracked it down to the "Crafting Queue" script inside the bench windows but it only accepts the Inventory container. This is because the 2-Inventory has a script called "Item Container" and that script is for the Inventory only i believe.
     
  36. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    Ah, no, the Item Container script is common. Any collection of slots should be inside an item container. The hotbar has one as well for example, or the loot window.
     
  37. ShatterGlassGames

    ShatterGlassGames

    Joined:
    Jan 14, 2016
    Posts:
    135
    So it shouldn't be the Crafting Queue script? I though it was that since it's looking at the Item Container script inside the Inventory root
     
  38. rerwandi

    rerwandi

    Joined:
    Dec 8, 2014
    Posts:
    544
     
  39. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    ho good point.

    I guess, in your mind, the skills depend of attributes too ?

    - for example:

    attributes: strength, endurance, coordination, intelligence

    run = (coordination + endurance) / 2

    i can raise point of run, directly, and if i choose to distribute points in coordination & endurance, the run will raise too.

    what do u think about it ?

    ++
     
  40. Dramamine0001

    Dramamine0001

    Joined:
    Mar 23, 2014
    Posts:
    84
    You gotta be an AC player
     
    tequyla likes this.
  41. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Here is my updated class for connecting to Tenkoku.
    Code (CSharp):
    1.  
    2. using UnityEngine;
    3.  
    4. namespace SaltySeaDogs
    5. {
    6.     public enum TimeOfDay
    7.     {
    8.         Day,
    9.         Night
    10.     }
    11.  
    12.     public class TimeHandler : MonoBehaviour
    13.     {
    14.         private Tenkoku.Core.TenkokuModule tenkokuModule;
    15.         private Tenkoku.Core.TenkokuCalculations tenkokuCalculations;
    16.         private float currentTime;
    17.         private int currentHour;
    18.         private int currentDay = -1;
    19.         public TimeOfDay currentTimeOfDay;
    20.  
    21.         //sun calculations to find day state change
    22.         public float sunAzimuth = 0f;
    23.         public float sunAltitude = 0f;
    24.         private float sunriseTime = 0f;
    25.         private float sunsetTime = 0f;
    26.  
    27.         private void Awake()
    28.         {
    29.             tenkokuModule = GameObject.FindObjectOfType<Tenkoku.Core.TenkokuModule>();
    30.             if (tenkokuModule != null)
    31.             {
    32.                 tenkokuCalculations = FindObjectOfType<Tenkoku.Core.TenkokuCalculations>();
    33.                 UltimateSurvival.TimeOfDay.Instance.ExternalTimeKeeping = true;
    34.             }    
    35.         }
    36.  
    37.         // Update is called once per frame
    38.         void Update()
    39.         {
    40.             if (tenkokuModule != null)
    41.             {
    42.                 //day changed
    43.                 if (tenkokuModule.currentDay != currentDay)
    44.                 {
    45.                     currentDay = tenkokuModule.currentDay;
    46.                     CalculateSunTime();
    47.                 }
    48.  
    49.                 //look for a time of day change
    50.                 if (currentTimeOfDay == TimeOfDay.Day)
    51.                 {
    52.                     //see if the time is outside of the daylight hours
    53.                     if (currentTime < sunriseTime || currentTime > sunsetTime)
    54.                     {
    55.                         currentTimeOfDay = TimeOfDay.Night;
    56.                         UltimateSurvival.TimeOfDay.Instance.State.Set(UltimateSurvival.ET.TimeOfDay.Night);
    57.                     }
    58.                 }
    59.  
    60.                 if (currentTimeOfDay == TimeOfDay.Night)
    61.                 {
    62.                     //see if the time is outside of the daylight hours
    63.                     if (currentTime > sunriseTime && currentTime < sunsetTime)
    64.                     {
    65.                         currentTimeOfDay = TimeOfDay.Day;
    66.                         UltimateSurvival.TimeOfDay.Instance.State.Set(UltimateSurvival.ET.TimeOfDay.Day);
    67.                     }
    68.                 }
    69.  
    70.                 UltimateSurvival.TimeOfDay.Instance.NormalizedTime = currentTime;
    71.             }
    72.         }
    73.  
    74.         private void LateUpdate()
    75.         {
    76.             if (tenkokuCalculations != null)
    77.             {
    78.                 currentTime = tenkokuCalculations.UT + 1.0f;
    79.             }
    80.         }
    81.  
    82.         void CalculateSunTime()
    83.         {
    84.  
    85.             if (tenkokuCalculations != null)
    86.             {
    87.                 tenkokuCalculations.CalculateNode(2); //sun
    88.                 sunAzimuth = tenkokuCalculations.azimuth;
    89.                 sunAltitude = tenkokuCalculations.altitude;
    90.  
    91.                 //Calculate Sunrise time
    92.                 for (float xR = 12f; xR > 0f; xR = xR - 0.01f)
    93.                 {
    94.                     tenkokuCalculations.UT = xR;
    95.                     tenkokuCalculations.CalculateNode(2); //sun
    96.                     if (tenkokuCalculations.altitude <= 0f && tenkokuCalculations.azimuth < 200f)
    97.                     {
    98.                         sunriseTime = xR + 1.0f;
    99.                         break;
    100.                     }
    101.                 }
    102.  
    103.                 //Calculate Sunset time
    104.                 for (float xS = 12f; xS < 24f; xS = xS + 0.01f)
    105.                 {
    106.                     tenkokuCalculations.UT = xS;
    107.                     tenkokuCalculations.CalculateNode(2); //sun
    108.                     if (tenkokuCalculations.altitude <= 0f && tenkokuCalculations.azimuth > 200f)
    109.                     {
    110.                         sunsetTime = xS + 1.0f;
    111.                         break;
    112.                     }
    113.                 }
    114.             }
    115.  
    116.         }
    117.     }
    118. }
    119.  
    120.  
    Here is the stripped US ToD script. Just place this in the scene in addition to the TimeHandler and that is it. Be sure to remove the Sun/Moon from the prefab if you are still using that.
    Code (CSharp):
    1.  
    2. using System.Collections;
    3. using UnityEngine;
    4.  
    5. namespace UltimateSurvival
    6. {
    7.     /// <summary>
    8.     ///
    9.     /// </summary>
    10.     public class TimeOfDay : MonoSingleton<TimeOfDay>
    11.     {
    12.         public bool ExternalTimeKeeping = false;
    13.  
    14.         /// <summary></summary>
    15.         public Value<ET.TimeOfDay> State = new Value<ET.TimeOfDay>(ET.TimeOfDay.Day);
    16.  
    17.         /// <summary></summary>
    18.         public float NormalizedTime
    19.         {
    20.             get
    21.             {
    22.                 return m_NormalizedTime;
    23.             }
    24.             set
    25.             {
    26.                 m_NormalizedTime = float.IsNaN(Mathf.Repeat(value, 1f)) ? 0f : Mathf.Repeat(value, 1f);
    27.                 m_CurrentHour = (int)(m_NormalizedTime * 24f);
    28.             }
    29.         }
    30.  
    31.         public int CurrentHour
    32.         {
    33.             get { return m_CurrentHour; }
    34.         }
    35.  
    36.         private int m_CurrentHour = 6;
    37.      
    38.         private float m_NormalizedTime;
    39.  
    40.     }
    41. }
    42.  
    43.  
    Just drop the component onto the scene. It can be anywhere and it will pick up the Tenkoku module and the US singleton.
     
    Last edited: Apr 4, 2017
    siblingrivalry likes this.
  42. ShatterGlassGames

    ShatterGlassGames

    Joined:
    Jan 14, 2016
    Posts:
    135
    So I should replace the TimeOfDay script with this new script?
     
  43. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    In it's current form, yes. I still have to find a couple of spots where it is changing the normalized time outside of the timeofday script and move those into ToD so that all time functions are in one place. I will post an update when I get it smoothed out.
     
  44. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Did a quick mashup game using Tenkoku, Playway, Beautify, K4 Pirates Island, and Ultimate Survival. Took around 5 hours to get everything hooked up, modify a few scripts to get the time to be the same for the environment, and do a few tweaks to the terrain and object. Really a decent little project. Might actually turn it into a quick game one of these weekends.






     
    Kronnect likes this.
  45. gvenez

    gvenez

    Joined:
    Feb 19, 2013
    Posts:
    9
    Oh no! We started our game dev with Unity 5.6 using gaia and this sytem. You think version 0.2 will work with Unity 5.6?
     
  46. ShatterGlassGames

    ShatterGlassGames

    Joined:
    Jan 14, 2016
    Posts:
    135
    Your scripts worked like a charm. Just 1 thing I noticed but maybe it's something i'm doing wrong.

    Where you able to get the sleeping bag to work with Tenkoku? I mean isn't the time supposed to pass faster while sleeping?
     
    Last edited: Apr 5, 2017
  47. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    The problem is that the sleeping system calls to change the current time instead of calling the timeofday to do the change. That is what I meant in the previous post about still fixing that last external call and then I will update the script again. You can probably just do a property change of the time and have it send back to tenkoku to change the time. Give me a day or so and I will have it all ironed out and abstracted a bit better.
     
  48. ShatterGlassGames

    ShatterGlassGames

    Joined:
    Jan 14, 2016
    Posts:
    135
    Thanks a lot man. I was trying to look for the Tenkocu "AdvanceTimeX" variable to see if i can do a call while sleeping and change it to something like x1000 until it hit 7am but the Tenkoku code is way to advance for me and i just couldn't find it.
     
  49. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    yes :)
     
  50. Old_Wolf

    Old_Wolf

    Joined:
    Apr 3, 2017
    Posts:
    38
    ShatterGlassGames likes this.
Thread Status:
Not open for further replies.