DayZ
DayZ-Dynamic-AI-Addon
New Factions
Is it possible to add in new factions, or are they hardwired? If so, how?
< >
Showing 1-3 of 3 comments
it is hardwired into the pbo script file inside of the expansion-ai mod. Altho you can configure it to your servers needs you will have to unpack these pbo files. you can do it using dayz tools and Bankrev in the utilities. To pack them back into pbo files you need to run addon builder. I suggest copying the addons file into a seperate folder on your disk outside of the server and then when repacking the mod pack it into the addons folder of the original mod. Altho remember do not repack if not allowed and you cannot repack something with p3d files ( encrypted 3d models ).
Adding new factions is easy. btw its in the 3_game folder when unpacked. each faction is a different file that looks like this.

[eAIRegisterFaction(eAIFactionEast)]
class eAIFactionEast : eAIFaction
{
void eAIFactionEast()
{
m_Loadout = "EastLoadout";
}

override bool IsFriendly(notnull eAIFaction other)
{
if (other.IsInherited(eAIFactionEast)) return true;
if (other.IsInherited(eAIFactionCivilian)) return true;
return false;
}
};

eAIFactionEast = faction identification. which is used in the override bool
if (other.IsInherited(eAIFactionEast)) return true;
if (other.IsInherited(eAIFactionCivilian)) return true; <--eAIFaction(Name).

If you want the faction to not kill each other you must add them as a friendly faction within the override bool. Replace all eAIFactionEast with your faction registry which is done in the top.
the single faction.c file (eaifaction) automatically uses the Words after Faction as the name.
eAIFactionEast = East which is used in patrol settings as "Faction" = "East",

Hope this helps.The loadouts are defined in profiles/expansionmod/loadouts/

( m_Loadout = "EastLoadout"; ) this is the default loadout for the faction..
Dolphin  [developer] 17 Aug @ 1:54pm 
There's multiple mods adding factions already on the workshop.
If you want to add more, open them and see how it's done.
< >
Showing 1-3 of 3 comments
Per page: 1530 50