Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: Change profileNamespace DB to inidbi2 #105

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions =BTC=co@22_Hearts_and_Minds.Altis/core/fnc/common/getHouses.sqf

This file was deleted.

17 changes: 0 additions & 17 deletions =BTC=co@22_Hearts_and_Minds.Altis/core/fnc/db/delete.sqf

This file was deleted.

14 changes: 0 additions & 14 deletions =BTC=co@22_Hearts_and_Minds.Altis/core/init_server.sqf

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,163 +2,163 @@ class Params {
class btc_p_time {
//paramsArray[0]
title = "Set the start time:";
values[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24};
texts[]={"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24"};
default = 12;
values[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24};
texts[]={"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24"};
default = 12;
};
class btc_p_en {
//paramsArray[1]
title = "Enemy type:";
values[]={0,1,2,3};
texts[]={"Guerrilla (A3)","CAF","AAF (A3)","RHS Insurgents"};
default = 0;
values[]={0,1,2,3};
texts[]={"Guerrilla (A3)","CAF","AAF (A3)","RHS Insurgents"};
default = 0;
};
class btc_p_ied {
//paramsArray[2]
title = "IEDs ratio:";
values[]={0, 0.5, 1, 1.5};
texts[]={"Off","Low","Normal","High"};
default = 1;
values[]={0, 0.5, 1, 1.5};
texts[]={"Off","Low","Normal","High"};
default = 1;
};
class btc_p_hideout_n {
//paramsArray[3]
title = "Hideout numbers:";
values[]={99,1,2,3,4,5};
texts[]={"Random","1","2","3","4","5"};
default = 3;
values[]={99,1,2,3,4,5};
texts[]={"Random","1","2","3","4","5"};
default = 3;
};
class btc_p_cache_info_def {
//paramsArray[4]
title = "Info cache distance:";
values[]={500,1000,1500,2000,2500,3000,3500,4000,5000};
texts[]={"500 m","1000 m","1500 m","2000 m","2500 m","3000 m","3500 m","4000 m","5000 m"};
default = 1000;
};
values[]={500,1000,1500,2000,2500,3000,3500,4000,5000};
texts[]={"500 m","1000 m","1500 m","2000 m","2500 m","3000 m","3500 m","4000 m","5000 m"};
default = 1000;
};
class btc_p_cache_info_ratio {
//paramsArray[5]
title = "Cache info ratio:";
values[]={50,100};
texts[]={"50 m","100 m"};
default = 100;
values[]={50,100};
texts[]={"50 m","100 m"};
default = 100;
};
class btc_p_info_chance {
//paramsArray[6]
title = "Intel from dead bodies chance:";
values[]={0,10,20,30,40,50,60,70,80,90,100};
texts[]={"100 %","90 %","80 %","70 %","60 %","50 %","40 %","30 %","20 %","10 %","0 %"};
default = 70;
values[]={0,10,20,30,40,50,60,70,80,90,100};
texts[]={"100 %","90 %","80 %","70 %","60 %","50 %","40 %","30 %","20 %","10 %","0 %"};
default = 70;
};
class btc_p_rep {
//paramsArray[7]
title = "Reputation at start:";
values[]={0, 200, 500, 750};
texts[]={"Very Low","Low","Normal","High"};
default = 200;
};
values[]={0, 200, 500, 750};
texts[]={"Very Low","Low","Normal","High"};
default = 200;
};
class btc_p_redeploy {
//paramsArray[8]
title = "Allow re-deploy?";
values[]={0,1};
texts[]={"No","Yes"};
default = 1;
values[]={0,1};
texts[]={"No","Yes"};
default = 1;
};
class btc_p_set_skill {
//paramsArray[9]
title = "Set skill?";
values[]={0,1};
texts[]={"No","Yes"};
default = 1;
values[]={0,1};
texts[]={"No","Yes"};
default = 1;
};
class btc_p_set_skill_general {
//paramsArray[10]
title = "Set skill, general";
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 0;
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 0;
};
class btc_p_set_skill_aimingAccuracy {
//paramsArray[11]
title = "Set skill, aimingAccuracy";
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 1;
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 1;
};
class btc_p_set_skill_aimingShake {
//paramsArray[12]
title = "Set skill, aimingShake";
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 7;
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 7;
};
class btc_p_set_skill_aimingSpeed {
//paramsArray[13]
title = "Set skill, aimingSpeed";
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 2;
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 2;
};
class btc_p_set_skill_endurance {
//paramsArray[14]
title = "Set skill, endurance";
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 7;
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 7;
};
class btc_p_set_skill_spotDistance {
//paramsArray[15]
title = "Set skill, spotDistance";
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 100;
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 100;
};
class btc_p_set_skill_spotTime {
//paramsArray[16]
title = "Set skill, spotTime";
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 100;
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 100;
};
class btc_p_set_skill_courage {
//paramsArray[17]
title = "Set skill, courage";
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 1;
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 1;
};
class btc_p_set_skill_reloadSpeed {
//paramsArray[18]
title = "Set skill, reloadSpeed";
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 20;
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 20;
};
class btc_p_set_skill_commanding {
//paramsArray[19]
title = "Set skill, commanding";
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 80;
values[]={0,1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100};
texts[]={"0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1","2","3","4","5","6","7","8","9","10"};
default = 80;
};
class btc_p_debug {
//paramsArray[20]
title = "Debug:";
values[]={0,1,2};
texts[]={"No","Yes", "Log only"};
default = 0;
values[]={0,1,2};
texts[]={"No","Yes", "Log only"};
default = 0;
};
class btc_p_engineer {
//paramsArray[21]
title = "Everybody can disarm IED with the same chances:";
values[]={0,1};
texts[]={"No","Yes"};
default = 0;
values[]={0,1};
texts[]={"No","Yes"};
default = 0;
};
class btc_p_load {
//paramsArray[22]
title = "Load the savegame (if available)";
values[]={0,1};
texts[]={"No","Yes"};
default = 1;
title = "Load the savegame (If available and Need @iniDB)";
values[]={0,1};
texts[]={"No","Yes"};
default = 1;
};
class btc_p_med_level {
//paramsArray[23]
Expand All @@ -177,8 +177,8 @@ class Params {
class btc_p_rev {
//paramsArray[25]
title = "Revive time:";
values[]={0,60,120,180,240,300,600,900,1200,999999};
texts[]={"0","60","120","180","240","300","600","900","1200","999999"};
default = 600;
values[]={0,60,120,180,240,300,600,900,1200,999999};
texts[]={"0","60","120","180","240","300","600","900","1200","999999"};
default = 600;
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

_buildings = nearestObjects [(_this select 0), ["Building"], (_this select 1)];
_useful = [];
{
if (format["%1", _x buildingPos 2] != "[0,0,0]" && {damage _x isEqualTo 0} && {isNil {_x getVariable "btc_house_taken"}}) then {
_useful pushBack _x;
};
} forEach _buildings;
_useful
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ switch (_type) do {
case 3 : {
hint "This body does not have any intel";
};
case 4 : {
case 4 : {
hint "Found intels about an ammo cache and an hideout! Map updated";
};
case 5 : {
Expand All @@ -36,4 +36,7 @@ switch (_type) do {
case 10 : {
hint "Database deleted!";
};
case 11 : {
hint ("Game not " + (_this select 1) + " because @iniDB isn't lauched server side!");
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ if (isServer) then {
btc_fnc_data_spawn_group = compile preprocessFile "core\fnc\data\spawn_group.sqf";

//DB
if (isClass(configFile >> "cfgPatches" >> "inidbi2")) then {OO_fnc_inidbi = ["new", format ["btc_hm_%1",worldName]] call OO_INIDBI};
btc_fnc_db_save = compile preprocessFile "core\fnc\db\save.sqf";
btc_fnc_db_delete = compile preprocessFile "core\fnc\db\delete.sqf";
btc_fnc_db_save_array = compile preprocessFile "core\fnc\db\save_array.sqf";

//EH
//btc_fnc_eh_helo_respawn = compile preprocessFile "core\fnc\eh\helo_respawn.sqf";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _units = units _group;
_type_db = 0;
_array_pos = [];
_array_type = [];
_side = side (leader _group);
_side = str(side (leader _group));
_array_dam = [];
_behaviour = [behaviour (leader _group),combatMode _group,formation _group];
_array_wp = [];
Expand Down Expand Up @@ -36,7 +36,7 @@ if (!isNil {_group getVariable "getWeapons"}) then {_type_db = 5;};

if (vehicle leader _group != leader _group) then {_type_db = 1;};

if (_type_db == 1) then
if (_type_db == 1) then
{
private ["_veh"];
_veh = vehicle leader _group;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@ private ["_type","_array_pos","_array_type","_side","_array_dam","_behaviour","_
_type = _this select 0;
_array_pos = _this select 1;
_array_type = _this select 2;
_side = _this select 3;
switch (_this select 3) do
{
case "CIV":
{
_side = civilian;
};
case "UNKNOWN":
{
_side = sideUnknown;
};
default
{
_side = call compile (_this select 3);
};
};
_array_dam = _this select 4;
_behaviour = _this select 5;
_array_wp = _this select 6;
Expand Down Expand Up @@ -75,7 +89,7 @@ if (_type == 5) then {
while {Alive _suicider && !isNull _suicider && !_cond} do {
sleep 5;
if (count (getpos _suicider nearEntities ["SoldierWB", 25]) > 0) then {_cond = true;_suicider spawn btc_fnc_ied_suicider_active};
};
};
};
};

Expand Down
5 changes: 5 additions & 0 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/delete.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if !(isClass(configFile >> "cfgPatches" >> "inidbi2")) exitWith {[[11, "deleted"],"btc_fnc_show_hint"] spawn BIS_fnc_MP;};

"delete" call OO_fnc_inidbi;

[[10],"btc_fnc_show_hint"] spawn BIS_fnc_MP;
Loading