Table of Contents

Factions

Custom Factions

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 set the faction variable directly on the NPC with :

AI_FACTION_ID_XXXXX (integer) XXXXX

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

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

Default Factions

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.

phpBB Appliance - Powered by TurnKey Linux