DayZ
Trader
Namalsk Trader Files - Ready to Go
TraderConfig
https://pastebin.com/Gum18yh3

TraderObjects (TARA) - Fexed for SpawnObject in next link
https://pastebin.com/ECq5Hxku

Spawn objects for Trader, requires expansion and Builderitems (goes in init.c)
https://pastebin.com/J5cmNBra


This is pretty basic, but will server to get traders going.
Join The BoB Hardcore Namalsk for the hardcore experience with traders.
Last edited by Commander Beelo; 10 Dec, 2020 @ 2:30pm
< >
Showing 1-15 of 24 comments
MAVERICK 9 Dec, 2020 @ 4:49pm 
hey bro i need your help please add me ! :)
Commander Beelo 10 Dec, 2020 @ 2:30pm 
Originally posted by MAVCLINE:
hey bro i need your help please add me ! :)
Everything needed is in the post now.
76561199026988132 12 Dec, 2020 @ 10:49am 
where in my init.c dose that go? just crashies my server
Commander Beelo 12 Dec, 2020 @ 2:25pm 
The function goes above void main, the rest goes inside of void main. I would paste my whole init.c but I have some other custom spawns people may not want
Commander Beelo 12 Dec, 2020 @ 2:29pm 
static void SpawnObject(string type, vector position, vector orientation)
{
auto obj = GetGame().CreateObjectEx(type, position, ECE_SETUP | ECE_UPDATEPATHGRAPH | ECE_CREATEPHYSICS);
obj.SetPosition(position);
obj.SetOrientation(orientation);
obj.SetOrientation(obj.GetOrientation());
obj.SetFlags(EntityFlags.STATIC, false);
obj.Update();
obj.SetAffectPathgraph(true, false);
if (obj.CanAffectPathgraph()) GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, obj);
}

void main()
{


//ATMS
SpawnObject("DC_BankingATM", "7246.01 238.252 7038.83", "-8.999998 0.000000 0.000000"); //Safe Trader

// Tara Trader
SpawnObject("bldr_hbarrier_round", "7243.262695 239.141342 7025.149902", "12.691935 0.000000 0.000000");
SpawnObject("bldr_hbarrier_round", "7238.111328 239.141342 7027.649414", "52.748150 -0.000000 -0.000000");
SpawnObject("bldr_hbarrier_round", "7236.049805 239.188004 7032.890137", "100.096275 0.000000 0.000000");
SpawnObject("bldr_hbarrier_round", "7238.111328 239.159866 7038.243164", "137.243286 0.000000 -0.000000");
SpawnObject("bldr_hbarrier_round", "7248.669922 239.141342 7026.606934", "-27.000010 0.000000 0.000000");
SpawnObject("bldr_hbarrier_round", "7243.145020 239.185364 7040.863281", "-179.999939 0.000000 -0.000000");
SpawnObject("Land_Mil_GuardShed", "7247.792480 238.784241 7027.925781", "143.999969 0.000000 -0.000000");
SpawnObject("Land_Mil_GuardShed", "7243.382813 238.783585 7026.812500", "-171.000031 0.000000 -0.000000");
SpawnObject("Land_Mil_GuardShed", "7239.398926 238.799194 7028.716797", "-131.963409 0.000000 -0.000000");
SpawnObject("Land_Mil_GuardShed", "7237.911133 238.850739 7032.817383", "-89.999977 0.000000 0.000000");
SpawnObject("bldr_mil_guardshed", "7239.458008 238.817307 7037.260742", "-45.000000 0.000000 0.000000");
SpawnObject("Land_Mil_GuardShed", "7243.605957 238.813538 7039.163086", "-8.999998 0.000000 0.000000");
SpawnObject("Land_Mil_CamoNet_Roof_east", "7240.221680 239.751160 7030.966309", "63.000000 0.000000 0.000000");
SpawnObject("ExpansionSign_Trader_Consumables", "7247.086426 237.862427 7028.767090", "143.999969 0.000000 -0.000000");
SpawnObject("ExpansionSign_Trader_Weapons", "7240.293945 237.813080 7029.533691", "-130.691055 -0.000000 -0.000000");
SpawnObject("ExpansionSign_Trader_Attachments", "7239.104492 237.853302 7032.863770", "-90.000038 0.000000 -0.000000");
SpawnObject("ExpansionSign_Trader_Clothing", "7240.227539 237.828583 7036.509277", "-45.000053 0.000000 0.000000");
SpawnObject("ExpansionSign_Trader_Vehicles", "7243.856934 237.835800 7038.103516", "-9.000000 0.000000 0.000000");
SpawnObject("ExpansionSign_Trader_Accessoires", "7243.508789 237.807877 7027.983887", "-174.044357 -0.000000 -0.000000");

/*
[Namalsk] CE init (offline)
*/
CreateHive();
GetHive().InitOffline();

/*
[Namalsk] Weather init
Warning: DO NOT ALTER following values as they are interconnected with other Namalsk-specific systems!
To ensure correct functionality, it is necessary to include weaher init AFTER the hive init.
*/
Weather weather = GetGame().GetWeather();
weather.MissionWeather( true );
weather.GetOvercast().SetLimits( 0.10, 0.30 );
weather.GetRain().SetLimits( 0.0, 0.0 );
weather.GetFog().SetLimits( 0.0, 0.0 );
weather.GetOvercast().SetForecastChangeLimits( 0.1, 0.3 );
weather.GetOvercast().SetForecastTimeLimits( 1600, 2100 );
weather.GetOvercast().Set( Math.RandomFloatInclusive( 0.1, 0.2 ), 0, 0 ); // ignored if storage is present
weather.GetRain().Set( 0, 0, 0 ); // ignored if storage is present
weather.GetFog().Set( 0, 0, 0 ); // ignored if storage is present
weather.SetWindMaximumSpeed( 30 );
weather.SetWindFunctionParams( 0.1, 1.0, 42 );
weather.SetStorm( 0, 1, 1 );
weather.SetRainThresholds( 0.0, 1.0, 0 );


/*
[Namalsk] Mission time init
after CE init to determine if storage mission type is outside of the required time-frame
currently recommended time-frame is:
12/1 -> 12/31
keep in mind that gameplay features are tied to the mission date (stored in the storage) and that it SHOULD remain this period!
while using:
day accelerated 6 times (serverTimeAcceleration=6), resulting in an average 78 min of day-time (RL)
night accelerated 24 times (serverNightTimeAcceleration=4), resulting in an average of 26 min of night-time (RL)
*/
int year, month, day, hour, minute;
GetGame().GetWorld().GetDate( year, month, day, hour, minute );

if ( month < 12 )
{
year = 2011;
month = 12;
day = 1;

GetGame().GetWorld().SetDate( year, month, day, hour, minute );
}
};

