Search Unity

  1. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  2. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  3. Unity 2017.1 is now released.
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  6. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

[RELEASED - 0.1] Ultimate Survival - The Complete Survival Template

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

  1. thenamesace

    thenamesace

    Joined:
    Jan 25, 2014
    Posts:
    98
    Ok here is a quick one with animation bored today :p:p

    first duplicate the bone weapon call it "forage"

    next add it to the item manager ( just duplicate the bone club) call it forage

    disable the mesh on the bone club (we only want the hand)

    Put the forage script on the modal not the player

    turn the animator off

    add an animation controller (legacy)

    go to models/weapons/first person - go to the bone club switch animation type to legacy

    put the hit animation into our animation controller

    finally drag the animation controller into our forage script

    now unless I forgot something you should punch the ground when pressing the E key :)

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UltimateSurvival;
    5. using UltimateSurvival.InputSystem;
    6. using UltimateSurvival.GUISystem;
    7. public class Forage : PlayerBehaviour
    8.  
    9.  
    10. {
    11.         public string[] forageLoot;
    12.    
    13.         private InputManager m_Input;
    14.    
    15.         private bool cooldown;
    16.         public float cooldownTime = 72.0f; //Cooldown of 72 seconds, change this value as needed here or in Inspector
    17.  
    18.         public AudioClip forage; //put you forage sound here
    19.  
    20.         AudioSource audioSource;
    21.  
    22.     public Animation animator;// your animation
    23.  
    24.  
    25.  
    26.  
    27.  
    28.         public void Awake()
    29.         {
    30.                 if (GameController.InputManager)
    31.                         m_Input = GameController.InputManager;
    32.                 else
    33.                         enabled = false;
    34.         audioSource = GetComponent<AudioSource>();
    35.  
    36.     }
    37.  
    38.  
    39.         // Update is called once per frame
    40.         void Update () {
    41.                 if (InventoryController.Instance.IsClosed && Player.ViewLocked.Is(false))
    42.                     {
    43.                         // Forage only if player is crouching
    44.             if (Player.Crouch.Active) {
    45.                 //Add Forage in the Input Manager
    46.  
    47.                 if (m_Input.GetButtonDown ("Forage"))
    48.                    
    49.                
    50.                                     {
    51.                                         if (!cooldown)
    52.                                             {
    53.                                                 int rand = Random.Range(1, 101);
    54.                        
    55.                                                 StartCoroutine(Delay());
    56.                                                //50% chance to find something, can be changed as needed
    57.  
    58.                                                   audioSource.PlayOneShot (forage, 0.7F); //play your forage sound
    59.  
    60.                                                   gameObject.GetComponent<Animation> ().Play ("Hit",PlayMode.StopAll); // plays your animation when you press E
    61.  
    62.                        
    63.  
    64.                                                 if (rand < 51)
    65.                                                     {
    66.                                                         int added = 0;
    67.                                                         string myLoot;
    68.                                                         myLoot = forageLoot.RandomItem(); //loot an item from the array in inspector.
    69.                                                      
    70.                                                        //Adds the foraged item to the inventory
    71.                                                         InventoryController.Instance.AddItemToCollection(myLoot, 1, "Inventory", out added);
    72.                            
    73.                                                         //Feedback Message
    74.                                                         MessageDisplayer.Instance.PushMessage(string.Format("Gathered <color={0}>{1}</color> x {2}", "yellow", myLoot, 1), Color.grey);
    75.                                                 } else if (rand > 50)
    76.                                                     {
    77.                                                         MessageDisplayer.Instance.PushMessage("Nothing here!", Color.yellow); //Message if nothing found
    78.                                                     }
    79.                                         } else if (cooldown)
    80.                                             {
    81.                                                 MessageDisplayer.Instance.PushMessage("You can't do that yet!", Color.red); //Message if cooldown
    82.                                             }
    83.                                     }
    84.                             }
    85.                     }
    86.             }
    87.    
    88.         IEnumerator Delay()
    89.         {
    90.                 cooldown = true;
    91.        
    92.                 yield return new WaitForSeconds(cooldownTime);
    93.        
    94.                 cooldown = false;
    95.             }
    96. }
    97. public static class ArrayExtensions
    98. {
    99.         // This is an extension method. RandomItem() will now exist on all arrays.
    100.         public static T RandomItem<T>(this T[] array)
    101.         {
    102.                 return array[Random.Range(0, array.Length)];
    103.             }
    104. }
    105.  
     
    erichey, Shawn67, VladimirRad and 2 others like this.
  2. Robson-FrostGear

    Robson-FrostGear

    Joined:
    Jan 12, 2013
    Posts:
    89
    [QUOTE = "Hlo_man, post: 3177362, member: 855052"] quando estamos 0.2 saindo e não podemos perder mais uma versão beta para que possamos começar a trabalhar nela? [/ QUOTE]

    Thank you dude, very good.
     
  3. TheMessyCoder

    TheMessyCoder

    Joined:
    Feb 13, 2017
    Posts:
    190
    I was playing to get the horse pack with US also, but stopped to wait for 0.2 in case there were too many controller changes.

    I will be doing a video of the horse pack in a few weeks and maybe run a give away also :)
     
    jesseganey, Shawn67 and spotdot2 like this.
  4. SpinTheDaddy

    SpinTheDaddy

    Joined:
    Aug 9, 2016
    Posts:
    13
    You guys are working on 0.3 while 0.2 isn't even out yet....? wtf
     
  5. Shawn67

    Shawn67

    Joined:
    Jan 2, 2014
    Posts:
    1,836
    Uhm.. Maybe the artist doesn't code. If that is the case and art for 0.2 is done, why not go ahead and start the 0.3 art?
     
  6. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    184
    Yep, like Shawn said, that's the artist and the artist works on artistry things not programming things.
     
  7. Winterbyte312

    Winterbyte312

    Joined:
    Oct 25, 2016
    Posts:
    726
    My brother (the one that's doing the models and textures) finished his work on 0.2 a while ago, he's starting on 0.3's art so I can move through 0.3 faster when the time comes.
     
  8. reocwolf

    reocwolf

    Joined:
    Aug 1, 2013
    Posts:
    167
    Hey @Winterbyte312 I was thinking what about making the survival system a little bit more complicated? Instead of treating cold like most games that take away bit by bit some of your health, make an underlying sickness attribute instead that would be affected by not seeking shelter and poisons.

    This way the player has to care a little bit more about strategically building/seeking shelter and foods that is not poisonous. Because once you enter the sick mode, the character would be too sick to be controlled easily. Maybe some "dizzy" effects and if you do too much force you might even black out. He would also be loosing health, so if the player doesn't have a health kit with medicine or medicinal herb, perhaps he can die trying to find some while sick.

    Also an underlying nutritional system would be great. That way we can give nutritional values to food. Like how much protein is in an item, and therefore how much strength and stamina the character will gain etc.

    I feel like we need a little bit more survival than FPS in this kit. Otherwise what I see is that this will become a common FPS with some survival attributes in the background.
     
  9. arie1994

    arie1994

    Joined:
    Jun 30, 2016
    Posts:
    28
    Sounds too game specific, but the general idea is in the right direction- we need rpg like elements-
    like stats(strength,agility,intelligence) so equipment can require stats or change them.
    Crafting recipes that need to be unlocked or require stats.
    Status effects (buff, debuff) like sick,wet,bleeding,well feed,rested, warm.
     
  10. Winterbyte312

    Winterbyte312

    Joined:
    Oct 25, 2016
    Posts:
    726
    Exactly what I'm thinking.
     
  11. reocwolf

    reocwolf

    Joined:
    Aug 1, 2013
    Posts:
    167
    Exactly. I was trying to give an example.
     
    Winterbyte312 likes this.
  12. VladimirGameStudio

    VladimirGameStudio

    Joined:
    Jul 31, 2016
    Posts:
    22
    I think that at the speed they are doing the active and the support of the users who understand programming and the contribution they can give according to their knowledge, I think that not only a version 0.4 can do, but this asset will give Much more than that version, this asset is seen with a lot of potential and is not an asset of those who are out there who have removed the paste and have abandoned the project. The programmers and designers of this asset are very attentive to the users day after day and working hard, without more, my recommendation is very good. And to ask even though it is very difficult to implement something serious,
    1) Trading system,
    2) Construction system that is not so automatic type (life is feudal) in which you slowly have to load the materials,
    3) Skill system Construction, farming, prospecting, carpentry, etc.
    4) System of clans,
    5) System so that the doors can only be opened by the person who owns the house or the clan. Etc, I already have the letter of Santa Claus that brings me this Christmas but surely some fall XD.
     
  13. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    184
    Yep, exactly what I am going for :) I just hope that US doesn't ultimately cater to the realistic guns/vehicles survival system and I can still use this for my Medieval Fantasy RPG. Seeing that vehicle was neat and all but ultimately I'll eventually remove it myself because it's extra code my project won't use.
     
    erichey and Shawn67 like this.
  14. Shawn67

    Shawn67

    Joined:
    Jan 2, 2014
    Posts:
    1,836
    Ditto.. I really wish a lot of the systems were added as add-on packs that we purchase separate with this pack providing the core survival type aspects. That way we get the survival pack and then can add the things we need without having a system bogged down with a bunch of stuff we don't use. Don't get me wrong, loving all the stuff that is being done by the team, there are just some projects I have in mind for it that I wish when I got to purchase US for that project, I could pick and choose which systems I get and not even have the others installed.

    Maybe at the very least, have the project structured in a way that if we don't want modern vehicles, we can uncheck a folder during import that contains models and scripts related so that it isn't imported. Same with other systems/models that make sense to be an optional module.
     
    reocwolf and TheMessyCoder like this.
  15. VladimirGameStudio

    VladimirGameStudio

    Joined:
    Jul 31, 2016
    Posts:
    22
    Of course, that this is the car in the active does not matter since you can disable it without removing code, maybe someday you'll use that car if you think to do another genre of game, I in my case will also be medieval, but the only thing that the I'll turn it off, but one day if I do another genre, maybe I'll get it. But my advice is that if this asset is only specified in a genre it will not have the same sales as if it specifies a little bit in several genres so the asset is a bit standard so that more people can serve it as a little medieval. fantasy. Survival, etc.
     
  16. TheMessyCoder

    TheMessyCoder

    Joined:
    Feb 13, 2017
    Posts:
    190
    +1

    I have been pushing for the concept of addon packs since day 1. That way people can get addons that suit their needs and Winterbyte are able to make smaller updates at the same time able to increase their revenue. Which means more likely to have US maintain long term growth and development.
     
    RoyS, reocwolf and Shawn67 like this.
  17. TheMessyCoder

    TheMessyCoder

    Joined:
    Feb 13, 2017
    Posts:
    190
    here is part 2 of my 'The Forest' inspired tutorials. The good news is that this should work with US 0.2 because I tried not to use too many US embedded functionality. Well that is the theory anyway.

     
    Malbers, Reiner, Old_Wolf and 6 others like this.
  18. Legend458

    Legend458

    Joined:
    Mar 13, 2016
    Posts:
    143
    I tried this but it didn't work.....
     
  19. C0rt3x

    C0rt3x

    Joined:
    May 4, 2017
    Posts:
    8
    Nice good job, :) :) :)
     
  20. VladimirGameStudio

    VladimirGameStudio

    Joined:
    Jul 31, 2016
    Posts:
    22
    TheMessyCoder You have won another as with your contribution, good work.

    TheMessyCoder you speak Spanish
     
    Last edited: Aug 13, 2017
    TheMessyCoder likes this.
  21. TheMessyCoder

    TheMessyCoder

    Joined:
    Feb 13, 2017
    Posts:
    190
    Hola.
    Thanks. I hope it helps. It was a lot of fun doing that video.

    I tried to take some lessons but don't have the time. All I know is a few words :(
     
  22. thenamesace

    thenamesace

    Joined:
    Jan 25, 2014
    Posts:
    98
    did you do the set-up in the first post of this script? where you set the input manager up? look back a couple of pages

    if so I may have missed a step out I was doing it from memory will take a look when I get chance
     
  23. Legend458

    Legend458

    Joined:
    Mar 13, 2016
    Posts:
    143
    I just used the script on this page, where you had the steps.....
     
  24. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    184
    It's not just Drag 'n Drop. However you need to go to "Project Settings > Input" and add "Forage" for whatever key you want to use. 'E' in his case.
     
    thenamesace likes this.
  25. Legend458

    Legend458

    Joined:
    Mar 13, 2016
    Posts:
    143
    Yeah, I used the script and did the steps he described. I eventually used Gegebel's original script. I may try and see if I can make the one with the animation work.
     
  26. Firesoft

    Firesoft

    Joined:
    Dec 20, 2016
    Posts:
    280
    Legend458 are you the asset flipper called "Interactive Game Studios"?

    Empire just added Foraging isnt that funny?










    Im bored ok? :D
     
  27. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    977
    buh... damn assetflipper.
     
  28. JakeeYeXe

    JakeeYeXe

    Joined:
    Aug 4, 2017
    Posts:
    8
    anyone have a solution for a short save system on 0.1 ? Like just save what happend and next time you have same savegame without loading and all this interface stuff?
     
  29. SpinTheDaddy

    SpinTheDaddy

    Joined:
    Aug 9, 2016
    Posts:
    13
    Ah, fair enough. When will 0.2 be out? Has it been submitted yet?
     
  30. Legend458

    Legend458

    Joined:
    Mar 13, 2016
    Posts:
    143
    Don't think so. Check Trello (which may not have been updated on his progress thus far).
     
    Last edited: Aug 15, 2017 at 12:19 AM
  31. Winterbyte312

    Winterbyte312

    Joined:
    Oct 25, 2016
    Posts:
    726
    GMax likes this.
  32. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    977
  33. Winterbyte312

    Winterbyte312

    Joined:
    Oct 25, 2016
    Posts:
    726
    Been figthing with the first person animations, a lot of modifications needed. I'm back on the functionality/code part now.
     
  34. Zombie_Expert

    Zombie_Expert

    Joined:
    Jan 29, 2013
    Posts:
    7
    Will we have some sort of 'choose gender/model' option built into the framework too?
     
  35. Winterbyte312

    Winterbyte312

    Joined:
    Oct 25, 2016
    Posts:
    726
    Yeah, I want it to be in 0.3.
     
  36. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    111
  37. Robson-FrostGear

    Robson-FrostGear

    Joined:
    Jan 12, 2013
    Posts:
    89
    I agree with @sebasfreelance

    If the "HDD Crash" was at the end of May, and we are in the middle of August, then this
    (https://trello.com/c/vtlx0mUF/103-to-do-after-the-crash) was done in 2 ½ months? o_O

    Sorry if the question seems offensive, i do not mean it. It's just a simple question.:)
     
  38. Winterbyte312

    Winterbyte312

    Joined:
    Oct 25, 2016
    Posts:
    726
    On trello are things I still have to do, there are a ton which have been done/fixed since that crash.
    Since that event I redesigned a few things / marked some items incomplete so the kit will be a little more stable & polished in the end. That won't happen with the next updates, 0.1 needed a lot of improvements & additions.

    Good news in regard to this. My programming teammate is back and doing his best to help.
     
  39. gegebel

    gegebel

    Joined:
    Jan 29, 2014
    Posts:
    225
    0.2 must be the ultimate script paradise with so much improvement :D
     
  40. Robson-FrostGear

    Robson-FrostGear

    Joined:
    Jan 12, 2013
    Posts:
    89
    I understood, was what I imagine :p. As you had not updated the trello i thought these items were only.
    Thanks for the answer. Look forward to the release. :)
     
    Winterbyte312 likes this.
  41. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    122
    Oh lord, not this again....

    It will be done when it's done. If you've ever had a hard drive crash and lost everything you'd understand. Winterbyte has learned of the importance of backups. But I'd rather him release a stable version than some buggy POS.

    Winterbyte, in the future please don't give a release date....just something like in the next couple of months because I'm sick of all the people asking every other day or every other post. My sanity can't take much more of this.

    @TheMessyCoder I love your tutorials, keep it up!
     
    franky_li, danreid70, Shawn67 and 2 others like this.
  42. Robson-FrostGear

    Robson-FrostGear

    Joined:
    Jan 12, 2013
    Posts:
    89
    Hahahahahahaha :D
    The question was to Winterbyte, who politely replied. So do not create situations that do not exist, please ;). Thank you.
     
  43. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    977
    Unless you are a one-dev-assetflipper - NO RELEASE DATE wont work for the most of us who are managing a team...
     
    gegebel and VladimirRad like this.
  44. Will-D-Ramsey

    Will-D-Ramsey

    Joined:
    Dec 9, 2012
    Posts:
    155
    Guess you should've got an asset that was already completed, I am a solo dev but NOT an assetflipper.
     
  45. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    977
    When is your planned release date?
     
  46. gegebel

    gegebel

    Joined:
    Jan 29, 2014
    Posts:
    225
    He has none. People who develop alone don't have the "Time" issue like we do.
     
    Will-D-Ramsey likes this.
  47. LucianPavel

    LucianPavel

    Joined:
    Jan 14, 2017
    Posts:
    22
    OLD Double Barrel Shotgun (removed before releasing 0.1) ..VS.. NEW Double Barrel Shotgun (From 0.3)
    -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
    [​IMG] -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
    [​IMG] -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
    Screenshots made in Unity
     
  48. gegebel

    gegebel

    Joined:
    Jan 29, 2014
    Posts:
    225
    Looks good, I wish I could use them :D
     
  49. jessejarvis

    jessejarvis

    Joined:
    Aug 9, 2013
    Posts:
    184
    I've spent those two and a half months working on Houses, landscape, menu systems, AI, and I still have pleeeenty to do. I'm in no rush for 0.2. There is more to game development then an asset like Ultimate Survival. There are maaaany things to do.

    And no the release date isn't planned because people keep complaining about it.

    It's done when it's done :)

    I'm excited for the new release especially to hear that pesky weapon-shaking has been taken care of! I fixed most of it with using MapMagic's floating point solution but there was still some shaking. Hopefully there will be no shaking now!


    Awesome! People will enjoy that :) Medieval weapons is what I'm using though haha. I already have those though so thanks :)

    Any plans on Alternate bows? I have many melee weapons but bows I believe are tricky because of the string.
     
    LucianPavel, Shawn67 and spotdot2 like this.
  50. VladimirGameStudio

    VladimirGameStudio

    Joined:
    Jul 31, 2016
    Posts:
    22
    Here's the one Lucian Pavel is working on, give your brother a stick. XD
     
    Last edited: Aug 15, 2017 at 5:30 PM