Jump to content

Faction Ranks


srayesmanll

Recommended Posts

Has anyone used faction ranks in their mod? I have been trying to use faction ranking as a counter to keep track of actions of NPCs (followers and non-followers). I can add the factions to the NPC with a given rank (AddToFaction), but I can't seem to add a rank as necessary using ModFactionRank. It just fails. I know I could use SetFactionRank, but according to TES4 Construction Set (which is the only place with docs on this particular command - linked from GECK docs), SetFactionRank affects the base object as well as the actor. I only want to track it on the actor. Has anyone used ModFactionRank successfully? Is there another maybe simpler way to tracks counts for multiple NPCs? Are tokens maybe a better way to do it? I haven't looked into using tokens.

Link to comment

When modfactionrank fails, are you calling it and addtofaction in the same frame? If so.. could just be another one of those engine timing bugs. Do the add to faction, then in the next stage just keep checking if the npc is a member of the faction, and do a modfactionrank after that.

 

As for figuring out if the TESCK is lying, that's easy to test. Summon an NPCs in the console (placeatme refid), do the setfactionrank on it, then summon another and check the rank. See if it's changed from the default as well. If so, it's affecting the base actor.

Link to comment

"are you calling it and addtofaction in the same frame" - nope. It's being called in the sexout spellcb, no looping on the actor so it should be within a single frame. Also, I call GetInFaction first. If not in faction, AddToFaction with a rank of 1, if not in faction call the ModFactionRank bumping by 1. Again, it's a single call with no looping for checking on the specified actor (there is a loop, but it checks both actor A and B from a sex scene). I'll to give the test a try - I actually found the SetFactionRank call in the Skyrim Creation Kit and it made no mention of it affecting the base. Of course, SkCK is not the same as GECK.

 

By the way, with Tokens, is there a way to make them completely invisible except for console/script calls? One reason I avoided using the token idea is that I hate seeing them show up in inventories. In fact I still see debug tokens show up every once in a while (something like ACDebug), especially in merchant inventories.

Link to comment

GetFactionRank is bugged if reading from a faction added by script.

It does not check the rank really and only answers -1 or +1

(Bug existed in Fallout 3)

I made a plugin to workaround that but it is a very dirty and dependant on NVSE version.

I might release it once prideslayer release nvse b13.

 

 

Or pride could include my code. I basically rewrote the functions in C++ then override the addresses in the command list.

 

 

 

For token always set them not playable and quest item. (Then use a debug plugin to make them playable while testing.)

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use