Aller au contenu

Photo

npc equipment


  • Veuillez vous connecter pour répondre
11 réponses à ce sujet

#1
PJ156

PJ156
  • Members
  • 2 986 messages
I have the player join a party for a short while in my new mod.

Not sure how to stop the player pillaging the party equipment.

Three options I can see:

1. Let the player decide if they wish to steal and sell the party gear. It is for them to decided how they role play the situation.
2. Have the npc party join as henchmen but then the player does not have so much flexibility when the fighting starts.
3. Have the equipment either tagged as stolen or not removable from the npc inventory.

Option 3 would be nice but I don't know how to do it.

Thoughts would be welcome.

PJ

#2
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
You could store each NPC's initial set of items as local objects, and then later check if the items have been taken and are in the possession of the PC. Then you either have a heated conversation or just return the items via script. You could also run the check on the NPC's inventory disturb event.

You can also set the stolen or cursed tags in a script, without have to do custom blueprints for everything.

#3
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 598 messages
Cursed items cannot be removed from inventory. So turn on the cursed flag on them. I don't think you need to create custom blueprints for the items as long as the party members are placed instances. You cannot mark items cursed on creature blueprints themselves, but if you place your party members in an area then you can customize the items they have and make them cursed.  They just won't be cursed in the creature blueprint.

Modifié par Kaldor Silverwand, 08 janvier 2012 - 09:30 .


#4
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Remeber that conversation that happened in The Gathering Storm, where if you tried to take the guy's ring he would ask if you were trying to hold his hand? You could do a converstion that automatically re-equipped the items with a short quip like "hands off, it's mine" or something like that. You would use tag based scripting and use the unequip event. i_tagofitem_ue would be the script name, IIRC.

Check out the insides of TGS let me know if you are interested.

#5
kamal_

kamal_
  • Members
  • 5 258 messages
What Kaldor said, cursed items. I'm not sure what happens if the party meets an accident though, if you can loot cursed items from the dead party members.

#6
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
I don't think you can. I recently had a weird item show up on a bodybag which could not be looted. It looked like a debug item. I'm guessing it was cursed.

Easily tested, though. Give an NPC a cursed item and kill it.

#7
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
I just checked the item that was on the NPC that I couldn't loot and it was indeed cursed. Looks like you cannot loot cursed items.

#8
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 598 messages
I suppose if you wanted to loot them then you could have the NPC's death script set his/her inventory items to non-cursed.

#9
The Fred

The Fred
  • Members
  • 2 516 messages
Cursed items are a bit wonky, because they can't be given away... by anyone. Or anything. That cursed item you found in that chest? Aww, shucks, the chest can't actually let you have it.

You could do it how we did it back in the old days (pre-HotU) and manually return the item to the owner rather than using the cursed flag. Kaldor's suggestion is just as good, but you'll want to turn the cursed flag back on again afterwards. It's useful to have an OnEquip script which will do this, actually, in case you find cursed items in chests etc. Just remember to do the same if the NPC is not looted, but raised.

Coming back to the original point, you can just flag them as stolen. Then, some stores won't buy them, and others will pay less. Hell, you could even have guards search people and if they find stolen items, throw them into jail!

#10
Morbane

Morbane
  • Members
  • 1 883 messages
I like the local variable method - if the item has one the hench says "Hey! Thats Mine! Hands off! That way if the PC decides to give some goodies to the Hench- s/he can get them back if they want.

#11
Dann-J

Dann-J
  • Members
  • 3 161 messages
You can set the items to plot so they can't be sold. You can also put a lot of restrictions on the items so that only a chaotic neutral halfling rogue (or whatever) can equip them. That'll restrict the ability of players to make use of the equipment, even if they can't sell it. The downside is that the PC might just be a chaotic neutral halfling rogue - or a bard or warlock with a high 'use magic device' skill.

Tag-based OnUnequipped scripts could force them to instantly re-equip. You could either write individual scripts for every piece of equipment, or use local variables on the items and give them all the same tag and one generic script. You might have to avoid doing that for weapons though.

#12
PJ156

PJ156
  • Members
  • 2 986 messages
Thanks for all of this. I do remember M.R script now and will try that on some items but in general I will go with the cursed flag and see how I get on.

Thanks for all the responses guys,

PJ