Making NPC's loot corpses?

Josan12

Vault Senior Citizen
Is it possible to set NPC's to be able to loot corpses? It struck me that if they could, it might add a really interesting level of interaction and unpredictability to the game. Any ideas?
 
I was thinking about this too. Don't know how it could be done just yet... or if it can be done. An alternative might be that, after every battle, or just time wandering around the wastes, random items might be added to the NPC's inventory to simulate that they had picked up things on their own.
 
MIB88 said:
I was thinking about this too. Don't know how it could be done just yet... or if it can be done. An alternative might be that, after every battle, or just time wandering around the wastes, random items might be added to the NPC's inventory to simulate that they had picked up things on their own.

Hmm

Dunno don't like that to much. Well I think it could be usefull in the beginning of the game So I would like to see a dialog option that makes you party NPC's look for items.

I dislike haveing to clean my NPC's inventory.
 
Well, it could be done in a smart way. It could be set that things would be generated in their inventories that are consistent with their personalities (i.e. Myron might produce drugs, condoms, the occasional burst-fire weapon he craves, etc.). It makes sense. Personally, I like the idea that NPCs are not completely controlled by the player (reminds me of some characters from other games who sometimes make their own decisions about things even though you want them to do something specific, like in Wasteland and the original Bard's Tale). Having them generate their own items may add to that feeling. Of course, to really have this feeling it would have to be set that the NPCs never just freely give up items to the player, preferring instead to only trade. But, I'm sure that is probably too much alteration for most players. Maybe I'll make that an option for one of my personal mods... :wink:
 
MIB88 said:
Well, it could be done in a smart way. It could be set that things would be generated in their inventories that are consistent with their personalities (i.e. Myron might produce drugs, condoms, the occasional burst-fire weapon he craves, etc.). It makes sense. Personally, I like the idea that NPCs are not completely controlled by the player (reminds me of some characters from other games who sometimes make their own decisions about things even though you want them to do something specific, like in Wasteland and the original Bard's Tale). Having them generate their own items may add to that feeling. Of course, to really have this feeling it would have to be set that the NPCs never just freely give up items to the player, preferring instead to only trade. But, I'm sure that is probably too much alteration for most players. Maybe I'll make that an option for one of my personal mods... :wink:

Yeah, right on MIB. That's the idea. I think it would be great. I think it would be better to enable NPC's to loot corpses & containers though. We would just need to set it so that if an NPC is within x hexes of a container/corpse (which i beleive are handled the same) then they move to it and loot it.

I'm not too sure about generating random items in the NPC's inventory - i think it would work as a last resort if there's no other way of doing it. But remember the PC is effectively the one who's gonna be getting whatever odds and ends turn up in the NPC inven. I think it's better not to add items to the game if possible (there's already alot of items)
 
But I wouldn't like it if I kill someone and my fellow friend takes stuff from the dead then so that I need take the stuff from my fellow friend back. Or if I don't, the inventory of the NPC gets pretty full after a while.

I like the idea with random items better. But here the same: I wouldn't like it if the inventory gets pretty full after a while. I am thinking now about a list with items the NPC can get randomly after a while - and if the player doesn't take it, it will disappear after a while.

My idea:

-> NPC gets random items X and Y after some time.
-> if the player takes the items, the NPC gets new stuff after a while. (maybe buying? Or the NPC gets only not _that_ usefull stuff so that buying wouldn't be worth the pay...)
-> if the player doesn't take the randomly generated items, they will dissapear after some time -> then, a bit later, new random items are generated.

The items could be stuff like normal junk, stones, knifes, maybe some ammo (but this could maybe make problems, if it is ammo the NPC already has and use for his gun(s)).

I have to say, I like the idea...


...and if someone has lots of time, this could become even bigger. Let's think about this: The NPC (I am speaking about companions) gets randomly some items. If he has the amount X of randomly generated items and the player enters with him town Y, the NPC opens a dialogue with the player and tells him, that he needs to go to the lokal trader. The player can then make the decision yes or no. If yes, the NPC leaves the party for a short while, walks to a trader, floats a message like "Hey dude, let's barter..." and stands there for a short time (some items get deleted, maybe some other added). If he is finished and the player is still in town, he comes back and is in the active party again. If the player leaved the map already, he goes to a lokal Bar or so and is waiting there.

Heh, what do you guys think? I like it and I am thinking now about adding it into SD2...


... man, NPC interaction in SD2 will be hella better than in Fallout 2. :)
 
I like everything Lexx suggested. I also have an additional idea:

What's the point for you to find in your NPC another (sharpened?)Spear, Jet or even Hunting Rifle in midgame you're floating of such?

Let's make NPCs "create" unique items - maybe dependent on NPC/player level (it would suck if it depends on NPC level, because there will be a lot items that will never be seen by the player). Here are some suggestions about those items:

Melee weapons with 3 (or more) range, weapons damage type usually unavailable for that weapon "class" (like a Big Gun with EMP damage), drugs (of course, with no addiction; also, unique somehow and/or with no withdraw effects except if overpowered), maybe some things without function (like vial of isolated FEV), even suits making you look like some creature (yes, I know they have just unarmed attack animation, but they can still be used).

Maybe having a certain NPC in your party will give you a perk while he's with you and as long as you have the perk, the NPC will count towards your party (to avoid having all the "NPC perks).

Maybe with some NPC(s) you'll be able to respend your SPECIAL points - a single one doing all of them or something more complicated (like Sulik enabling trading ST for PE and AG, IN for CH and CH for IN...You got the whole idea).

And, of course, there are some things you should keep in mind:
•That new "system" can be used to balance the NPCs - so that it won't any "weak" NPCs like Lenny anymore;
•It will be nice to make it so that certain NPCs fit well with certain characters - for example, Sulik could give things useful for melee weapons character, Myron could be more useful when you have much science and so on;
•Don't forget that making NPCs stronger will make Charisma more useful - it should be compensated in some way (I can't think of one right now)
•That new feature could be used to balance skills by making features for weaker skills (Energy Weapons, Throwing, Steal and other) more useful, while making things mostly for fun (like EMP shotgun that does nearly as much damage as a normal one to robots) for the most overpowered skills (Small Guns).
 
