Search Unity

Realistic FPS Prefab [RELEASED]

Discussion in 'Assets and Asset Store' started by Deleted User, Apr 5, 2013.

  1. Herman-Tulleken

    Herman-Tulleken

    Joined:
    Nov 20, 2009
    Posts:
    358
    Hi Everyone,

    I am one of the developers of Rucksack (Multiplayer Inventory System) at Devdog. We recently did a integration for RFPSP that allows you to manage your weapons and ammunition in your inventory, buy and sell them, and so on. If anyone has any questions, I will keep an eye here, but you can also pop in at Devdog on Discord: https://discord.gg/6DH3kQ7
     
    jons190, ronaldomoon and jorisshh like this.
  2. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    299
    So, at last - here it is, for download, (as I've promised earlier):
    ZIP LINE RFPS - COMMUNITY EDITION - V1.0
    Enjoy, everyone, let us know and upload here - any improvements, for everyone :).
    Merry Christmas, And Happy New Year, everyone.
    DOWNLOAD
    RFPS Zipline-26-05-2018-Progress.JPG
     
    Mucossa, NickNovell, Weblox and 4 others like this.
  3. s11510161

    s11510161

    Joined:
    Dec 20, 2018
    Posts:
    1
    Umm does anyone know how to change the zombie model into our own enemy model?
    I was following the tutorial on youtube but its kinda outdated. Thanks btw
     
  4. NickNovell

    NickNovell

    Joined:
    Apr 27, 2017
    Posts:
    51
    Hello, thank you for this. How can we make it work? I get a lot of errors in the console.

    Assets/! -ZipLine-RFPS-V1/Scripts/RfpsZiplineScr.cs(17,8): error CS0246: The type or namespace name `hebertsystems' could not be found. Are you missing an assembly reference?
    Assets/! -ZipLine-RFPS-V1/Scripts/RfpsZiplineScr.cs(14,8): error CS0246: The type or namespace name `XInputDotNetPure' could not be found. Are you missing an assembly reference?

    Thanks.
     
  5. ronaldomoon

    ronaldomoon

    Joined:
    Jan 24, 2014
    Posts:
    87
    Thank you for doing this, Herman, and the rest of the Devdog team as well.
     
    Oderus_Urungus likes this.
  6. KyleFriesen

    KyleFriesen

    Joined:
    Jul 21, 2015
    Posts:
    2
    I am currently developing a medieval action game using the Realistic FPS Prefab. I am incredibly happy with the tools the prefab provides and I have been able to use it as a framework for many of the game's functions. I have run into a problem recently with the ranged AI. Up until this point I have only used the tools to make melee AI but I am trying to modify the ranged AI to shoot physical arrows instead of just sending raycast damage. What would be the best way to go about this and making the arrows damage both the player and AI?
     
    Last edited: Dec 23, 2018
    jons190 and OZAV like this.
  7. Oderus_Urungus

    Oderus_Urungus

    Joined:
    Jun 8, 2017
    Posts:
    96
    I haven't changed a model out in a while, but if I remember correctly I copied each component from the zombie model and added them to my enemy models. Of course you have to copy the zombie animator controller and rename it to your model as well as changing the animations to your models animations. Hope that helps.
     
    jons190 likes this.
  8. Oderus_Urungus

    Oderus_Urungus

    Joined:
    Jun 8, 2017
    Posts:
    96
    You could comment them out, unless you want controller vibration.
     
  9. StevaloniYT

    StevaloniYT

    Joined:
    Dec 23, 2018
    Posts:
    2
    pls help me
     

    Attached Files:

  10. Mario167100

    Mario167100

    Joined:
    Jul 25, 2016
    Posts:
    49
    Just a quick question
    I might have my enemies have a death animation instead of ragdolls. I know that RFPS supports death animations, i'm wondering how to do it.
     
    KyleFriesen likes this.
  11. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    299
    Hey, Nick, Happy New Year. Have you read our Best Practices advice, as I commented for everyone's use at the script start ? If you have, you will see that it says "if any 'using' statement (like HerbertSystems namespace) or other namespaces you don't have is causing you exceptions - un-comment it". And for the XInput (your second) exception - you basically need to have XInput installed, as two DLL's in your Plugins folder - the procedure is to say again: explained in our comments at start of the script, in the same "Best Practices" comments section. So: reading manuals and comments does help, let's take it from there, so you can update us here further - how it went for you from there, let me know by PM if anything stacks after that again, i will give you a full guide if necessary with XInput ( that is there to do gamepads vibration effects and for no other reasons ) [In the RFPS movement - we lave no man behind, I hope to the best for it, in the 2019 and beyond, to all of our members and the dev's - the best is - still to come, as we progress] :).
     
    Last edited: Dec 23, 2018
  12. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    299

    ... The first thing is to untick the "Ragdoll" option ( i think it was in the CharacterDamage" script), and than go about the animations assigning work. While ... i think that Ragdoll option is lot more realistic, and it picks up the physics of ragdoll very well, as well, once character dies and a ragdoll is instantiated, but that's just me, up to you there, for your project needs :).
     
  13. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    299

    1 Read the second line on the console carefully (again, what is advising you to do),
    2 Go: Edit-PorjectSettings-Input, and in the Input dialogue - create the new inputs with those missing names, and assign inside any buttons / axes you like for it, it does not matter that much, once they are newly created, and so that way does not upset that your script any more) BTW - this is how all coding Inputs in Unity should be done - binding the code directly to Input section, so you can assign anything you like of buttons / axes there. [The Keycode dot method of scripting inputs and binding only to keyboard that way limits your project Input capabilities to a great deal, because it accepts only keyboard as the input in that case, and is mainly made by the dev's who care only to get your money and nothing else] *** Keycode dot, and keycode mouse methods are betrayal of Unity. :).
     
    Weblox likes this.
  14. StevaloniYT

    StevaloniYT

    Joined:
    Dec 23, 2018
    Posts:
    2
    thx bro
     
    OZAV likes this.
  15. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Modify the NPCAttack script's FireOneShot() method. You could adopt some of the code used by the player to shoot arrows, in which case you'll also want to modify ArrowObject.cs to detect the player's layer and do damage to the player.

    RFPSP doesn't use an input named "left" (with a lowercase L). Your problem is caused by a different asset or script. A0101A just posted what to do. Find out what inputs the other asset/script requires, and define them in Edit > Project Settings > Input.
     
    KyleFriesen and OZAV like this.
  16. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    299
    Btw, Jimbob, Tony - please, if you ever make any improvements to Zipline RFPS I just released - please upload here, for everyone's uses, so we can all have more uses (and versions) of it, over the everyone's various RFPS based projects :).
     
  17. BrandonDeee

    BrandonDeee

    Joined:
    Dec 26, 2018
    Posts:
    5
    Hey Tony, I currently have RFPS V 1.23 Since 2 years now, I've been creating my game with it, and am to far to upgrade. So I was looking into inventory systems and It says I need S - Inventory V1.21 because I have RFPS V 1.23. I think S - Inventory has been taken down. Is there a way you can send it to me please?
     
  18. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @BrandonDeee - Sorry, I can't. S-Inventory was made by a different developer. I don't have the rights to distribute it. You could try to contact the developer, SoumiDelRio. But since it's no longer on the Asset Store, you probably won't be able to get support for it. You could consider upgrading to the latest RFPSP and using Rucksack.
     
  19. BrandonDeee

    BrandonDeee

    Joined:
    Dec 26, 2018
    Posts:
    5
    ohhh damn, does he have an email i can reach him at ???
     
  20. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    My previous reply has a link to the S-Inventory dev's contact form.
     
  21. BrandonDeee

    BrandonDeee

    Joined:
    Dec 26, 2018
    Posts:
    5
    ok
     
  22. Oderus_Urungus

    Oderus_Urungus

    Joined:
    Jun 8, 2017
    Posts:
    96
    I just recently tried this method, even though I have been developing my game for 2 years. It just wasn't as important an issue to me. Last night I tried this method, and it does indeed work in the editor to the color I want, but on play it reverts back to the green arm sleeves no matter what color I assign.

    Any suggestions? @tony Li?

    Also, I have screwed around and somehow all of my automatic weapons are pulling up a mask like my sniper rifle now when I aim down the sights. I dont mean they are pulling up a scope prefab, just the mask that darkens the screen like when you aim down the scope of a sniper.

    I have the flu, and im stumped as my brain just isnt focusing properly, so any help from anyone would be greatly appreciated.

    Thanks.

    Edit- @petercoleman
     
    Last edited: Dec 27, 2018
  23. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    It might be safest to revert that stuff back to a previous commit. I haven't worked too much with models in RFPS, although there are a good number of people here who have. Maybe they can give some pointers.
     
    Oderus_Urungus likes this.
  24. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240
    Hi, and sorry my inglish.

    Greetings, I need help, I do not want to clone my "Player Character Model".
    When I run the game I get "Player Character Model (Clone)" I need my player configured not a clone.

    How can i fix this?
    thx!
     
  25. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Hi All,

    I am trying to use the RFPS move trigger script set up (from managers and examples) to get NPC's to move to points (locations) and play sounds as they do out of the box. That works OK but for my purpose not quite how I want it to work....

    Can anyone help with the following please.....

    Using RFPS move trigger can anyone advise how I can get the NPC when at a move trigger location to STOP there while the sound plays, before moving on to the next Move Trigger?

    I have been trying to get this to work via various methods for some time without success e.g. various waypoint path assets both free and purchased and also state machine assets, none of which I have got to work as needed.....and then came across the Move triggers in the RFPS folders and thought I would give that a go. Seems it works as I want except for having the NPC to Stop or wait at a location to play their audio sound and then move on to the next location and so on :)

    As always any help is much appreciated.

    Thank you.

    UPDATE : I have found a solution - unless anyone can think of a better or easier one and that is I deactivate the move trigger objects completely until I need them to move the NPC by utilising a standard Timed Object Activator attached to a Trigger that activates the move Trigger after my specified amount of time (length of sound file + a second or two) and off goes the NPC :) That works well it would seem and is easy to set up!

    Peter
     
    Last edited: Dec 28, 2018
  26. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Hi Oderus_Urungus,

    You started a Unity conversation with me re : Hey. I've noticed you have seemed to have some success with this, and I was wondering how you did it. I tried Tony's suggestion and it worked in the editor, but not in play mode. Any help would be appreciated!

    Thanks!


    So I am replying here in case it helps others...

    My main Player character I have changed completely but just tried the default and it still works OK for me where the whole player clothing is changed to a bluish colour - and the FPS arms too work in play mode as a matching blue..

    This is what I have/had done. Before you mess up your player/main make sure you have a backup of the RFPS folder somewhere so you can copy things back if anything goes wrong.

    Here we go :

    1. In the RFPS folder Objects/NPC's/Soldier NPC/Textures/soldier there should be a texture named Unity_goodsoldier_Body_DIF_wip which is the main texture for the Player model (complete). This texture if you want to match up the main player texture TP mode with the arms in FPS mode you will need to edit in a paint programme to change its colour to whatever you want (having made a backup of it somewhere of course). This texture now being your new colour could be used for both the main player in all modes including the fps arms. However what i have done is made a copy of it and the called the copy PlayerArms1.

    You now should have two textures exactly the same being of a matching new colour. Yes.

    If you wish you could copy the one for the body and rename it to PlayerSkin1 or similar so you have clearly named textures for main texture and arms in fps. Yes. In total you now have 3 all being the same - reason is RFPS may not like to use the one called PlayerSkin1 but look for the original Unity_goodsoldier_Body_DIF_wip which now is in any case the colour you need. Yes

    Now you should have all the textures you need for Player in TP and FP mode. If you have any issues later you may need to make sure that you have materials for the new textures as RFPS can be a pain sometimes. Whatever reply on your backups if anything goes wrong so make sure you have some backups.

    Now for the important bit :

    2. In the RFPS folder objects/weapons find the fbx : SoldierSleveR and select it. In the import properties for it look at Materials and make sure that import materials is set to off so none are imported.

    You could start a new empty scene for a test and place a floor of course and place into it the SoldierSleveR fbx now you can select it in the level view in editor and it should be a model with no texture/default....

    If you look at the mesh renderer standard shader you can now add your new PlayerArms1 texture to it or perhaps better still create a new material where you think is best approriate so you can easily find it and add teh texture directly to the new material which you should name to match the PlayerArms1 texture name perhaps...

    Now you can add the new material to the Material slot of the SoldierSleveR in your level. You should probably save the level somewhere now in case you need to do more work with it and play around with it. I would close the level then open it again and place the Player in it. Place a weapon pickup in it and see what happens.

    That should be all you need to do, However RFPS can be a pain so if in testing things don't actually show up correctly you may need to try to force them too another way. Thats another day :)

    I have attached a screen shot that may help. As you can see as well as having a new texture-colour/material, I have also adjusted the albedo colour to quite a bright blue tint as in my instance I found that the blueish colour tint of the texture alone does not show up well in Game Play in first person weapon mode (on arms) and would not match the main Body texture for colour in Third Person either otherwise, Ahh lots of niggling issues Yes.

    Hope that helps. Sorry its long winded and its a tricky pain its not really as complicated as it looks (well yes its a pain in the butt).

    PlayerArms.jpg

    Peter
     
    Oderus_Urungus likes this.
  27. Oderus_Urungus

    Oderus_Urungus

    Joined:
    Jun 8, 2017
    Posts:
    96
    Haha...dang. Ok, I'll give it a shot. I'll import it into Photoshop and see what I can do. Thanks @Peter Coleman.

    Post Script- That is a lot to just change the color of a material. Lol
     
  28. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Hi Oderus_Urungus,

    You could just try copying the original texture file Unity_goodsoldier_Body_DIF_wip and re-colour that which should then update the player main body to a new colour/tint - then apply the same texture/material to the SoldierSleveR.fbx model which hopefully would then apply the same to the Player Arms in FPS mode. Thus only one original texture/material would be needed applied to both.

    I just made copies/duplicates so I could edit them independently and having different ones means I knew which one belonged to which when things did not work.

    Additionally : If none of the above work what you could try is to take your new texture/material and apply it directly to the First Person player arms found under the Player Main component / FPS Weapons section attached to the Player Character. Find the weapons and try using the Sniper Weapon by exposing it (Enable it so you can see it) then you will see the arms attached to the weapon model. If the arms do not display your new texture/material select the arms individually and apply your new texture/material directly to them and hopefully it should display on them.....

    Then apply the changes to the Player Main. Place a Sniper weapon pickup in the level and collect it and see what happens. If the new texture/material does not show up then you might try applying the changes on the Player Character FPS sniper weapon prefab that you just applied the new texture/material too so both should be updated.

    If that does not work then I am afraid I can't remember all that I actually did as it was some years ago that I did it :)

    Sometimes RFPS and or Unity can be a pain in updating stuff and things work after a reboot - sometimes not :)

    RFPS in particular can be a pain as its non standard in many things and the Player Character and weapons are especially difficult to work with as they are complicated in how they are designed and set up including the underlying code structures apparently....

    At the end of the day most things can be done but if not and expert programmer with a full understanding of RFPS (unity) code then it gets even harder.

    I have lots of difficult issues all of the time as I have many systems integrated with RFPS and want it to do many things it does not out of the box....

    Thus far I have succeeded in getting all I want to work to some degree or other but its often a nightmare and arduous task which yes often drives me to insanity and I have a permanent headache....

    No one said making anything other than a simple game was easy and that's an understatement. Its hard work but best thing is not to panic, keep calm and have faith that with enough effort and searching for solutions most things can be done. Often the easiest route is the best and we often tend to make things more difficult than they need be. Patience to find the answers one needs is a virtue when we just want to get on and do it I know.

    I don't use the default player or weapons currently as I have changed them all to new ones and that was difficult until I discovered how to do it - then one wonders what all the fuss was about. Of course its a lot of work which could be easier, But using RFPS it is just not as perhaps with other systems. Overall though RFPS is a decent system and better the devil you know unless you want to go through the same or perhaps worse with something else. As far as I am aware there is no more simple system out there better than RFPS. Its as good as it gets as far as I know.

    :)

    Regards

    Peter
     
    Last edited: Dec 29, 2018
    Oderus_Urungus likes this.
  29. BrandonDeee

    BrandonDeee

    Joined:
    Dec 26, 2018
    Posts:
    5
    Im so screwed, hes not anwsering me and I am to far with my game to update it. . . .
     
  30. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    He might be on holiday. It's that time of year.

    Herman Tulleken posted here about Rucksack integration. You could check with him to see if it would work in RFPS 1.23.
     
  31. BrandonDeee

    BrandonDeee

    Joined:
    Dec 26, 2018
    Posts:
    5
    ah I can't this doesn't have a crafting system
    e
     
  32. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Hi all,

    I have another question - asked about before no doubt?

    I am trying to get NPC enemy characters to have particles emitted from the end of weapon when shooting.

    Of course I can attach particles to the correct position and get them to play in game. However - the particles of course are always active. Setting them to not play on awake would mean they don't play at all because they need to be activated only when the weapon fires and the bullet is ejected.

    Now clearly the Player object has more exposed effects than NPC's have for weapon effects which have none effectively except for the muzzle flash and tracers.

    I have been trying to get particles to work for NPC's weapons by adding them to the Muzzle Flash or the Tracers both physically and in code in the NPC attack script. However I have not got it to work as yet and have stripped out all of my code again and given up for the moment. I clearly need some more banging of head against the wall :) and clear thinking when my headache is gone! or much more searching around the web for a solution.

    Anyone done this and or have any pointers to a solution.

    Thanks again for any help.

    UPDATE :

    This is now done so no worries. Sorted- Flamethrowered :)

    FutureCity-8.png


    Regards

    Peter
     
    Last edited: Dec 31, 2018
  33. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    299
  34. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240
    please help!
    Is there any way to not clone the model?

    Thank you
     
  35. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    299

    You will need to post a screenshot, of what is really going on, in your editor, a full editor screenshot, so we all here can get some idea of what your problem exactly is, first ... If unity is loading a prefab, per say, from the resources, that (often) calls it a Clone at the end of it's name, if you have more than one such object in the scene during the gameplay ... it's a main reason, but could be other reasons, as well, to me it looks like something with pooling, since something definitely creates multiple instances of your Player, whatever that object is. Anyways, nothing will be (much) clear without the screenshots.
     
    Last edited: Dec 31, 2018
  36. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240
    https://imgur.com/a/ZABiH6o


    thanks for answering,

    I am only interested in using third person, I need you not to clone the "Player Character Model"

    I think he does it from

    PlayerCharacter.cs
    fpBodyObj = Instantiate (myTransform.gameObject, myTransform.position, myTransform.rotation) as GameObject; // duplicate this object

    but if I delete this, I no longer clone but the model does not work.

    thx
     
    Last edited: Dec 31, 2018
  37. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    Hi Guys, I have been working on my game for about 3 years and using RFPS, and just over a year ago I decided to remake it from scratch and now im releasing a free update. Includes wave based modes [wave, gungame, deadin5] also have a survival mode which you build craft and survive.
    I'm terrible at making videos but here's my attempt at a trailer. It's on Steam! https://store.steampowered.com/app/429490
     
  38. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Nice shader effect when chopping trees!
     
    llJIMBOBll likes this.
  39. Oderus_Urungus

    Oderus_Urungus

    Joined:
    Jun 8, 2017
    Posts:
    96
    I like it. I'm going to buy it as soon as I get off of work. I support fellow devs!
    Great job, JIMBOB!
     
    llJIMBOBll likes this.
  40. jons190

    jons190

    Joined:
    Sep 13, 2016
    Posts:
    260
    All the models use an actual arm and sleeve 3d model. I deleted the sleeves on my models and use a bare arm. Saved a draw call..... My guess is that you have to delete/change colour on all the models.... not just one...
     
  41. jons190

    jons190

    Joined:
    Sep 13, 2016
    Posts:
    260
    nice. i too use it for melee combat. I am just using the default swords at the moment. How hard was it to change to that broadsword?
     
  42. Oderus_Urungus

    Oderus_Urungus

    Joined:
    Jun 8, 2017
    Posts:
    96
    I think im going to copy the sleeve models, rename them, make a new material and apply a leather map to it, then put those on the arm models.
    Probably won't work, but it's worth a shot.
     
  43. jons190

    jons190

    Joined:
    Sep 13, 2016
    Posts:
    260
    And how?????
     
  44. jons190

    jons190

    Joined:
    Sep 13, 2016
    Posts:
    260
    and remember...each weapon set has a arm and sleeve model. So you'll have to change out like 9 or 12 or so (what ever the number of the default weapons are)
     
    Oderus_Urungus likes this.
  45. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    299
    ... Tony, Jim, anyone, with this fella sebasfreelance ... what is he trying to say here, any ideas what his work-around might be, deactivate any cloned models via the script ? He thinks it does it from PlayerCharacter.cs ...
    fpBodyObj = Instantiate (myTransform.gameObject, myTransform.position, myTransform.rotation) as GameObject; // duplicate this object ...
    "but if I delete this, I no longer clone but the model does not work."
    PlayerModel-Cloned.jpg
     
  46. F0GZ

    F0GZ

    Joined:
    Feb 22, 2018
    Posts:
    33
    zarkam, llJIMBOBll, TonyLi and 2 others like this.
  47. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Why does it matter?

    RFPS splits the Player Character Model into two GameObjects:
    • Player Character Model, and
    • Player Character Model (Clone)
    Each GameObject handles a different part of third person mode, and they are designed to work together.

    If you don't want it to work this way, you'll need to rewrite PlayerCharacter.cs.

    However, I recommend you work with it the way it was designed.
     
    Weblox and OZAV like this.
  48. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240

    ok thanks,

    even so I found just what I needed here in the forum.
     
  49. GameMunchers

    GameMunchers

    Joined:
    Jul 3, 2017
    Posts:
    40
    Hey Tony!!

    So about the inventory system, I followed that guide on how to set it up and now this happens, So basically it works when I set it up. The food applys to my character when eaten and the gun uses the ammo in the inventory but for some reason the gun wont go into my skill bar?? and also when I save and reload the scene, the food that I eat in the inventory doesn't apply to my character anymore and the gun doesnt show when I drop it either? Any idea on what's causing theese problems??

     
  50. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @GameMunchers - What versions of Unity, RFPS, Dialogue System, and S-Inventory are you using?

    Are there any warnings or errors in the Console window?

    Does the Dialogue System's S-Inventory integration example scene work correctly?