Jump to content
  • 0

Adding trader city Bor


faraga321

Question

12 answers to this question

Recommended Posts

  • 0
14 minutes ago, faraga321 said:

thank you but it doesnt really help me, i want to add a trader or two in Bor i dont need to add custom buildings

but u need to create the AI and buildings if u want.

 

if u only need add a AI trader

 

Open your Arma2oa editor 3d.

Create center (civilian)

create a civilian group

create a civilian unit (not used for epoch default trader)

place the AI in Bor

save the file.

Open C:\Users\your user\Documents\ArmA 2 Other Profiles\your nick name\missions\your save mision\mission.sqf

 

you need copy from here this part:

Spoiler

_unit_0 = objNull;
if (true) then
{
  _this = _group_0 createUnit ["ValentinaVictim", [6290.9736, 7827.728, 0.85280406], [], 0, "CAN_COLLIDE"];
  _unit_0 = _this;
  _this setDir -169.92563;
  _this setUnitAbility 0.60000002;
  if (true) then {_group_0 selectLeader _this;};
  if (true) then {selectPlayer _this;};
};

and change by

Spoiler

_unit_1800 = objNull;
if (true) then
{
  _this = createAgent  ["ValentinaVictim", [6290.9736, 7827.728, 0.85280406], [], 0, "CAN_COLLIDE"];
  _unit_1800 = _this;
  _this setDir -169.92563;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
  _this addEventHandler ["handleDamage", {false}];
  _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 copy this code and open:

\@DayZ_Epoch_Server\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf

find:

Spoiler

_unit_128 = objNull;
if (true) then
{
  _this = createAgent ["Doctor", [4059.437, 11660.436], [], 0, "CAN_COLLIDE"];
  _unit_128 = _this;
  _this setDir 24.266853;
  _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;};

 

and paste bellow:

Spoiler

_unit_1800 = objNull;
if (true) then
{
  _this = createAgent  ["ValentinaVictim", [6290.9736, 7827.728, 0.85280406], [], 0, "CAN_COLLIDE"];
  _unit_1800 = _this;
  _this setDir -169.92563;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
  _this addEventHandler ["handleDamage", {false}];
  _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;};

 

save, and repack your dayz_server.pbo

now open your  server_traders.sqf for gold system or server_trader_cherno.11.sqf for coins.

add your trader id here:

serverTraders = ["ValentinaVictim","Citizen1","USMC_LHD_Crew_Purple","INS_Lopotev_DZ",the others traders]

now at very bottom:

//custom trade
menu_ValentinaVictim = [
    [["Wholesale",636]],
    [["FoodBioMeat","ItemZombieParts",1,1,"buy","Zombie Parts","Bio Meat",101]],
    "neutral"
];

 

//add others categorys  i use wholesaler as an example

 

Link to comment
Share on other sites

  • 0
2 minutes ago, juandayz said:

but u need to create the AI and buildings if u want.

 

if u only need add a AI trader

 

Open your Arma2oa editor 3d.

Create center (civilian)

create a civilian group

create a civilian unit (not used for epoch default trader)

place the AI in Bor

save the file.

Open C:\Users\your user\Documents\ArmA 2 Other Profiles\your nick name\missions\your save mision\mission.sqf

 

you need copy from here this part:

  Hide contents

_unit_0 = objNull;
if (true) then
{
  _this = _group_0 createUnit ["ValentinaVictim", [6290.9736, 7827.728, 0.85280406], [], 0, "CAN_COLLIDE"];
  _unit_0 = _this;
  _this setDir -169.92563;
  _this setUnitAbility 0.60000002;
  if (true) then {_group_0 selectLeader _this;};
  if (true) then {selectPlayer _this;};
};

and change by

  Reveal hidden contents

_unit_1800 = objNull;
if (true) then
{
  _this = createAgent  ["ValentinaVictim", [6290.9736, 7827.728, 0.85280406], [], 0, "CAN_COLLIDE"];
  _unit_1800 = _this;
  _this setDir -169.92563;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
  _this addEventHandler ["handleDamage", {false}];
  _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 copy this code and open:

\@DayZ_Epoch_Server\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf

find:

  Hide contents

_unit_128 = objNull;
if (true) then
{
  _this = createAgent ["Doctor", [4059.437, 11660.436], [], 0, "CAN_COLLIDE"];
  _unit_128 = _this;
  _this setDir 24.266853;
  _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;};

 

and paste bellow:

  Hide contents

_unit_1800 = objNull;
if (true) then
{
  _this = createAgent  ["ValentinaVictim", [6290.9736, 7827.728, 0.85280406], [], 0, "CAN_COLLIDE"];
  _unit_1800 = _this;
  _this setDir -169.92563;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
  _this addEventHandler ["handleDamage", {false}];
  _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;};

 

save, and repack your dayz_server.pbo

now open your  server_traders.sqf for gold system or server_trader_cherno.11.sqf for coins.

add your trader id here:

serverTraders = ["ValentinaVictim","Citizen1","USMC_LHD_Crew_Purple","INS_Lopotev_DZ",the others traders]

now at very bottom:

//custom trade
menu_ValentinaVictim = [
    [["Wholesale",636]],
    [["FoodBioMeat","ItemZombieParts",1,1,"buy","Zombie Parts","Bio Meat",101]],
    "neutral"
];

 

//add others categorys  i use wholesaler as an example

 

yes i tried to follow a yt tutorial and a few others but in my server mission.sqm there are no lines like that

Link to comment
Share on other sites

  • 0
2 hours ago, juandayz said:

but u need to create the AI and buildings if u want.

 

if u only need add a AI trader

 

Open your Arma2oa editor 3d.

Create center (civilian)

create a civilian group

create a civilian unit (not used for epoch default trader)

place the AI in Bor

save the file.

Open C:\Users\your user\Documents\ArmA 2 Other Profiles\your nick name\missions\your save mision\mission.sqf

 

you need copy from here this part:

  Reveal hidden contents

_unit_0 = objNull;
if (true) then
{
  _this = _group_0 createUnit ["ValentinaVictim", [6290.9736, 7827.728, 0.85280406], [], 0, "CAN_COLLIDE"];
  _unit_0 = _this;
  _this setDir -169.92563;
  _this setUnitAbility 0.60000002;
  if (true) then {_group_0 selectLeader _this;};
  if (true) then {selectPlayer _this;};
};

and change by

  Reveal hidden contents

_unit_1800 = objNull;
if (true) then
{
  _this = createAgent  ["ValentinaVictim", [6290.9736, 7827.728, 0.85280406], [], 0, "CAN_COLLIDE"];
  _unit_1800 = _this;
  _this setDir -169.92563;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
  _this addEventHandler ["handleDamage", {false}];
  _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 copy this code and open:

\@DayZ_Epoch_Server\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf

find:

  Reveal hidden contents

_unit_128 = objNull;
if (true) then
{
  _this = createAgent ["Doctor", [4059.437, 11660.436], [], 0, "CAN_COLLIDE"];
  _unit_128 = _this;
  _this setDir 24.266853;
  _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;};

 

and paste bellow:

  Reveal hidden contents

_unit_1800 = objNull;
if (true) then
{
  _this = createAgent  ["ValentinaVictim", [6290.9736, 7827.728, 0.85280406], [], 0, "CAN_COLLIDE"];
  _unit_1800 = _this;
  _this setDir -169.92563;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
  _this addEventHandler ["handleDamage", {false}];
  _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;};

 

save, and repack your dayz_server.pbo

now open your  server_traders.sqf for gold system or server_trader_cherno.11.sqf for coins.

add your trader id here:

serverTraders = ["ValentinaVictim","Citizen1","USMC_LHD_Crew_Purple","INS_Lopotev_DZ",the others traders]

now at very bottom:

//custom trade
menu_ValentinaVictim = [
    [["Wholesale",636]],
    [["FoodBioMeat","ItemZombieParts",1,1,"buy","Zombie Parts","Bio Meat",101]],
    "neutral"
];

 

//add others categorys  i use wholesaler as an example

 

allright i tried it did not work, i cant see the trader and infistar wasnt working

Link to comment
Share on other sites

  • 0

ok see:this is tested and working... my first answer works too....but maybe you not replace by your coords or something,,any way is my foul... i was explain you very quick and bad

  thers 2 ways.

1- add traders by server side using mission.sqf (whers original traders are located)

2-add traders by client side.

If u never add traders then pick more easy and clear option: add traders using a new sqf separated of the originals traders.

-------------------------------

Well for example if u want to add only 1 trader AI in Stary then:

1.Open your game and in main menu press ALT+E this gonna open arma2oa editor 3d.

2-Create a Civilian Center/Create a group for this civilian center/ create a unit.

3-This unit must be diferent for the others AI traders. if ure not sure about Traders Ids used for the game open your server_traders.sqf or server_traders_cherno11.sqf and see this section:

serverTraders =["name of all AI used for traders"];

then pick another diferent in your editor.

/*******For example you can use "ValentinaVictim" this is not used by any other trader.**************/

 

4-Choose a location for your AI and save the mission ass "tradertest"

5-Go to your C:\Users\user\Documents\ArmA 2 Other Profiles\yourNickName\missions\tradertest\ and open mission.sqf

you will see something like this:

Spoiler

activateAddons [
];

activateAddons [];
initAmbientLife;

_this = createCenter civilian;
_center_0 = _this;

_group_0 = createGroup _center_0;

_unit_0 = objNull;
if (true) then
{
  _this = _group_0 createUnit ["ValentinaVictim", [6290.9736, 7827.728, 0.85280406], [], 0, "CAN_COLLIDE"];
  _unit_0 = _this;
  _this setDir -169.92563;
  _this setUnitAbility 0.60000002;
  if (true) then {_group_0 selectLeader _this;};
  if (true) then {selectPlayer _this;};
};

processInitCommands;
runInitScript;
finishMissionInit;

6-This need be changed in it: (delete lines not used, and add some line to give god mode to your trader and make it static)

Spoiler

if (isServer) then {

_this = createCenter civilian;
_center_0 = _this;

_group_0 = createGroup _center_0;

_unit_0 = objNull;
if (true) then
{
  _this =  createAgent ["ValentinaVictim", [6290.9736, 7827.728, 0.85280406], [], 0, "CAN_COLLIDE"];
  _unit_0 = _this;
  _this setDir -169.92563;
  _this setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
  _this addEventHandler ["handleDamage", {false}];

  _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;};

};

7-save as tradertest.sqf  and drop into mpmissions\custom\traders\

8-now this file need be called, so go to your init.sqf and paste at bottom:

[] execVM "custom\traders\tradertest.sqf";

9-Server now can spawn this unit. but your need something more. Add this unit as Trader and give any item category to sell and bought.

10-If your using Coins system open server_traders_cherno_11.sqf  but if u have gold system open server_traders.sqf

In this case i use server_traders_cherno_11.sqf

11-at very top of this file you need find and add your new trader ID (in this case "ValentinaVictim") so see the lines in blue bellow:

serverTraders = ["ValentinaVictim","RU_Functionary1","the others traders".......];

12-Now its time to give a menu and item category to this trade. so into the same file but at very bottom add this structure:

Spoiler

//CUSTOM TRADER

menu_//name of your trader = [
    [["category name",number of category],["category name",number of category]],
    [],//here you can put a change item by item//this is optional
    ""// here is the humanity variable "neutral" is for all players // "hostile" trader only for bandits //"hero" only for heros

];

13-In this step you need complete the structure for your trader so:

Spoiler

//CUSTOM TRADER

menu_ValentinaVictim = [
    [["Clothing",575",],["Toolbelt Items",510],["Light Machine Gun",638]],
    [["FoodBioMeat","ItemZombieParts",1,1,"buy","Zombie Parts","Bio Meat",101]],
    "neutral"

];

14-and its done. you can add more categories in the structure or create a new. 

15-To create a new categorie for exaple in coins locate:

¡MPMissions\DayZ_Epoch_11.Chernarus\ZSC\config\Category\

you will see a lot of hpp files.  open for example "neutralToolbeltItems.hpp" and in very bottom  but above of last bracket ( }; ) add:

Spoiler

class Category_3000 {
    class ItemShovel {
        type = "trade_weapons";
        buy[] ={5200,"Coins"};
        sell[] ={1000,"Coins"};
    };
    class ItemSledge {
        type = "trade_weapons";
        buy[] ={5200,"Coins"};
        sell[] ={1000,"Coins"};
    };

};//THE LAST BRACKET

so your new categorie id is "3000" and you sell and bought shovels and sledges (add any other item) then go to your custom Trader structure in server_traders.sqf or server_traders_Cherno_11.sqf and add it:

//CUSTOM TRADER

menu_ValentinaVictim = [
    [["Toolbelt Items",3000]],
    [],
    "neutral"

];

**Note: if u wanna sell and bougth vehicles you need add an "emptyheliH" in the arma2oa editor (this emptyheli  define the place where vehicle spawn)

Link to comment
Share on other sites

  • 0
Just now, juandayz said:

and you say " yes i tried to follow a yt tutorial and a few others but in my server mission.sqm there are no lines like that "

@faraga321 you dont need touch any thing in your mission.sqm

 

 

yea i realised my mistake i tried with your guide but it still didnt work infistar stopped working and the trader was no where to be seen

Link to comment
Share on other sites

  • 0

can you paste your sqf where u set the trader, the call from your init.sqf  and your server_traders.sqf or your server_traders-cherno_11.sqf?

or just give me the coords for bor  and  tell me if ure using gold or coins and i try to do it

Link to comment
Share on other sites

  • 0
16 minutes ago, juandayz said:

can you paste your sqf where u set the trader, the call from your init.sqf  and your server_traders.sqf or your server_traders-cherno_11.sqf?

or just give me the coords for bor  and i try to do it

dont sweat it i will try your more detailed guide tmrow, if i have any other problems i will write

 

Link to comment
Share on other sites

  • 0

Ok Default epoch trader/s Map location/spawns are inside "mission.sqf" inside your server.pbo

example:

_unit_13 = objNull;
if (true) then
{
  _this = createAgent ["Profiteer4", [11449.484, 11341.03, -9.1552734e-005], [], 0, "CAN_COLLIDE"];
  _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;};


note the _unit_no. has to follow order if you add on to this file.

otherwise you can make a new file called something like traders.sqf then call it from the very bottom of "server_functions.sqf" located inside the init folder within server.pbo either way you do it keep an eye on _unit_numbers try to follow suit so inside "mission.sqf" inside your server.pbo find the last _unit_no and continue numbering

example call:

[] ExecVM "\z\addons\dayz_server\init\broadcaster.sqf";

//////////////////////////////
////////BUILDING PACKS////////
//////////////////////////////
[] ExecVM "\z\addons\dayz_server\buildings\mistycastle.sqf";
[] ExecVM "\z\addons\dayz_server\buildings\NovyLugBase.sqf";
[] ExecVM "\z\addons\dayz_server\buildings\epochbalota.sqf";
[] ExecVM "\z\addons\dayz_server\buildings\pavlovo_prison.sqf";
[] ExecVM "\z\addons\dayz_server\buildings\prison.sqf";
[] ExecVM "\z\addons\dayz_server\buildings\NWAF.sqf";
[] ExecVM "\z\addons\dayz_server\buildings\devilscastle.sqf";
[] ExecVM "\z\addons\dayz_server\buildings\parishilton.sqf";
///////////////////////////////
//////Skalisty AI Island //////
///////////////////////////////
[] ExecVM "\z\addons\dayz_server\addons\skalisty_island_lottery.sqf";
[]ExecVM "\z\addons\dayz_server\buildings\skalisty_island_bridge.sqf";
[]ExecVM "\z\addons\dayz_server\buildings\skalisty_island_castle.sqf";
[]ExecVM "\z\addons\dayz_server\buildings\skalisty_island_road.sqf";
[]ExecVM "\z\addons\dayz_server\buildings\skalisty_island_wall.sqf";
///////////////////////////////
/////////Extra Traders/////////
///////////////////////////////
[] ExecVM "\z\addons\dayz_server\buildings\trader.sqf";
[] ExecVM "\z\addons\dayz_server\buildings\Trader_CDC_Balota.sqf";
///////////////////////////////
/////////Race Tracks///////////
///////////////////////////////
[] ExecVM "\z\addons\dayz_server\buildings\raceday.sqf";
[] ExecVM "\z\addons\dayz_server\buildings\racetrack.sqf";
///////////////////////////////
/////////END/OF/PACKS//////////
///////////////////////////////

As you can see i put my extra buildings/traders/city's files in a folder called "buildings" inside my server.pbo

Ok that will get them on the map now for menu tid's

serverTraders = ["You need to place the new traders skin class name here","RU_Functionary1","RU_Citizen3"]

example:
menu_RU_Functionary1 = [
    [["Ammunition",478],["Clothes",476],["Helicopter Armed",493],["Military Armed",562],["Trucks Armed",479],["Weapons",477]],
    [],
    "hero"
];

menu_RU_Functionary is the skin classname of the trader

Ammunition is the name of trader menu in game when you scroll on the ai skin wearing that class name.

The number "478" next to it is the menu TID default epoch traders are sql so if you check the table traders_data you will see tid column this is how the game knows what trader has what items. you can give every trader the same TID they will all have the same items in game for sale the reason for different TIDs is so each trader can be setup with different menu's.

And the last is "hero" this means the trader will not trade with you unless you are a hero

"friendly" this means the trader will trade with you if you are not negative on humanity 0 humanity and above.

"neutral" this means the trader will trade with everyone

"hostile" this means the trader will only trade with bandits

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...