Jump to content

Adding a new faction to existing NPCs


HiveMaster

Recommended Posts

As the title suggests, I'm working on a mod that involves adding a new faction of my creation to NPCs that already exist in the world. But it doesn't seem to be working...in the CK, the faction is clearly listed in that Actor's Factions and Ranks list, but in game, they aren't in the faction at all. Using the console, GetInFaction returns 0, and, most puzzling of all, GetFactionRank returns -2.00 for all NPCs, even ones that don't have the faction in their list in the CK. My understanding was that even if a character wasn't in a faction, GetFactionRank should return -1.00. I can use addfac in the console to add the NPCs to the faction manually, but I don't understand why they're not in the faction to start, if it's in their Factions and Ranks list.

 

Clearly, I'm doing something wrong, I just haven't been able to find what that is. Could anyone tell me, please?

Link to comment
Share on other sites

I know some factions rely on relationships to work, at least from what I've seen in practice, anyway. Take a custom follower, for instance, you can set CurrentFollowerFaction and PotentialFollowerFaction to them (with the CurrentFollowerFaction rank set to -1) but if you're not their friend/ally (i.e. have a friendly relationship with them) the dialogue for them to follow you will never show. I don't know how much, if any, of this applies to what you're doing but it may be something to look into if, at least, to rule it out.

Link to comment
Share on other sites

lofgren- As a matter of fact, I am testing on a save game. I didn't know that would make a difference. So if I stared a new game with the mod on, you think the NPCs would be in the new faction? I'll test that!

 

KaelVirum- That is good to know, but it doesn't really apply to what I'm working on, I'm afraid.

 

In a nutshell, what I'm working on is a mod that uses a system of perks to alter merchants' buying prices based on how much base gold the merchant has. So a merchant who has 1000 gold will pay you more for an item than one that has 750. That's simple enough, but I'd also like the buying prices to change when you invest in a particular merchant. I can make that work by making the perk dependent on the Global that changes when you invest in a particular merchant, but that's going to involve making a separate perk (or perk entry) for every investable merchant in the game. Which is doable, I suppose, but it seems cumbersome.

 

What I'd like to do is put all of the investable merchants with, for example, 1000 gold in a new faction, and have the dialogue to invest in each of them increase their rank in that faction. Then I can have the modified sell prices be dependant on their rank in the faction with GetFactionRank. But of course, the game has to recognize them as being in the faction for it to work!

 

But if they'll be in the new faction for a new game, as lofgren seems to be indicating, and not the old save game I've been testing on, then problem solved!

Edited by HiveMaster
Link to comment
Share on other sites

  • Recently Browsing   0 members

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