Table of Contents

Class NwFaction

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

The faction info of a Creature/Player/GameObject.

public sealed class NwFaction : IEquatable<NwFaction>
Inheritance
NwFaction
Implements
Inherited Members
Extension Methods

Properties

AverageGoodEvilAlignment

Gets the average Good/Evil alignment value of members in this faction.

AverageLawChaosAlignment

Gets the average Law/Chaos alignment value of members in this faction.

AverageLevel

Gets the average level of members in this faction.

AverageXP

Gets the average amount of XP of members in this faction.

Factions

Gets a list of all active factions.

Gold

Gets the total amount of gold held by all members of this party.

Id

Gets the id of this faction.

Leader

Gets the leader of this player faction (party).

MostFrequentClass

Gets the most common type of class among the members of this faction/party.

StandardFactionType

Gets the StandardFaction type of this faction.
If this is a player or custom faction, returns an out-of-range value.

Methods

AdjustReputation(NwCreature, int)

Adjusts how this faction feels about the specified creature.

Equals(NwFaction?)

Indicates whether the current object is equal to another object of the same type.

Equals(object?)

Determines whether the specified object is equal to the current object.

FromFactionId(int)

Resolves a NwFaction from a faction id.

FromStandardFaction(StandardFaction)

Resolves a NwFaction from a StandardFaction.

GetAverageReputation(NwGameObject)

Gets an integer between 0 and 100 (inclusive) that represents how this faction feels about the specified target.
-> 0-10 means this faction is hostile to the target
-> 11-89 means this faction is neutral to the target
-> 90-100 means this faction is friendly to the target.

GetBestACMember(NwCreature?, bool)

Gets the member with the highest AC in this faction.

GetHashCode()

Serves as the default hash function.

GetLeastDamagedMember(NwCreature?, bool)

Gets the least damaged member in this faction that is visible from the specified object.

GetMembers()

Gets all creatures that are members of this faction.

GetMostDamagedMember(NwCreature?, bool)

Gets the most damaged member in this faction that is visible from the specified object.

GetReputation(NwGameObject)

Gets an integer between 0 and 100 (inclusive) that represents how this faction feels about the specified target.
-> 0-10 means this faction is hostile to the target
-> 11-89 means this faction is neutral to the target
-> 90-100 means this faction is friendly to the target.

GetStrongestMember(NwCreature?, bool)

Gets the strongest member in this faction that is visible from the specified object.

GetWeakestMember(NwCreature?, bool)

Gets the weakest member in this faction that is visible from the specified object.

GetWorstACMember(NwCreature?, bool)

Gets the member with the lowest AC in this faction that is visible from the specified object.

SetReputation(NwGameObject, int)

Sets how this faction feels about the specified creature.
-> 0-10 means this faction is hostile to the target.
-> 11-89 means this faction is neutral to the target.
-> 90-100 means this faction is friendly to the target.

Operators

operator ==(NwFaction?, NwFaction?)
implicit operator NwFaction(StandardFaction)
operator !=(NwFaction, NwFaction)