I found this post:
So I tried the function GetActorValue, with "Aggression" as an argument. This returns a value from 0-3. It seems like each NPC has an aggression level that makes sense, but it doesn't solve the issue I'm having because NCR troopers and Powder Gangers both have the same aggression level, even though Powder Gangers shoot at me on sight, and NCR troopers don't, so somewhere else Powder Gangers consider the player an enemy.
Edit: I found this function: GetReputation. It takes two arguments: Reputation, and a 1 or 0 (which determines if it returns fame or infamy -- each faction has both), and it returns the player's reputation with the faction.
Reputation:
https://geckwiki.com/index.php?title=Reputation
This works, except I can't find any functions to get an actor's faction's Reputation, to use as an argument to the GetReputation function. Does anyone know of a function like that?
Edit: I've found a convoluted way: For each actor, get the actors factions, using GetFactions, and save them in an array, and loop through that array. For each faction, get the faction reputation type using GetFactionReputationType, then I used the value returned as an argument to GetReputation. This compiles, but seemingly doesn't work..