class CustomMission: MissionServer
{
override void OnInit()
{
super.OnInit();

// this piece of code is recommended otherwise event system is switched on automatically and runs from default values
// comment this whole block if NOT using Namalsk Survival
if ( m_EventManagerServer )
{
// enable/disable event system, min time between events, max time between events
m_EventManagerServer.OnInitServer( true, 600, 800 );
// Register possible events along with their probability (0..1)
// any custom events MUST inherit from EventBase, otherwise they will fail to load!
m_EventManagerServer.RegisterEvent( Aurora, 1.0 );
m_EventManagerServer.RegisterEvent( Blizzard, 0.5 );
m_EventManagerServer.RegisterEvent( ExtremeCold, 0.4 );
m_EventManagerServer.RegisterEvent( Snowfall, 0.8 );
m_EventManagerServer.RegisterEvent( EVRStorm, 0.25 );
}
}

void SetRandomHealth(EntityAI itemEnt)
{
if (itemEnt)
{
float rndHlt = Math.RandomFloat( 0.50, 0.85 );
itemEnt.SetHealth01( "", "", rndHlt );
}
}

override void StartingEquipSetup( PlayerBase player, bool clothesChosen )
{
EntityAI itemClothing;
EntityAI itemEnt;
ItemBase itemBs;
float rand;

// top
itemClothing = player.FindAttachmentBySlotName( "Body" );
if ( itemClothing )
{
SetRandomHealth( itemClothing );

itemEnt = itemClothing.GetInventory().CreateInInventory( "Rag" );
if ( Class.CastTo( itemBs, itemEnt ) )
itemBs.SetQuantity( 4 );
player.SetQuickBarEntityShortcut( itemEnt, 0 );

SetRandomHealth( itemEnt );

itemEnt = itemClothing.GetInventory().CreateInInventory( "RoadFlare" );
SetRandomHealth( itemEnt );
itemEnt = itemClothing.GetInventory().CreateInInventory( "RoadFlare" );
SetRandomHealth( itemEnt );
player.SetQuickBarEntityShortcut( itemEnt, 1 );
}

// pants
itemClothing = player.FindAttachmentBySlotName( "Legs" );
if ( itemClothing )
{
SetRandomHealth( itemClothing );

itemEnt = itemClothing.GetInventory().CreateInInventory( "Heatpack" );
SetRandomHealth( itemEnt );

int throwDice = Math.RandomInt( 0, 2 );
if ( throwDice == 0 )
itemEnt = itemClothing.GetInventory().CreateInInventory( "dzn_tool_watch" );
else
itemEnt = itemClothing.GetInventory().CreateInInventory( "dzn_tool_watch2" );
player.SetQuickBarEntityShortcut( itemEnt, 2 );
}

// shoes
itemClothing = player.FindAttachmentBySlotName( "Feet" );
if ( itemClothing )
{
SetRandomHealth( itemClothing );
}

// bump fresh spawn water and energy values (to compensate for the frozen food and harder-to-get wells)
player.GetStatWater().Set( 900 );
player.GetStatEnergy().Set( 1100 );
}
};

