Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Survival Engine - Complete Project Template for Survival Games

Discussion in 'Assets and Asset Store' started by IndieMarc, Sep 18, 2020.

  1. NamraGame

    NamraGame

    Joined:
    Feb 17, 2019
    Posts:
    31
    Hi!
    quick question; where can we find the code to modify the directional light (rotation over time, intensity and shadows when night comes etc) ?
    thanks!
     
  2. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    Resources /GameData,

    If the settings dont do go in TheRender.cs
     
    NamraGame likes this.
  3. johny256

    johny256

    Joined:
    Mar 3, 2015
    Posts:
    258
    HI! i Plan to Add Firearm weapons? pistol,machinegun and etc?
     
  4. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    New in 1.12

    Cold Mechanics
    -Player temperature can go up or down based on heat sources around him.
    -Player will lose hp if temparature get too low.
    -Some equipment makes the character more resistant to cold.

    Horse Riding
    -New animal prefab: wild horse
    -The character can jump on the horse and ride it

    Starting items
    -Starting items for the main player
    -Starting items for storage boxes

    Code refactor
    -Code has been reworked to make some of the systems more consistent with Farming Engine
    -Simplified some scripts
    -Fixed various issues/bugs

    Other
    -HP regen value for destructibles
    -Buildable characters (buildable.cs script is now compatible on characters, so they may be crafted and placed like plants and constructions).
    -Plant progression (for growth and fruit growth) is now saved.


    -
     
    ThatBeADragon and EN_Games like this.
  5. toothpick4572

    toothpick4572

    Joined:
    Oct 18, 2019
    Posts:
    2
    Let me start off with I love this asset!! You have made one of the easiest to use I have found with the most wide range of stuff that you can do. I made my first game with it and my kids love it and play it all the time.
    I love the use of scriptable objects in this making it a breeze to make more items with no knowledge of code, however there is a few things needed...

    1. Framework for leveling your character. No one wants a game where you can't level up and if someone does not know c# or is still learning this would be a pain! So please add that, should be easy.

    2. Need to implemented "Mirror" for multi-player. Its free to put in and have all the stuff ready for whoever purchases your engine.

    3. Option to put in a npc store or merchant.

    And lastly some type of digging system like digger.

    I purchased your engine and I'm not using it for survival but I am using it for free roam sandbox games. I'll be posting some video in a few weeks as I am already halfway done with the core objects.
     
    IndieMarc likes this.
  6. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    Hi and thank you so much for all the great suggestions and comments.
    I can't guarantee any of these as they are all new feature requests and I get a lot of those. But here is what i think of them:

    #1 This is a great idea but skills and level up systems can be very different from one game to the other so at the moment i leave it free to each developer make their own. I may implement something in the future, but nothing is planned for this yet.

    #2 Having multiplayer would surely be amazing but would also complicated the code a lot. For this reason if I ever do a multiplayer version it would most likely be a different package, and it would not be with mirror (there are too many assets with mirror already), and instead it would be using the new Unity MLAPI (its their new built-in networking solution that they just released last month). Again no promise, I still need to see my priorities, but I can say that it would probably not be with mirror if i make one.

    #3 There is actually already a NPC store made, but its a unique feature of Farming Engine (and not in Survival Engine), I wouldn't mind to share the code for the store on discord so you can try to integrate it. If you are on discord.

    #4 There is a shovel that allow you to dig at specific "dig spots" I really doubt that I would make a more complex digging system in the near future as this seems very specific.
     
    Last edited: Apr 10, 2021
  7. toothpick4572

    toothpick4572

    Joined:
    Oct 18, 2019
    Posts:
    2
    Wow that was a awesome fast reply, and I would love to try to implement that farm sell feature. Also I did not realize unity released a new multi-player system, ill have to check that out.

    As far as the level system, I understand that everyone uses it differently, but with your understanding of scriptable objects (I'm just now learning them) I can see how you could add it where it can be used by anyone with the most common formulas, they just change the names of them and select what type of formula and done ha ha. Thanks for that fast reply.
     
    IndieMarc likes this.
  8. adenss100

    adenss100

    Joined:
    Jan 25, 2021
    Posts:
    1
    How I use load game for mainmenu
     
  9. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    All the functions are in TheGame. cs

    There are static functions to load save or for new game that you can call when clicking on your ui.

    You can also check the menu demo package I put on the discord channel.
     
  10. jh092

    jh092

    Joined:
    Sep 2, 2018
    Posts:
    52
    Hi there, I'm just new to this asset and enjoying it very much, thank you.

    May I ask two questions please...

    1. Some of my inventory items are fuel powered, for example a chainsaw or a flashlight. I'm thinking of using/extending the weapon and ammo to simulate this, where the ammo remaining becomes the fuel remaining. Does that sound like the right approach?

    2. When I chop down a tree I want there to be logs and a tree stump. The logs are fine as they would become "loot", but I'm not clear how I can have a tree stump in the place of the tree. I guess the issue there is the stump needs to be in the same position as the tree was.

    Many thanks and best wishes from Australia

    Jon
     
  11. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    1) you could try this method if your fuel is a separate item, in any case you would probably need to code something for that so the thing is reduced. Another simpler option would be to use the durability and set it to EquipTime so the durability goes down only when equiped. But then you would not have a separate fuel item
    2) I think thats just triggering and animation, you can add a script and connect to the event OnDeath of the destructible to spawn your stump, or you could also just add the tree stump as a loot (you can add a spawnable object instead of an item as loot, check the tree with the beehive as example).
     
  12. jh092

    jh092

    Joined:
    Sep 2, 2018
    Posts:
    52
    Thanks so much Marc for the super fast help!
     
  13. jh092

    jh092

    Joined:
    Sep 2, 2018
    Posts:
    52
    Hi Marc, sorry I have another question.

    I have created a brand new inventory panel with slots. It works fine the trouble is whenever I try and hide it using one of my interface buttons (and setting CanvasGroup.alpha) it reappears again straight away. I cannot see what is forcing it to be visible at all times. Could you help me with this, I want to be able to hide/show it as needed (by setting the CanvasGroup alpha).

    Sorry for basic question, thank you.

    Jon
     
  14. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    Yes the script already control that, normally you can just call the functions Show or Hide on that panel.
     
  15. jh092

    jh092

    Joined:
    Sep 2, 2018
    Posts:
    52
    Thank you!
     
  16. Artini

    Artini

    Joined:
    Jan 29, 2016
    Posts:
    181
    How easy is to replace assets (animals, characters, environment ...) with the other ones?
     
    haibu likes this.
  17. JoelBedard

    JoelBedard

    Joined:
    Nov 1, 2018
    Posts:
    2
    Hi Marc,

    Great asset, I've been having a good bit of fun with it. Any chance of using heightmaps or similar to give the terrain some depth?
     
  18. mattiaa95

    mattiaa95

    Joined:
    Dec 20, 2016
    Posts:
    2
    Hi Marc,


    I just purchased your survival engine asset, it is great, it has served as a basis for me to do many things, I also bought the minimap asset, I would like to know if it is implementable to autogenerated maps in Runtimr or if it needs some modification?

    Congratulations on the Asset has a supreme quality, I am super happy with the purchase.
     
  19. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    There is a runtime mode on the asset. On the world Generator you can change Editor to Runtime.
    But its mostly to generate prefabs, the terrain generator is more limited, there are probably other assets that can generate terrain if you need something more advanced.
     
  20. mattiaa95

    mattiaa95

    Joined:
    Dec 20, 2016
    Posts:
    2
    Thanks for the answer,

    I have tried putting in run time, and assigning to the Player the script Map Zone.cs but it doesn't seem to working, I'm doing something wrong for sure, I'll keep trying.

    thanks a lot for the answer :)
     
  21. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    What is not working exactly?
     
  22. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    169
    Just trying this asset out. Started a new project in 2019.4.30 and got an error in the console after a clean install:

    Code (JavaScript):
    1. Copying assembly from 'Temp/com.unity.multiplayer-hlapi.Runtime.dll' to Library/ScriptAssemblies/com.unity.multiplayer-hlapi.Runtime.dll' failed
    When I look at the packages that the asset import brought in, it includes Multiplayer HLAPI 1.0.8. This preventing running the demo scene or anything as it wouldn't clear with the error.

    Once I removed the package got a few errors about accessing HLAPI dlls but hitting clear in the console fixed it.
     
  23. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    This package isn't included with the asset, i dont know why it was included in your project thats odd. Maybe an issue with your unity.
    Hopefully it works now.
     
  24. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    169
    Yeah you mentioned it didn't support multiplayer (which is fine). Like I said I created an empty project but didn't look at the default packages that creates. The import mentioned some packages had to be updated so I'm assuming there was some kind of weird conflict when it did the upgrade that caused the error.

    In any case just a note for people that are importing into 2019 into a blank project might experience this but its easily fixed. Not a problem with the asset, just a glitch in the Matrix with Unity.
     
  25. grengossgaming

    grengossgaming

    Joined:
    Apr 2, 2019
    Posts:
    1
    Hello there, this asset looks fantastic and I'm interested in picking up a copy but I'm wondering if this engine will be suitable for a 2D project? I'm currently using More Mountains' Top down engine to prototype a 2D survival game and being able to implement a lot of the features included in this asset would be an immense time saver!
     
  26. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    It's possible to replace 3D models by 2D sprites, if you keep it Top down and in the XZ axis.
    I don't think it would merge well with another Template. I think it's better to use either Top Down engine or Survival Engine.
     
  27. Dsinorland

    Dsinorland

    Joined:
    Mar 3, 2022
    Posts:
    1
    does this game support webgl?

    I've bought and tried it for webgl, but when running it always fails.

    eror webgl.jpg
     
  28. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    Note: This issue has been resolved in the discord server. Basically there was a problem with his server settings.
     
  29. FractalCore

    FractalCore

    Joined:
    May 15, 2009
    Posts:
    151
    I'm using the Dialogue and Quests system, and I can't figure out if it's possible to have stepped quests. There's a "Quest Progress" option but I'm not sure what to do with it.

    Using you gift quest example, we should be able to set it up so the quest isn't completed once we pickup the gift. That should let us complete one sub-step of the quest (found gift). The journal entry for this quest should then update to show that step 1 has been completed (with Quest Notice prompt appearing), now step 2 is to return to the quest giver with the gift. And only then should it say Quest Completed.
     
  30. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    Hi, there is a progress step but its just a int variable you need to do the logic with NarrativeEvents. So a event for when the progress go up. It was more thought of repeated actions you need to do many times like kill 10 enemies. But not really for different parts of the same quest so at the moment it doesn't change the quest log. Maybe it's better to do a different quest if you want to do many steps, or otherwise would need some script editing i think.

    Maybe in a future version I'll link the progress to the ui.
     
  31. alexgemini002

    alexgemini002

    Joined:
    Jan 15, 2020
    Posts:
    24
    dear developer:
    really love the assets,i have 3 question all related to integration with emerald ai
    1.Is it possible to have a official document describe how to integration survival engine and emerald ai especially range combat. out team have already succesfully add melee combat, but there seems need to change playercharacetercombat scripts and emeraldaiProjectile script to add range combat features.
    2. How emerald ai enemy health and survival engine descruicible.cs script blende together so they have some health number setup. where need to be change so when enemy get hit the enemy health reduce accordingly both in emerald ai health system and survival engine descruicible.cs script.
    3. how to add assembly definition to both emerald ai and survival engine. The emerald ai document says their EmeraldAIPlayerDamage.cs script need to including survival engine classes. And survival engine playercharactercombat.cs script also need to reference some emerald ai class, that is cyclinc reference isn't it, how to solve it so both emerald ai and survival engine can both have seperate assembly definition .
    thanks.
     
  32. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    Hi, there is no official integration with Emerald AI, I actually never worked with Emerald AI. Maybe the integration was made by the one who did the Emerald AI asset ? Probably better to ask them? Otherwise I am really not sure what you are mentioning since I don't own and never worked with Emerald AI and I do not know how to use that asset. I think that integration was made by someone else ?
     
  33. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240
    Hi, first of all congratulations for your work, it is very complete Survival Engine.

    Could you help me? How can I search for an item in inventory?
    thank you!
     
  34. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    You can access inventory with PlayerCharacter.Get().Inventory
    Then you can do .InventoryData or .EquipData or .BagData
    and you can loop on items or HasItem() or CountItems()
     
  35. alexgemini002

    alexgemini002

    Joined:
    Jan 15, 2020
    Posts:
    24
    dear developer:
    in this project, survival engine load all asset in resource fold into memory before scene started, and it consume many memory to hold all item,construction, and this is not performance when most item and other graphics asset is not low-poly style art assets, and most those art asset is not using in the current running game but still hold in memory , Is it possible to convert the project's unity old Resources.load based method into new Addressables based system , so it reduce memory usage? many thanks.
     
  36. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    I want to avoid as much package dependencies as possible and keep it simple for new users. But that shouldn't be too hard to convert if you know what you are doing.

    If you need help I am available on Discord. I can check that with you and provide a script. Also there is a way to specify the load folder so it only loads resources in that folder.

    Also one thing to note is that if you have a big scene with a lot of items, most of existing stuff will be loaded at the start anyway so in the end you wouldn't save that much loading with Addressable (unless most of your stuff is crafting/constructions). You would probably need a more advanced system of level streaming which is not a feature of this asset.

    In anycase with more details on what you want to do I can help guide you update that on Discord.
     
    Last edited: Mar 29, 2023
  37. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240
    thanks for answering!, what I'm trying is if I have the ax in the inventory, it does one thing

    Code (CSharp):
    1. using UnityEngine;
    2. using SurvivalEngine;
    3.  
    4. public class BagItms : MonoBehaviour
    5. {
    6.     void Update()
    7.     {
    8.         searchItem();
    9.     }
    10.  
    11.     void searchItem()
    12.     {
    13.         if(PlayerCharacter.Get().Inventory.InventoryData.HasItem("Axe"))
    14.         {
    15.             Debug.Log("I have Axe");
    16.         }
    17.     }
    18. }
     
  38. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    yes something like this should work. Just be careful the id are case sensitive in the original demo its "axe" not "Axe"

    Also if you want to check in all inventory (bag inventory and equip)
    I think there is a function directly in PlayerCharacter.Get().Inventory.HasItem
     
  39. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240
    Perfect! Changing to lowercase has worked for me, thank you very much for your help

    a greeting
     
  40. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240
    Hi, I have a very big problem that I can't solve.

    If I delete the game on android and reinstall a new version, it loads something that is saved.When installing the game, the character appears in another position than the one I have defined as the start, and objects appear in the inventory, apart from life and others.

    Game data is not saved within the game? or copy it to another folder?
    thx
     
    Last edited: Apr 18, 2023
  41. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240
    Hi.
    have created a button to clear the data and the PlayerPrefs
    I delete the game, install it again and there is still the saved game.
    I don't find the solution
    Any advice why this is happening to me?

    thanks!
     
  42. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    Hey sorry for the late reply, i don't always get notif for the forum (im much faster on email/discord).

    There is already a option to delete the save file at the top in Survival Engine-> Delete save

    You can also delete the file directly in windows if you go to the Unity persistantDataPath (search for this term on google you will find the path for your os)

    The other options is just to click on Pause in game and then click on New Game, it will create a new game without the need to delete the save.
     
  43. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240
    Thank you very much for the information, I'll look why this is happening to me, I delete everything saved by code, and it keeps appearing with things in the inventory and the player's position is not the initial one, when deleting and reinstalling the game.

    thx!
     
  44. jschalky

    jschalky

    Joined:
    May 9, 2020
    Posts:
    6
    Hi,

    On the asset page it says there is first person view. I have looked through the camera script and components but cant find any reference to it or how to enabled it.
     
  45. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    In prefabs folder there should be a FirstPerson character and also a First Person camera, you add those prefabs to the scene and remove the default ones.
     
  46. alexgemini002

    alexgemini002

    Joined:
    Jan 15, 2020
    Posts:
    24
    dear developer , is it possible to add localization support with unity offcial localization package?
    another minor issue,is it possible to add multiple save slot instead of just one save slot , dont starve have 5 save slots.
     
  47. IndieMarc

    IndieMarc

    Joined:
    Jan 16, 2017
    Posts:
    183
    You can add as many save slot as you want, if you call Save() or Load() with a parameter that says which save file it is
     
  48. alexgemini002

    alexgemini002

    Joined:
    Jan 15, 2020
    Posts:
    24
    dear developer, is it possible to port "NPC store to buy/sell items" feature from farm engine to survival engine?
     
  49. alexgemini002

    alexgemini002

    Joined:
    Jan 15, 2020
    Posts:
    24
    there is a bug in animal riding system,when using the default horse , during the riding, the player can only move left and right but can not move north and south using w and s key.
    second ,maybe this is unity asset team's problem, I want to purchase survival engine online during 50% sales,the asset store page said if I own survival engine I can reduce the price .but the price is still 49.50 dollar. I think during 50% sales, the price should be (99-45) * 50% = 27 dollar.
     
  50. ArtemX1

    ArtemX1

    Joined:
    Nov 6, 2014
    Posts:
    2
    YEs