Weapon drop mod

Discussion in 'Fallout General Modding' started by Josan12, Jul 13, 2009.

  1. Josan12

    Josan12 Vault Senior Citizen

    Oct 15, 2007
    MIB88 and i have put together a simple little script that, essentially, makes a critter drop their weapon on the ground when killed.

    While it sounds simple, the gamplay effects of this little change are quite profound. Im sure we all know how weapons lying around on the ground can change the course of a combat.... :shock: Critters on both sides will be able to get their dirty mitts on them - including trigger happy Vic and Sulik. And also, as anyone who's played with thrown weapons will know, items tend to get lost under the piles of corpses :twisted:

    So i wanted to throw this out there and get a poll of opinions about this big-little change and see what the community thinks about it: good, bad or ugly??
  2. Kanhef

    Kanhef Vault Dweller

    Sep 2, 2007
    I like it. Should make combat more exciting, especially the longer battles. Normally it's good to take out the most dangerous enemies first, which are usually the ones with the biggest guns. If one of their buddies can pick up that machine gun or rocket launcher, the overall threat level doesn't decrease nearly as much. The second person isn't likely to have ammo for it, at least.

    A few questions:
    Can and should critters drop weapons in their 'off hand'?
    Obviously, floating eye bots, turrets, deathclaws, and Horrigan shouldn't drop weapons. Security bots have a Robo Rocket Launcher, which shouldn't drop, and an Avenger minigun; should this drop (being a normal weapon) or not (being part of the robot, not held externally)?

    Unless Timeslip finds a way to draw items on top of bodies and bloodstains, it will be almost impossible to loot items from enemies. In cities you can wait for the bodies to disappear (though robots never do, and blood takes a long time to fade away), but there's nothing you can do in random encounters. This could be rather annoying.
    On the other hand, it dramatically changes the game's economy. The player will have to buy new weapons and ammo much more often. Without valuable weapons to sell, it will be more important to have a good Barter skill, do quests for money or stuff rather than free karma, scrounge for everything that can be looted, and even steal things. Getting enough money for the combat implant enhancements could be quite a challenge.
  3. MIB88

    MIB88 So Old I'm Losing Radiation Signs

    Feb 22, 2005
    Ok, at most, we are talking about the occasional weapon that will end up under a body. It's not gonna happen nearly enough to affect how people handle such things as bartering, using ammo, and accumulating money.
  4. Josan12

    Josan12 Vault Senior Citizen

    Oct 15, 2007
    My thoughts exactly. I think it would make combat much more dynamic, dangerous and exciting! :D

    Currently, the script makes them drop anything 'in-hand' - both item slots. Also, they drop when KO'd.

    Yes, good point. And i'm not sure how to stop robots 'dropping' their guns .... MIB??

    Also my thoughts exactly. I think it would improve the game economy significantly - and although there will always be those who like their free armory of weapons, i do not. But as MIB says, i don't think that many weapons will get 'buried'. At a guess, maybe 20%. But IMO that adds a level of realism, as guns do get lost, broken, destoryed in the mayhem of combat...
  5. MIB88

    MIB88 So Old I'm Losing Radiation Signs

    Feb 22, 2005
    If you want weapons destroyed a percentage of the time, Josan12, I can add that too. As far as bots dropping their weapons, there are two possible solutions. The first is simply to not add the relevant code to those critters' scripts. If Timeslip were to come up with something more global, as we talked about earlier, then it's easy to change the code. Basically, it would just say only process that part of the script if the critter is not a certain critter number (easy to implement that since there are relatively few critters this is relevant for).
  6. Josan12

    Josan12 Vault Senior Citizen

    Oct 15, 2007
    Good news! What do you think, Timeslip? (if you are reading this)
  7. B-2Admirer

    B-2Admirer First time out of the vault

    Oct 28, 2008
    Are you going to modify each affected critter's script to make them drop weapons?
  8. smilodom

    smilodom Look, Ma! Two Heads!

    Apr 17, 2008
    Very good idea...keep on working :clap:
  9. Josan12

    Josan12 Vault Senior Citizen

    Oct 15, 2007
    Yes. But with a little luck (and Timeslip) the script can be integrated into the engine (or something - like i know what i'm talking about :D) reducing the work hugely.

    But even if that doesn't work out, i'll go through the humanoid scripts and modify them.
  10. Sieg

    Sieg First time out of the vault

    Dec 8, 2008
    A very interesting idea. Combat would certainly be more interesting.

    Of course ammo is something else to consider, if the enemy drops an empty weapon it won't change much if they pick it up. Also if it does have ammo, it may be limited depending on the NPC's ammo stock.
  11. Glovz

    Glovz Vault Dweller

    Sep 16, 2005
    I really like this thread and I'm thinking this sort of code could be added to the engine somewhere in the combat/damage functions.

    I like the idea of a random chance weapons will be destroyed when dropped. Though this should only apply to non-melee weapons, it wouldn't be terrible if it occurred to all weopons.

    As for weapons being empty or having very limited ammo left - that the chance a player or npc will have to take ithey choose to pick up a dropped weapon in combat. :D
  12. Josan12

    Josan12 Vault Senior Citizen

    Oct 15, 2007
    Ok fellow Fallout fans. I'm pleased to announce, that courtesy of MIB88's scripting skills, and Timeslips engine hack sfall, this mod is now playable.

    Name: Weapon Drop Mod 1.0

    How to use:

    Simply copy this file into your Fallout2\data\scripts folder.

    You MUST have the lastest version of Timeslips sfall (1.47 or above)

    What it does:

    All humanoid critters, on death, will drop the weapon in their active item slot. This will dramatically affect tactical combat gameplay, and probably make it more likely that you'll get your ass whooped so use at your own risk!

    It will also make it harder to loot all of your enemies corpses as weapons will occasionally get 'lost' under bodies, scenery etc. Think of this effect as weapons getting destroyed, damaged and lost in the heat of battle as would happen in reality. So don't whine about it and rise to the challenge!

    There will likely be future versions of this mod that, among other things, makes critters drop their weapons on KO, arm cripple, etc.

    Any questions, just ask. Feedback and suggestions appreciated.

    Happy hunting!
  13. Glovz

    Glovz Vault Dweller

    Sep 16, 2005
    This defintely should be added as an optional install by killap in the RP at some point.

    Testing should be done to see if game balance is thrown off or tweaking is needed for "on KO, arm cripple, etc. ".

    I would help but RL is kicking the shit out of me right now.
  14. Ohaimerk

    Ohaimerk modoc, den, grave Orderite

    Mar 30, 2009
    I love the idea. I'd play it right away, but am having troubles downloading.

    EDIT: Nevermind, it was my firefox popup blocker. Got it fine now.

    Played around with it. It works great and is uberfun. I started a new game, went to the den, killed flick for some weapons, and killed the 3 man gang north of flick's place. Each one dropped a weapn in what looks like the hex on the right arm of the dead body. I took out the female one in tubby's place, and she dropped her spear and a knife(knife ended up a few hexes down from her)

    When I took out tubby, one of his thugs picked up the knife and armed it(but ran away due to his wimpyness)

    Only thing I can think of to comment on, other than AWESOME!!!, is the fact that the secondary hand's weapon gets dropped. I always imagined that the non active hand was for a weapon in a holster, and shouldn't drop once dead. Another thing, is it possible for a weapon to get dropped behind a wall?

    I will be playing this all day, and maybe even most of the week. Great work.


    Found a bug. When you load a game the dude_obj does his weapon putting away motion, then the player's active weapon is on the ground(but the player's inactive weapon slot is unaffected. I had a spear in active and sharpened spear in inactive, and the regular one got dropped while the sharpened one stayed in my other slot)

    This doesn't happen the first time you load a game(first start up) but does happen if you quit to the main menu and load. Party members aren't effected by this problem as far as I can tell. Other than that it's all working good so far.

    Great fun, having a good time with this little mod. One comment, and it has nothing to do with the mod at all, is that a lot of dudes seem to keep ammo in their inactive slot, which doesn't make a whole lot of sense. I guess it's to keep the player from stealing it.

    And, the guns do go on the other side of walls. Not a big problem, but a bit annoying
  15. Josan12

    Josan12 Vault Senior Citizen

    Oct 15, 2007
    Glad you like it, man.

    Yeah, we know about this wierd 'butter-fingers dude' bug and will try to resolve it for the next version.

    Now that's something i didn't know! I would like to get some opinions about whether the 'inactive item slot' or 'off-hand slot' is intended to be a holstered weapon or not, and therefore should be dropped or not. I'm leaning toward not. Opinions?

    Yes. That will happen. I think we might reduce the distance weapons drop from 1 or 2 hexes to 1. This will help, but not eliminate the problem. The same happens with thrown weapons so is just a quirky part of the game engine...

    I agree, but i'm not so sure Killap would. More likely we can ask Timeslip to integrate it into sfall as an option that can be turned off or on.
  16. Ohaimerk

    Ohaimerk modoc, den, grave Orderite

    Mar 30, 2009
    I think you meant to quote the other part of my post for this, lol. My opinion on the whole inactive slot thing is that the inactive item slot is what's in one's front pockets/holster/utility belt, and the rest of the inventory is in some sort of shoulder bag or backpack that's there but not represented by the sprites.

    I don't know for sure if they are keeping ammo in their inactive slot, I just noticed that some people(most noticeably metzger's guards) were dropping ammo as well as their guns. I thought it might be a bug with the inventory being cleared out, but I tested it on sulik(sorry about that frien) and he only dropped what was in his 'hands' and his general inventory was left in his body.
  17. MIB88

    MIB88 So Old I'm Losing Radiation Signs

    Feb 22, 2005
    It's already been fixed. Josan12, if you get the latest MM (2.35.4) you will find the latest file in there. Sorry, I'm not in a position right now to send you that file separately.

    And those guards have to be holding ammo in their hands. The script is not just gonna create some random ammo near their bodies.
  18. Kanhef

    Kanhef Vault Dweller

    Sep 2, 2007
    Some thoughts: Is it possible to check the item type, and use that to make only weapons drop? Maybe keep unarmed-class weapons from dropping, since you'd really have to loot the corpse to take them. On knockout is good, on arm cripple makes sense for two-handed weapons more than one-handed ones. I think that's all possible if you can get a pointer to the weapon.

    I agree with Farmerk that the inactive item should be considered something readily accessible, but not actually in the hands and so not prone to being dropped. Technically, I believe the active/inactive slots are the same as the player's left/right hand item slots, so there's no actual restriction on what can be in them.
  19. Ohaimerk

    Ohaimerk modoc, den, grave Orderite

    Mar 30, 2009
    I wasn't thinking that, I just was thinking there was some kind of bug with certain critters where either the weapon was being unloaded or that the inventory was being dropped. Neither were correct, it's just weird that the ammo is in the item slot. Is this a normal occurrence throughout the game?
  20. Josan12

    Josan12 Vault Senior Citizen

    Oct 15, 2007
    I like this idea. I'll ask MIB88 if it's possible. But i suspect we might be reaching a little. When Timeslip returns i think we'll focus on asking for the KO and arm cripple stuff.

    Yes, i think i agree with this. Again, i'll ask MIB.

    Here's an updated version of the mod without the 'butter-fingers dude' bug:


    Please keep the feedback and comments/suggestions coming as the mod will likely need playtesting and tweaking...

    *Mod link updated 01/04/10*