Mission CreateCustomMission(string path)
{
return new CustomMission();
};
Commander Beelo 12 Dec, 2020 @ 2:29pm 
That is the init.c for hardcore.namalsk
Lynx 16 Dec, 2020 @ 11:21pm 
hi, i did everything you put in, but i don't have any traders showing up. however I did put the mod files in the SC of my dedicated server but it does not appear in the game. I don't know what to do anymore.
Bonifaci 17 Dec, 2020 @ 1:14am 
Originally posted by _Stubaaw_:
where in my init.c dose that go? just crashies my server
My server crashing too((
Commander Beelo 17 Dec, 2020 @ 2:10pm 
If you guys dont know how to use SpawnObject, spend some time on youtube, there are plenty of tutorials.
Last edited by Commander Beelo; 17 Dec, 2020 @ 2:10pm
Uncle_DayZ 19 Dec, 2020 @ 7:37pm 
sorry i don't speak much english, but to help you i explain <download trader dr.jones> <in the @trader folder
/ trader / ServerProfile> copy the trader folder paste in the <profiles> or <config> folder. in the trader folder delete all that is located in <TraderObjects.txt> put your own configuration.

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/
/
/
/ ///////////////////
/ // South //
/ //////////////////
/
/
/<TraderMarker> 0
/<TraderMarkerPosition> 6369.03, 17.7339, 10210.7
/<TraderMarkerSafezone> 100
/
/// ------------------------------------------------------ Objects to Spawn --------------------------------------
/
/6
/ <Object> vbldr_cashier
/ <ObjectPosition> 6369.03, 17.7339, 10210.7
/ <ObjectOrientation> 110.009438, 0.000000, 6.996442
/ <ObjectAttachment> NPC_DUMMY
/ <ObjectAttachment> BoxCerealCrunchin
/ <ObjectAttachment> SurgicalGloves_White
/ <ObjectAttachment> Bandana_Polkapattern
/ <ObjectAttachment> MiniDress_PinkChecker
/ <ObjectAttachment> DressShoes_White
/
/<FileEnd> // This has to be on the End of this File and is very importand!
/
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

<download vpp admin tools> install mod start your server, close your server. In the root folder. <profiles / vppadmintools / ConfigurablePlugins / BuildingSetManager> paste the folder <TraderObjects.txt> change .txt to .vpp
Uncle_DayZ 19 Dec, 2020 @ 7:46pm 
bonjour je vous j'explique <télécharger trader dr.jones> <dans le dossier @trader
/ trader / ServerProfile> copiez le dossier du trader coller dans le dossier <profiles> ou <config>. dans le dossier du tader, supprimez tout ce qui se trouve dans <TraderObjects.txt> mettez votre propre configuration
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/ ///////////////////////
/ // Sud ////////////
/ //////////////////////
/
/
/ <TraderMarker> 0
/ <TraderMarkerPosition> 6369.03, 17.7339, 10210.7
/ <TraderMarkerSafezone> 100
/
/// ------------------------------------------------------ Objets à générer --------------------------------------
/
/ 6
/ <Objet> vbldr_cashier
/ <ObjectPosition> 6369.03, 17.7339, 10210.7
/ <ObjectOrientation> 110,009438, 0,000000, 6,996442
/ <ObjectAttachment> NPC_DUMMY
/ <ObjectAttachment> BoxCerealCrunchin
/ <ObjectAttachment> SurgicalGloves_White
/ <ObjectAttachment> Bandana_Polkapattern
/ <ObjectAttachment> MiniDress_PinkChecker
/ <ObjectAttachment> RobeShoes_White
/
/ <FileEnd> // Cela doit être à la fin de ce fichier et c'est très important!
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

<télécharger les outils d'administration vpp> installer mod démarrer votre serveur, fermer votre serveur. Dans le dossier racine. <profiles / vppadmintools / ConfigurablePlugins / BuildingSetManager> collez le dossier <TraderObjects.txt> changez .txt en .vpp
Belzona 22 Dec, 2020 @ 5:03pm 
Originally posted by Demonburger - DayZServer: The Bo:
TraderConfig
https://pastebin.com/Gum18yh3

TraderObjects (TARA) - Fexed for SpawnObject in next link
https://pastebin.com/ECq5Hxku

Spawn objects for Trader, requires expansion and Builderitems (goes in init.c)
https://pastebin.com/J5cmNBra


This is pretty basic, but will server to get traders going.
Join The BoB Hardcore Namalsk for the hardcore experience with traders.
What would cause my vehicles spawn at the farthest corner of the map? I have the coords set to where i want them but it wont spawn. What is a fix for this?
Bukowski 23 Dec, 2020 @ 2:23am 
@Demonburger, in the config file Magnum is listed as Magum.
Bukowski 23 Dec, 2020 @ 3:27am 
@Demonburger, several of the expansion items are missing, for example, scopes and sights. The trader's positions are not in their boxes but scattered nearby.
< >
Showing 1-15 of 24 comments
Per page: 1530 50