Aller au contenu

Photo

Restrict item to (custom) follower?


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

#1
BTCentral

BTCentral
  • Members
  • 1 684 messages
Hi,

I'm working on a new follower, and was wondering if it is possible to restrict it to that character?

Obviously you do not get a Restrict option like for the followers in the official campaign, however I have seen items restricted to the (player) character using this method before:

AddItemProperty(oItem,ITEM_PROPERTY_NO_ATTRIBUTE_REQUIREMENTS,1);
AddItemProperty(oItem,10018,1); // Restrict to Player only

Is there something similar you can do specifying the NPC?

I'm still fairly new to the toolkit, so this may be blatently obvious, however I was unable to find anything.

Many Thanks.

Modifié par BTCentral, 30 décembre 2010 - 07:38 .


#2
Proleric

Proleric
  • Members
  • 2 352 messages
I haven't tested this, but AFAIK you can add a new item property to the itmprps 2DA, based on a copy of the entry for (say) "Restriction : Sten".

Your new entry will identify a custom script, which you can base on ip_restrict_sten. It just uses the creature tag to restrict usage to your follower.

#3
BTCentral

BTCentral
  • Members
  • 1 684 messages
Good idea, thanks - I will check that out.

I'm still new to the toolset so did not even think of looking there.

Modifié par BTCentral, 31 décembre 2010 - 02:03 .


#4
BTCentral

BTCentral
  • Members
  • 1 684 messages
Well, the restriction does work. However in game it looks like this with a question mark in front and the description in brackets: http://cl.ly/303d072G3N351t2S0g2t

I would imagine that is because there's no matching "NameStrId" to look up (I had to set it to 0), and I could not work out where that comes from.

Edit: I just realised, NameStrId references a string ID that needs to be set via the toolset (Tools -> String Editor).
Edit 2: You also need to export the talk table (Tools -> Export -> Export Talk Table) after doing so!

It now works. I have my custom item with the custom follower restriction :D - Thank you Proleric1.

Modifié par BTCentral, 31 décembre 2010 - 03:54 .