Jump to content

[LE] How adding keyword to listener via dialogue ?(papyrus)


akigami

Recommended Posts

The only way to dynamically add keywords to things is with aliases. Why do you think an alias won't work for you?

I could be wrong, but while I was studying the question I got information that the aliases are temporary and not permanent

Link to comment
Share on other sites

 

The only way to dynamically add keywords to things is with aliases. Why do you think an alias won't work for you?

I could be wrong, but while I was studying the question I got information that the aliases are temporary and not permanent

 

 

Aliases can be temporary; they can be filled with different things at different times, the quest can be stopped, they can be cleared, etc. But you don't have to do any of those. Every single mod with an MCM menu? They have a quest with a player alias in it that never gets emptied out or stopped.

Link to comment
Share on other sites

 

 

The only way to dynamically add keywords to things is with aliases. Why do you think an alias won't work for you?

I could be wrong, but while I was studying the question I got information that the aliases are temporary and not permanent

 

 

Aliases can be temporary; they can be filled with different things at different times, the quest can be stopped, they can be cleared, etc. But you don't have to do any of those. Every single mod with an MCM menu? They have a quest with a player alias in it that never gets emptied out or stopped.

 

hmm, try using them

Link to comment
Share on other sites

sometimes it is helpful to tick on "optional" by using ReferenceAlias

 

Another way would be (Give NPC a unique key that you have created)

TheNPC.AddKeyIfNeeded(TheKey)    ; variant A
TheNPC.AddItem(TheKey, 1)        ; variant B

and use this to do what you want

 IF (TheNPC.GetItemCount > 0)
    ; NPC has the key
 ELSE
    ; NPC does not have the key
 ENDIF

If unique key is no more useful, remove it from inventory with

TheNPC.RemoveItem(TheKey, 1)
Edited by ReDragon2013
Link to comment
Share on other sites

 

sometimes it is helpful to tick on "optional" by using ReferenceAlias

 

Another way would be (Give NPC a unique key that you have created)

TheNPC.AddKeyIfNeeded(TheKey)    ; variant A
TheNPC.AddItem(TheKey, 1)        ; variant B

and use this to do what you want

 IF (TheNPC.GetItemCount > 0)
    ; NPC has the key
 ELSE
    ; NPC does not have the key
 ENDIF

If unique key is no more useful, remove it from inventory with

TheNPC.RemoveItem(TheKey, 1)

Is it possible to make a restriction for example 2 keys? if >2 then not add key, idea with key notbad and easy, with alias not work so far but see

Link to comment
Share on other sites

There were a couple more questions, how to get through the dialogue from npc a copy of the key from his house ?

and how to make npc objects yours (in the NPC house, for example eat) ?(if you take something from a npc, it is not stil)

 

 

for 1q)I think can bind an object by type to an alias and use it via Game.GetPlayer().AddItem(name_alias) but i do not understand how bind type object to var

for 2q)set faction object to var and join player in this faction, but again how to realize ?

Edited by akigami
Link to comment
Share on other sites

yes, if key or faction know, but if no ? in this problem or i understand...

 

Oh, you want a general solution, for any given NPC? That's more difficult. You could use SetRelationshipRank instead of manipulating factions to make the NPC friendly, which means you only need to know which NPC you're talking to, and that's easy. As far as keys go... I'm not sure of a general solution. You could check their inventory for any keys and add copies of them, but that will produce (I assume) undesired results if the NPC has had their inventory of keys messed with.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...