Vehicle key changer script updated for Epoch 1.0.6.1 by salival.
-
Discussion URL: https://epochmod.com/forum/topic/43348-release-vehicle-key-changer-updated-for-epoch-106/
-
original discussion url: https://epochmod.com/forum/topic/5972-release-vehicle-key-changer-for-making-masterkey-v-14-updated-06152014/
-
updated discussion url: https://epochmod.com/forum/topic/43048-release-vehicle-key-changer-for-making-masterkey-v-141-updated-for-epoch-106/
-
Tested as working on a blank Epoch 1.0.6.1
-
This adds support for briefcases, gems and coins.
-
Uses the epoch vehicle upgrade system to do the key changing/claiming.
-
Please, if you report issues can you please attach (on pastebin or similar) your CLIENT rpt log file as this helps find out the errors very quickly. To find this logfile:
C:\users\<YOUR WINDOWS USERNAME>\AppData\Local\Arma 2 OA\ArmA2OA.RPT
- Fresh Install
- Mission folder install
- dayz_server folder install
- BattlEye filter install
- infiSTAR setup
- Upgrading with previous version installed
- This install basically assumes you have NO custom variables.sqf or compiles.sqf or fn_selfActions.sqf, I would recommend diffmerging where possible.
-
In mission\init.sqf find:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";
and add this directly below:call compile preprocessFileLineNumbers "dayz_code\init\variables.sqf";
-
In mission\init.sqf find:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";
and add this directly below:call compile preprocessFileLineNumbers "dayz_code\init\compiles.sqf";
-
In mission\description.ext add the following line directly at the bottom:
#include "scripts\vkc\vkc.hpp"
-
Download the
stringTable.xml
file linked below from the Community Localization GitHub and copy it to your mission folder, it is a community based localization file and contains translations for major community mods including this one.
>> Download stringTable.xml <<
- Replace or merge the contents of
server_publishVehicle3.sqf
provided with your original copy.
-
This assumes you are running the DEFAULT epoch filters.
-
On line 12 of
config<yourServerName>\Battleye\scripts.txt
:5 createDialog
add this to the end of it:!="createDialog \"vkc\";"
So it will then look like this for example:
5 createDialog <CUT> !="createDialog \"vkc\";"
-
If you have
_CUD = true;
in your AHconfig.sqf: Add4800
to the end of your_ALLOWED_Dialogs
array, i.e:_ALLOWED_Dialogs = _ALLOWED_Dialogs + [81000,88890,20001,20002,20003,20004,20005,20006,55510,55511,55514,55515,55516,55517,55518,55519,555120,118338,118339,571113,4800]; // adding some others from community addons
-
If you have
_CSA = true;
in your AHconfig.sqf: Add,"s_player_copyToKey","s_player_claimVehicle"
to the end of your_dayzActions =
array, i.e:"Tow_settings_dlg_CV_btn_fermer","Tow_settings_dlg_CV_titre","unpackRavenAct","vectorActions","wardrobe","s_player_copyToKey","s_player_claimVehicle"
-
Copy the files from the github repo in the
scripts\vkc
folder to your current VKC folder in your mission file overwriting anything when prompted. -
Copy
dayz_server\compile\server_publishVehicle3.sqf
to yourdayz_server\compile
folder overwriting it when prompted. -
In your
dayz_code\compile\fn_selfActions.sqf
find this code block:if (_hasKey && {_hasKeyKit} && {(count _temp_keys) > 1} && {!_isLocked}) then { _temp_key_name = (_temp_keys_names select (_temp_keys find _characterID)); _vkc_carKeyName = getText (configFile >> "CfgWeapons" >> _temp_key_name >> "displayName"); _temp_keys = _temp_keys - [_characterID]; _vkc_temp_keys_names = _temp_keys_names - [_temp_key_name]; s_player_copyToKey = player addAction ["<t color=""#0096FF"">Change vehicle key</t>","scripts\vkc\vehicleKeyChanger.sqf",[_cursorTarget,_characterID,"change",_temp_keys,_vkc_temp_keys_names],5,true,true]; };
Replace it with this code block:
if (_hasKey && {_hasKeyKit} && {(count _temp_keys) > 1} && {!_isLocked}) then { s_player_copyToKey = player addAction ["<t color=""#0096FF"">Change vehicle key</t>","scripts\vkc\vehicleKeyChanger.sqf",[_cursorTarget,_characterID,"change"],5,false,true]; };
Also in your
dayz_code\compile\fn_selfActions.sqf
find this code block:if (s_player_claimVehicle < 0) then { _totalKeys = call epoch_tempKeys; _temp_keys = _totalKeys select 0; _temp_keys_names = _totalKeys select 1; if (count _temp_keys > 0) then { s_player_claimVehicle = player addAction [format ["<t color=""#0096FF"">Claim %1</t>",_text],"scripts\vkc\vehicleKeyChanger.sqf",[_cursorTarget,_characterID,"claim",_temp_keys,_temp_keys_names],5,true,true]; }; };
Replace it with this code block:
if (s_player_claimVehicle < 0) then { _totalKeys = call epoch_tempKeys; if (count (_totalKeys select 0) > 0) then { s_player_claimVehicle = player addAction [format ["<t color=""#0096FF"">Claim %1</t>",_text],"scripts\vkc\vehicleKeyChanger.sqf",[_cursorTarget,_characterID,"claim"],5,false,true]; }; };
-
In your
dayz_code\init\variables.sqf
find this line://Player self-action handles
Add these two lines above it:
vkc_claimPrice = 1000; // Amount in worth for claiming a vehicle. See the top of this script for an explanation. vkc_changePrice = 5000; // Amount in worth for changing the key for a vehicle. See the top of this script for an explanation.
-
In mission\description.ext add the following line directly at the bottom:
#include "scripts\vkc\vkc.hpp"
-
Install new the BattlEye filter for your scripts.txt BattlEye filter install
-
If you run infiSTAR: In your AHconfig.sqf remove from the _cMenu array (around line 158)
,"#USER:_keyMenu"
also make sure you run this install step: Infistar setup