Talk:GetFactionRank - Actor

From the Fallout4 CreationKit Wiki
Revision as of 00:52, 20 October 2016 by imported>Cobalt027 (Created page with "The ranks are a bit deceiving and this page should probably be updated with more detail. -2 : Is a special value that not only means the NPC is not in the faction, but it al...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The ranks are a bit deceiving and this page should probably be updated with more detail.

-2 : Is a special value that not only means the NPC is not in the faction, but it also means they have never been in the faction.

-1 : When you remove an actor from a faction, this is the rank they revert to. So it not only carries potential membership, but past membership as well.

There is also a bug that can lead to unexpected results. If you SetFactionRank() to a negative value other than -1, IsInFaction() will return true. So if you write mod-friendly code that stores off the original faction rank and restores it later, it can leave the Actor with a rank of -2 and IsInFaction() checks still returning true. So be careful and remember to not rely on rank alone for membership checks.