Jump to content
jonse

Help with custom trader city !!! Willing to pay

Recommended Posts

Hi

i am very good at coding and stuff but i cant seem to figure out how to add a trader at a random spot (bu coords ofc)

so i am looking for some help to make those traders because i really want a another trader at the sea so new players dont need to run so long but i cant make any traders i followed raymix's tutorial but that confuses me the fuck out so can somebody please help me with it i already made where they need to stand just pm me or reply if you want to help/ discuss i at Willig to pay

 

Share this post


Link to post
Share on other sites

If you have infistar you can turn on admin debug monitor and stand exactly where you want the trader. Take a screenshot of the coords in the debug.

Go into your server pbo, open up the missions.sqf (this will be in a folder named what ever map you are using, ex: missions\DayZ_Epoch_11.Chernarus)

Do a search for "_unit" without the "quotes".  Copy that whole block of code, that looks like this

_unit_13 = objNull;
if (true) then
{
  _this = createAgent ["Profiteer4", [11449.484, 11341.03, -9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _this setcaptive true;
  _unit_13 = _this;
  _this setDir 34.525925;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
  _this setUnitAbility 0.60000002;
  _this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;};
 

[/spolier]

paste that code at the bottom of the missions.sqf

Highlighted in bold, are the changes i made in order for the NPC to appear on the map

_unit_13000 = objNull;
if (true) then
{
  _this = createAgent ["Hooker2", [11449.484, 11341.03, -9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _this setcaptive true;
  _unit_13000 = _this;
  _this setDir 34.525925;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
  _this setUnitAbility 0.60000002;
  _this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;};

 

Now to make that NPC a actual trader.

Mission sided, open up your server_traders.sqf

paste this block of code at the bottom

// Drugs and alcohol
menu_Hooker2 = [
    [["Drugs 'n Alcohol",972]],
    [],
    "neutral"  //Options are neutral, hero, bandit
];

Highlighted in black are the things that need to be changed to suit your needs

972 is the number of the category, you will need to change it and make sure the number is unique, ex: 2000

the "Hooker2" needs to be added the server traders list at the top, like so


serverTraders = ["Functionary1_EP1_DZ",,"Hooker2",.........  DO NOT ADD PUT "menu_Hooker2" its "Hooker2" or whatever NPC you've used.

Now we need to define what drugs and alcohol is going to sell.

Open up your category folder, in there you will see tons of HPP files. NeutralAirplanes, NeutralAssaultRifle and so on.

If you are going to sell items, pay attention to the "trade_items" part in the HPP.

if its vehicles it will be "trade_any_vehicle" instead and so on...

copy one of those, Change the number at the top to 2000 (or whatever you would picked in the server_traders.sqf)

create the list of things you want to sell.

Save it as MYNEWTIEMS.hpp

Then you need to open cfgServerTrader.hpp   At the bottom of the list, add PATH\MYNEWTIEMS.hpp

Thats how you create a trader.

If you have any issues let me know

 

 

Share this post


Link to post
Share on other sites

jonse,

 

just about to sort out a custom trader for my taviana epochogins server. If you need any help jump onto our ts and ill do my best.

We created a full set of custom traders for cherno. I like klen best created a Tree lined drive up to the palace traders.

I am the coder my friend is the designer as I have no drawing skills.

What map are you wanting to add a trader to ?

 

TS3:  Teamspeak3

 

Hawkeye.

 

 

Share this post


Link to post
Share on other sites
9 minutes ago, hawkeye said:

jonse,

 

just about to sort out a custom trader for my taviana epochogins server. If you need any help jump onto our ts and ill do my best.

We created a full set of custom traders for cherno. I like klen best created a Tree lined drive up to the palace traders.

I am the coder my friend is the designer as I have no drawing skills.

What map are you wanting to add a trader to ?

 

TS3:  Teamspeak3

 

Hawkeye.

 

 

 

well thanks for the help but i dont need it anymore but my friend needs it here is his steam and ts ip 

http://steamcommunity.com/id/dacinibun

ts2.freets3.net:10060

 

or add me 

http://steamcommunity.com/profiles/76561198043320225/

Share this post


Link to post
Share on other sites

Sorry to resurrect an old topic but I've searched and searched and can find NO clarification on what the "_this setDir 34.525925;" is, or where to get this value when adding my own custom traders.

In this (http://epochmod.com/forum/index.php?/topic/970-custom-trader-cities/)  explanation, it's suggested that the number is to be found in the custom map you create when you make your traders, but my saved map contains no such number. (!?)  All my traders in my mission.sqf file have different values set here.  What ARE these numbers?

Would someone PLEASE explain this to me?

Share this post


Link to post
Share on other sites

"_this setDir 34.525925;"

 

Basically, it's the direction something is facing. So if you wanted to place a trader NPC in a certain place (I use infiSTAR) I would stand exactly where I want the trader NPC to be, then press F2 and "Copy Worldspace Co-Ords to RPT". They would look something like this : [61.7218,[2049.03,11807,0.00144958]]

To break those numbers down : 

61.7218 = Direction the trader is facing in the world.

2049.03 = The "X" co-ordinate.

11807 = The "Y" co-ordinate.

0.00144958 = The "Z" co-ordinate.

This gives an EXACT position to put something.

If you are adding stuff to your mission.PBO though, like markers or trader NPC's, you need to set them out X, Z, Y, like this, for it to work : 

[61.7218,[2049.03,0.00144958,11807]]

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

If you are adding custom stuff in an SQF file serverside, you will see something like this : 

_vehicle_3301 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Mil_House", [2896.6016, 4503.7505, 0.23285694], [], 0, "CAN_COLLIDE"];
  _vehicle_3301 = _this;
  _this setDir -89.442787;
  _this setVehicleInit "this setvectorup [0,0,1]";
  _this setPos [2896.6016, 4503.7505, 0.23285694];
};

This is basically telling the server to spawn a Land_Mil_House at these co-ords, 2896.6016, 4503.7505, 0.23285694 and make sure it's facing this direction : _this setDir -89.442787;

 

 

Share this post


Link to post
Share on other sites
4 hours ago, ravenwolf said:

Sorry to resurrect an old topic but I've searched and searched and can find NO clarification on what the "_this setDir 34.525925;" is, or where to get this value when adding my own custom traders.

In this (http://epochmod.com/forum/index.php?/topic/970-custom-trader-cities/)  explanation, it's suggested that the number is to be found in the custom map you create when you make your traders, but my saved map contains no such number. (!?)  All my traders in my mission.sqf file have different values set here.  What ARE these numbers?

Would someone PLEASE explain this to me?

well.I was explained everything but.. now i see its a resurrected topic :D

Share this post


Link to post
Share on other sites
On 3/5/2016 at 7:32 PM, ElDubya said:

"_this setDir 34.525925;"

 

Basically, it's the direction something is facing. So if you wanted to place a trader NPC in a certain place (I use infiSTAR) I would stand exactly where I want the trader NPC to be, then press F2 and "Copy Worldspace Co-Ords to RPT". They would look something like this : [61.7218,[2049.03,11807,0.00144958]]

To break those numbers down : 

61.7218 = Direction the trader is facing in the world.

2049.03 = The "X" co-ordinate.

11807 = The "Y" co-ordinate.

0.00144958 = The "Z" co-ordinate.

This gives an EXACT position to put something.

If you are adding stuff to your mission.PBO though, like markers or trader NPC's, you need to set them out X, Z, Y, like this, for it to work : 

[61.7218,[2049.03,0.00144958,11807]]

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

If you are adding custom stuff in an SQF file serverside, you will see something like this : 

_vehicle_3301 = objNull;
if (true) then
{
  _this = createVehicle ["Land_Mil_House", [2896.6016, 4503.7505, 0.23285694], [], 0, "CAN_COLLIDE"];
  _vehicle_3301 = _this;
  _this setDir -89.442787;
  _this setVehicleInit "this setvectorup [0,0,1]";
  _this setPos [2896.6016, 4503.7505, 0.23285694];
};

This is basically telling the server to spawn a Land_Mil_House at these co-ords, 2896.6016, 4503.7505, 0.23285694 and make sure it's facing this direction : _this setDir -89.442787;

 

 

Thanks a LOT for this information.  Makes a lot more sense to me now.

Share this post


Link to post
Share on other sites

Okay So I have Created I new trader...

I went into my Server Mission.sqf created the new unit at the location I wanted

Spoiler

_unit_134 = objNull; //Tulga Dealer
if (true) then
{
  _this = createAgent ["RU_Soldier_Crew_DZ", [12878.1,4437.06,0.00143433], [], 0, "CAN_COLLIDE"];
  _unit_134 = _this;
  _this setDir 349.301;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
  _this setUnitAbility 0.60000002;
  _this allowDammage false; _this disableAI 'FSM'; _this disableAI 'MOVE'; _this disableAI 'AUTOTARGET'; _this disableAI 'TARGET'; _this setBehaviour 'CARELESS'; _this forceSpeed 0;_this enableSimulation false;};

Then I went into my server Trader.sqf and added the trader to the bottom. and added his skin to the top of the file.

Spoiler

// Tulga Trader
menu_RU_Soldier_Crew_DZ = [
    [["Weapons",914],["Ammo",915],["Vehicles",916],["Thermals",917],["Rockets",693]"Rocket Ammo",694]],
    [],
    "neutral"
];   

I have the appropriate .hpp files for the categories he sells.  But when in the server, none of the trader including the one I added work, (no trader menu)

If I comment out the Tulga trader that I put in my server trader.sqf the rest of the traders work.

I cant figure out where im going wrong or what I am missing. I have been reading tutorials and watching all sorts of videos for info on how to add a custom trader, but it always come back to this...

Share this post


Link to post
Share on other sites

 

@Saije

youre missing the lines in red see:

Spoiler

// Tulga Trader
menu_RU_Soldier_Crew_DZ = [
    [["Weapons",914],["Ammo",915],["Vehicles",916],["Thermals",917],["Rockets",693],["Rocket Ammo",694]],
    [],
    "neutral"
];   

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By 2DayZ2Retirement
      -PROBLEM SOLVED-
       
      G'day, Survivors.
      I am having an issue on my server where vehicles which spawn randomly around the map repair themselves upon server restart.
      I use this config in my init.sqf which successfully spawns the vehicles in damaged and with low fuel...
      DynamicVehicleDamageLow = 75;
      DynamicVehicleDamageHigh = 100;
      DynamicVehicleFuelLow = 0;
      DynamicVehicleFuelHigh = 25;
      ...However upon each server restart the vehicles repair themselves (the fuel remains low however) and for the life of me I can't figure out why this is happening. 
      DayZ Version -DayZ Epoch 1.0.6.2
      Scripts Used -DZAI | -DZMS | -Right Click Actions (Suicide, Smoke Drugs, GPS Scan)
      AntiHack - InfiSTAR
      Server Host - GTXGaming
      My HiveEXT.log and arma2oaserver.RPT logs are not showing anything out of the ordinary.
      I'm not sure if it matter, but all Planes/Helicopters and Boats have been removed from the server via the dynamic_vehicle.sqf.
      In addition, all of the traders and trader cities being removed by removing the call for the CfgServerTrader.hpp in the description.ext.
      If there is any other info I can show to assist in fixing this problem please let me know, any help would be greatly appreciated.
      Cheers.
    • By rocalpha
      Bonjour, j’écris aujourd’hui parce que j’aimerais savoir si vous ne pourrez pas m'aider. Je loue un serveur via gportal et j’aimerais pouvoir être mon serveur en PvE, mais aussi créer des éléments de base pour la connexion et des choses simples comme . J'ai un autre problème lorsque j'achète une voiture chère à pied cela me met une flèche rouge puis rien non aucun véhicule il apparait qu'après un redémarrage du serveur
    • By Warburgg
      I installed the dynamic climate script and it happens that it rains on the server but only lasts 10 seconds and stops. Is it because I use the script that speeds server time? I currently use Control Time which allows the server to have 2 hours of day and 1 hour night.
      The other climates such as overcast and fog last the forecast time 5-20 minutes but the rain does not.
      In my logs show: 16:52:30 "39:2 Debug: Rain set to 0.92421 for 10.6582 minutes". It rains until it rains but soon stops.
    • By Brian Soanes
      To unlock vehicles left in your traders over a server restart, open your epoch_server.pbo

      In epoch_server\compile\epoch_vehicle\EPOCH_load_vehicles.sqf
      Find
      if (_allowDamage) then { Just above that, add this
      A3E_SafeZonePosArray = [ [[18451.9,14278.1,0]], //Altis East trader [[13333.5,14494.3,0]], //Altis Central trader [[6192.46,16834,0]] //Altis West trader ]; { if (_vehicle distance (_x select 0) < 200) then { _vehicle lock false; diag_log format["Vehicle %1 left in trader unlocked @ %2", _class, mapGridPosition _vehicle]; }; } forEach A3E_SafeZonePosArray; Pack pbo and you're good to go
    • By Tanita-Corp
      Hello guys)
      Tell me please how to make 
      spawned veh. unused 4 day deleted
      with key veh. unused 14 day deleted
       
      I broke my head
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...