Aller au contenu

Photo

Companion script to not allow unequip of item


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

#1
UltimaPhoenix

UltimaPhoenix
  • Members
  • 24 messages
Hey all,

I'm brand new to modding, but I've been working hard and learning alot thanks to you wonderful people. I've browsed through the old forums and searched these forums for the answer I seek:

I made a custom item for a companion that I don't want the player to be able to remove from the equip slot it starts in. The item goes into the chest area and should never be allowed to be removed (the context is that it's an exoskeleton that overrides armour).


Anyone have any idea how to implement this?

#2
Morbane

Morbane
  • Members
  • 1 883 messages
You could use tag based scripting and create an unequip script that forces re-equiping after an attempted unequip. Its a bit dirty but it would work.

#3
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 598 messages
When you create a script in the toolset you can create using a template. Select the template for an unequip script to get a good start on it.

#4
UltimaPhoenix

UltimaPhoenix
  • Members
  • 24 messages
Thank you for responding, Morbane and Kaldor.



I created a tag-based script that reequips the item in question when removed, and setting the item to "Cursed" also made it so that the item can't be dropped or exchanged between party members. Thanks again!

#5
Morbane

Morbane
  • Members
  • 1 883 messages
well done UP :)

#6
rjshae

rjshae
  • Members
  • 4 497 messages
One other thing to check for is whether it can be sold at a store. You might have to make it a plot item or set the value to zero.

Modifié par rjshae, 13 janvier 2011 - 05:50 .


#7
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 598 messages
I don't think the UI allows you to drop or give away or sell equipped items. You have to unequip the item first. So if the unequip script reequips the item you should not need to set it cursed (keeps from dropping or giving away) or plot (keeps from selling). It won't hurt anything, but I don't think it is needed.

#8
The Fred

The Fred
  • Members
  • 2 516 messages
Yes, it makes non-unequippable items a lot easier than they were in NWN1.