Regarding non-removable character-specific items
God
Member Posts: 1,150
I was wondering if any of you could assist me in an endeavour I have recently undertaken.
I am interested in utilizing the mechanic certain items bound to NPCs use (e.g. Minsc's Boo, Edwin's Amulet, Alora's Rabbit Foot etc.), namely the displaying of a non-standard string within the space meant for it on the inventory screen and playing a sound when the player attempts to remove the item. The mechanic used by Xan's moonblade, blocking use by other characters and also displaying the respective string, is also of some minor interest to me.
What I am working on is a joinable NPC who has a few personal items which I'd like him to comment on, if the player tries touching them. If I could make use of the mechanic I speak of, that would greatly enhance the overall experience of interacting with this character. I have the strings and voice acting connected to them in place, all I need is the method of attaching that to particular items.
Any insights on that matter are most welcome.
I am interested in utilizing the mechanic certain items bound to NPCs use (e.g. Minsc's Boo, Edwin's Amulet, Alora's Rabbit Foot etc.), namely the displaying of a non-standard string within the space meant for it on the inventory screen and playing a sound when the player attempts to remove the item. The mechanic used by Xan's moonblade, blocking use by other characters and also displaying the respective string, is also of some minor interest to me.
What I am working on is a joinable NPC who has a few personal items which I'd like him to comment on, if the player tries touching them. If I could make use of the mechanic I speak of, that would greatly enhance the overall experience of interacting with this character. I have the strings and voice acting connected to them in place, all I need is the method of attaching that to particular items.
Any insights on that matter are most welcome.
1
Comments
Now if you want a comment to go along with a personal item, it would have to be flagged droppable and you would have that NPC take their item back through their script file along with their comment. The only example that I can think of that uses this is the Yasraena mod.
IF
!HasItem("FIREFLOW",Myself)
OR(6)
HasItem("FIREFLOW",Player1)
HasItem("FIREFLOW",Player2)
HasItem("FIREFLOW",Player3)
HasItem("FIREFLOW",Player4)
HasItem("FIREFLOW",Player5)
HasItem("FIREFLOW",Player6)
THEN
RESPONSE #100
ActionOverride(Player1,GiveItem("FIREFLOW","Yasraena"))
ActionOverride(Player2,GiveItem("FIREFLOW","Yasraena"))
ActionOverride(Player3,GiveItem("FIREFLOW","Yasraena"))
ActionOverride(Player4,GiveItem("FIREFLOW","Yasraena"))
ActionOverride(Player5,GiveItem("FIREFLOW","Yasraena"))
ActionOverride(Player6,GiveItem("FIREFLOW","Yasraena"))
DisplayStringHead(Myself,99990)
END
What I essentially intend to do is to override the phrase 'This item cannot be removed.' with a different string, as it is done in the examples below:
The question is how to assign a string to display when 'This item cannot be removed.' would normally be displayed. I just haven't had the time to look into it very thoroughly yet, hence my inquiry. And since I never really modded items all that much, my major concern being difficulty enhancement, spells and dialogues, I might be missing something very basic here. What I know is that I know nothing, as a toga-clad colleague of mine used to say
Though there doesn't seem to be any item_use.2da in my override folder, and I'm quite sure I did extract all 2das. But I'll look into it later, so thank you anyway.
My main questions/issues are:
- How do I add a new string to dialog.tlk? I've done as an item description with SAY and that was rather easy of course but how do I add something like this?
- When I do have the correct string added, how do I refer to it in the item_use.2da file? Since I don't know the exact string reference number and it is different depending on what else is installed, how do I tell WeiDU to go and look for that certain line of text that I just added and use its string reference number. Since in the item_use.2da file it's only a number that refers to it and forced string references are a big no no, I'm kinda puzzled.
Thanks in advance for any help!
You'd use RESOLVE_STR_REF. E.g.,
Thanks so much! (It worked of course.)