Those are some good ideas, too. I do especially like the ideas regarding the creation/finding of special items only by certain party NPCs. I have no intention of adding anything to level out the various NPCs, such as making certain ones better fighters, or able to use more weapons. I already did that with Miria, and that is enough. However, I think it is a great idea to allow for the NPCs to have other functions which make them more worthwhile in the game. So, sure, Lenny might be a weak NPC, but maybe I could add something to him to balance things out. Or Myron. Weak as hell, but he already produces drugs. I tell you this, if I make Myron tougher, there will be bad side effect... maybe like a drop of 2 points from charisma for the player for having him in the party. :twisted: Just floating an idea.

I like what you wrote too, Lexx. The NPC inventory would need to be cleaned out, or it would just get irritating for the player. It is a lot of scripting to script in all party NPCs to go to all merchants in all maps to sell things. A potential shortcut would be to have the float dialog, fade out/in, and have the party NPC have the inventory slightly modified and have a little more money. Of course, the NPC may just sell something that the player didn't want them to sell. Of course, that is the risk the player faces for giving an item to someone else! :twisted:

As for actually looting a corpse, I keep going over it in my head and trying to figure out how to do it. Just a type of rambling...
There is a function that checks whether or not a critter is dead (critter state), but I don't know if it is fully implemented. Once a critter is killed, the script attached to it is destroyed. Hmm. Maybe a code could be added to party NPCs that says that, if he sees a dead critter, then 'use' it. Upon doing so, the inventory from that critter could be added to the NPCs inventory. Or, perhaps it could be set so that only certain types of items are removed, depending on the party NPC. Of course, the code would have to be written to ensure that a critter is only looted one time by the NPC and that it does not happen during combat. Lots of things to still consider, but, it may be possible.
Of course, all this just depends on whether or not this is still the best way to proceed. Any other possible problems?
 
