Post by Sentinel on Aug 15, 2010 2:30:15 GMT
(originally posted by Stuporstar)
Hey again. I thought this would be the best place to ask. How do you make NPCs acknowledge a specific companion in your party? I know there are some mods that do this. Is it a scripted variable or something else?
Hey again. I thought this would be the best place to ask. How do you make NPCs acknowledge a specific companion in your party? I know there are some mods that do this. Is it a scripted variable or something else?
It's a global you use that is set to different values depending on if the companion is in tow or not. If you look at for instance Constance (available in the download section), there's a global called con_flw that is set to 1 if she is with you and to 0 if she is not.
Then, in the dialog section, there are various greetings and dialog lines for npcs that are filtered for con_flw ==1 in the function/variable section.
If you look at Constances script you'll find another thing as well that has become very much used in companion mods and other mods as well. It's a local variable called emmasnpcid, and in Constances case this id is 101.
This is another dialog filter function which means that anyone can add dialog that only Constance will say into any mod they make. If they just have a local called emmasnpcid in their mod, they can add greetings and dialog lines which they don't filter for any npc-ID but instead in the function/variable section they filter for emmasnpcid == 101. This means that IF the player is using Constance in his game, she will use these dialog lines. If Constance isn't there, no-one will use it.
All my companion have their own emmasnpcid, so that they can interact with each other, and other companion makers, like for instance Kateri, has given their companions an emmasnpcid as well. Feel free to give your companion an emmasnpcid if you like, but use a random high number like 746 or something like that to avoid conflicts with existing companions using emmasnpcid. - Emma
Then, in the dialog section, there are various greetings and dialog lines for npcs that are filtered for con_flw ==1 in the function/variable section.
If you look at Constances script you'll find another thing as well that has become very much used in companion mods and other mods as well. It's a local variable called emmasnpcid, and in Constances case this id is 101.
This is another dialog filter function which means that anyone can add dialog that only Constance will say into any mod they make. If they just have a local called emmasnpcid in their mod, they can add greetings and dialog lines which they don't filter for any npc-ID but instead in the function/variable section they filter for emmasnpcid == 101. This means that IF the player is using Constance in his game, she will use these dialog lines. If Constance isn't there, no-one will use it.
All my companion have their own emmasnpcid, so that they can interact with each other, and other companion makers, like for instance Kateri, has given their companions an emmasnpcid as well. Feel free to give your companion an emmasnpcid if you like, but use a random high number like 746 or something like that to avoid conflicts with existing companions using emmasnpcid. - Emma