akigami Posted April 11, 2019 Author Share Posted April 11, 2019 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 More sharing options...
foamyesque Posted April 11, 2019 Share Posted April 11, 2019 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 More sharing options...
akigami Posted April 11, 2019 Author Share Posted April 11, 2019 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 More sharing options...
ReDragon2013 Posted April 11, 2019 Share Posted April 11, 2019 (edited) 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 Band 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 April 11, 2019 by ReDragon2013 Link to comment Share on other sites More sharing options...
akigami Posted April 12, 2019 Author Share Posted April 12, 2019 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 Band 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 More sharing options...
akigami Posted April 12, 2019 Author Share Posted April 12, 2019 (edited) Figured out the restriction, used GlobalVar, stopped on the keys, all thx for help Edited April 12, 2019 by akigami Link to comment Share on other sites More sharing options...
akigami Posted April 13, 2019 Author Share Posted April 13, 2019 (edited) 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 varfor 2q)set faction object to var and join player in this faction, but again how to realize ? Edited April 13, 2019 by akigami Link to comment Share on other sites More sharing options...
foamyesque Posted April 14, 2019 Share Posted April 14, 2019 What you want to use are Properties[/iurl[. They work a lot like variables for the most part (the exceptions aren't relevant here). The key piece is that properties, unlike variables, can be set up to hold game objects directly in the CK, through the Edit Properties button in the script windows. So, for example, in your script, you could have: Key Property KeyToAdd Auto And then, you'd open up the property menu and it will let you choose the what that property should hold from a dropdown list of every key in the game. Or, you for the faction approach, you could go: Faction Property FactionToAdd Auto And do the same thing. I suspect there may be a default script that will do this for you already, in fact. Link to comment Share on other sites More sharing options...
akigami Posted April 14, 2019 Author Share Posted April 14, 2019 yes, if key or faction know, but if no ? in this problem or i understand... Link to comment Share on other sites More sharing options...
foamyesque Posted April 14, 2019 Share Posted April 14, 2019 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 More sharing options...
Recommended Posts