Ok then i have an uniq fire gecko armor for cassidy, cause all the frames are done (for my metzger mod)


rundemorp0.gif
[/code]
 
MIB88 said:
Of course, the NPC may just sell something that the player didn't want them to sell. Of course, that is the risk the player faces for giving an item to someone else! :twisted:

To prevent this, I have two ideas in mind: The first would be, the dialogue thing I wrote above. If the NPC wants to go to a trader, he talks to the player and the player can say something like "Sure, do whatever you want." or "No, we don't have time for this now.", etc. The second would be that all randomly generated items (if they are generated random) would be marked with a variable or the names of the items and the amount is saved in variables. Then you could say the NPC via script, what item is free for selling and what item not.

Something like this:
vars: Item1, Item1amount, Item2, Item2amount, Item3, Item3amount, ...

Possible random generated items: Stone, Spear, Booze, ...

Now you need a shitload of parameters and if/or/%/ ...

Then you get maybe this:

Item1 == Stone, Item1amount == 1
Item2 == Booze, Item2amount == 3
Item3 == doesn't exist, % wasn't enough or whatever

If the NPC is now in the store, he sells randomly Item 1 or 2 or both and gets something other from the trader. This could be some other item or money.

Well, yeh. This would be my first thought about it.
 
The dialog option would work. That other part about variables being assigned to randomly generated items sounds great, in theory. However, I think that bad things would happen to your game. Remember that 'too many items' bug? I'm pretty sure that is the result of too many items with scripts attached. And that is the only way you could add variables to items.

And Mr. Wolna, are all those frames completed? Do you have ideas for statistics for fire gecko armor?
 
Hmm yes... the too many items thing is bad, I didn't thought about this. To prevent this, the system could maybe become more simple, I think. Like, every companion NPC has a list of items he gets randomly from time to time. And he also only sells stuff from this list to other traders. This would cut off the hole variable thing I posted above but also would make it less controllable. Still, I like this idea and will think a bit more about it.
 
The NPC item generation/trading idea is interesting, but I feel it will become its own mod or part of the Megamod, and incompatible with everything else. Normally, critters will pick up weapons (maybe drugs and ammo?) that are lying on the ground. I think Josan's original idea is to have them take weaponry from dead bodies as well. This is more of an engine tweak than a mod, and I don't think it would be out of place in killap's RP.

If critters in general (not just party members) looted bodies, it would make combat more exciting. Consider: Toad Morton with his light support weapon is much more dangerous than the thug with a 14mm pistol, so you shoot him first, then the guys with the flamer and .223 pistol, as they're the next most threatening. If that thug puts away the harmless pistol and takes Toad's LSW, you have to rethink your battle plan.

In many encounters, critters don't carry any spare ammunition and often run out of ammo. Caravans and brahmin drives especially suffer from this. Taking weapons from fallen enemies/friends rather than fighting hand-to-hand would be more realistic and keep the battle from being so pathetic at the end.

As for party members, it could be nice to have them take better weapons when they're available, or find more ammo if they run out. Imaging Marcus taking and using those plasma grenades from mercenaries around San Francisco. But they might get weapons you'd rather not have them using (Sulik kills Snake Morton with a ripper, picks up G11E, hope you saved recently), so it would be good to have some control over this behavior.

