[Modding] Creating custom Expansion P2P trader objects NPC's - salutesh/DayZ-Expansion-Scripts GitHub Wiki
If you plan to add your custom p2p trader object or NPC for the Expansion P2P market system you can find some examples for the needed object configuration as well as the needed script classes for the object here.
Example config.cpp:
class CfgPatches
{
class MyMod_P2PMarket_Objects
{
units[]={};
weapons[]={};
requiredVersion=0.1;
requiredAddons[]=
{
"DZ_Data",
"DZ_Characters",
"DayZExpansion_Dta_Core",
"DayZExpansion_Core_Objects_Bases",
"DayZExpansion_P2PMarket_Objects"
};
};
};
class CfgVehicles
{
class ExpansionP2PMarketTraderStatic;
class SurvivorM_Mirek;
class SurvivorM_Denis;
class SurvivorM_Boris;
class SurvivorM_Cyril;
class SurvivorM_Elias;
class SurvivorM_Francis;
class SurvivorM_Guo;
class SurvivorM_Hassan;
class SurvivorM_Indar;
class SurvivorM_Jose;
class SurvivorM_Kaito;
class SurvivorM_Lewis;
class SurvivorM_Manua;
class SurvivorM_Niki;
class SurvivorM_Oliver;
class SurvivorM_Peter;
class SurvivorM_Quinn;
class SurvivorM_Rolf;
class SurvivorM_Seth;
class SurvivorM_Taiki;
class SurvivorF_Linda;
class SurvivorF_Maria;
class SurvivorF_Frida;
class SurvivorF_Gabi;
class SurvivorF_Helga;
class SurvivorF_Irena;
class SurvivorF_Judy;
class SurvivorF_Keiko;
class SurvivorF_Eva;
class SurvivorF_Naomi;
class SurvivorF_Baty;
//! Static trader object
class MY_STATIC_P2P_TRADER: ExpansionP2PMarketTraderStatic
{
scope = 1;
model = "\DZ\structures\furniture\cases\locker\locker_closed_blue_v1.p3d";
rotationFlags = 12;
};
//! NPC traders
class MY_NPC_P2P_TRADER_Mirek: SurvivorM_Mirek
{
scope = 2;
displayName = "Mirek";
vehicleClass = "Expansion_Trader";
};
//! AI NPC Traders
class MY_AINPC_P2P_TRADER_Mirek: SurvivorM_Mirek
{
scope = 2;
displayName = "Mirek";
vehicleClass = "Expansion_Trader";
};
};
Script class example for a static P2P trader object in the 4_World
script module of your mod:
class ExpansionP2PMarketTraderLockerClosedBlueV1: ExpansionP2PMarketTraderStatic {};
Script class example for a normal P2P trader NPC in the 4_World
script module of your mod:
class MY_NPC_P2P_TRADER_Mirek: ExpansionP2PMarketTraderNPC {};
Script class example for a Expansion AI P2P trader NPC in the 4_World
script module of your mod:
class MY_AINPC_P2P_TRADER_Mirek: ExpansionP2PMarketTraderNPCAI {};