Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

[RELEASED] DarkTree FPS system

Discussion in 'Assets and Asset Store' started by DarkTree, Mar 29, 2019.

  1. stuartdn

    stuartdn

    Joined:
    Feb 3, 2018
    Posts:
    14
    Hi,

    Here is what it says in the editor when I try and use a weapon. The demo scene runs but as there is no terrain or buildings everything falls away and there are errors that there isn't a Navmesh.

    upload_2019-11-28_17-30-36.png

    Cheers,

    Stuart
     
  2. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    I made ReadMe file in asset root. Even highlighted it with capslock. It says that in order to get demo scene work you will also need to download flooded grounds demo. It's about missing terrain and objects.

    About errors. It looks like scripts are not able to find 'GamePrefab' gameObject. As you say, you try to shot weapons but nothing happens, so it means that gameprab on your scene. Did you rename gameprefab? It's only one clear reason for errors that I see now...

    Code (CSharp):
    1. ///
    2.             if (!usedByNPC)
    3.             {
    4.                 decalsParentObject_concrete.transform.SetParent(GameObject.Find("GamePrefab").transform);
    5.             }
    6. ///
    7.  
     
    jesseganey likes this.
  3. Thilon

    Thilon

    Joined:
    Jul 23, 2012
    Posts:
    10
    @DarkTree

    I started testing 1.3 version, some issues what i found:

    - Makarov pistol. If you put the equipped makarov pistol to the inventory, the pistol is still in your hand. If you change to other weapon and you but back the makarov to the secondary slot the pistol will be useless.

    - AK weapon PSO scope: Turn around in scoped mode. One side 180 degree working well. but the another 180 only blackness.

    - Kill the player with grenade. You can change the weapons and using them when you are dead.

    - In the inventory the big weapons (shotgun, AK) hard to equip to the slots, and back to inventory. (Looks like the
    the grid is slipped by 1 square)


    Otherwise, I like new things. :) I'll keep trying and start putting in my own improvements. :)
     
  4. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Thank you for your feedback! I'll release patch as fast as possible
     
  5. Thilon

    Thilon

    Joined:
    Jul 23, 2012
    Posts:
    10
    @DarkTree Your welcome!
    - Muzzle flashs missing in weapons :p

    I try to use the building mode. How does it work? :confused:
     
    DarkTree likes this.
  6. officialthetr1angle

    officialthetr1angle

    Joined:
    Jun 1, 2018
    Posts:
    2
    Hi @DarkTree,

    I tested demo and it is excellent, good job mate. I have a couple questions..
    1. Inventory fire or neither camp itself nothing do much so I wonder what is it for?
    2. When you enter little house door won't let you in unless you crouch, so is it intended?
    3. How hard is it going to be disable hunger and thirst? if I want to just use health and maybe water and food shall increase health a little?
    4. Can I disable rifle scope? because I wanna use just regular AK without any zooming optic. Also where is scar, sniper and glock I could not find..
    5. Shotgun won't aim, I know it is intended but can I zoom in a little at least?
    6. I can walk in the water but do you have any plan for swimming stance or animation and logic for future?
    7. Can you implement opening door logic and maybe locked doors with key item?
    8. Can you implement also examining logic to the item grab? like I want to see weapon or medkit examine (looking and turning object with mouse) before I put into my inventory like resident evil 7.. :)
    9. Demo can equip weapon pressing 123 when I die, can you fix those?
    10. Can you tell me future update plan, I saw couple things in previous comments but I want to know official update list. PLS

    Lastly, I will buy of course. it looks and works great, also I will rate highly when I buy, I just need to learn some basic menu implementation logic first. Can you maybe do tutorial to start making menu?
     
    Last edited: Nov 29, 2019
  7. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    In project folder DarkTree FPS/Building/ you can find special items for building (firecamp cost 1xbranch, tent 4xbranch, 4xclothe). It's considered to use resources to build something. Feature in TODO list, so it's not documented now, more is for test now. As I wrote before, want to make tutorial for this but little bit busy now. So wait for tutorial
    Seems that collider too big:) I forgot to fix collider and it wasn't supposed to be.
    In PlayerStats script you can just disable hunger and thirst. Items has ConsumableEvents.cs component, and you can which one parameter to use with that. So yes, you can make items to restore health instead hunger etc.
    You need just to turn off scope under weapon's hierarchy, and change aiming animation. Aiming is not made with scripts. Also you should to replace aim animation in weapon's animator to regular aiming. (All aim animations were made with Unity animator, so you can replace aim position as you need).
    As I remember, shotgun just have not aim animation. Yes it could aiming, just set aim animation in weapon's animator. (Aim animations on Aim layer, also make sure that weight is set to 1).
    Yes I am.
    Easy could be done even for now. Need some UseObject.cs modification, but really simple. Wanted create in current version but time wasn't enough.
    Maybe yes, maybe not. Maybe in far releases.
    Yes of course, it's my miss. You can do it by yourself before I release patch. You need to disable WeaponManager component on death. (Death method in PlayerStats.cs)
    Next update should improve stability and usability of the asset. Also looking for a way to make NPC better and smarter. So next update will be more about NPC.
    No problem.
     
  8. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Answered post above
     
  9. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Described above in section one.
     
    jesseganey likes this.
  10. jesseganey

    jesseganey

    Joined:
    Apr 26, 2017
    Posts:
    78
    was wondering about crafting? will you do crafting or should i use another system for this.
     
  11. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Yes, really want crafting. You will not be able to link the system with inventory, because core code is absolutely different. Also I haven't seen any fine craft system. Functionality of the main systems on store is very poor as for me...
     
    jesseganey likes this.
  12. rudigreig

    rudigreig

    Joined:
    Dec 11, 2018
    Posts:
    50
    I have a problem
    I can't find weapon's ID on the weapon attached to the player, item pickup or weapon data, therefor can't make a pickup of the new gun I created.
    Can you do an updated Weapon Wizard tutorial, for the new update as it's very different.
     
  13. jesseganey

    jesseganey

    Joined:
    Apr 26, 2017
    Posts:
    78
    i agree it would work best built in. would really help out if it was in kit for survival.
     
  14. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Hi, will tell you how once I get home. Also I've got your feedback and will release patch tommorow, hope will be available at the evening. Sorry for issues.
     
  15. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    So weapon objects are being equipped by item name (tittle). Item have title and weaponmanager take it as an weapon to enable argument. Player's weapons have ID too but it required for searching ammo items. So if we have an ID 3012 on your player weapon for example, component will search ammo items with the same id. Take a look at the picture
     

    Attached Files:

  16. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Patch v1.3.1 is uploaded for review.

    List of bug fixes:
    - Fixed GamePrefab fake errors on start.
    - Added shotgun aim animation.
    - Fixed weapon change after death.
    - Fixed inventory can equip removed null items.
    - Mobile is fully functional again (removed knife and weapon switch buttons, equip items from inventory).
    - Removed Flooded Grounds demo scene (due people think that scene broken and they are gave negative feedback).
    If you want, you can download asset and create your own gameplay with this scene.
    - Added empty event for animation events on player (they cased fake errors in the console).
    - Fixed player collider wrong size.
    - Some items has missing fields fixed.
    - Removed postprocessing missed components from cameras.

    In one word, all main problems and issues are fixed.
     
    jesseganey likes this.
  17. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Hello, I fixed all problems you meet in previous version. I sent patch to asset store and you can upgrade asset once it will available. Also I ask you to update your review if everything ok with new patch.

    Here is the video which shows that I have not any errors in my unity version. (2019.1.14f1). Also I added shotgun aim animation.

     
  18. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Hi! I found out why scope appears black in some cases. Reason is standard unity shader. To fix that you need to bake reflection probes on your scene. I think about writing my own shader for scope...
     
  19. sammi32

    sammi32

    Joined:
    Feb 19, 2014
    Posts:
    16
    Hi,

    Thank you for your great Work, it is a great Asset.

    i have one Question, how can i scale the Character, clean, but the Thing is it is not 1.80 1.90 Meters

    it Looks like 3 Meters?!

    please have you an Idea?

    best regards Sammi
     
  20. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Just scale player gameobject, it is safe. Only need to adjust speed and jump parameters of FPSController.
     
  21. stuartdn

    stuartdn

    Joined:
    Feb 3, 2018
    Posts:
    14
    Hi,

    Thanks for coming back to me. I've downloaded the Flooded Grounds assets and after baking the NavMesh it now works. Perhaps you could include the need to download the asset pack as a UI element on the demo for those of us that missed it in the ReadMe file?

    Regarding the GamePrefab, every time I dragged it onto a brand new scene in Unity 2019.2.6f1 it was renamed to GamePrefab(1). Not sure why this is? After manually renaming it the prefab now works.

    Cheers,

    Stuart
     
  22. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Hello:) I can't find out why prefab always became renamed. I think that there is a bug with prefab serialization in unity because my scripts are not influence on gameprefab. I fixed that for upcoming version 1.3.1 (it's already in assetstore but waiting for review, should be available soon).

    For now you can write and place this script on the gameprefab to avoid this behavior in future.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class NameFix : MonoBehaviour
    6. {
    7.     void Awake()
    8.     {
    9.         name = "GamePrefab";
    10.     }
    11. }
    12.  
     
    jesseganey and stuartdn like this.
  23. stuartdn

    stuartdn

    Joined:
    Feb 3, 2018
    Posts:
    14
    That's great. Thanks a lot!!
     
  24. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Patch 1.3.1 released and available on the Asset Store!
     
    stuartdn and jesseganey like this.
  25. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Update version, patch is out
     
    stuartdn and jesseganey like this.
  26. stuartdn

    stuartdn

    Joined:
    Feb 3, 2018
    Posts:
    14
    Hi,

    Is there a way to set an equipped starting weapon and to start with some items already in the inventory?

    Many thanks,

    Stuart
     
  27. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    stuartdn likes this.
  28. stuartdn

    stuartdn

    Joined:
    Feb 3, 2018
    Posts:
    14
    Thanks for coming back to me. I'm still using version 1.2 as I'm comfortable with how it works and have done a bit of customisation. Based on your suggestion I have produced the following to add items and ammo to inventory and equip primary and secondary weapons on launch. However for some reason the items and ammo are doubled when appearing in the inventory. Do you have any idea why this might be happening? Thanks. Stuart

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using DarkTreeFPS;
    5.  
    6. public class AddItemsOnStart : MonoBehaviour
    7. {
    8.  
    9.     // Item prefabs need to be in scene to be added to Inventory
    10.     public List<Item> items;
    11.  
    12.     public Item PrimaryAmmoItem;
    13.     public int PrimaryAmmoCount;
    14.     public Item SecondaryAmmoItem;
    15.     public int SecondaryAmmoCount;
    16.  
    17.     public string PrimaryWeaponNameToEquip;
    18.     public GameObject PrimaryWeaponObject;
    19.     public string SecondaryWeaponNameToEquip;
    20.     public GameObject SecondaryWeaponObject;
    21.  
    22.     bool spawned = false;
    23.  
    24.     void Update()
    25.     {
    26.         if (items == null || spawned)
    27.         {
    28.             Destroy(this);
    29.         }
    30.  
    31.         var Inventory = FindObjectOfType<Inventory>();
    32.         var weaponManager = FindObjectOfType<WeaponManager>();
    33.      
    34.         if (SecondaryWeaponObject != null)
    35.         {
    36.             weaponManager.EquipWeapon(SecondaryWeaponNameToEquip, SecondaryWeaponObject);
    37.             Inventory.GiveItem(SecondaryAmmoItem, SecondaryAmmoCount);
    38.         }
    39.  
    40.         if (PrimaryWeaponObject != null)
    41.         {
    42.             weaponManager.EquipWeapon(PrimaryWeaponNameToEquip, PrimaryWeaponObject);
    43.             Inventory.GiveItem(PrimaryAmmoItem, PrimaryAmmoCount);
    44.         }
    45.  
    46.         foreach (var item in items)
    47.         {
    48.             Inventory.GiveItem(item);
    49.          
    50.         }
    51.  
    52.         spawned = true;
    53.  
    54.     }
    55.  
    56. }
     
  29. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Oh, code I sent was tested only with v1.3:( Inventory in 1.3 works in absolutely different way, and honestly, I do not remember code of 1.2 well. But if I am not mistaken I found some kind of error in your code. You call GiveItem with gameobject argument, but that function should not take any other than Item instance. Better add items with foreach operator and put your items to list.

    Code (CSharp):
    1. foreach(var item in items)
    2. {
    3. //That would be right
    4.       inventory.GiveItem(item);
    5. }
    Weapon equip calls are ok!
     
    stuartdn likes this.
  30. stuartdn

    stuartdn

    Joined:
    Feb 3, 2018
    Posts:
    14
    Hi,

    Thanks for coming back to me. I do call the items separately using that call after the weapon and ammo calls. I thought I'd check for ammo only if weapons are equipped.

    I think the inventory listing is duplicated because the items triggered twice. Once by my script and once by the script on the item. I'll look into it.

    Cheers,

    Stuart
     
  31. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Is anyone have ready projects with asset? Want to see what you make with it. Very interesting.
     
    stuartdn likes this.
  32. guardspeak

    guardspeak

    Joined:
    May 21, 2017
    Posts:
    1
    Приветствую, хотел бы узнать будет ли в будущем обновлении, меню или хотя бы загрузить/сохранить ?
     
  33. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Привет, выше уже спрашивали. Это же просто, уроков куча. Там принципиально ничего с кодом не требуется делать. На паузе ставить время на ноль, а к кнопкам save/load привязать функции со скрипта, они публичные. Но, вообще думаю сделать, т.к. просят в последнее время часто.
     
  34. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    476
    A couple of questions for 1.3
    • What happened to the text popup when targeting items on the ground?
    • When will we see Save/Load and Level Change with Inventory?
    • Is inventory expandable? (Can I add more slots if the player picks up a backpack for instance?)
     
  35. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    1. It's issue I seems forgot to check. In mobile version text popup works. Will fix that.
    2. I just figured out how to travel between levels safe without data loss. I experimented with that before 1.3 version release and made DontDestroyOnLoad for GamePrefab to store picked items here. But there was two problems. First, after loading level, second instance of player that existed on a level appeared. Solved by deleting player instance on load. Second, I was able to transit items between scenes but can't to drop on current level. So I've looked for a way how to move items from DontDestroyOnLoad to current level and someone tell me to create script holder for keeping transform of current level. Because if we just null parent for item it's still existing in DontDestroyOnLoad folder. So now I can do that and already do.
    3. Yes and not. I did some test before release and wanted to create loot chests. I made second grid and it worked. But I'm not sure that it will work on runtime.
     
  36. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    476
    Thanks @DarkTree Let me know if there is a quick fix I can make in code.

    So, it is working in 1.3.1, or will be in next release?

    OK, expandable inventory would be excellent.

    Thanks for your hard work.
    Mark
     
  37. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    In next release. I plain to make another one small update with stability improvements and small features.

    To make item text appear, look into UseObjects.cs. Not really sure why text disabled but in mobile vesion, as I said before, it works. So behaviour must be under if(InputManager.useMobile){ ... } I guess.
     
  38. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    476
    Found it. Please add it to the minor fixes in next release. Around line 93, where it says:
    Code (CSharp):
    1.                 else
    2.                     useState = false;
    3.                 {
    4.                     //Clear use object if there is no an object with "Item" tag
    5.  
    Move the useState = false; to AFTER the "{"

    Cheers!
    Mark
     
    DarkTree likes this.
  39. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Thank you for response!
     
  40. rudigreig

    rudigreig

    Joined:
    Dec 11, 2018
    Posts:
    50
    Hey, you should put an online version that works using Photon PUN 2. If you want to make it a separate version for more money or users that have original package pay for an upgrade that'd be fine, I would really love to see online multiplayer be implemented.
     
  41. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Me too. Since Unity multiplayer deprecated PUN would be the best choice.
     
    rudigreig likes this.
  42. rudigreig

    rudigreig

    Joined:
    Dec 11, 2018
    Posts:
    50
    One thing you could add to make campfires useful is that they do damage to NPCs, maybe you could add traps as well
     
  43. jesseganey

    jesseganey

    Joined:
    Apr 26, 2017
    Posts:
    78
    Is there a roadmap somwhere to look at.
     
  44. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    149
    This looks good. How good is the performance on mobile? I'm currently using third-person cover shooter by redbee, but it is catastrophic in terms of performance. Is there any chance to get a 3rd person view option?

    I see that you get requests/wishes about the main menu and similar stuff that are not related to this asset, some people want you to build a complete game for them. Don't waste time on those features, focus more on basic stuff and quality of the existing asset and then move to other less relevant things.
     
  45. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Answered on mail
     
  46. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Still not sure about features. I'll make a post once I decide what to include.
     
    jesseganey likes this.
  47. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Hi, sorry that missed your message. Firecamp was supposed for heat demand. I doing game where player have cold damage and firecamp was moved from my project as building example.
     
  48. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    Features and bug fixes planned for:

    v1.3.2

    - Features -

    • Player transition between scenes with save/load. (Player now will be spawned on start point. Will use DontDestroyOnLoad)
    • Sample crafting system. (ObjA + ObjB = Something. Cloth + Scissors = Bandage etc.)
    • Really want to improve inventory drag and drop. False placement when you drop item on empty space and it getting back to previous position annoying me too.
    - Bug fixes -
    • Item name is not appear on the screen
    • Inventory had vice versa columns rows.
    • NPC movement jerking (now interpolated)
    • If I missed something broken thing feel free to remind me.
    Also. Now I making full tutorial series about work with package. Should be available in 2 days.

    v1.4

    Features is in doubt. Will put voting later.

    Thanks for viewing.
     
    jesseganey likes this.
  49. DarkTree

    DarkTree

    Joined:
    Mar 23, 2013
    Posts:
    239
    I also wanted to talk about one important thing for me.

    I'm going to create fundraising company for GOAP Battle AI system for unity. It must be free, just want to bring something for Unity community. Unfortunately, I can't just sit and make it for now because It'll take a lot of time and I need some funds to exist on something. AI in DT FPS took about 2-3 months to create it from scratch.

    Is someone have experience in crowdfunding? Because I'm not. I want to gather 1000$ most part of this money will go for content makers and part for me to live on something.
     
    jesseganey likes this.
  50. jesseganey

    jesseganey

    Joined:
    Apr 26, 2017
    Posts:
    78
    Is there an idea on date for next update would love to try out crafting system. i would also love some emerald ai integration. if its not to s big deal.
     
    Last edited: Dec 18, 2019