User Tools

Site Tools


building:scripts:api:getsetfactionid

GetFactionId / SetFactionId

Sinfar's systems support the manipulation of factions, including custom ones. Each faction is given a unique ID that can then be given different reputations with other factions.

See: https://nwn.sinfar.net/cstmfac_manageform.php

You can attribute or remove the custom faction ID's to your erf NPC or faction PC with the following functions :

void AddCustomFactionToCreature(object oCreature, int nCustomFactionId);
void RemoveCustomFactionFromCreature(object oCreature, int nCustomFactionId);

Functions

int GetFactionId(object oObject);

This will return the Faction ID of oObject.

Default Factions:
1 = Hostile
2 = Commoner
3 = Merchant
4 = Defender

void SetFactionId(object oObject, int nFaction);

This will set oObject's Faction ID to nFaction.

murdrkitten 2019/03/26 16:56

building/scripts/api/getsetfactionid.txt · Last modified: 2022/12/05 08:00 by spankitty