TamaChan Posted June 6, 2016 Posted June 6, 2016 So I couldn't find anywhere else a way to check what factions an npc is in, and wanted to know what ideas someone might have for a possible way to check? Using mods that adds you to faction can cause bugs, and because it does it through scripts, it is often very hard to find out what faction you might have been added to, because the creation kit doesn't say. So I was hoping someone more insightful than me could help me find a way to check what factions an npc is in in-game through a script or console command. So far the best I could find was using a bat file to add a npc to every faction and seeing which ones it returns as saying they were already in. Unfortunately, I use such a massive load order that this would be very unpracticle, possibly even impossible since there is a limit to how far up you can scroll the console log.
gregathit Posted June 6, 2016 Posted June 6, 2016 For Vanilla - just check the wiki. For mods, use tes5edit.
TamaChan Posted June 7, 2016 Author Posted June 7, 2016 For Vanilla - just check the wiki. For mods, use tes5edit. And what if I use a mod that adds the player to a faction through scripts insted of through an npc record in a plugin?
gregathit Posted June 7, 2016 Posted June 7, 2016 Then you'll need to use the CK to view the scripts.
TamaChan Posted June 7, 2016 Author Posted June 7, 2016 Then you'll need to use the CK to view the scripts. And if I don't know what script, or even what mod it was? My point is that sometimes using the ck/tesvedit is insufficient, so I was hoping someone else might have a stroke of genious. I'm not asking for handouts, just that none of my idea's have panned out.
gregathit Posted June 7, 2016 Posted June 7, 2016 Sorry, I'm not aware of any easy buttons either. Sometimes it is obvious what mods do faction wise, and sometimes, as you state, it is looking for a needle in a pile of needles. You can export all the scripts in a mod as text files and do a word search. That is about all I can think of. Sorry.
Guest Posted June 7, 2016 Posted June 7, 2016 If you want to check the factions an Actor is currently in just use the SKSE function: Faction[] theFactions = theActor.GetFactions(-128, 127) Where "theAcotr" is the NPC you want to check. And yes, you need a script i nthe game to do that. Do you want to do it not inside the game? Then Greg already told you everything. And keep in mind that you cannot control which mods will be installed by players, so there is not a definitive answer to "get all the factions for a specific NPC". Each game-play may have different factions for a given NPC (or the player.)
TamaChan Posted June 7, 2016 Author Posted June 7, 2016 If you want to check the factions an Actor is currently in just use the SKSE function: Faction[] theFactions = theActor.GetFactions(-128, 127) Where "theAcotr" is the NPC you want to check.And yes, you need a script i nthe game to do that. Do you want to do it not inside the game? Then Greg already told you everything. And keep in mind that you cannot control which mods will be installed by players, so there is not a definitive answer to "get all the factions for a specific NPC". Each game-play may have different factions for a given NPC (or the player.) Thanks npc, this is exactly what I was looking for. And sorry to either if I came off pretentious.
Guest Posted June 7, 2016 Posted June 7, 2016 Not a problem. be aware that many vanilla factions are un-named. So if you try to print the names you get nothing. Do something like: Event OnInt() RegisterForKey(2) EndEvent Event OnKeyUp(Int KeyCode, Float HoldTime) if keyCode!=2 return endIf Actor a = Game.GetCurrentCrosshairRef() as Actor if !a return endIf Faction[] theFactions = a.GetFactions(-128, 127) int f = theFactions.length while f f-=1 String name = theFactions[f].getName() if name=="" name = theFactions[f] as String endIf Debug.Print("Acotr " + a.getDisplayName() + " Faction -> " + name) endWhile EndEvent Put this script somewhere that is executed (like a Quest), and then click on the key "1" when your cross hair is over an actor, and you will find all Factions in the Papyrus log.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.