[Release] Epoch Trader Menu Dialogs

maca134

Well-Known Member
Epoch Trading Menus
0.1
3ZjK0.jpg
Erm, better trading menus in Epoch.
Requirements
Easy
The first step is to move compiles.sqf and fn_selfactions.sqf to your mission files. Most servers running custom code will have this in place already, if you do goto step 4.

Step 1
Copy compiles.sqf and fn_selfActions.sqf to your mission folder.

Step 2
Open init.sqf and find the following line (approx line 39)
Code:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions

Replace with (please note the path MUST match the location of the compiles.sqf file you copied)
Code:
call compile preprocessFileLineNumbers "custom\compiles.sqf"; //Compile regular functions

Step 3
Open compiles.sqf and find the following line (approx line 16)
Code:
fnc_usec_selfActions = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_selfActions.sqf"; //Checks which actions for self

Replace with (please note the path MUST match the location of the fn_selfActions.sqf file you copied)
Code:
fnc_usec_selfActions = compile preprocessFileLineNumbers "custom\fn_selfActions.sqf"; //Checks which actions for self

Step 4
Open fn_selfActions.sqf and find the following (approx line 476)
Code:
// Database menu
{
_buy = player addAction [(_x select 0), "\z\addons\dayz_code\actions\buy_or_sell.sqf",[(_x select 1),(_x select 0)], 99, true, false, "",""];
s_player_parts set [count s_player_parts,_buy];
} forEach (_traderMenu select 0);

Replace with:
Code:
_buy = player addAction ["Trader Menu", "traders\show_dialog.sqf",(_traderMenu select 0), 99, true, false, "",""];
s_player_parts set [count s_player_parts,_buy];

Step 5
Add the following into init.sqf inside the 'if (!isDedicated) {' block
Code:
_void = [] execVM "traders\init.sqf";

Example:
Code:
if (!isDedicated) then {
//Conduct map operations
0 fadeSound 0;
waitUntil {!isNil "dayz_loadScreenMsg"};
dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
 
//Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor =[] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
// NEW TRADER MENU [START]
_void = [] execVM "traders\init.sqf";
// NEW TRADER MENU [END]
};

Step 6
Add the following at the bottom of description.ext:
Code:
#include "traders\dialog.hpp"

Now download https://dl.dropboxusercontent.com/u/135243/dayz_epoch/trader_dialog.zip and copy the trader folder to your mission folder.

And that should be it!

P.S Here is a clean Epoch Chernarus mission pbo https://dl.dropboxusercontent.com/u/135243/dayz_epoch/DayZ_Epoch_11_Traders.Chernarus.zip
 
Back
Top