Empty pockets

Post » Sun Jan 24, 2010 7:04 am

I've been trying to work out how to tell if a player has nothing at all - that is nothing in their inventory - at first I thought about trying to get their base stat of encumbrance which is strength x 5 however after reading through MWSFD this seems impossible - I can't find any script which replicates what happens if you go to Jail and your stolen inventory is removed.

Has anyone ever come across a script that can identify if a player has everything removed from their inventory?
User avatar
bonita mathews
 
Posts: 3405
Joined: Sun Aug 06, 2006 5:04 am

Post » Sun Jan 24, 2010 8:14 am

To do it reliably, you need to use MWSE.
User avatar
Beat freak
 
Posts: 3403
Joined: Thu Dec 14, 2006 6:04 am

Post » Sun Jan 24, 2010 5:51 pm

I've thought about trying to force the player to empty his inventory before.

The best way I could think of doing it without MWSE would be to work out their maximum encumberance, like you suggested, make sure they don't have any feather effects active, and then burden them so that they wouldn't be able to move if they had any items with weight.

I don't know how well this would work though and I can imagine it being quite fiddly... plus any weightless items would still be allowed.
User avatar
Jessie Butterfield
 
Posts: 3453
Joined: Wed Jun 21, 2006 5:59 pm

Post » Sun Jan 24, 2010 12:28 pm

Closest thing i can think of is just including a 'naked' check. Atleast they wont have anything on them then :/
User avatar
Dean Brown
 
Posts: 3472
Joined: Fri Aug 31, 2007 10:17 pm

Post » Sun Jan 24, 2010 10:17 am

a) Naked check only works in dialogue but not in scripts, B) it checks whether the PC wears anything but not whether he has anything in inventory.
User avatar
Jennie Skeletons
 
Posts: 3452
Joined: Wed Jun 21, 2006 8:21 am

Post » Sun Jan 24, 2010 4:34 am

It's possible to script a sort of armor/weapons "naked check", but it's very limited. As Yacoby said, the only reliable method here is using MWSE's inventory functions.
User avatar
Céline Rémy
 
Posts: 3443
Joined: Sat Apr 07, 2007 12:45 am

Post » Sun Jan 24, 2010 1:32 pm

Actually, I think if you combined some of these ideas you could have a half-decent naked check... is there any reason why my burden idea wouldn't work?
You'd have to force the player to move for him to "pass" the naked check, i.e. by putting an activator out of reach.
User avatar
QuinDINGDONGcey
 
Posts: 3369
Joined: Mon Jul 23, 2007 4:11 pm

Post » Sun Jan 24, 2010 1:44 pm

Actually, I think if you combined some of these ideas you could have a half-decent naked check... is there any reason why my burden idea wouldn't work

You can't detect base strength without a script extender. 0 weight items. Mod incompatibilities (Player has got a feather constant effect, can't go forward because of it). If the encumbrance multiplier has changed or the encumbrance isn't quite correct.
User avatar
Sabrina garzotto
 
Posts: 3384
Joined: Fri Dec 29, 2006 4:58 pm

Post » Sun Jan 24, 2010 6:44 am

Thanks for the replies - I understand the problem with weightless items like gold which makes it all very hard.

As for constant effect items I was thinking of using a force equip to bluntly remove those and a location specific dispel curse to prevent bound items appearing and removing any feather spells

Apart from gold what other weightless items are there?
User avatar
Lil'.KiiDD
 
Posts: 3566
Joined: Mon Nov 26, 2007 11:41 am

Post » Sun Jan 24, 2010 7:07 pm

1. Couldn't you remove any Fortify Strength enchantments with a script in order to get base strength? Failing that, using Fortify Strength would be an unavoidable cheat, but hey, this method's not going to be perfect - plus if you check to make sure they're not wearing armour or weapons, Fortify Strength enchantments are less likely to crop up. You could even do a naked check in dialogue, too!

2. There aren't many useful 0 weight items. Keys are pretty much irrelevant, and gold (and any other obvious ones) can easily be detected with a script.

3. If someone is using a mod that changes the encumberance multiplier, they'd have to tweak a global in this mod before playing to set it right. Kind of like a "manual" compatibility patch.

Ok, it's not ideal, but it's something! :)
User avatar
anna ley
 
Posts: 3382
Joined: Fri Jul 07, 2006 2:04 am

Post » Sun Jan 24, 2010 7:05 pm

GCD has had trouble with this for a while now, and there are a few things you can do that help, but no sure fix. What Illuminiel and Danjb have been saying is probably the best bet, but obviously still not perfect.

Using the dialogue naked check is a pretty good idea. You can have a trigger variable, ForceGreeting an invisible NPC, run it and set another var if it succeeds. It's a little awkward, but if you don't want MWSE, sounds like the best method.
User avatar
keri seymour
 
Posts: 3361
Joined: Thu Oct 19, 2006 4:09 am


Return to III - Morrowind