moved r3f realism into client files

This commit is contained in:
[VB]AWOL
2013-11-17 02:08:28 -06:00
parent 1810c51517
commit bc7b19dd64
380 changed files with 96 additions and 47397 deletions

View File

@@ -128,3 +128,5 @@ class RscStructuredTextGUI: RscStructuredText
#include "Configs\CfgAmmo.hpp" #include "Configs\CfgAmmo.hpp"
#include "Configs\CfgBuildingLoot\CfgBuildingLoot.hpp" #include "Configs\CfgBuildingLoot\CfgBuildingLoot.hpp"
#include "Configs\CfgArma.hpp" #include "Configs\CfgArma.hpp"
#include "external\R3F_Realism\R3F_Weight\R3F_CfgWeight.h"

View File

Can't render this file because it contains an unexpected character in line 11 and column 10.

View File

@@ -33,7 +33,7 @@ R3F_WEIGHT_FNCT_GetItemWeight = {
_arr_class = (_this select 0) + (_this select 1); _arr_class = (_this select 0) + (_this select 1);
_total_weight = 0; _total_weight = 0;
_weight = 0; _weight = 0;
CfgWeight = missionConfigFile >> "CfgWeight"; CfgWeight = configFile >> "CfgWeight";
{ {
if(isclass(CfgWeight >> "Weapons" >> _x)) then { if(isclass(CfgWeight >> "Weapons" >> _x)) then {
_weight = getNumber(CfgWeight >> "Weapons" >> _x >> "weight"); _weight = getNumber(CfgWeight >> "Weapons" >> _x >> "weight");

View File

@@ -2,3 +2,4 @@ if (isServer) then {
waitUntil{dayz_preloadFinished}; waitUntil{dayz_preloadFinished};
}; };
_id = [] execFSM "\z\addons\dayz_code\system\player_monitor.fsm"; _id = [] execFSM "\z\addons\dayz_code\system\player_monitor.fsm";
_void = [] execVM "\z\addons\dayz_code\external\R3F_Realism\R3F_Realism_Init.sqf";

View File

@@ -1,81 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.02
@date 20101018
*****************************************************************************/
#include "R3F_WEIGHT_Configuration.cfg"
R3F_WEIGHT_FNCT_MakeSingleArray = {
private ["_arr_i","_arr_n", "_arr", "_n", "_nb", "_x"];
_arr_i = (_this select 0) select 0;
_arr_n = (_this select 0) select 1;
_arr = [];
_n = 0;
{
_nb = _arr_n select _n;
for [{_i = 0}, {_i < _nb}, {_i = _i + 1}] do{
_arr = _arr + [_x];
};
_n = _n + 1;
}foreach _arr_i;
_arr;
};
R3F_WEIGHT_FNCT_GetItemWeight = {
private ["_arr_class", "_total_weight", "_weight"];
_arr_class = (_this select 0) + (_this select 1);
_total_weight = 0;
_weight = 0;
CfgWeight = missionConfigFile >> "CfgWeight";
{
if(isclass(CfgWeight >> "Weapons" >> _x)) then {
_weight = getNumber(CfgWeight >> "Weapons" >> _x >> "weight");
_total_weight = _total_weight + _weight;
}else{
if(isclass(CfgWeight >> "Magazines" >> _x)) then {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight;
}else{
_weight = 0;
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
};
if(_weight > 0) then {
_total_weight = _total_weight + _weight;
} else {
// log only if not found
//diag_log format["Class not found %1", _x];
};
};
};
}foreach _arr_class;
_total_weight;
};
R3F_WEIGHT_FNCT_GetWeight = {
private ["_bagpack","_bagpack_weapons", "_bagpack_ammo", "_return","_english"];
_return = 0;
_bagpack = unitBackpack player;
if(!isnull(_bagpack)) then {
_bagpack_weapons = [getWeaponCargo _bagpack] call R3F_WEIGHT_FNCT_MakeSingleArray;
_bagpack_ammo = [getMagazineCargo _bagpack] call R3F_WEIGHT_FNCT_MakeSingleArray;
_return = [_bagpack_weapons, _bagpack_ammo] call R3F_WEIGHT_FNCT_GetItemWeight;
};
_return = _return + ([(weapons player), (magazines player)] call R3F_WEIGHT_FNCT_GetItemWeight);
_english = localize "STR_R3F_WEIGHT_English" == "lb";
if(_english) then {
_return = _return / 0.45359 ;
_return = round (_return * 100)/100;
};
_return;
};

View File

@@ -7,7 +7,7 @@ OnLoadMissionTime = False;
disabledAI = true; disabledAI = true;
disableChannels[]={0,2,6}; disableChannels[]={0,2,6};
enableItemsDropping=0; enableItemsDropping=0;
#include "R3F_Realism\R3F_Weight\R3F_CfgWeight.h"
briefing = 0; briefing = 0;
debriefing = 0; debriefing = 0;

View File

@@ -100,7 +100,7 @@ if (!isDedicated) then {
//Run the player monitor //Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}]; _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf"; _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";

View File

@@ -1,14 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
Language, English, French
#include "R3F_Realism\R3F_stringtable.csv"
Can't render this file because it contains an unexpected character in line 13 and column 10.

View File

@@ -1,21 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_Realism_Configuration.cfg"
#ifdef R3F_REALISM_USE_WEIGHT
_void = [] execVM "R3F_realism\R3F_Weight\R3F_DoWeight.sqf";
#endif
#ifdef R3F_REALISM_USE_TIRED
_void = [] execVM "R3F_realism\R3F_Tired\R3F_Tired_Init.sqf";
#endif

View File

@@ -1,12 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#define R3F_REALISM_USE_WEIGHT
#define R3F_REALISM_USE_TIRED

View File

@@ -1,12 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_Weight\R3F_WEIGHT_Stringtable.csv"
Can't render this file because it contains an unexpected character in line 11 and column 10.

View File

@@ -1,130 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.02
@date 20101011
*****************************************************************************/
#include "R3F_TIRED_Configuration.cfg"
private ["_level", "_n", "_s"];
//_voil = [] call R3F_TIRED_FNCT_MkVoile;
//[_voil,1] call R3F_TIRED_FNCT_Voile_Noir;
_n = 0;
_posATL = 0;
#ifdef R3F_TIRED_CSV_EXPORT
_s = format["""Duree"",""Distance From"",""Distance To"",""Vitesse"",""Fatigue"",""Black Level"",""poids"",""Counter"""];
_s call FNC_PrintToRPT;
#endif
R3F_TIRED_Accumulator = 0;
sleep 1;
_level = 1;
while {true} do {
R3F_TIRED_POIDS_TOTAL_PLAYER= R3F_Weight + R3F_TIRED_WEIGHT_PLAYER_EMPTY;
if (R3F_weight < R3F_TIRED_WEIGHT_LEVEL3 )then {
if (r3f_weight < R3F_TIRED_WEIGHT_LEVEL2) then {
if (r3f_weight < R3F_TIRED_WEIGHT_LEVEL1 ) then {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO1;
} else {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO2;
};
} else {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO3;
};
} else {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO4;
};
if (alive player) then {
switch (toArray (animationState player) select 5) do {
case 112: {
R3F_TIRED_Ratio_Position = R3F_TIRED_DOWN_LEVEL;
};
case 107:{
R3F_TIRED_Ratio_Position=R3F_TIRED_KNEE_LEVEL;
};
case 101:{
R3F_TIRED_Ratio_Position = R3F_TIRED_UP_LEVEL;
};
};
R3F_TIRED_vitesse_de_mon_joueur = [0,0,0] distance velocity player;
R3F_TIRED_coeff_mon_elevation_en_z = 0 max ((velocity player select 2) / R3F_TIRED_WEIGHT_CLIMB_FACTOR);
_posATL = (getPosATL player) select 2;
if((vehicle player == player) && (_posATL < 100)) then {
R3F_TIRED_Accumulator = R3F_TIRED_Accumulator
+ (R3F_TIRED_POIDS_TOTAL_PLAYER * R3F_TIRED_vitesse_de_mon_joueur * R3F_TIRED_Ratio_Position * R3F_TIRED_WEIGHT_SPEED_RATIO*R3F_TIRED_Ratio_Overweight)
+ (R3F_TIRED_POIDS_TOTAL_PLAYER * R3F_TIRED_coeff_mon_elevation_en_z * R3F_TIRED_WEIGHT_LEVEL2);
};
R3F_TIRED_Accumulator = 0 max (R3F_TIRED_Accumulator - R3F_TIRED_Ratio_Recovery);
_level = ((R3F_TIRED_Accumulator / R3F_TIRED_BLACKOUT_LEVEL) * 100);
_level = 0 max (1 - (_level / 100));
#ifdef R3F_TIRED_DEBUG
hintsilent format["Fatique : %1/%2\nBlack level : %3\nPoids total : %4\n Poids armement : %5",
R3F_TIRED_Accumulator,
R3F_TIRED_BLACKOUT_LEVEL,
_level,
R3F_TIRED_POIDS_TOTAL_PLAYER,
R3F_Weight];
#endif
[_level] call R3F_TIRED_FNCT_Voile_Noir;
if (R3F_TIRED_Accumulator > R3F_TIRED_BLACKOUT_LEVEL and scriptDone R3F_TIRED_Handle_Blackout_Effect and scriptDone R3F_TIRED_Handle_Blur_Effect) then {
R3F_TIRED_Handle_Blackout_Effect = [] spawn R3F_TIRED_FNCT_DoBlackVanish;
};
} else {
R3F_TIRED_Accumulator = 0;
};
if (R3F_TIRED_GLOBAL_TIRING
&& R3F_TIRED_vitesse_de_mon_joueur > 4
&& R3F_TIRED_Ratio_Recovery > R3F_TIRED_RATIO_RECOVERING
) then {
R3F_TIRED_Counter_Time= R3F_TIRED_Counter_Time + 1;
};
#ifdef R3F_TIRED_CSV_EXPORT
_s = format["%1,%2,%3,%4,%5,%6,%7,%8",
_n,
(player distance flag_start),
(player distance flag_end),
R3F_TIRED_vitesse_de_mon_joueur,
R3F_TIRED_Accumulator,
_level,
R3F_Weight,
R3F_TIRED_Counter_Time];
_s call FNC_PrintToRPT;
#endif
if ((R3F_TIRED_Counter_Time > R3F_TIRED_TIME_RECOVERING)) then {
R3F_TIRED_Ratio_Recovery = R3F_TIRED_Ratio_Recovery - 1;
R3F_TIRED_Counter_Time = 0;
};
sleep 1;
_n = _n + 1;
};
//[_voil] call R3F_TIRED_FNCT_Effect_Off;

View File

@@ -1,131 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
//Uncomment to write in arma.rpt a csv file for excel to trace some graphics
// #define R3F_TIRED_CSV_EXPORT
//Uncomment to show some informations in game
// #define R3F_TIRED_DEBUG
//adjustment player weight with helmet jacket Rangers Light equipment (not weapons)
#define R3F_TIRED_WEIGHT_PLAYER_EMPTY 90
//Predefined models for an easy setting
// uncomment only one setting
// #define R3F_TIRED_SET_MODE_EASY
#define R3F_TIRED_SET_MODE_UBEREASY
//#define R3F_TIRED_SET_MODE_NORMAL
//#define R3F_TIRED_SET_MODE_HARD
//adjustment weight * speed player
#define R3F_TIRED_WEIGHT_SPEED_RATIO 1
#ifdef R3F_TIRED_SET_MODE_UBEREASY
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 100000
// adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 0.9
#define R3F_TIRED_KNEE_LEVEL 0.6
#define R3F_TIRED_UP_LEVEL 0.5
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 20
//adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 40
#define R3F_TIRED_WEIGHT_LEVEL2 50
#define R3F_TIRED_WEIGHT_LEVEL3 60
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.8
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 1
#endif
#ifdef R3F_TIRED_SET_MODE_EASY
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 70000
// adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 1.8
#define R3F_TIRED_KNEE_LEVEL 1.2
#define R3F_TIRED_UP_LEVEL 1
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 20
//adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 25
#define R3F_TIRED_WEIGHT_LEVEL2 30
#define R3F_TIRED_WEIGHT_LEVEL3 40
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.8
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 10
#endif
#ifdef R3F_TIRED_SET_MODE_NORMAL
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 50000
//adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 3
#define R3F_TIRED_KNEE_LEVEL 1.5
#define R3F_TIRED_UP_LEVEL 1
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 10
//adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 15
#define R3F_TIRED_WEIGHT_LEVEL2 20
#define R3F_TIRED_WEIGHT_LEVEL3 30
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.6
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 30
#endif
#ifdef R3F_TIRED_SET_MODE_HARD
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 40000
// adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 4
#define R3F_TIRED_KNEE_LEVEL 2
#define R3F_TIRED_UP_LEVEL 1
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 5
// adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 10
#define R3F_TIRED_WEIGHT_LEVEL2 17
#define R3F_TIRED_WEIGHT_LEVEL3 25
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.3
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 60
#endif
// ratio of threshold weight
#define R3F_TIRED_WEIGHT_RATIO1 0.3 /* for weight < 10 kg */
#define R3F_TIRED_WEIGHT_RATIO2 0.4 /* for weight 10 à 20 kg */
#define R3F_TIRED_WEIGHT_RATIO3 0.6 /* for weight 20 à 30 kg */
#define R3F_TIRED_WEIGHT_RATIO4 0.7 /* for weight > 30 kg */
// activation / deactivation unit recup loss over time (true / false)
#define R3F_TIRED_GLOBAL_TIRING true
// adjustment recovery rate
#define R3F_TIRED_TIME_RECOVERING 100
#define R3F_TIRED_RATIO_RECOVERING 360
#define R3F_TIRED_WITH_VANISH true

View File

@@ -1,30 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_TIRED_Configuration.cfg"
FNC_PrintToRPT = {
diag_log text _this;
};
R3F_TIRED_FNCT_Voile_Noir = {
_level = _this select 0;
if(_level < R3F_TIRED_SHORTNESS_THRESHOLD ) then{
playSound "heartbeat_1";
addCamShake [2, 1, 25];
};
};
R3F_TIRED_FNCT_DoBlackVanish = {
[player,0.1] call fnc_usec_damageUnconscious;
[_refObj,"scream",3,false] call dayz_zombieSpeak;
cutText ["You are overburdened.", "PLAIN DOWN"];
};

View File

@@ -1,25 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_TIRED_Configuration.cfg"
call compile preprocessFile "R3F_realism\R3F_Tired\R3F_Tired_Fnct.sqf";
R3F_Weight = 0;
R3F_TIRED_Ratio_Position = 0;
R3F_TIRED_Accumulator = 0;
R3F_TIRED_Handle_Blur_Effect = [] spawn {};
R3F_TIRED_Handle_Blackout_Effect = [] spawn {};
R3F_TIRED_Counter_Time = 0;
R3F_TIRED_Ratio_Recovery = R3F_TIRED_RATIO_RECOVERING;
R3F_TIRED_Ratio_Overweight = 1;
_void = [] execVM "R3F_Realism\R3F_Tired\R3F_DoTired.sqf";

View File

@@ -1,3 +0,0 @@

R3F_VERSION_TIRED, "1.02", "1.02"
1 R3F_VERSION_TIRED 1.02 1.02

View File

@@ -1,50 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_WEIGHT_Configuration.cfg"
call compile preprocessFile "R3F_Realism\R3F_Weight\R3F_Weight_Fnct.sqf";
private ["_n","_gearbox_visible","_control","_display","_initial_text"];
disableSerialization;
R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight;
_initial_text = "";
_n = 0;
while {true} do
{
sleep R3F_WEIGHT_SHORT_DELAY;
#ifdef R3F_WEIGHT_SHOW_WEIGHT
_display = findDisplay ARMA2_RSCDISPLAYGEARBOX;
_gearbox_visible = ( (str _display) != "No display");
#else
_gearbox_visible = false;
#endif
if(_gearbox_visible) then {
R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight;
if(_initial_text == "") then {
_control = _display displayCtrl ARMA2_CAPTIONGEARBOX;
_initial_text = ctrlText _control ;
};
_control = _display displayCtrl ARMA2_CAPTIONGEARBOX;
_control ctrlSetText format[localize "STR_R3F_WEIGHT_InGearBox",_initial_text,R3F_Weight];
_n = 0;
}else{
if( _n > R3F_WEIGHT_LONG_DELAY) then {
R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight;
_n = 0;
};
_n = _n + 1 ;
};
};

View File

@@ -1,22 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#define ARMA2_RSCDISPLAYGEARBOX 106
#define ARMA2_CAPTIONGEARBOX 1001
#define R3F_WEIGHT_SHORT_DELAY 1
#define R3F_WEIGHT_LONG_DELAY 10
#define R3F_WEIGHT_MAIN_INCREMENT 1
#define R3F_WEIGHT_SHOW_WEIGHT
//show or not classes not found in arma.rpt
//#define R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND

View File

@@ -1,12 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
R3F_VERSION_WEIGHTED, "1.04", "1.04"
STR_R3F_WEIGHT_InGearBox, "%1 | Weight carried : %2 lb", "%1 | Poids transporté : %2 Kg"
STR_R3F_WEIGHT_English, "lb", "Kg"
1 /****************************************************************************
2 Copyright (C) 2010 Team ~R3F~
3 This program is free software under the terms of the GNU General Public License version 3.
4 You should have received a copy of the GNU General Public License
5 along with this program. If not see <http://www.gnu.org/licenses/>.
6 @authors team-r3f.org
7 @version 1.00
8 @date 20101006
9 *****************************************************************************/
10 R3F_VERSION_WEIGHTED 1.04 1.04
11 STR_R3F_WEIGHT_InGearBox %1 | Weight carried : %2 lb %1 | Poids transporté : %2 Kg
12 STR_R3F_WEIGHT_English lb Kg

View File

@@ -1,81 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.02
@date 20101018
*****************************************************************************/
#include "R3F_WEIGHT_Configuration.cfg"
R3F_WEIGHT_FNCT_MakeSingleArray = {
private ["_arr_i","_arr_n", "_arr", "_n", "_nb", "_x"];
_arr_i = (_this select 0) select 0;
_arr_n = (_this select 0) select 1;
_arr = [];
_n = 0;
{
_nb = _arr_n select _n;
for [{_i = 0}, {_i < _nb}, {_i = _i + 1}] do{
_arr = _arr + [_x];
};
_n = _n + 1;
}foreach _arr_i;
_arr;
};
R3F_WEIGHT_FNCT_GetItemWeight = {
private ["_arr_class", "_total_weight", "_weight"];
_arr_class = (_this select 0) + (_this select 1);
_total_weight = 0;
_weight = 0;
CfgWeight = missionConfigFile >> "CfgWeight";
{
if(isclass(CfgWeight >> "Weapons" >> _x)) then {
_weight = getNumber(CfgWeight >> "Weapons" >> _x >> "weight");
_total_weight = _total_weight + _weight;
}else{
if(isclass(CfgWeight >> "Magazines" >> _x)) then {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight;
}else{
_weight = 0;
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
};
if(_weight > 0) then {
_total_weight = _total_weight + _weight;
} else {
// log only if not found
//diag_log format["Class not found %1", _x];
};
};
};
}foreach _arr_class;
_total_weight;
};
R3F_WEIGHT_FNCT_GetWeight = {
private ["_bagpack","_bagpack_weapons", "_bagpack_ammo", "_return","_english"];
_return = 0;
_bagpack = unitBackpack player;
if(!isnull(_bagpack)) then {
_bagpack_weapons = [getWeaponCargo _bagpack] call R3F_WEIGHT_FNCT_MakeSingleArray;
_bagpack_ammo = [getMagazineCargo _bagpack] call R3F_WEIGHT_FNCT_MakeSingleArray;
_return = [_bagpack_weapons, _bagpack_ammo] call R3F_WEIGHT_FNCT_GetItemWeight;
};
_return = _return + ([(weapons player), (magazines player)] call R3F_WEIGHT_FNCT_GetItemWeight);
_english = localize "STR_R3F_WEIGHT_English" == "lb";
if(_english) then {
_return = _return / 0.45359 ;
_return = round (_return * 100)/100;
};
_return;
};

View File

@@ -1,13 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.02
@date 20101018
*****************************************************************************/
call compile preprocessFile "R3F_Realism\R3F_Weight\R3F_Weight_Fnct.sqf";
_void = [] execVM "R3F_Realism\R3F_Weight\R3F_DoWeight.sqf";

View File

@@ -1,10 +0,0 @@

#define ARMA2_RSCDISPLAYGEARBOX 106
#define ARMA2_CAPTIONGEARBOX 1001
#define R3F_WEIGHT_SHORT_DELAY 1
#define R3F_WEIGHT_LONG_DELAY 10
#define R3F_WEIGHT_MAIN_INCREMENT 1

View File

@@ -7,7 +7,7 @@ OnLoadMissionTime = False;
disabledAI = true; disabledAI = true;
disableChannels[]={0,2,6}; disableChannels[]={0,2,6};
enableItemsDropping=0; enableItemsDropping=0;
#include "R3F_Realism\R3F_Weight\R3F_CfgWeight.h"
briefing = 0; briefing = 0;
debriefing = 0; debriefing = 0;

View File

@@ -100,7 +100,7 @@ if (!isDedicated) then {
//Run the player monitor //Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}]; _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf"; _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";

View File

@@ -1,14 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
Language, English, French
#include "R3F_Realism\R3F_stringtable.csv"
Can't render this file because it contains an unexpected character in line 13 and column 10.

View File

@@ -1,21 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_Realism_Configuration.cfg"
#ifdef R3F_REALISM_USE_WEIGHT
_void = [] execVM "R3F_realism\R3F_Weight\R3F_DoWeight.sqf";
#endif
#ifdef R3F_REALISM_USE_TIRED
_void = [] execVM "R3F_realism\R3F_Tired\R3F_Tired_Init.sqf";
#endif

View File

@@ -1,12 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#define R3F_REALISM_USE_WEIGHT
#define R3F_REALISM_USE_TIRED

View File

@@ -1,12 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_Weight\R3F_WEIGHT_Stringtable.csv"
Can't render this file because it contains an unexpected character in line 11 and column 10.

View File

@@ -1,130 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.02
@date 20101011
*****************************************************************************/
#include "R3F_TIRED_Configuration.cfg"
private ["_level", "_n", "_s"];
//_voil = [] call R3F_TIRED_FNCT_MkVoile;
//[_voil,1] call R3F_TIRED_FNCT_Voile_Noir;
_n = 0;
_posATL = 0;
#ifdef R3F_TIRED_CSV_EXPORT
_s = format["""Duree"",""Distance From"",""Distance To"",""Vitesse"",""Fatigue"",""Black Level"",""poids"",""Counter"""];
_s call FNC_PrintToRPT;
#endif
R3F_TIRED_Accumulator = 0;
sleep 1;
_level = 1;
while {true} do {
R3F_TIRED_POIDS_TOTAL_PLAYER= R3F_Weight + R3F_TIRED_WEIGHT_PLAYER_EMPTY;
if (R3F_weight < R3F_TIRED_WEIGHT_LEVEL3 )then {
if (r3f_weight < R3F_TIRED_WEIGHT_LEVEL2) then {
if (r3f_weight < R3F_TIRED_WEIGHT_LEVEL1 ) then {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO1;
} else {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO2;
};
} else {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO3;
};
} else {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO4;
};
if (alive player) then {
switch (toArray (animationState player) select 5) do {
case 112: {
R3F_TIRED_Ratio_Position = R3F_TIRED_DOWN_LEVEL;
};
case 107:{
R3F_TIRED_Ratio_Position=R3F_TIRED_KNEE_LEVEL;
};
case 101:{
R3F_TIRED_Ratio_Position = R3F_TIRED_UP_LEVEL;
};
};
R3F_TIRED_vitesse_de_mon_joueur = [0,0,0] distance velocity player;
R3F_TIRED_coeff_mon_elevation_en_z = 0 max ((velocity player select 2) / R3F_TIRED_WEIGHT_CLIMB_FACTOR);
_posATL = (getPosATL player) select 2;
if((vehicle player == player) && (_posATL < 100)) then {
R3F_TIRED_Accumulator = R3F_TIRED_Accumulator
+ (R3F_TIRED_POIDS_TOTAL_PLAYER * R3F_TIRED_vitesse_de_mon_joueur * R3F_TIRED_Ratio_Position * R3F_TIRED_WEIGHT_SPEED_RATIO*R3F_TIRED_Ratio_Overweight)
+ (R3F_TIRED_POIDS_TOTAL_PLAYER * R3F_TIRED_coeff_mon_elevation_en_z * R3F_TIRED_WEIGHT_LEVEL2);
};
R3F_TIRED_Accumulator = 0 max (R3F_TIRED_Accumulator - R3F_TIRED_Ratio_Recovery);
_level = ((R3F_TIRED_Accumulator / R3F_TIRED_BLACKOUT_LEVEL) * 100);
_level = 0 max (1 - (_level / 100));
#ifdef R3F_TIRED_DEBUG
hintsilent format["Fatique : %1/%2\nBlack level : %3\nPoids total : %4\n Poids armement : %5",
R3F_TIRED_Accumulator,
R3F_TIRED_BLACKOUT_LEVEL,
_level,
R3F_TIRED_POIDS_TOTAL_PLAYER,
R3F_Weight];
#endif
[_level] call R3F_TIRED_FNCT_Voile_Noir;
if (R3F_TIRED_Accumulator > R3F_TIRED_BLACKOUT_LEVEL and scriptDone R3F_TIRED_Handle_Blackout_Effect and scriptDone R3F_TIRED_Handle_Blur_Effect) then {
R3F_TIRED_Handle_Blackout_Effect = [] spawn R3F_TIRED_FNCT_DoBlackVanish;
};
} else {
R3F_TIRED_Accumulator = 0;
};
if (R3F_TIRED_GLOBAL_TIRING
&& R3F_TIRED_vitesse_de_mon_joueur > 4
&& R3F_TIRED_Ratio_Recovery > R3F_TIRED_RATIO_RECOVERING
) then {
R3F_TIRED_Counter_Time= R3F_TIRED_Counter_Time + 1;
};
#ifdef R3F_TIRED_CSV_EXPORT
_s = format["%1,%2,%3,%4,%5,%6,%7,%8",
_n,
(player distance flag_start),
(player distance flag_end),
R3F_TIRED_vitesse_de_mon_joueur,
R3F_TIRED_Accumulator,
_level,
R3F_Weight,
R3F_TIRED_Counter_Time];
_s call FNC_PrintToRPT;
#endif
if ((R3F_TIRED_Counter_Time > R3F_TIRED_TIME_RECOVERING)) then {
R3F_TIRED_Ratio_Recovery = R3F_TIRED_Ratio_Recovery - 1;
R3F_TIRED_Counter_Time = 0;
};
sleep 1;
_n = _n + 1;
};
//[_voil] call R3F_TIRED_FNCT_Effect_Off;

View File

@@ -1,131 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
//Uncomment to write in arma.rpt a csv file for excel to trace some graphics
// #define R3F_TIRED_CSV_EXPORT
//Uncomment to show some informations in game
// #define R3F_TIRED_DEBUG
//adjustment player weight with helmet jacket Rangers Light equipment (not weapons)
#define R3F_TIRED_WEIGHT_PLAYER_EMPTY 90
//Predefined models for an easy setting
// uncomment only one setting
// #define R3F_TIRED_SET_MODE_EASY
#define R3F_TIRED_SET_MODE_UBEREASY
//#define R3F_TIRED_SET_MODE_NORMAL
//#define R3F_TIRED_SET_MODE_HARD
//adjustment weight * speed player
#define R3F_TIRED_WEIGHT_SPEED_RATIO 1
#ifdef R3F_TIRED_SET_MODE_UBEREASY
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 100000
// adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 0.9
#define R3F_TIRED_KNEE_LEVEL 0.6
#define R3F_TIRED_UP_LEVEL 0.5
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 20
//adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 40
#define R3F_TIRED_WEIGHT_LEVEL2 50
#define R3F_TIRED_WEIGHT_LEVEL3 60
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.8
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 1
#endif
#ifdef R3F_TIRED_SET_MODE_EASY
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 70000
// adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 1.8
#define R3F_TIRED_KNEE_LEVEL 1.2
#define R3F_TIRED_UP_LEVEL 1
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 20
//adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 25
#define R3F_TIRED_WEIGHT_LEVEL2 30
#define R3F_TIRED_WEIGHT_LEVEL3 40
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.8
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 10
#endif
#ifdef R3F_TIRED_SET_MODE_NORMAL
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 50000
//adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 3
#define R3F_TIRED_KNEE_LEVEL 1.5
#define R3F_TIRED_UP_LEVEL 1
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 10
//adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 15
#define R3F_TIRED_WEIGHT_LEVEL2 20
#define R3F_TIRED_WEIGHT_LEVEL3 30
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.6
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 30
#endif
#ifdef R3F_TIRED_SET_MODE_HARD
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 40000
// adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 4
#define R3F_TIRED_KNEE_LEVEL 2
#define R3F_TIRED_UP_LEVEL 1
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 5
// adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 10
#define R3F_TIRED_WEIGHT_LEVEL2 17
#define R3F_TIRED_WEIGHT_LEVEL3 25
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.3
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 60
#endif
// ratio of threshold weight
#define R3F_TIRED_WEIGHT_RATIO1 0.3 /* for weight < 10 kg */
#define R3F_TIRED_WEIGHT_RATIO2 0.4 /* for weight 10 à 20 kg */
#define R3F_TIRED_WEIGHT_RATIO3 0.6 /* for weight 20 à 30 kg */
#define R3F_TIRED_WEIGHT_RATIO4 0.7 /* for weight > 30 kg */
// activation / deactivation unit recup loss over time (true / false)
#define R3F_TIRED_GLOBAL_TIRING true
// adjustment recovery rate
#define R3F_TIRED_TIME_RECOVERING 100
#define R3F_TIRED_RATIO_RECOVERING 360
#define R3F_TIRED_WITH_VANISH true

View File

@@ -1,30 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_TIRED_Configuration.cfg"
FNC_PrintToRPT = {
diag_log text _this;
};
R3F_TIRED_FNCT_Voile_Noir = {
_level = _this select 0;
if(_level < R3F_TIRED_SHORTNESS_THRESHOLD ) then{
playSound "heartbeat_1";
addCamShake [2, 1, 25];
};
};
R3F_TIRED_FNCT_DoBlackVanish = {
[player,0.1] call fnc_usec_damageUnconscious;
[_refObj,"scream",3,false] call dayz_zombieSpeak;
cutText ["You are overburdened.", "PLAIN DOWN"];
};

View File

@@ -1,25 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_TIRED_Configuration.cfg"
call compile preprocessFile "R3F_realism\R3F_Tired\R3F_Tired_Fnct.sqf";
R3F_Weight = 0;
R3F_TIRED_Ratio_Position = 0;
R3F_TIRED_Accumulator = 0;
R3F_TIRED_Handle_Blur_Effect = [] spawn {};
R3F_TIRED_Handle_Blackout_Effect = [] spawn {};
R3F_TIRED_Counter_Time = 0;
R3F_TIRED_Ratio_Recovery = R3F_TIRED_RATIO_RECOVERING;
R3F_TIRED_Ratio_Overweight = 1;
_void = [] execVM "R3F_Realism\R3F_Tired\R3F_DoTired.sqf";

View File

@@ -1,3 +0,0 @@

R3F_VERSION_TIRED, "1.02", "1.02"
1 R3F_VERSION_TIRED 1.02 1.02

View File

@@ -1,50 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_WEIGHT_Configuration.cfg"
call compile preprocessFile "R3F_Realism\R3F_Weight\R3F_Weight_Fnct.sqf";
private ["_n","_gearbox_visible","_control","_display","_initial_text"];
disableSerialization;
R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight;
_initial_text = "";
_n = 0;
while {true} do
{
sleep R3F_WEIGHT_SHORT_DELAY;
#ifdef R3F_WEIGHT_SHOW_WEIGHT
_display = findDisplay ARMA2_RSCDISPLAYGEARBOX;
_gearbox_visible = ( (str _display) != "No display");
#else
_gearbox_visible = false;
#endif
if(_gearbox_visible) then {
R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight;
if(_initial_text == "") then {
_control = _display displayCtrl ARMA2_CAPTIONGEARBOX;
_initial_text = ctrlText _control ;
};
_control = _display displayCtrl ARMA2_CAPTIONGEARBOX;
_control ctrlSetText format[localize "STR_R3F_WEIGHT_InGearBox",_initial_text,R3F_Weight];
_n = 0;
}else{
if( _n > R3F_WEIGHT_LONG_DELAY) then {
R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight;
_n = 0;
};
_n = _n + 1 ;
};
};

View File

@@ -1,22 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#define ARMA2_RSCDISPLAYGEARBOX 106
#define ARMA2_CAPTIONGEARBOX 1001
#define R3F_WEIGHT_SHORT_DELAY 1
#define R3F_WEIGHT_LONG_DELAY 10
#define R3F_WEIGHT_MAIN_INCREMENT 1
#define R3F_WEIGHT_SHOW_WEIGHT
//show or not classes not found in arma.rpt
//#define R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND

View File

@@ -1,12 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
R3F_VERSION_WEIGHTED, "1.04", "1.04"
STR_R3F_WEIGHT_InGearBox, "%1 | Weight carried : %2 lb", "%1 | Poids transporté : %2 Kg"
STR_R3F_WEIGHT_English, "lb", "Kg"
1 /****************************************************************************
2 Copyright (C) 2010 Team ~R3F~
3 This program is free software under the terms of the GNU General Public License version 3.
4 You should have received a copy of the GNU General Public License
5 along with this program. If not see <http://www.gnu.org/licenses/>.
6 @authors team-r3f.org
7 @version 1.00
8 @date 20101006
9 *****************************************************************************/
10 R3F_VERSION_WEIGHTED 1.04 1.04
11 STR_R3F_WEIGHT_InGearBox %1 | Weight carried : %2 lb %1 | Poids transporté : %2 Kg
12 STR_R3F_WEIGHT_English lb Kg

View File

@@ -1,13 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.02
@date 20101018
*****************************************************************************/
call compile preprocessFile "R3F_Realism\R3F_Weight\R3F_Weight_Fnct.sqf";
_void = [] execVM "R3F_Realism\R3F_Weight\R3F_DoWeight.sqf";

View File

@@ -1,10 +0,0 @@

#define ARMA2_RSCDISPLAYGEARBOX 106
#define ARMA2_CAPTIONGEARBOX 1001
#define R3F_WEIGHT_SHORT_DELAY 1
#define R3F_WEIGHT_LONG_DELAY 10
#define R3F_WEIGHT_MAIN_INCREMENT 1

View File

@@ -7,7 +7,7 @@ OnLoadMissionTime = False;
disabledAI = true; disabledAI = true;
disableChannels[]={0,2,6}; disableChannels[]={0,2,6};
enableItemsDropping = 0; enableItemsDropping = 0;
#include "R3F_Realism\R3F_Weight\R3F_CfgWeight.h"
briefing = 0; briefing = 0;
debriefing = 0; debriefing = 0;

View File

@@ -101,7 +101,7 @@ if (!isDedicated) then {
//Run the player monitor //Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}]; _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf"; _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";

View File

@@ -1,14 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
Language, English, French
#include "R3F_Realism\R3F_stringtable.csv"
Can't render this file because it contains an unexpected character in line 13 and column 10.

View File

@@ -1,21 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_Realism_Configuration.cfg"
#ifdef R3F_REALISM_USE_WEIGHT
_void = [] execVM "R3F_realism\R3F_Weight\R3F_DoWeight.sqf";
#endif
#ifdef R3F_REALISM_USE_TIRED
_void = [] execVM "R3F_realism\R3F_Tired\R3F_Tired_Init.sqf";
#endif

View File

@@ -1,12 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#define R3F_REALISM_USE_WEIGHT
#define R3F_REALISM_USE_TIRED

View File

@@ -1,12 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_Weight\R3F_WEIGHT_Stringtable.csv"
Can't render this file because it contains an unexpected character in line 11 and column 10.

View File

@@ -1,130 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.02
@date 20101011
*****************************************************************************/
#include "R3F_TIRED_Configuration.cfg"
private ["_level", "_n", "_s"];
//_voil = [] call R3F_TIRED_FNCT_MkVoile;
//[_voil,1] call R3F_TIRED_FNCT_Voile_Noir;
_n = 0;
_posATL = 0;
#ifdef R3F_TIRED_CSV_EXPORT
_s = format["""Duree"",""Distance From"",""Distance To"",""Vitesse"",""Fatigue"",""Black Level"",""poids"",""Counter"""];
_s call FNC_PrintToRPT;
#endif
R3F_TIRED_Accumulator = 0;
sleep 1;
_level = 1;
while {true} do {
R3F_TIRED_POIDS_TOTAL_PLAYER= R3F_Weight + R3F_TIRED_WEIGHT_PLAYER_EMPTY;
if (R3F_weight < R3F_TIRED_WEIGHT_LEVEL3 )then {
if (r3f_weight < R3F_TIRED_WEIGHT_LEVEL2) then {
if (r3f_weight < R3F_TIRED_WEIGHT_LEVEL1 ) then {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO1;
} else {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO2;
};
} else {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO3;
};
} else {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO4;
};
if (alive player) then {
switch (toArray (animationState player) select 5) do {
case 112: {
R3F_TIRED_Ratio_Position = R3F_TIRED_DOWN_LEVEL;
};
case 107:{
R3F_TIRED_Ratio_Position=R3F_TIRED_KNEE_LEVEL;
};
case 101:{
R3F_TIRED_Ratio_Position = R3F_TIRED_UP_LEVEL;
};
};
R3F_TIRED_vitesse_de_mon_joueur = [0,0,0] distance velocity player;
R3F_TIRED_coeff_mon_elevation_en_z = 0 max ((velocity player select 2) / R3F_TIRED_WEIGHT_CLIMB_FACTOR);
_posATL = (getPosATL player) select 2;
if((vehicle player == player) && (_posATL < 100)) then {
R3F_TIRED_Accumulator = R3F_TIRED_Accumulator
+ (R3F_TIRED_POIDS_TOTAL_PLAYER * R3F_TIRED_vitesse_de_mon_joueur * R3F_TIRED_Ratio_Position * R3F_TIRED_WEIGHT_SPEED_RATIO*R3F_TIRED_Ratio_Overweight)
+ (R3F_TIRED_POIDS_TOTAL_PLAYER * R3F_TIRED_coeff_mon_elevation_en_z * R3F_TIRED_WEIGHT_LEVEL2);
};
R3F_TIRED_Accumulator = 0 max (R3F_TIRED_Accumulator - R3F_TIRED_Ratio_Recovery);
_level = ((R3F_TIRED_Accumulator / R3F_TIRED_BLACKOUT_LEVEL) * 100);
_level = 0 max (1 - (_level / 100));
#ifdef R3F_TIRED_DEBUG
hintsilent format["Fatique : %1/%2\nBlack level : %3\nPoids total : %4\n Poids armement : %5",
R3F_TIRED_Accumulator,
R3F_TIRED_BLACKOUT_LEVEL,
_level,
R3F_TIRED_POIDS_TOTAL_PLAYER,
R3F_Weight];
#endif
[_level] call R3F_TIRED_FNCT_Voile_Noir;
if (R3F_TIRED_Accumulator > R3F_TIRED_BLACKOUT_LEVEL and scriptDone R3F_TIRED_Handle_Blackout_Effect and scriptDone R3F_TIRED_Handle_Blur_Effect) then {
R3F_TIRED_Handle_Blackout_Effect = [] spawn R3F_TIRED_FNCT_DoBlackVanish;
};
} else {
R3F_TIRED_Accumulator = 0;
};
if (R3F_TIRED_GLOBAL_TIRING
&& R3F_TIRED_vitesse_de_mon_joueur > 4
&& R3F_TIRED_Ratio_Recovery > R3F_TIRED_RATIO_RECOVERING
) then {
R3F_TIRED_Counter_Time= R3F_TIRED_Counter_Time + 1;
};
#ifdef R3F_TIRED_CSV_EXPORT
_s = format["%1,%2,%3,%4,%5,%6,%7,%8",
_n,
(player distance flag_start),
(player distance flag_end),
R3F_TIRED_vitesse_de_mon_joueur,
R3F_TIRED_Accumulator,
_level,
R3F_Weight,
R3F_TIRED_Counter_Time];
_s call FNC_PrintToRPT;
#endif
if ((R3F_TIRED_Counter_Time > R3F_TIRED_TIME_RECOVERING)) then {
R3F_TIRED_Ratio_Recovery = R3F_TIRED_Ratio_Recovery - 1;
R3F_TIRED_Counter_Time = 0;
};
sleep 1;
_n = _n + 1;
};
//[_voil] call R3F_TIRED_FNCT_Effect_Off;

View File

@@ -1,131 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
//Uncomment to write in arma.rpt a csv file for excel to trace some graphics
// #define R3F_TIRED_CSV_EXPORT
//Uncomment to show some informations in game
// #define R3F_TIRED_DEBUG
//adjustment player weight with helmet jacket Rangers Light equipment (not weapons)
#define R3F_TIRED_WEIGHT_PLAYER_EMPTY 90
//Predefined models for an easy setting
// uncomment only one setting
// #define R3F_TIRED_SET_MODE_EASY
#define R3F_TIRED_SET_MODE_UBEREASY
//#define R3F_TIRED_SET_MODE_NORMAL
//#define R3F_TIRED_SET_MODE_HARD
//adjustment weight * speed player
#define R3F_TIRED_WEIGHT_SPEED_RATIO 1
#ifdef R3F_TIRED_SET_MODE_UBEREASY
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 100000
// adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 0.9
#define R3F_TIRED_KNEE_LEVEL 0.6
#define R3F_TIRED_UP_LEVEL 0.5
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 20
//adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 40
#define R3F_TIRED_WEIGHT_LEVEL2 50
#define R3F_TIRED_WEIGHT_LEVEL3 60
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.8
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 1
#endif
#ifdef R3F_TIRED_SET_MODE_EASY
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 70000
// adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 1.8
#define R3F_TIRED_KNEE_LEVEL 1.2
#define R3F_TIRED_UP_LEVEL 1
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 20
//adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 25
#define R3F_TIRED_WEIGHT_LEVEL2 30
#define R3F_TIRED_WEIGHT_LEVEL3 40
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.8
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 10
#endif
#ifdef R3F_TIRED_SET_MODE_NORMAL
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 50000
//adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 3
#define R3F_TIRED_KNEE_LEVEL 1.5
#define R3F_TIRED_UP_LEVEL 1
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 10
//adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 15
#define R3F_TIRED_WEIGHT_LEVEL2 20
#define R3F_TIRED_WEIGHT_LEVEL3 30
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.6
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 30
#endif
#ifdef R3F_TIRED_SET_MODE_HARD
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 40000
// adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 4
#define R3F_TIRED_KNEE_LEVEL 2
#define R3F_TIRED_UP_LEVEL 1
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 5
// adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 10
#define R3F_TIRED_WEIGHT_LEVEL2 17
#define R3F_TIRED_WEIGHT_LEVEL3 25
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.3
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 60
#endif
// ratio of threshold weight
#define R3F_TIRED_WEIGHT_RATIO1 0.3 /* for weight < 10 kg */
#define R3F_TIRED_WEIGHT_RATIO2 0.4 /* for weight 10 à 20 kg */
#define R3F_TIRED_WEIGHT_RATIO3 0.6 /* for weight 20 à 30 kg */
#define R3F_TIRED_WEIGHT_RATIO4 0.7 /* for weight > 30 kg */
// activation / deactivation unit recup loss over time (true / false)
#define R3F_TIRED_GLOBAL_TIRING true
// adjustment recovery rate
#define R3F_TIRED_TIME_RECOVERING 100
#define R3F_TIRED_RATIO_RECOVERING 360
#define R3F_TIRED_WITH_VANISH true

View File

@@ -1,30 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_TIRED_Configuration.cfg"
FNC_PrintToRPT = {
diag_log text _this;
};
R3F_TIRED_FNCT_Voile_Noir = {
_level = _this select 0;
if(_level < R3F_TIRED_SHORTNESS_THRESHOLD ) then{
playSound "heartbeat_1";
addCamShake [2, 1, 25];
};
};
R3F_TIRED_FNCT_DoBlackVanish = {
[player,0.1] call fnc_usec_damageUnconscious;
[_refObj,"scream",3,false] call dayz_zombieSpeak;
cutText ["You are overburdened.", "PLAIN DOWN"];
};

View File

@@ -1,25 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_TIRED_Configuration.cfg"
call compile preprocessFile "R3F_realism\R3F_Tired\R3F_Tired_Fnct.sqf";
R3F_Weight = 0;
R3F_TIRED_Ratio_Position = 0;
R3F_TIRED_Accumulator = 0;
R3F_TIRED_Handle_Blur_Effect = [] spawn {};
R3F_TIRED_Handle_Blackout_Effect = [] spawn {};
R3F_TIRED_Counter_Time = 0;
R3F_TIRED_Ratio_Recovery = R3F_TIRED_RATIO_RECOVERING;
R3F_TIRED_Ratio_Overweight = 1;
_void = [] execVM "R3F_Realism\R3F_Tired\R3F_DoTired.sqf";

View File

@@ -1,3 +0,0 @@

R3F_VERSION_TIRED, "1.02", "1.02"
1 R3F_VERSION_TIRED 1.02 1.02

View File

@@ -1,50 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_WEIGHT_Configuration.cfg"
call compile preprocessFile "R3F_Realism\R3F_Weight\R3F_Weight_Fnct.sqf";
private ["_n","_gearbox_visible","_control","_display","_initial_text"];
disableSerialization;
R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight;
_initial_text = "";
_n = 0;
while {true} do
{
sleep R3F_WEIGHT_SHORT_DELAY;
#ifdef R3F_WEIGHT_SHOW_WEIGHT
_display = findDisplay ARMA2_RSCDISPLAYGEARBOX;
_gearbox_visible = ( (str _display) != "No display");
#else
_gearbox_visible = false;
#endif
if(_gearbox_visible) then {
R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight;
if(_initial_text == "") then {
_control = _display displayCtrl ARMA2_CAPTIONGEARBOX;
_initial_text = ctrlText _control ;
};
_control = _display displayCtrl ARMA2_CAPTIONGEARBOX;
_control ctrlSetText format[localize "STR_R3F_WEIGHT_InGearBox",_initial_text,R3F_Weight];
_n = 0;
}else{
if( _n > R3F_WEIGHT_LONG_DELAY) then {
R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight;
_n = 0;
};
_n = _n + 1 ;
};
};

View File

@@ -1,22 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#define ARMA2_RSCDISPLAYGEARBOX 106
#define ARMA2_CAPTIONGEARBOX 1001
#define R3F_WEIGHT_SHORT_DELAY 1
#define R3F_WEIGHT_LONG_DELAY 10
#define R3F_WEIGHT_MAIN_INCREMENT 1
#define R3F_WEIGHT_SHOW_WEIGHT
//show or not classes not found in arma.rpt
//#define R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND

View File

@@ -1,12 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
R3F_VERSION_WEIGHTED, "1.04", "1.04"
STR_R3F_WEIGHT_InGearBox, "%1 | Weight carried : %2 lb", "%1 | Poids transporté : %2 Kg"
STR_R3F_WEIGHT_English, "lb", "Kg"
1 /****************************************************************************
2 Copyright (C) 2010 Team ~R3F~
3 This program is free software under the terms of the GNU General Public License version 3.
4 You should have received a copy of the GNU General Public License
5 along with this program. If not see <http://www.gnu.org/licenses/>.
6 @authors team-r3f.org
7 @version 1.00
8 @date 20101006
9 *****************************************************************************/
10 R3F_VERSION_WEIGHTED 1.04 1.04
11 STR_R3F_WEIGHT_InGearBox %1 | Weight carried : %2 lb %1 | Poids transporté : %2 Kg
12 STR_R3F_WEIGHT_English lb Kg

View File

@@ -1,81 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.02
@date 20101018
*****************************************************************************/
#include "R3F_WEIGHT_Configuration.cfg"
R3F_WEIGHT_FNCT_MakeSingleArray = {
private ["_arr_i","_arr_n", "_arr", "_n", "_nb", "_x"];
_arr_i = (_this select 0) select 0;
_arr_n = (_this select 0) select 1;
_arr = [];
_n = 0;
{
_nb = _arr_n select _n;
for [{_i = 0}, {_i < _nb}, {_i = _i + 1}] do{
_arr = _arr + [_x];
};
_n = _n + 1;
}foreach _arr_i;
_arr;
};
R3F_WEIGHT_FNCT_GetItemWeight = {
private ["_arr_class", "_total_weight", "_weight"];
_arr_class = (_this select 0) + (_this select 1);
_total_weight = 0;
_weight = 0;
CfgWeight = missionConfigFile >> "CfgWeight";
{
if(isclass(CfgWeight >> "Weapons" >> _x)) then {
_weight = getNumber(CfgWeight >> "Weapons" >> _x >> "weight");
_total_weight = _total_weight + _weight;
}else{
if(isclass(CfgWeight >> "Magazines" >> _x)) then {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight;
}else{
_weight = 0;
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
};
if(_weight > 0) then {
_total_weight = _total_weight + _weight;
} else {
// log only if not found
//diag_log format["Class not found %1", _x];
};
};
};
}foreach _arr_class;
_total_weight;
};
R3F_WEIGHT_FNCT_GetWeight = {
private ["_bagpack","_bagpack_weapons", "_bagpack_ammo", "_return","_english"];
_return = 0;
_bagpack = unitBackpack player;
if(!isnull(_bagpack)) then {
_bagpack_weapons = [getWeaponCargo _bagpack] call R3F_WEIGHT_FNCT_MakeSingleArray;
_bagpack_ammo = [getMagazineCargo _bagpack] call R3F_WEIGHT_FNCT_MakeSingleArray;
_return = [_bagpack_weapons, _bagpack_ammo] call R3F_WEIGHT_FNCT_GetItemWeight;
};
_return = _return + ([(weapons player), (magazines player)] call R3F_WEIGHT_FNCT_GetItemWeight);
_english = localize "STR_R3F_WEIGHT_English" == "lb";
if(_english) then {
_return = _return / 0.45359 ;
_return = round (_return * 100)/100;
};
_return;
};

View File

@@ -1,13 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.02
@date 20101018
*****************************************************************************/
call compile preprocessFile "R3F_Realism\R3F_Weight\R3F_Weight_Fnct.sqf";
_void = [] execVM "R3F_Realism\R3F_Weight\R3F_DoWeight.sqf";

View File

@@ -1,10 +0,0 @@

#define ARMA2_RSCDISPLAYGEARBOX 106
#define ARMA2_CAPTIONGEARBOX 1001
#define R3F_WEIGHT_SHORT_DELAY 1
#define R3F_WEIGHT_LONG_DELAY 10
#define R3F_WEIGHT_MAIN_INCREMENT 1

View File

@@ -7,7 +7,7 @@ OnLoadMissionTime = False;
disabledAI = true; disabledAI = true;
disableChannels[]={0,2,6}; disableChannels[]={0,2,6};
enableItemsDropping=0; enableItemsDropping=0;
#include "R3F_Realism\R3F_Weight\R3F_CfgWeight.h"
briefing = 0; briefing = 0;
debriefing = 0; debriefing = 0;

View File

@@ -100,7 +100,7 @@ if (!isDedicated) then {
//Run the player monitor //Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}]; _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf"; _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";

View File

@@ -1,14 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
Language, English, French
#include "R3F_Realism\R3F_stringtable.csv"
Can't render this file because it contains an unexpected character in line 13 and column 10.

View File

@@ -1,21 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_Realism_Configuration.cfg"
#ifdef R3F_REALISM_USE_WEIGHT
_void = [] execVM "R3F_realism\R3F_Weight\R3F_DoWeight.sqf";
#endif
#ifdef R3F_REALISM_USE_TIRED
_void = [] execVM "R3F_realism\R3F_Tired\R3F_Tired_Init.sqf";
#endif

View File

@@ -1,12 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#define R3F_REALISM_USE_WEIGHT
#define R3F_REALISM_USE_TIRED

View File

@@ -1,12 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_Weight\R3F_WEIGHT_Stringtable.csv"
Can't render this file because it contains an unexpected character in line 11 and column 10.

View File

@@ -1,130 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.02
@date 20101011
*****************************************************************************/
#include "R3F_TIRED_Configuration.cfg"
private ["_level", "_n", "_s"];
//_voil = [] call R3F_TIRED_FNCT_MkVoile;
//[_voil,1] call R3F_TIRED_FNCT_Voile_Noir;
_n = 0;
_posATL = 0;
#ifdef R3F_TIRED_CSV_EXPORT
_s = format["""Duree"",""Distance From"",""Distance To"",""Vitesse"",""Fatigue"",""Black Level"",""poids"",""Counter"""];
_s call FNC_PrintToRPT;
#endif
R3F_TIRED_Accumulator = 0;
sleep 1;
_level = 1;
while {true} do {
R3F_TIRED_POIDS_TOTAL_PLAYER= R3F_Weight + R3F_TIRED_WEIGHT_PLAYER_EMPTY;
if (R3F_weight < R3F_TIRED_WEIGHT_LEVEL3 )then {
if (r3f_weight < R3F_TIRED_WEIGHT_LEVEL2) then {
if (r3f_weight < R3F_TIRED_WEIGHT_LEVEL1 ) then {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO1;
} else {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO2;
};
} else {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO3;
};
} else {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO4;
};
if (alive player) then {
switch (toArray (animationState player) select 5) do {
case 112: {
R3F_TIRED_Ratio_Position = R3F_TIRED_DOWN_LEVEL;
};
case 107:{
R3F_TIRED_Ratio_Position=R3F_TIRED_KNEE_LEVEL;
};
case 101:{
R3F_TIRED_Ratio_Position = R3F_TIRED_UP_LEVEL;
};
};
R3F_TIRED_vitesse_de_mon_joueur = [0,0,0] distance velocity player;
R3F_TIRED_coeff_mon_elevation_en_z = 0 max ((velocity player select 2) / R3F_TIRED_WEIGHT_CLIMB_FACTOR);
_posATL = (getPosATL player) select 2;
if((vehicle player == player) && (_posATL < 100)) then {
R3F_TIRED_Accumulator = R3F_TIRED_Accumulator
+ (R3F_TIRED_POIDS_TOTAL_PLAYER * R3F_TIRED_vitesse_de_mon_joueur * R3F_TIRED_Ratio_Position * R3F_TIRED_WEIGHT_SPEED_RATIO*R3F_TIRED_Ratio_Overweight)
+ (R3F_TIRED_POIDS_TOTAL_PLAYER * R3F_TIRED_coeff_mon_elevation_en_z * R3F_TIRED_WEIGHT_LEVEL2);
};
R3F_TIRED_Accumulator = 0 max (R3F_TIRED_Accumulator - R3F_TIRED_Ratio_Recovery);
_level = ((R3F_TIRED_Accumulator / R3F_TIRED_BLACKOUT_LEVEL) * 100);
_level = 0 max (1 - (_level / 100));
#ifdef R3F_TIRED_DEBUG
hintsilent format["Fatique : %1/%2\nBlack level : %3\nPoids total : %4\n Poids armement : %5",
R3F_TIRED_Accumulator,
R3F_TIRED_BLACKOUT_LEVEL,
_level,
R3F_TIRED_POIDS_TOTAL_PLAYER,
R3F_Weight];
#endif
[_level] call R3F_TIRED_FNCT_Voile_Noir;
if (R3F_TIRED_Accumulator > R3F_TIRED_BLACKOUT_LEVEL and scriptDone R3F_TIRED_Handle_Blackout_Effect and scriptDone R3F_TIRED_Handle_Blur_Effect) then {
R3F_TIRED_Handle_Blackout_Effect = [] spawn R3F_TIRED_FNCT_DoBlackVanish;
};
} else {
R3F_TIRED_Accumulator = 0;
};
if (R3F_TIRED_GLOBAL_TIRING
&& R3F_TIRED_vitesse_de_mon_joueur > 4
&& R3F_TIRED_Ratio_Recovery > R3F_TIRED_RATIO_RECOVERING
) then {
R3F_TIRED_Counter_Time= R3F_TIRED_Counter_Time + 1;
};
#ifdef R3F_TIRED_CSV_EXPORT
_s = format["%1,%2,%3,%4,%5,%6,%7,%8",
_n,
(player distance flag_start),
(player distance flag_end),
R3F_TIRED_vitesse_de_mon_joueur,
R3F_TIRED_Accumulator,
_level,
R3F_Weight,
R3F_TIRED_Counter_Time];
_s call FNC_PrintToRPT;
#endif
if ((R3F_TIRED_Counter_Time > R3F_TIRED_TIME_RECOVERING)) then {
R3F_TIRED_Ratio_Recovery = R3F_TIRED_Ratio_Recovery - 1;
R3F_TIRED_Counter_Time = 0;
};
sleep 1;
_n = _n + 1;
};
//[_voil] call R3F_TIRED_FNCT_Effect_Off;

View File

@@ -1,131 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
//Uncomment to write in arma.rpt a csv file for excel to trace some graphics
// #define R3F_TIRED_CSV_EXPORT
//Uncomment to show some informations in game
// #define R3F_TIRED_DEBUG
//adjustment player weight with helmet jacket Rangers Light equipment (not weapons)
#define R3F_TIRED_WEIGHT_PLAYER_EMPTY 90
//Predefined models for an easy setting
// uncomment only one setting
// #define R3F_TIRED_SET_MODE_EASY
#define R3F_TIRED_SET_MODE_UBEREASY
//#define R3F_TIRED_SET_MODE_NORMAL
//#define R3F_TIRED_SET_MODE_HARD
//adjustment weight * speed player
#define R3F_TIRED_WEIGHT_SPEED_RATIO 1
#ifdef R3F_TIRED_SET_MODE_UBEREASY
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 100000
// adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 0.9
#define R3F_TIRED_KNEE_LEVEL 0.6
#define R3F_TIRED_UP_LEVEL 0.5
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 20
//adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 40
#define R3F_TIRED_WEIGHT_LEVEL2 50
#define R3F_TIRED_WEIGHT_LEVEL3 60
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.8
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 1
#endif
#ifdef R3F_TIRED_SET_MODE_EASY
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 70000
// adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 1.8
#define R3F_TIRED_KNEE_LEVEL 1.2
#define R3F_TIRED_UP_LEVEL 1
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 20
//adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 25
#define R3F_TIRED_WEIGHT_LEVEL2 30
#define R3F_TIRED_WEIGHT_LEVEL3 40
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.8
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 10
#endif
#ifdef R3F_TIRED_SET_MODE_NORMAL
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 50000
//adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 3
#define R3F_TIRED_KNEE_LEVEL 1.5
#define R3F_TIRED_UP_LEVEL 1
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 10
//adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 15
#define R3F_TIRED_WEIGHT_LEVEL2 20
#define R3F_TIRED_WEIGHT_LEVEL3 30
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.6
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 30
#endif
#ifdef R3F_TIRED_SET_MODE_HARD
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 40000
// adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 4
#define R3F_TIRED_KNEE_LEVEL 2
#define R3F_TIRED_UP_LEVEL 1
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 5
// adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 10
#define R3F_TIRED_WEIGHT_LEVEL2 17
#define R3F_TIRED_WEIGHT_LEVEL3 25
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.3
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 60
#endif
// ratio of threshold weight
#define R3F_TIRED_WEIGHT_RATIO1 0.3 /* for weight < 10 kg */
#define R3F_TIRED_WEIGHT_RATIO2 0.4 /* for weight 10 à 20 kg */
#define R3F_TIRED_WEIGHT_RATIO3 0.6 /* for weight 20 à 30 kg */
#define R3F_TIRED_WEIGHT_RATIO4 0.7 /* for weight > 30 kg */
// activation / deactivation unit recup loss over time (true / false)
#define R3F_TIRED_GLOBAL_TIRING true
// adjustment recovery rate
#define R3F_TIRED_TIME_RECOVERING 100
#define R3F_TIRED_RATIO_RECOVERING 360
#define R3F_TIRED_WITH_VANISH true

View File

@@ -1,30 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_TIRED_Configuration.cfg"
FNC_PrintToRPT = {
diag_log text _this;
};
R3F_TIRED_FNCT_Voile_Noir = {
_level = _this select 0;
if(_level < R3F_TIRED_SHORTNESS_THRESHOLD ) then{
playSound "heartbeat_1";
addCamShake [2, 1, 25];
};
};
R3F_TIRED_FNCT_DoBlackVanish = {
[player,0.1] call fnc_usec_damageUnconscious;
[_refObj,"scream",3,false] call dayz_zombieSpeak;
cutText ["You are overburdened.", "PLAIN DOWN"];
};

View File

@@ -1,25 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_TIRED_Configuration.cfg"
call compile preprocessFile "R3F_realism\R3F_Tired\R3F_Tired_Fnct.sqf";
R3F_Weight = 0;
R3F_TIRED_Ratio_Position = 0;
R3F_TIRED_Accumulator = 0;
R3F_TIRED_Handle_Blur_Effect = [] spawn {};
R3F_TIRED_Handle_Blackout_Effect = [] spawn {};
R3F_TIRED_Counter_Time = 0;
R3F_TIRED_Ratio_Recovery = R3F_TIRED_RATIO_RECOVERING;
R3F_TIRED_Ratio_Overweight = 1;
_void = [] execVM "R3F_Realism\R3F_Tired\R3F_DoTired.sqf";

View File

@@ -1,3 +0,0 @@

R3F_VERSION_TIRED, "1.02", "1.02"
1 R3F_VERSION_TIRED 1.02 1.02

View File

@@ -1,50 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_WEIGHT_Configuration.cfg"
call compile preprocessFile "R3F_Realism\R3F_Weight\R3F_Weight_Fnct.sqf";
private ["_n","_gearbox_visible","_control","_display","_initial_text"];
disableSerialization;
R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight;
_initial_text = "";
_n = 0;
while {true} do
{
sleep R3F_WEIGHT_SHORT_DELAY;
#ifdef R3F_WEIGHT_SHOW_WEIGHT
_display = findDisplay ARMA2_RSCDISPLAYGEARBOX;
_gearbox_visible = ( (str _display) != "No display");
#else
_gearbox_visible = false;
#endif
if(_gearbox_visible) then {
R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight;
if(_initial_text == "") then {
_control = _display displayCtrl ARMA2_CAPTIONGEARBOX;
_initial_text = ctrlText _control ;
};
_control = _display displayCtrl ARMA2_CAPTIONGEARBOX;
_control ctrlSetText format[localize "STR_R3F_WEIGHT_InGearBox",_initial_text,R3F_Weight];
_n = 0;
}else{
if( _n > R3F_WEIGHT_LONG_DELAY) then {
R3F_Weight = call R3F_WEIGHT_FNCT_GetWeight;
_n = 0;
};
_n = _n + 1 ;
};
};

View File

@@ -1,22 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#define ARMA2_RSCDISPLAYGEARBOX 106
#define ARMA2_CAPTIONGEARBOX 1001
#define R3F_WEIGHT_SHORT_DELAY 1
#define R3F_WEIGHT_LONG_DELAY 10
#define R3F_WEIGHT_MAIN_INCREMENT 1
#define R3F_WEIGHT_SHOW_WEIGHT
//show or not classes not found in arma.rpt
//#define R3F_WEIGHT_SHOW_CLASSES_NOT_FOUND

View File

@@ -1,12 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
R3F_VERSION_WEIGHTED, "1.04", "1.04"
STR_R3F_WEIGHT_InGearBox, "%1 | Weight carried : %2 lb", "%1 | Poids transporté : %2 Kg"
STR_R3F_WEIGHT_English, "lb", "Kg"
1 /****************************************************************************
2 Copyright (C) 2010 Team ~R3F~
3 This program is free software under the terms of the GNU General Public License version 3.
4 You should have received a copy of the GNU General Public License
5 along with this program. If not see <http://www.gnu.org/licenses/>.
6 @authors team-r3f.org
7 @version 1.00
8 @date 20101006
9 *****************************************************************************/
10 R3F_VERSION_WEIGHTED 1.04 1.04
11 STR_R3F_WEIGHT_InGearBox %1 | Weight carried : %2 lb %1 | Poids transporté : %2 Kg
12 STR_R3F_WEIGHT_English lb Kg

View File

@@ -1,81 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.02
@date 20101018
*****************************************************************************/
#include "R3F_WEIGHT_Configuration.cfg"
R3F_WEIGHT_FNCT_MakeSingleArray = {
private ["_arr_i","_arr_n", "_arr", "_n", "_nb", "_x"];
_arr_i = (_this select 0) select 0;
_arr_n = (_this select 0) select 1;
_arr = [];
_n = 0;
{
_nb = _arr_n select _n;
for [{_i = 0}, {_i < _nb}, {_i = _i + 1}] do{
_arr = _arr + [_x];
};
_n = _n + 1;
}foreach _arr_i;
_arr;
};
R3F_WEIGHT_FNCT_GetItemWeight = {
private ["_arr_class", "_total_weight", "_weight"];
_arr_class = (_this select 0) + (_this select 1);
_total_weight = 0;
_weight = 0;
CfgWeight = missionConfigFile >> "CfgWeight";
{
if(isclass(CfgWeight >> "Weapons" >> _x)) then {
_weight = getNumber(CfgWeight >> "Weapons" >> _x >> "weight");
_total_weight = _total_weight + _weight;
}else{
if(isclass(CfgWeight >> "Magazines" >> _x)) then {
_weight = getNumber(CfgWeight >> "Magazines" >> _x >> "weight");
_total_weight = _total_weight + _weight;
}else{
_weight = 0;
if(isNumber (configFile >> "cfgMagazines" >> _x >> "weight")) then {
_weight = getNumber(configFile >> "cfgMagazines" >> _x >> "weight");
};
if(_weight > 0) then {
_total_weight = _total_weight + _weight;
} else {
// log only if not found
//diag_log format["Class not found %1", _x];
};
};
};
}foreach _arr_class;
_total_weight;
};
R3F_WEIGHT_FNCT_GetWeight = {
private ["_bagpack","_bagpack_weapons", "_bagpack_ammo", "_return","_english"];
_return = 0;
_bagpack = unitBackpack player;
if(!isnull(_bagpack)) then {
_bagpack_weapons = [getWeaponCargo _bagpack] call R3F_WEIGHT_FNCT_MakeSingleArray;
_bagpack_ammo = [getMagazineCargo _bagpack] call R3F_WEIGHT_FNCT_MakeSingleArray;
_return = [_bagpack_weapons, _bagpack_ammo] call R3F_WEIGHT_FNCT_GetItemWeight;
};
_return = _return + ([(weapons player), (magazines player)] call R3F_WEIGHT_FNCT_GetItemWeight);
_english = localize "STR_R3F_WEIGHT_English" == "lb";
if(_english) then {
_return = _return / 0.45359 ;
_return = round (_return * 100)/100;
};
_return;
};

View File

@@ -1,13 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.02
@date 20101018
*****************************************************************************/
call compile preprocessFile "R3F_Realism\R3F_Weight\R3F_Weight_Fnct.sqf";
_void = [] execVM "R3F_Realism\R3F_Weight\R3F_DoWeight.sqf";

View File

@@ -1,10 +0,0 @@

#define ARMA2_RSCDISPLAYGEARBOX 106
#define ARMA2_CAPTIONGEARBOX 1001
#define R3F_WEIGHT_SHORT_DELAY 1
#define R3F_WEIGHT_LONG_DELAY 10
#define R3F_WEIGHT_MAIN_INCREMENT 1

View File

@@ -7,7 +7,7 @@ OnLoadMissionTime = False;
disabledAI = true; disabledAI = true;
disableChannels[]={0,2,6}; disableChannels[]={0,2,6};
enableItemsDropping=0; enableItemsDropping=0;
#include "R3F_Realism\R3F_Weight\R3F_CfgWeight.h"
briefing = 0; briefing = 0;
debriefing = 0; debriefing = 0;

View File

@@ -104,7 +104,7 @@ if (!isDedicated) then {
//Run the player monitor //Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}]; _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf"; _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
//Lights //Lights
//[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf"; //[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";

View File

@@ -1,14 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
Language, English, French
#include "R3F_Realism\R3F_stringtable.csv"
Can't render this file because it contains an unexpected character in line 13 and column 10.

View File

@@ -1,21 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_Realism_Configuration.cfg"
#ifdef R3F_REALISM_USE_WEIGHT
_void = [] execVM "R3F_realism\R3F_Weight\R3F_DoWeight.sqf";
#endif
#ifdef R3F_REALISM_USE_TIRED
_void = [] execVM "R3F_realism\R3F_Tired\R3F_Tired_Init.sqf";
#endif

View File

@@ -1,12 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#define R3F_REALISM_USE_WEIGHT
#define R3F_REALISM_USE_TIRED

View File

@@ -1,12 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_Weight\R3F_WEIGHT_Stringtable.csv"
Can't render this file because it contains an unexpected character in line 11 and column 10.

View File

@@ -1,130 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.02
@date 20101011
*****************************************************************************/
#include "R3F_TIRED_Configuration.cfg"
private ["_level", "_n", "_s"];
//_voil = [] call R3F_TIRED_FNCT_MkVoile;
//[_voil,1] call R3F_TIRED_FNCT_Voile_Noir;
_n = 0;
_posATL = 0;
#ifdef R3F_TIRED_CSV_EXPORT
_s = format["""Duree"",""Distance From"",""Distance To"",""Vitesse"",""Fatigue"",""Black Level"",""poids"",""Counter"""];
_s call FNC_PrintToRPT;
#endif
R3F_TIRED_Accumulator = 0;
sleep 1;
_level = 1;
while {true} do {
R3F_TIRED_POIDS_TOTAL_PLAYER= R3F_Weight + R3F_TIRED_WEIGHT_PLAYER_EMPTY;
if (R3F_weight < R3F_TIRED_WEIGHT_LEVEL3 )then {
if (r3f_weight < R3F_TIRED_WEIGHT_LEVEL2) then {
if (r3f_weight < R3F_TIRED_WEIGHT_LEVEL1 ) then {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO1;
} else {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO2;
};
} else {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO3;
};
} else {
R3F_TIRED_Ratio_Overweight = R3F_TIRED_WEIGHT_RATIO4;
};
if (alive player) then {
switch (toArray (animationState player) select 5) do {
case 112: {
R3F_TIRED_Ratio_Position = R3F_TIRED_DOWN_LEVEL;
};
case 107:{
R3F_TIRED_Ratio_Position=R3F_TIRED_KNEE_LEVEL;
};
case 101:{
R3F_TIRED_Ratio_Position = R3F_TIRED_UP_LEVEL;
};
};
R3F_TIRED_vitesse_de_mon_joueur = [0,0,0] distance velocity player;
R3F_TIRED_coeff_mon_elevation_en_z = 0 max ((velocity player select 2) / R3F_TIRED_WEIGHT_CLIMB_FACTOR);
_posATL = (getPosATL player) select 2;
if((vehicle player == player) && (_posATL < 100)) then {
R3F_TIRED_Accumulator = R3F_TIRED_Accumulator
+ (R3F_TIRED_POIDS_TOTAL_PLAYER * R3F_TIRED_vitesse_de_mon_joueur * R3F_TIRED_Ratio_Position * R3F_TIRED_WEIGHT_SPEED_RATIO*R3F_TIRED_Ratio_Overweight)
+ (R3F_TIRED_POIDS_TOTAL_PLAYER * R3F_TIRED_coeff_mon_elevation_en_z * R3F_TIRED_WEIGHT_LEVEL2);
};
R3F_TIRED_Accumulator = 0 max (R3F_TIRED_Accumulator - R3F_TIRED_Ratio_Recovery);
_level = ((R3F_TIRED_Accumulator / R3F_TIRED_BLACKOUT_LEVEL) * 100);
_level = 0 max (1 - (_level / 100));
#ifdef R3F_TIRED_DEBUG
hintsilent format["Fatique : %1/%2\nBlack level : %3\nPoids total : %4\n Poids armement : %5",
R3F_TIRED_Accumulator,
R3F_TIRED_BLACKOUT_LEVEL,
_level,
R3F_TIRED_POIDS_TOTAL_PLAYER,
R3F_Weight];
#endif
[_level] call R3F_TIRED_FNCT_Voile_Noir;
if (R3F_TIRED_Accumulator > R3F_TIRED_BLACKOUT_LEVEL and scriptDone R3F_TIRED_Handle_Blackout_Effect and scriptDone R3F_TIRED_Handle_Blur_Effect) then {
R3F_TIRED_Handle_Blackout_Effect = [] spawn R3F_TIRED_FNCT_DoBlackVanish;
};
} else {
R3F_TIRED_Accumulator = 0;
};
if (R3F_TIRED_GLOBAL_TIRING
&& R3F_TIRED_vitesse_de_mon_joueur > 4
&& R3F_TIRED_Ratio_Recovery > R3F_TIRED_RATIO_RECOVERING
) then {
R3F_TIRED_Counter_Time= R3F_TIRED_Counter_Time + 1;
};
#ifdef R3F_TIRED_CSV_EXPORT
_s = format["%1,%2,%3,%4,%5,%6,%7,%8",
_n,
(player distance flag_start),
(player distance flag_end),
R3F_TIRED_vitesse_de_mon_joueur,
R3F_TIRED_Accumulator,
_level,
R3F_Weight,
R3F_TIRED_Counter_Time];
_s call FNC_PrintToRPT;
#endif
if ((R3F_TIRED_Counter_Time > R3F_TIRED_TIME_RECOVERING)) then {
R3F_TIRED_Ratio_Recovery = R3F_TIRED_Ratio_Recovery - 1;
R3F_TIRED_Counter_Time = 0;
};
sleep 1;
_n = _n + 1;
};
//[_voil] call R3F_TIRED_FNCT_Effect_Off;

View File

@@ -1,131 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
//Uncomment to write in arma.rpt a csv file for excel to trace some graphics
// #define R3F_TIRED_CSV_EXPORT
//Uncomment to show some informations in game
// #define R3F_TIRED_DEBUG
//adjustment player weight with helmet jacket Rangers Light equipment (not weapons)
#define R3F_TIRED_WEIGHT_PLAYER_EMPTY 90
//Predefined models for an easy setting
// uncomment only one setting
// #define R3F_TIRED_SET_MODE_EASY
#define R3F_TIRED_SET_MODE_UBEREASY
//#define R3F_TIRED_SET_MODE_NORMAL
//#define R3F_TIRED_SET_MODE_HARD
//adjustment weight * speed player
#define R3F_TIRED_WEIGHT_SPEED_RATIO 1
#ifdef R3F_TIRED_SET_MODE_UBEREASY
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 100000
// adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 0.9
#define R3F_TIRED_KNEE_LEVEL 0.6
#define R3F_TIRED_UP_LEVEL 0.5
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 20
//adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 40
#define R3F_TIRED_WEIGHT_LEVEL2 50
#define R3F_TIRED_WEIGHT_LEVEL3 60
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.8
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 1
#endif
#ifdef R3F_TIRED_SET_MODE_EASY
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 70000
// adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 1.8
#define R3F_TIRED_KNEE_LEVEL 1.2
#define R3F_TIRED_UP_LEVEL 1
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 20
//adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 25
#define R3F_TIRED_WEIGHT_LEVEL2 30
#define R3F_TIRED_WEIGHT_LEVEL3 40
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.8
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 10
#endif
#ifdef R3F_TIRED_SET_MODE_NORMAL
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 50000
//adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 3
#define R3F_TIRED_KNEE_LEVEL 1.5
#define R3F_TIRED_UP_LEVEL 1
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 10
//adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 15
#define R3F_TIRED_WEIGHT_LEVEL2 20
#define R3F_TIRED_WEIGHT_LEVEL3 30
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.6
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 30
#endif
#ifdef R3F_TIRED_SET_MODE_HARD
// adjustment onset threshold blackout effect
#define R3F_TIRED_BLACKOUT_LEVEL 40000
// adjustment player attitude * weight (stand up, down, crouch)
#define R3F_TIRED_DOWN_LEVEL 4
#define R3F_TIRED_KNEE_LEVEL 2
#define R3F_TIRED_UP_LEVEL 1
#define R3F_TIRED_WEIGHT_CLIMB_FACTOR 5
// adjustment threshold weight agravante factor
#define R3F_TIRED_WEIGHT_LEVEL1 10
#define R3F_TIRED_WEIGHT_LEVEL2 17
#define R3F_TIRED_WEIGHT_LEVEL3 25
#define R3F_TIRED_SHORTNESS_THRESHOLD 0.3
#define R3F_TIRED_UNCONSCIOUSNESS_DURATION 60
#endif
// ratio of threshold weight
#define R3F_TIRED_WEIGHT_RATIO1 0.3 /* for weight < 10 kg */
#define R3F_TIRED_WEIGHT_RATIO2 0.4 /* for weight 10 à 20 kg */
#define R3F_TIRED_WEIGHT_RATIO3 0.6 /* for weight 20 à 30 kg */
#define R3F_TIRED_WEIGHT_RATIO4 0.7 /* for weight > 30 kg */
// activation / deactivation unit recup loss over time (true / false)
#define R3F_TIRED_GLOBAL_TIRING true
// adjustment recovery rate
#define R3F_TIRED_TIME_RECOVERING 100
#define R3F_TIRED_RATIO_RECOVERING 360
#define R3F_TIRED_WITH_VANISH true

View File

@@ -1,30 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_TIRED_Configuration.cfg"
FNC_PrintToRPT = {
diag_log text _this;
};
R3F_TIRED_FNCT_Voile_Noir = {
_level = _this select 0;
if(_level < R3F_TIRED_SHORTNESS_THRESHOLD ) then{
playSound "heartbeat_1";
addCamShake [2, 1, 25];
};
};
R3F_TIRED_FNCT_DoBlackVanish = {
[player,0.1] call fnc_usec_damageUnconscious;
[_refObj,"scream",3,false] call dayz_zombieSpeak;
cutText ["You are overburdened.", "PLAIN DOWN"];
};

View File

@@ -1,25 +0,0 @@
/****************************************************************************
Copyright (C) 2010 Team ~R3F~
This program is free software under the terms of the GNU General Public License version 3.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@authors team-r3f.org
@version 1.00
@date 20101006
*****************************************************************************/
#include "R3F_TIRED_Configuration.cfg"
call compile preprocessFile "R3F_realism\R3F_Tired\R3F_Tired_Fnct.sqf";
R3F_Weight = 0;
R3F_TIRED_Ratio_Position = 0;
R3F_TIRED_Accumulator = 0;
R3F_TIRED_Handle_Blur_Effect = [] spawn {};
R3F_TIRED_Handle_Blackout_Effect = [] spawn {};
R3F_TIRED_Counter_Time = 0;
R3F_TIRED_Ratio_Recovery = R3F_TIRED_RATIO_RECOVERING;
R3F_TIRED_Ratio_Overweight = 1;
_void = [] execVM "R3F_Realism\R3F_Tired\R3F_DoTired.sqf";

Some files were not shown because too many files have changed in this diff Show More