I don't know what it would take to implement this, but critters might need to be prescient about what containers/bodies contain useful items so they don't repeatedly search empty containers. It would be best to only let critters take objects from bodies or other containers in combat, rather than just ones lying on the ground. NPCs searching any container at any time would create too many problems. What happens when one of your party members tries to loot a guarded container? You'd risk having towns randomly, uncontrollably turn hostile. If the guard doesn't give a warning if they can't see you (normally you'd be sneaking), you have an easy, risk-free way of stealing things. Modifying guards' scripts to have them prevent NPCs from searching containers but not turn hostile would make it incompatible with many other mods.
 
Well, setting NPCs to check only containers that were once living critters can (hopefully) be done. I think checking all those other containers could be gotten around. However, what you said, Kanhef, has a lot of merit. It would be really awesome if critter AI allowed them to loot and then use more powerful weapons. Maybe it is something that could only be fixed within the engine, though.
 
Hmm. As far as I can see, the problem would be to tell the NPC where a dead body is and what he has to do with this. Or in other words: We need to check what stuff in the inventory of the corpse is and tell the NPC if he is interested in it or not.

/Edit: Or, let the killed NPC drop his weapon right before he is marked as dead. Sometimes NPCs pick up weapons that are laying on ground (see a Gecko that picks up some brass knucks and attacks the player with them, heh. :) ) But this could make it annoying for the player to pick up the stuff later.
 
Interesting alternative. It would take a lot of time to write it into all critter scripts to drop their weapons. It can be done, though. But, then we run into the problem of more weapons falling under bodies and becoming irretrievable.

Also, definitely looking forward to NPC interactions in SD2. :)
 
@MIB i zhink two animations are not done yet, but this si work of 1 day. Not such a big problem.

@Lexx meaby helios his write_int can hel you. What you think?
The only problem si to find out the right offset in the memory.
 
Help with what? Everything I have in mind at the moment is possible without special added stuff or big work arounds.

And btw. your english is pretty bad again. Use the spellcheck function, thats why it is in.
 
Kanhef said:
If critters in general (not just party members) looted bodies, it would make combat more exciting. Consider: Toad Morton with his light support weapon is much more dangerous than the thug with a 14mm pistol, so you shoot him first, then the guys with the flamer and .223 pistol, as they're the next most threatening. If that thug puts away the harmless pistol and takes Toad's LSW, you have to rethink your battle plan.

In many encounters, critters don't carry any spare ammunition and often run out of ammo. Caravans and brahmin drives especially suffer from this. Taking weapons from fallen enemies/friends rather than fighting hand-to-hand would be more realistic and keep the battle from being so pathetic at the end.

As for party members, it could be nice to have them take better weapons when they're available, or find more ammo if they run out. Imaging Marcus taking and using those plasma grenades from mercenaries around San Francisco. But they might get weapons you'd rather not have them using (Sulik kills Snake Morton with a ripper, picks up G11E, hope you saved recently), so it would be good to have some control over this behavior.

Dead on, Kanhef - this is exactly what i was thinking.

There would indeed be some issues to figure out. NPC's could be set to loot any corpse within, say, 6 hexes. But as you say this could result in NPC's trying to loot at the same time causing crashes. I agree it would be better if it were possible to set them to only take items pertinent to them - as they already do if the items are lying on the ground like Lexx says.


Lexx said:
Or, let the killed NPC drop his weapon right before he is marked as dead. Sometimes NPCs pick up weapons that are laying on ground (see a Gecko that picks up some brass knucks and attacks the player with them, heh. Smile ) But this could make it annoying for the player to pick up the stuff later.

I like this idea. This would effectively make NPC's able to loot corpses by using their already coded ability to pick stuff up off the ground (which is quite sophisticated from what i've seen)

As MIB says, it would mean more loot getting lost under corpses but i think that could be seen as a good thing as i think it's too easy for the player to get too much gear too easily, and anyway - stuff gets damaged and lost in the heat of battle.
 
This is a great idea, as for your NPC companions getting in the way of your looting, just have a dialogue option that goes something like:
1. loot at will
2. loot only after a while has passed
3. never loot
 
Back
Top