shturman

пропадает авто DZAI

Вопрос

Нужно сохранить отнятые у ботов DZAI авто до рестарта. Авто пропадает через 15 минут.  Немогу найти ответ и многое перепробовал в настройках...Где регулируется очистка транспорта подскажите пожалуйста у кого сохраняется до рестарта.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

12 ответов на этот вопрос

Нужно сохранить отнятые у ботов DZAI авто до рестарта. Авто пропадает через 15 минут.  Немогу найти ответ и многое перепробовал в настройках...Где регулируется очистка транспорта подскажите пожалуйста у кого сохраняется до рестарта.

В инфистаре отключи: _UIC =  true;

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах
Забронировать это рекламное место


отключил, непомогло...

Интересно как же ты отключил тогда? если не помогло тебе

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Интересно как же ты отключил тогда? если не помогло тебе

/*  Vehicle ValidId ?                  */ _UIC = false;

 

 

DZAI_VERSION "2.2.1 Release Build 20141208"

 

Изменено пользователем shturman (история изменений)

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Я решил проблему именно так и не иначе. Без понятия почему у тебя техника все равно исчезает. Может ты в самих настройках дзаи чет изменил? ну там время удаление самой этой техники?

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Я решил проблему именно так и не иначе. Без понятия почему у тебя техника все равно исчезает. Может ты в самих настройках дзаи чет изменил? ну там время удаление самой этой техники?

Если можешь скинь свой DZAI для сравнения.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

 

Если можешь скинь свой DZAI для сравнения.

 

У меня стандартное все, я менял только время появления новых групп ботов и все. Так что скачай по новой с первоисточника и поставь их

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

У меня стандартное все, я менял только время появления новых групп ботов и все. Так что скачай по новой с первоисточника и поставь их

Да раз 5-7 уже качал и переустанавливал...и вообщето по умолчанию авто закрыто :

   

_vehicle allowCrewInImmobile (!_isAirVehicle);

_vehicle setVehicleLock "LOCKED";

clearWeaponCargoGlobal _vehicle;

clearMagazineCargoGlobal _vehicle;

 

- потому я и спросил для сравнения . может я не так открыл их...

Изменено пользователем shturman (история изменений)

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Ссылку можно? (Гляну)

https://github.com/dayzai/DZAI

мои настройки : dzai_config.sqf

/*

    DZAI Configuration File

    

    Description: Contains all configurable settings of DZAI. Contains settings for debugging, customization of AI units, spawning, and loot.

    

 

*/

 

diag_log "[DZAI] Reading DZAI configuration file.";

 

/*    DZAI Settings

--------------------------------------------------------------------------------------------------------------------*/    

 

//Enable or disable event logging to arma2oaserver.rpt. Debug level setting. 0: No debug output, 1: Basic Debug output, 2: Extended Debug output. (Default: 0)

//Debug output may help finding additional information about DZAI's background behavior. This output is helpful when asking for help regarding bugs or unexpected behaviors.

DZAI_debugLevel = 0;

 

//Frequency of server monitor update to RPT log in seconds. The monitor periodically reports number of max/current AI units and dynamically spawned triggers into RPT log. (Default: 300, 0 = Disable reporting)                                        

DZAI_monitorRate = 0;

 

//Enable or disable verification and error-correction of classname tables used by DZAI. If invalid entries are found, they are removed and logged into the RPT log.

//If disabled, any invalid classnames will not be removed and clients may crash if AI bodies with invalid items are looted. Only disable if a previous scan shows no invalid classnames (Default: true).                                        

DZAI_verifyTables = false;

 

//(Feature in development) Enables additional checking and error-correction of certain classname tables. (Default: false)

DZAI_extendedVerify = false;

 

//Enable to have server spawn in objects/buildings normally spawned clientside by DayZ's CfgTownGenerator. Prevents AI from walking/shooting through clutter and other objects. (Default: true)    

//If running DayZ Mod ("vanilla DayZ") or DayZ Overwatch, it is highly recommended to enable this option, as many added buildings are handled by the CfgTownGenerator. Not used with Epoch.                            

DZAI_objPatch = true;

 

//Minimum seconds to pass until each dead AI body or destroyed vehicle can be cleaned up by DZAI's task scheduler. DZAI will not clean up a body/vehicle if there is a player close by (Default: 900).    

//Note: Other cleanup scripts might interfere by cleaning up dead AI bodies/vehicles!                                    

DZAI_cleanupDelay = 900;                                    

 

//Enable auto detection of DayZ mod type ran by server. If additional support exists for the mod type, DZAI will load additional classnames (example: weapons, skins, or other items)

//Additional support exists for the following DayZ mods: Epoch, Overwatch, Unleashed, Hunting Grounds, 2017. (Default: true)

DZAI_modAutoDetect = true;

 

 

/*    AI Unit Settings

--------------------------------------------------------------------------------------------------------------------*/        

 

//Enhanced AI health system setting.

//If enabled, AI units will use DayZ's 12,000 blood system, can be knocked unconscious and Tasered, and can self-bloodbag/morphine. If disabled, AI units will use default Arma 2 damage handling. (Default: true)

DZAI_useHealthSystem = true;

 

//Minimum and maximum AI blood level to spawn each unit with. Each individual unit will have a randomized blood level within this range. Upper limit: 12000 blood (Default: [10000,12000])

//Note: No effect if DZAI_useHealthSystem is false

DZAI_unitBloodLevel = [10000,12000];

 

//Amount of blood restored from a full self-heal. One-third of the total amount is restored 3 times every 3 seconds. Note: Applies to infantry-type AI units. (Default: 6000)

//Note: No effect if DZAI_useHealthSystem is false

DZAI_unitHealAmount = 6000;

 

//Below this blood level, AI may decide to heal themselves for amount specified by DZAI_unitHealAmount. Healing requires 9 seconds to fully complete and can be interrupted by knocking the unit unconscious. (Default: 5000)

//Note: No effect if DZAI_useHealthSystem is false

DZAI_lowBloodLevel = 5000;

 

//Enable or disable zombie attraction to AI weapon sounds. No effect if DZAI_zombieEnemy is set to false. Enabling this option may impact server performance as a script is run for each AI bullet fired.

//Note: AI cannot be attacked or damaged by zombies.(Default: false)        

DZAI_weaponNoise = true;

 

//If enabled, AI group will attempt to track down player responsible for killing a group member. Players with radios will be given text warnings if they are being pursued (Default: true)

DZAI_findKiller = true;    

 

//If normal probability check for spawning NVGs fails, then give AI temporary NVGs only if they are spawned with weapongrade 1 or higher (applies only during nighttime hours). Temporary NVGs are unlootable and will be removed at death (Default: false).                                    

DZAI_tempNVGs = false;    

 

//Amount of humanity to reward player for killing an AI unit (Default: 0)                                    

DZAI_humanityGain = -10;                                        

 

//If enabled, players with radios will be given text warnings if they are being pursued by AI groups. (Default: true)

DZAI_radioMsgs = true;

 

//If enabled, last surviving unit of a group will be granted slightly boosted skills. No effect if unit is spawned alone (Default: false)

DZAI_lastManStanding = true;

 

 

/*DZAI client-side addon settings.

**NOTE**: These settings require the DZAI client-side addon to be installed to your mission pbo file in order to work.

--------------------------------------------------------------------------------------------------------------------*/    

 

//Enable to use client-side radio addon for radio messages instead of remote execution method. (Default: false)

DZAI_clientRadio = false;

 

//Enable or disable AI hostility to zombies. If enabled, AI units spawned by DZAI will attack nearby zombies. (Default: false)

DZAI_zombieEnemy = true;    

 

//Maximum distance (in meters) for AI group leader to detect zombies. Increasing range beyond default may negatively impact server performance. (Default: 150)                            

DZAI_zDetectRange = 150;

 

//Enable or disable AI death messages. Messages will be sent only to player responsible for killing the unit. Messages will be sent in System chat in the format "(Unit name) was killed." (Default: false)

DZAI_deathMessages = false;                                    

 

 

/*    Static AI Spawning Settings

--------------------------------------------------------------------------------------------------------------------*/    

 

//Enable or disable static AI spawns. If enabled, AI spawn points will be generated in cities, towns, and other predefined areas. Does not affect custom-defined spawns (Default: true).

DZAI_staticAI = false;

 

//Set minimum and maximum wait time in seconds to respawn an AI group after all units have been killed. Applies to both static AI and custom spawned AI (Default: Min 300, Max 600).                                    

DZAI_respawnTimeMin = 900;

DZAI_respawnTimeMax = 1200;

 

//Time to allow spawned AI units to exist in seconds before being despawned when no players are present in a trigger area. Applies to both static AI and custom spawned AI (Default: 120)                                        

DZAI_despawnWait = 120;                                        

 

//Respawn limits. Set to -1 for unlimited respawns. (Default: -1 for each).

DZAI_respawnLimit0 = -1;     //Respawn limit for low level AI found in low-value areas (Default: -1)

DZAI_respawnLimit1 = -1;     //Respawn limit for mid level AI found in cities and other mid-value areas (Default: -1)

DZAI_respawnLimit2 = -1;     //Respawn limit for high level AI found in places with military loot (Default: -1)

DZAI_respawnLimit3 = -1;     //Respawn limit for very high level AI in places with high-grade military loot (Default: -1)

 

//Spawn probabilities

DZAI_spawnChance0 = 0.40;    //Spawn chance for low-skill AI typically found in small towns (Default: 0.40)

DZAI_spawnChance1 = 0.60;    //Spawn chance for mid-level AI typically found in cities and large towns (Default: 0.60)

DZAI_spawnChance2 = 0.80;    //Spawn chance for high-level AI typically found in places with military-grade loot (Default: 0.80)

DZAI_spawnChance3 = 0.90;    //Spawn chance for expert-level AI found in areas with high-grade military loot (Default: 0.90)

 

 

/*    Dynamic AI Spawning Settings

--------------------------------------------------------------------------------------------------------------------*/        

 

//Enable or disable dynamic AI spawns. If enabled, AI spawn locations will be generated for randomly selected players at randomized intervals (Default: true)                                    

DZAI_dynAISpawns = true;

 

//Time (seconds) required to reach maximum spawn probability per player, after which the probability is reset to 0%. Lower number = More frequent spawns, Higher Number = Less frequent. (Recommended range: 1200-2700, Default: 1200)

DZAI_maxSpawnTime = 1800;

 

//Time (seconds) to allow each player to retain maximum spawn probability. (Default: 1200).

DZAI_keepMaxSpawnTime = 1200;

 

//Probability for dynamic AI to actively hunt a targeted player. If probability check fails, dynamic AI will patrol the area instead of hunting (Default: 0.50)

DZAI_huntingChance = 0.75;

 

//Probability to send first available AI helicopter to reinforce dynamic AI group. No effect if DZAI_maxHeliPatrols is set to zero. (Default: 0.50)

DZAI_heliReinforceChance = 0.50;

 

//Array of area blacklist markers. Players within marker areas will not be targeted for dynamic AI spawns (Example: ["BlacklistArea1","BlacklistArea2","BlacklistArea3"])

//Epoch: DZAI will automatically set up 200m-radius blacklist areas around each trader area.

DZAI_dynAreaBlacklist = [];

 

//Time to wait before despawning all AI units in dynamic spawn area when no players are present. (Default: 120)

DZAI_dynDespawnWait = 120;

 

//Enable or disable dynamic spawn-free zones of 600m radius around player spawn areas. (Default: false)

DZAI_freshSpawnSafeArea = true;

 

 

/*    Random AI Spawning Settings (Feature in development)

--------------------------------------------------------------------------------------------------------------------*/        

 

//Maximum number of placed random spawns on map

DZAI_maxRandomSpawns = 20;

 

//Time to wait before despawning all AI units in random spawn area when no players are present. (Default: 120)

DZAI_randDespawnWait = 120;

 

//Array of area blacklist markers. Players within marker areas will not be targeted for random AI spawns (Example: ["BlacklistArea1","BlacklistArea2","BlacklistArea3"])

//Epoch: DZAI will automatically set up 200m-radius blacklist areas around each trader area.

//Tip: To use dynamic-spawn blacklist areas for random-spawn blacklist areas, simply set DZAI_randAreaBlacklist = DZAI_dynAreaBlacklist;

DZAI_randAreaBlacklist = [];

 

 

/*    AI Air vehicle patrol settings. These AI vehicles will randomly travel between different cities and towns.

--------------------------------------------------------------------------------------------------------------------*/        

 

//Global maximum number of active AI air vehicle patrols. Set at 0 to disable (Default: 0).                            

DZAI_maxHeliPatrols = 3;

 

//Set minimum and maximum wait time in seconds to respawn an AI vehicle patrol after vehicle is destroyed or disabled. (Default: Min 600, Max 900).

DZAI_respawnTMinA = 900;

DZAI_respawnTMaxA = 1200;

 

//Classnames of air vehicle types to use, with the maximum amount of each type to spawn.

DZAI_heliList = [

    ["UH1H_DZ",4],

    ["Mi17_DZ",3],

    ["Ka137_MG_PMC",2],

    ["An2_TK_EP1",3],

    ["GNT_C185",5]

];

 

//Difficulty level of air vehicle patrol units. Difficulty level also affects unit loadout and loot. Possible values: 0 to 3 (Default: 3)

DZAI_heliUnitLevel = 3;

 

//Maximum number of gunner units per air vehicle. Limited by actual number of available gunner positions. (Default: 2)

DZAI_heliGunnerUnits = 3;

 

//Specify vehicle weapon for air vehicles that are unarmed by default. DZAI will arm these air vehicles with the specified weapons upon spawning each vehicle.

//Weapon classnames are verified. If the classname is invalid (banned or nonexistent), it will not be added to the vehicle.

//Format: Each row containing a vehicle classname will be equipped with the weapon from the corresponding row in weapon classnames section. DZAI will automatically select ammo type.

DZAI_airWeapons = [

    //Air vehicle classnames (Remember: no comma for last entry! Otherwise, separate each string with commas)

    ["GNT_C185","An2_TK_EP1"]

    ,

    //Corresponding weapon classnames (Remember: no comma for last entry! Otherwise, separate each string with commas)

    ["M240","Helicopter2_Example_Weapon"]

];

 

 

/*AI Land vehicle patrol settings. These AI vehicles will randomly travel between different cities and towns.

--------------------------------------------------------------------------------------------------------------------*/    

 

//Global maximum number of active AI land vehicle patrols. Set at 0 to disable (Default: 0).    

DZAI_maxLandPatrols = 33;

 

//Set minimum and maximum wait time in seconds to respawn an AI vehicle patrol after vehicle is destroyed or disabled. (Default: Min 600, Max 900).

DZAI_respawnTMinL = 900;

DZAI_respawnTMaxL = 1200;

 

//Classnames of land vehicle types to use, with the maximum amount of each type to spawn.

DZAI_vehList = [

    ["UAZ_Unarmed_TK_EP1",3],

    ["SUV_TK_CIV_EP1",5],

    ["policecar",5],

    ["VolhaLimo_TK_CIV_EP1",3],

    ["KamazOpen",3],

    ["Old_moto_TK_Civ_EP1",5],

    ["TT650_TK_CIV_EP1",0],

    ["BTR40_TK_GUE_EP1",3],

    ["Pickup_PK_GUE",3],

    ["UAZ_RU",3],

    ["V3S_Civ",3],

    ["Ural_UN_EP1",3]

];

 

//Difficulty level of land vehicle patrol units. Difficulty level also affects unit loadout and loot. Possible values: 0 to 3 (Default: 3)

DZAI_vehUnitLevel = 3;

 

//Maximum number of gunner units per land vehicle. Limited by actual number of available gunner positions. (Default: 1)

DZAI_vehGunnerUnits = 2;

 

//Maximum number of cargo units per land vehicle. Limited by actual number of available cargo positions. (Default: 3)

DZAI_vehCargoUnits = 11;

 

 

/*    AI Vehicle (Air & Land) Settings

--------------------------------------------------------------------------------------------------------------------*/

 

//Array of area blacklist markers. Areas covered by marker will not be used as waypoints for vehicle patrols. (Example: ["BlacklistArea1","BlacklistArea2","BlacklistArea3"])

//Note: Vehicles may still pass through these areas but will not make stops unless enemies are encountered.

DZAI_waypointBlacklist = [];

 

 

/*    AI weapon selection settings

--------------------------------------------------------------------------------------------------------------------*/

 

//True: Dynamically generate AI weapon list from CfgBuildingLoot (DayZ loot tables). False: Use preset weapon tables located near the end of this file. (Default: true).

//Highly recommended to enable DZAI_verifyTables if this option is set to false.

DZAI_dynamicWeaponList = true;

 

//Determines whether DZAI reads from default DayZ loot tables for dynamic AI weapon generation or from user-installed custom loot tables. (Default: false)

//No effect if DZAI_dynamicWeaponList is 'false'. If DZAI is unable to find custom loot tables installed, default loot tables will be used instead. If no loot tables are found, DZAI will use prebuilt weapon tables.

DZAI_customLootTables = false;

 

//List of classnames of weapons that AI should never use. By default, AI may carry any lootable weapon. (Only if DZAI_dynamicWeaponList = true)  

//Example: DZAI_banAIWeapons = ["M107_DZ","BAF_AS50_scoped"] will remove the M107 and AS50 from AI weapon tables if dynamic weapon list is enabled.                                

//Note: It is recommended to add all melee weapon classnames into this list as AI have issues using melee weapons.

//Pre-banned weapons by DZAI: "Crossbow_DZ","Crossbow","MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeBaseball","MeleeBaseBallBat","MeleeBaseBallBatBarbed","MeleeBaseBallBatNails"

DZAI_banAIWeapons = ["M107_DZ","BAF_AS50_scoped"];                                        

 

//List of launcher-type weapons for mid/high-level AI to use (by default, weapongrade 1/2/3), example: ["M136"]. If left empty, AI will not use launcher weapons. (Default: [])

//If AI encounter an armored player vehicle, they will switch to a randomly-selected launcher-type weapon to engage.

//Weapon classnames added here are verified if DZAI_verifyTables is set to true. Note: Launcher weapons are removed from the AI unit upon death.

DZAI_launcherTypes = ["RPG7V"];    

 

//List of AI weapongrades that are permitted to use launcher-type weapons. Individual custom weapongrade levels may be added to allow launcher use (Default: [1,2,3])

DZAI_launcherLevels = [1,2,3];                                

 

//Limit of number of launcher-type weapons to add to each AI group. Groups cannot have more launcher weapons than their weapongrade value (Default: 1).

DZAI_launchersPerGroup = 2;

 

 

/*    AI loot quantity settings

--------------------------------------------------------------------------------------------------------------------*/

 

//Number of selections of medical items (Inventory)

DZAI_invmedicals = 1;

 

//Number of selections of edible items (Inventory)                                         

DZAI_invedibles = 1;    

 

//Number of selections of medical items (Backpack)                                    

DZAI_bpmedicals = 1;     

 

//Number of selections of edible items (Backpack)                                    

DZAI_bpedibles = 1;    

 

//Maximum number of items to select from DZAI_MiscItemS table.                                        

DZAI_numMiscItemS = 3;                        

 

//Maximum number of items to select from DZAI_MiscItemL table.                

DZAI_numMiscItemL = 1;                                        

 

 

/*    AI loot probability settings

--------------------------------------------------------------------------------------------------------------------*/

 

//Chance to add each medical item.

DZAI_chanceMedicals = 0.70;    

 

//Chance to add each edible item.                                

DZAI_chanceEdibles = 0.70;

 

//Chance to add each random item from DZAI_MiscItemS table.                                    

DZAI_chanceMiscItemS = 0.60;

 

//Chance to add each random item from DZAI_MiscItemL table.                                

DZAI_chanceMiscItemL = 0.15;                                

 

 

/*AI weapon/skill probabilities (gradeChances should add up to 1.00) - [Civilian, Military, MilitarySpecial, HeliCrash] - Note: AI with higher grade weaponry will also have higher skill settings.

--------------------------------------------------------------------------------------------------------------------*/

 

//equipType level 0 - most AI will have basic pistols or rifles, and occasionally common military weapons.

DZAI_gradeChances0 = [0.90,0.10,0.00,0.00];    

 

//equipType level 1 - most AI will have common rifles, many will have common military weapons. Very rarely, AI will spawn with high-grade military or helicrash weapons.                

DZAI_gradeChances1 = [0.65,0.30,0.04,0.01];    

 

//equipType level 2 - most AI carry military weapons, and occasionally high-grade military weapons.                

DZAI_gradeChances2 = [0.15,0.65,0.15,0.05];

 

//equipType level 3 - All AI will carry at least a military-grade weapon. Many will be carrying high-grade military weapons. Note: Air and land vehicle patrols use equipType level 3.                    

DZAI_gradeChances3 = [0.00,0.50,0.35,0.15];    

 

//equipType level "dynamic" - Weapongrade chances for dynamic-spawned AI. Majority of dynamic AI will be carrying low-grade military weapons, some will carry high-grade military.            

DZAI_gradeChancesDyn = [0.00,0.88,0.09,0.03];                

 

 

/*

    AI skill settings

    Skill Level: Description

    0-1: Low to medium-skilled AI. Most common type of AI encountered. Intended to challenge players.

    2-3: High-skilled AI. Uncommon/rare type of AI found in places with military loot. Intended to kill players.

    Hint: The best way to quickly adjust AI difficulty is by modifying aimingAccuracy value. For all skill types, higher number = better skill.

*/

 

//AI skill settings level 0 (Skill, Minimum skill, Maximum skill). Baseline skill level: 0.50

DZAI_skill0 = [    

    ["aimingAccuracy",0.325,0.125],

    ["aimingShake",0.50,0.59],

    ["aimingSpeed",0.50,0.59],

    ["endurance",0.50,0.59],

    ["spotDistance",0.50,0.59],

    ["spotTime",0.50,0.59],

    ["courage",0.50,0.59],

    ["reloadSpeed",0.50,0.59],

    ["commanding",0.60,0.69],

    ["general",0.60,0.69]

];

 

//AI skill settings level 1 (Skill, Minimum skill, Maximum skill). Baseline skill level: 0.60

DZAI_skill1 = [    

    ["aimingAccuracy",0.325,0.15],

    ["aimingShake",0.60,0.69],

    ["aimingSpeed",0.60,0.69],

    ["endurance",0.60,0.69],

    ["spotDistance",0.60,0.69],

    ["spotTime",0.60,0.69],

    ["courage",0.60,0.69],

    ["reloadSpeed",0.60,0.69],

    ["commanding",0.70,0.79],

    ["general",0.70,0.79]

];

 

//AI skill settings level 2 (Skill, Minimum skill, Maximum skill). Baseline skill level: 0.70

DZAI_skill2 = [    

    ["aimingAccuracy",0.275,0.225],

    ["aimingShake",0.70,0.79],

    ["aimingSpeed",0.70,0.79],

    ["endurance",0.70,0.79],

    ["spotDistance",0.70,0.79],

    ["spotTime",0.70,0.79],

    ["courage",0.70,0.79],

    ["reloadSpeed",0.70,0.79],

    ["commanding",0.80,0.89],

    ["general",0.80,0.89]

];

 

//AI skill settings level 3 (Skill, Minimum skill, Maximum skill). Baseline skill level: 0.80

DZAI_skill3 = [    

    ["aimingAccuracy",0.325,0.250],

    ["aimingShake",0.80,0.89],

    ["aimingSpeed",0.80,0.89],

    ["endurance",0.80,0.89],

    ["spotDistance",0.80,0.89],

    ["spotTime",0.80,0.89],

    ["courage",0.80,0.89],

    ["reloadSpeed",0.80,0.89],

    ["commanding",0.90,0.99],

    ["general",0.90,0.99]

];

 

 

/*

    Additional AI skill settings can be defined (DZAI_skill4 - DZAI_skill9) for the corresponding custom weapongrade level using the same format above.

    Note: If a custom weapongrade is used without defining the corresponding custom skill settings, DZAI_skill3 settings will be used instead.

    Instructions: replace "nil" with the skill array. Refer to the above preset skill arrays for examples.

    Custom AI skill settings can only be used with custom-defined spawns (spawns created using the DZAI_spawn function).

*/

 

//weapongrade 4 skills

DZAI_skill4 = nil;

 

//weapongrade 5 skills

DZAI_skill5 = nil;

 

//weapongrade 6 skills

DZAI_skill6 = nil;

 

//weapongrade 7 skills

DZAI_skill7 = nil;

 

//weapongrade 8 skills

DZAI_skill8 = nil;

 

//weapongrade 9 skills

DZAI_skill9 = nil;

 

 

/*

    AI weapon, loot, and equipment settings

    

    DZAI will first load the classname tables defined below, the modify the settings according to the DayZ map/mod being run.

    

    Example: DZAI will always first load the classname tables defined below, then if DayZ Epoch is detected, DZAI will add or overwrite settings specified by \world_classname_configs\epoch\dayz_epoch.sqf.

    

*/

 

//Default weapon classname tables - DZAI will ONLY use these tables if the dynamic weapon list (DZAI_dynamicWeaponList) is disabled, otherwise they are ignored and overwritten if it is enabled.

//Note: Low-level AI (weapongrade 0) may use pistols listed in DZAI_Pistols0 or DZAI_Pistols1. Mid/high level AI (weapongrade 1+) will carry pistol weapons but not use them - they will use rifle weapons instead.

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DZAI_Pistols0 = ["Makarov","Colt1911","revolver_EP1"];                 //Weapongrade 0 pistols

DZAI_Pistols1 = ["M9","M9SD","MakarovSD","UZI_EP1","glock17_EP1"];     //Weapongrade 1 pistols

DZAI_Pistols2 = ["M9SD","MakarovSD","UZI_EP1","glock17_EP1"];         //Weapongrade 2 pistols

DZAI_Pistols3 = ["M9SD","MakarovSD","UZI_EP1","glock17_EP1"];         //Weapongrade 3 pistols

 

DZAI_Rifles0 = ["LeeEnfield","Winchester1866","MR43","huntingrifle","LeeEnfield","Winchester1866","MR43"]; //Weapongrade 0 rifles

DZAI_Rifles1 = ["M16A2","M16A2GL","AK_74","M4A1_Aim","AKS_74_kobra","AKS_74_U","AK_47_M","M24","M1014","DMR_DZ","M4A1","M14_EP1","Remington870_lamp","MP5A5","MP5SD","M4A3_CCO_EP1"]; //Weapongrade 1 rifles

DZAI_Rifles2 = ["M16A2","M16A2GL","M249_DZ","AK_74","M4A1_Aim","AKS_74_kobra","AKS_74_U","AK_47_M","M24","SVD_CAMO","M1014","DMR_DZ","M4A1","M14_EP1","Remington870_lamp","M240_DZ","M4A1_AIM_SD_camo","M16A4_ACG","M4A1_HWS_GL_camo","Mk_48_DZ","M4A3_CCO_EP1","Sa58V_RCO_EP1","Sa58V_CCO_EP1","M40A3","Sa58P_EP1","Sa58V_EP1"]; //Weapongrade 2 rifles

DZAI_Rifles3 = ["FN_FAL","FN_FAL_ANPVS4","Mk_48_DZ","M249_DZ","BAF_L85A2_RIS_Holo","G36C","G36C_camo","G36A_camo","G36K_camo","AK_47_M","AKS_74_U","M14_EP1","bizon_silenced","DMR_DZ","RPK_74"]; //Weapongrade 3 rifles

 

    

/*

    Custom rifle tables can be defined below this line (DZAI_Rifles4 - DZAI_Rifles9) for the corresponding custom weapongrade level using the same format above.

    Note: If a custom weapongrade is used without defining the corresponding custom rifle array, the DZAI_Rifles3 array will be used instead.

    Instructions: Replace "nil" with the wanted rifle array. Refer to the above rifle arrays for examples on how to define custom rifle tables.

    Custom rifle tables can only be used with custom-defined spawns (spawns created using the DZAI_spawn function).

*/

 

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DZAI_Rifles4 = nil; //weapongrade 4 weapons

DZAI_Rifles5 = nil; //weapongrade 5 weapons

DZAI_Rifles6 = nil; //weapongrade 6 weapons

DZAI_Rifles7 = nil; //weapongrade 7 weapons

DZAI_Rifles8 = nil; //weapongrade 8 weapons

DZAI_Rifles9 = nil; //weapongrade 9 weapons

 

 

//AI skin classnames. DZAI will use any of these classnames for AI spawned. Note: Additional skins may be included on a per-map or per-mod basis - see folders in \world_classname_configs

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DZAI_BanditTypes = ["UN_CDF_Soldier_Crew_EP1", "Soldier_Bodyguard_AA12_PMC_DZ", "US_Delta_Force_AR_EP1"];

 

 

//AI Backpack types (for weapongrade levels 0-3)

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DZAI_Backpacks0 = ["DZ_Patrol_Pack_EP1","DZ_Czech_Vest_Puch","DZ_Assault_Pack_EP1"];

DZAI_Backpacks1 = ["DZ_Patrol_Pack_EP1","DZ_Czech_Vest_Puch","DZ_Assault_Pack_EP1","DZ_British_ACU","DZ_TK_Assault_Pack_EP1","DZ_CivilBackpack_EP1","DZ_ALICE_Pack_EP1"];

DZAI_Backpacks2 = ["DZ_CivilBackpack_EP1","DZ_British_ACU","DZ_Backpack_EP1"];

DZAI_Backpacks3 = ["DZ_CivilBackpack_EP1","DZ_Backpack_EP1"];

 

 

//AI Food/Medical item types. DZAI_Edibles: Drinkable and edible items. DZAI_Medicals1: List of common medical items to be added to AI inventory. DZAI_Medicals2: List of all medical items available only in hospitals to be added to AI backpack.

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DZAI_Edibles = ["ItemSodaCoke", "ItemSodaPepsi", "ItemWaterbottle", "FoodCanSardines", "FoodCanBakedBeans", "FoodCanFrankBeans", "FoodCanPasta", "ItemWaterbottleUnfilled","ItemWaterbottleBoiled","FoodmuttonCooked","FoodchickenCooked","FoodBaconCooked","FoodRabbitCooked","FoodbaconRaw","FoodchickenRaw","FoodmuttonRaw","foodrabbitRaw","FoodCanUnlabeled","FoodPistachio","FoodNutmix","FoodMRE"];

DZAI_Medicals1 = ["ItemBandage", "ItemPainkiller"];

DZAI_Medicals2 = ["ItemPainkiller", "ItemMorphine", "ItemBandage", "ItemBloodbag", "ItemAntibiotic","ItemEpinephrine"];

 

 

//AI Miscellaneous item types. DZAI_MiscItemS: List of random low-value items. DZAI_MiscItemL: List of random semi-valuable/useful items

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DZAI_MiscItemS = ["ItemHeatpack", "HandRoadFlare", "HandChemBlue", "HandChemRed", "HandChemGreen","SmokeShell","TrashTinCan","TrashJackDaniels","ItemSodaEmpty"];

DZAI_MiscItemL = ["ItemJerrycan", "PartWheel", "PartEngine", "PartFueltank", "PartGlass", "PartVRotor","PartWoodPile"];

 

 

//AI toolbelt item types. Toolbelt items are added to AI inventory upon death. Format: [item classname, item probability]

//Weapongrade level 0-1 AI will use DZAI_tools0 table, weapongrade level 2-3 AI will use DZAI_tools1 table. Custom-spawned AI will use DZAI_tools1 table.

//NOTE: Do not delete any elements from this list, set its chance to zero intead. Only add elements to the end of the array, not in the middle.

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DZAI_tools0 = [["ItemFlashlight",0.65],["ItemWatch",0.65],["ItemKnife",0.50],["ItemHatchet",0.40],["ItemCompass",0.40],["ItemMap",0.35],["ItemToolbox",0.15],["ItemMatchbox",0.15],["ItemFlashlightRed",0.05],["ItemGPS",0.005],["ItemRadio",0.005],["ItemCrowbar",0.15]];

DZAI_tools1 = [["ItemFlashlight",0.75],["ItemWatch",0.75],["ItemKnife",0.75],["ItemHatchet",0.70],["ItemCompass",0.75],["ItemMap",0.70],["ItemToolbox",0.35],["ItemMatchbox",0.40],["ItemFlashlightRed",0.10],["ItemGPS",0.10],["ItemRadio",0.075],["ItemCrowbar",0.35]];

 

 

//AI-useable toolbelt item types. These items are added to AI inventory at unit creation and may be used by AI. Format: [item classname, item probability]

//Weapongrade level 0-1 AI will use DZAI_gadgets0 table, weapongrade level 2-3 AI will use DZAI_gadgets1 table. Custom-spawned AI will use DZAI_gadgets1 table.

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DZAI_gadgets0 = [["binocular",0.40],["NVGoggles",0.00]];

DZAI_gadgets1 = [["binocular",0.60],["NVGoggles",0.05]];

 

 

//NOTHING TO EDIT BEYOND THIS POINT

diag_log "[DZAI] DZAI configuration file loaded.";

 

 

spawnVehiclePatrol.sqf

private ["_marker","_vehicleType","_weapongrade","_unitGroup","_driver","_vehicle","_gunnerSpots","_markerPos","_markerSize","_isAirVehicle","_unitType","_vehSpawnPos","_isArmed","_maxUnits","_maxCargoUnits","_maxGunnerUnits","_keepLooking"];

 

if (!isServer) exitWith {};

 

_vehicleType = _this;

 

_maxCargoUnits = 0;

_maxGunnerUnits = 0;

_weapongrade = 0;

_isAirVehicle = (_vehicleType isKindOf "Air");

_vehSpawnPos = [];

_spawnMode = "NONE";

_keepLooking = true;

_error = false;

 

call {

    if (_vehicleType isKindOf "Air") exitWith {

        //Note: no cargo units for air vehicles

        _maxGunnerUnits = DZAI_heliGunnerUnits;

        _weapongrade = DZAI_heliUnitLevel call DZAI_getWeapongrade;

        _vehSpawnPos = [(getMarkerPos "DZAI_centerMarker"),300 + (random((getMarkerSize "DZAI_centerMarker") select 0)),random(360),1] call SHK_pos;

        _vehSpawnPos set [2,150];

        _spawnMode = "FLY";

    };

    if (_vehicleType isKindOf "LandVehicle") exitWith {

        _maxGunnerUnits = DZAI_vehGunnerUnits;

        _maxCargoUnits = DZAI_vehCargoUnits;

        _weapongrade = DZAI_vehUnitLevel call DZAI_getWeapongrade;

        while {_keepLooking} do {

            _vehSpawnPos = [(getMarkerPos "DZAI_centerMarker"),300 + random((getMarkerSize "DZAI_centerMarker") select 0),random(360),0,[2,750]] call SHK_pos;

            if ((count _vehSpawnPos) > 1) then {

                _playerNear = ({isPlayer _x} count (_vehSpawnPos nearEntities [["CAManBase","Land","Air"], 300]) > 0);

                if(!_playerNear) then {

                    _keepLooking = false;    //Found road position, stop searching

                };

            } else {

                if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: Unable to find road position to spawn AI %1. Retrying in 30 seconds.",_vehicleType]};

                uiSleep 30; //Couldnt find road, search again in 30 seconds.

            };

        };

    };

    _error = true;

};

 

if (_error) exitWith {diag_log format ["DZAI Error: %1 attempted to spawn unsupported vehicle type %2.",__FILE__,_vehicleType]};

 

_unitGroup = [] call DZAI_createGroup;

_driver = _unitGroup createUnit [(DZAI_BanditTypes call BIS_fnc_selectRandom2), [0,0,0], [], 1, "NONE"];

[_driver] joinSilent _unitGroup;

 

_vehicle = createVehicle [_vehicleType, _vehSpawnPos, [], 0, _spawnMode];

_vehicle setPos _vehSpawnPos;

_driver moveInDriver _vehicle;

 

//Run high-priority commands to set up group vehicle

//_vehicle setFuel 1;

//_vehicle setVehicleAmmo 1;

//_vehicle engineOn true;

_nul = _vehicle call DZAI_protectObject;

if !(_vehicle isKindOf "Plane") then {

    _vehicle setDir (random 360);

};

 

//Set variables

_vehicle setVariable ["unitGroup",_unitGroup];

 

//Determine vehicle armed state

_turretCount = count (configFile >> "CfgVehicles" >> _vehicleType >> "turrets");

_isArmed = ((({!(_x in ["CarHorn","BikeHorn","TruckHorn","TruckHorn2","SportCarHorn","MiniCarHorn"])} count (weapons _vehicle)) > 0) or {(_turretCount > 0)});

 

//Determine vehicle type and add needed eventhandlers

if (_isAirVehicle) then {

    _vehicle setVariable ["durability",[0,0,0]];    //[structural, engine, tail rotor]

    _vehicle addEventHandler ["Killed",{_this call DZAI_heliDestroyed;}];                    //Begin despawn process when heli is destroyed.

    _vehicle addEventHandler ["GetOut",{_this call DZAI_airLanding;}];    //Converts AI crew to ground AI units.

    _vehicle addEventHandler ["HandleDamage",{_this call DZAI_hHandleDamage}];

} else {

    _vehicle addEventHandler ["Killed",{_this call DZAI_vehDestroyed;}];

    _vehicle addEventHandler ["HandleDamage",{_this call DZAI_vHandleDamage}];

};

_objectID = str(round(random 999999));

_vehicle setVariable ["ObjectID", _objectID, true];

_vehicle setVariable ["ObjectUID", _objectID, true];

PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_vehicle];

 

//Setup group and crew

0 = [_driver,_weapongrade] call DZAI_setSkills;

0 = [_driver,_weapongrade] call DZAI_setupLoadout;

_driver setVariable ["unithealth",[(DZAI_baseBlood + (random DZAI_bonusBlood)),0,false]];

_driver setVariable ["unconscious",false];

_driver setVariable ["bodyName",(name _driver)];

if (!(_driver hasWeapon "NVGoggles")) then {

    _nvg = _driver call DZAI_addTempNVG;

};

_driver addEventHandler [DZAI_healthType, DZAI_healthStatements];

_driver assignAsDriver _vehicle;

_driver setVariable ["isDriver",true];

_unitGroup selectLeader _driver;

 

_cargoSpots = _vehicle emptyPositions "cargo";

for "_i" from 0 to ((_cargoSpots min _maxCargoUnits) - 1) do {

    _cargo = _unitGroup createUnit [(DZAI_BanditTypes call BIS_fnc_selectRandom2), [0,0,0], [], 1, "NONE"];

    [_cargo] joinSilent _unitGroup;

    0 = [_cargo,_weapongrade] call DZAI_setSkills;

    0 = [_cargo,_weapongrade] call DZAI_setupLoadout;

    _cargo setVariable ["unithealth",[(DZAI_baseBlood + (random DZAI_bonusBlood)),0,false]];

    _cargo setVariable ["unconscious",false];

    _cargo setVariable ["bodyName",(name _cargo)];

    if (!(_cargo hasWeapon "NVGoggles")) then {

        _nvg = _cargo call DZAI_addTempNVG;

    };

    _cargo addEventHandler [DZAI_healthType, DZAI_healthStatements];

    _cargo assignAsCargo _vehicle;

    _cargo moveInCargo [_vehicle,_i];

};

if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Spawned %1 cargo units for %2 vehicle %3.",(_cargoSpots min _maxCargoUnits),_unitGroup,_vehicleType]};

    

for "_i" from 0 to ((_turretCount min _maxGunnerUnits) - 1) do {

    _gunner = _unitGroup createUnit [(DZAI_BanditTypes call BIS_fnc_selectRandom2), [0,0,0], [], 1, "NONE"];

    [_gunner] joinSilent _unitGroup;

    0 = [_gunner,_weapongrade] call DZAI_setSkills;

    0 = [_gunner,_weapongrade] call DZAI_setupLoadout;

    _gunner setVariable ["unithealth",[(DZAI_baseBlood + (random DZAI_bonusBlood)),0,false]];

    _gunner setVariable ["unconscious",false];

    _gunner setVariable ["bodyName",(name _gunner)];

    if (!(_gunner hasWeapon "NVGoggles")) then {

        _nvg = _gunner call DZAI_addTempNVG;

    };

    _gunner addEventHandler [DZAI_healthType, DZAI_healthStatements];

    _gunner assignAsGunner _vehicle;

    _gunner moveInTurret [_vehicle,[_i]];

};

if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Spawned %1 gunner units for %2 vehicle %3.",(_turretCount min _maxGunnerUnits),_unitGroup,_vehicleType]};

 

_unitGroup allowFleeing 0;

_unitGroup setBehaviour "AWARE";

_unitGroup setSpeedMode "NORMAL";

_unitGroup setCombatMode "YELLOW";

 

_unitType = if (_isAirVehicle) then {"air"} else {"land"};

_unitGroup setVariable ["unitType",_unitType];

_unitGroup setVariable ["weapongrade",_weapongrade];

_unitGroup setVariable ["assignedVehicle",_vehicle];

_unitGroup setVariable ["isArmed",_isArmed];

(units _unitGroup) allowGetIn true;

 

//If vehicle is air type and unarmed, check if user config has weapons specified.

if (_isAirVehicle && {!_isArmed}) then {

    _index = (DZAI_airWeapons select 0) find _vehicleType;

    if (_index > -1) then {

        _vehWeapon = (DZAI_airWeapons select 1) select _index;

        if ([_vehWeapon,"weapon"] call DZAI_checkClassname) then {

            _vehicle addWeapon _vehWeapon;

            _vehMag = getArray (configFile >> "CfgWeapons" >> _vehWeapon >> "magazines") select 0;

            _vehicle addMagazine _vehMag;

            if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Added weapon %1 and ammo %2 to AI %3 (Group: %1).",_vehWeapon,_vehMag,_vehicleType,_unitGroup]};

        };

    };

};

 

_rearm = [_unitGroup,_weapongrade] spawn DZAI_autoRearm_group;    //start group-level manager

//if (daytime < 6 or {daytime > 20}) then {_vehicle action ["lightOn", _vehicle]};

 

if (_isAirVehicle) then {

    //Set initial waypoint and begin patrol

    [_unitGroup,0] setWaypointType "MOVE";

    [_unitGroup,0] setWaypointTimeout [0.5,0.5,0.5];

    [_unitGroup,0] setWaypointCompletionRadius 200;

    [_unitGroup,0] setWaypointStatements ["true","[(group this)] spawn DZAI_heliDetectPlayers;"];

 

    _waypoint = _unitGroup addWaypoint [_vehSpawnPos,0];

    _waypoint setWaypointType "MOVE";

    _waypoint setWaypointTimeout [3,6,9];

    _waypoint setWaypointCompletionRadius 150;

    _waypoint setWaypointStatements ["true","[(group this)] spawn DZAI_heliRandomPatrol;"];

 

    [_unitGroup] spawn DZAI_heliRandomPatrol;

    //if (DZAI_heliReinforceChance > 0) then {_oncall = [_vehicle,_unitGroup] spawn DZAI_heliOnCall}; //helicopter listen for reinforcement summons

    _vehicle flyInHeight 125;

    

    if ((!isNull _vehicle) && {!isNull _unitGroup}) then {

        DZAI_curHeliPatrols = DZAI_curHeliPatrols + 1;

        if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Created AI helicopter crew group %1 is now active and patrolling.",_unitGroup];};

    };

} else {

    //Set initial waypoint and begin patrol

    [_unitGroup,0] setWaypointType "MOVE";

    [_unitGroup,0] setWaypointTimeout [5,10,15];

    [_unitGroup,0] setWaypointCompletionRadius 150;

    [_unitGroup,0] setWaypointStatements ["true","[(group this)] spawn DZAI_vehPatrol;"];

    [_unitGroup] spawn DZAI_vehPatrol;

 

    if ((!isNull _vehicle) && {!isNull _unitGroup}) then {

        DZAI_curLandPatrols = DZAI_curLandPatrols + 1;

        if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Created AI land vehicle crew group %1 is now active and patrolling.",_unitGroup];};

    };

};

 

if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: Created AI vehicle patrol at %1 with vehicle type %2 with %3 crew units.",_vehSpawnPos,_vehicleType,(count (units _unitGroup))]};

 

true

 

время очистки менял -DZAI_cleanupDelay   -  DZAI_respawnTMinL- не помогло

Изменено пользователем shturman (история изменений)

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

https://github.com/dayzai/DZAI

мои настройки : dzai_config.sqf

/*

    DZAI Configuration File

    

    Description: Contains all configurable settings of DZAI. Contains settings for debugging, customization of AI units, spawning, and loot.

    

 

*/

 

diag_log "[DZAI] Reading DZAI configuration file.";

 

/*    DZAI Settings

--------------------------------------------------------------------------------------------------------------------*/    

 

//Enable or disable event logging to arma2oaserver.rpt. Debug level setting. 0: No debug output, 1: Basic Debug output, 2: Extended Debug output. (Default: 0)

//Debug output may help finding additional information about DZAI's background behavior. This output is helpful when asking for help regarding bugs or unexpected behaviors.

DZAI_debugLevel = 0;

 

//Frequency of server monitor update to RPT log in seconds. The monitor periodically reports number of max/current AI units and dynamically spawned triggers into RPT log. (Default: 300, 0 = Disable reporting)                                        

DZAI_monitorRate = 0;

 

//Enable or disable verification and error-correction of classname tables used by DZAI. If invalid entries are found, they are removed and logged into the RPT log.

//If disabled, any invalid classnames will not be removed and clients may crash if AI bodies with invalid items are looted. Only disable if a previous scan shows no invalid classnames (Default: true).                                        

DZAI_verifyTables = false;

 

//(Feature in development) Enables additional checking and error-correction of certain classname tables. (Default: false)

DZAI_extendedVerify = false;

 

//Enable to have server spawn in objects/buildings normally spawned clientside by DayZ's CfgTownGenerator. Prevents AI from walking/shooting through clutter and other objects. (Default: true)    

//If running DayZ Mod ("vanilla DayZ") or DayZ Overwatch, it is highly recommended to enable this option, as many added buildings are handled by the CfgTownGenerator. Not used with Epoch.                            

DZAI_objPatch = true;

 

//Minimum seconds to pass until each dead AI body or destroyed vehicle can be cleaned up by DZAI's task scheduler. DZAI will not clean up a body/vehicle if there is a player close by (Default: 900).    

//Note: Other cleanup scripts might interfere by cleaning up dead AI bodies/vehicles!                                    

DZAI_cleanupDelay = 900;                                    

 

//Enable auto detection of DayZ mod type ran by server. If additional support exists for the mod type, DZAI will load additional classnames (example: weapons, skins, or other items)

//Additional support exists for the following DayZ mods: Epoch, Overwatch, Unleashed, Hunting Grounds, 2017. (Default: true)

DZAI_modAutoDetect = true;

 

 

/*    AI Unit Settings

--------------------------------------------------------------------------------------------------------------------*/        

 

//Enhanced AI health system setting.

//If enabled, AI units will use DayZ's 12,000 blood system, can be knocked unconscious and Tasered, and can self-bloodbag/morphine. If disabled, AI units will use default Arma 2 damage handling. (Default: true)

DZAI_useHealthSystem = true;

 

//Minimum and maximum AI blood level to spawn each unit with. Each individual unit will have a randomized blood level within this range. Upper limit: 12000 blood (Default: [10000,12000])

//Note: No effect if DZAI_useHealthSystem is false

DZAI_unitBloodLevel = [10000,12000];

 

//Amount of blood restored from a full self-heal. One-third of the total amount is restored 3 times every 3 seconds. Note: Applies to infantry-type AI units. (Default: 6000)

//Note: No effect if DZAI_useHealthSystem is false

DZAI_unitHealAmount = 6000;

 

//Below this blood level, AI may decide to heal themselves for amount specified by DZAI_unitHealAmount. Healing requires 9 seconds to fully complete and can be interrupted by knocking the unit unconscious. (Default: 5000)

//Note: No effect if DZAI_useHealthSystem is false

DZAI_lowBloodLevel = 5000;

 

//Enable or disable zombie attraction to AI weapon sounds. No effect if DZAI_zombieEnemy is set to false. Enabling this option may impact server performance as a script is run for each AI bullet fired.

//Note: AI cannot be attacked or damaged by zombies.(Default: false)        

DZAI_weaponNoise = true;

 

//If enabled, AI group will attempt to track down player responsible for killing a group member. Players with radios will be given text warnings if they are being pursued (Default: true)

DZAI_findKiller = true;    

 

//If normal probability check for spawning NVGs fails, then give AI temporary NVGs only if they are spawned with weapongrade 1 or higher (applies only during nighttime hours). Temporary NVGs are unlootable and will be removed at death (Default: false).                                    

DZAI_tempNVGs = false;    

 

//Amount of humanity to reward player for killing an AI unit (Default: 0)                                    

DZAI_humanityGain = -10;                                        

 

//If enabled, players with radios will be given text warnings if they are being pursued by AI groups. (Default: true)

DZAI_radioMsgs = true;

 

//If enabled, last surviving unit of a group will be granted slightly boosted skills. No effect if unit is spawned alone (Default: false)

DZAI_lastManStanding = true;

 

 

/*DZAI client-side addon settings.

**NOTE**: These settings require the DZAI client-side addon to be installed to your mission pbo file in order to work.

--------------------------------------------------------------------------------------------------------------------*/    

 

//Enable to use client-side radio addon for radio messages instead of remote execution method. (Default: false)

DZAI_clientRadio = false;

 

//Enable or disable AI hostility to zombies. If enabled, AI units spawned by DZAI will attack nearby zombies. (Default: false)

DZAI_zombieEnemy = true;    

 

//Maximum distance (in meters) for AI group leader to detect zombies. Increasing range beyond default may negatively impact server performance. (Default: 150)                            

DZAI_zDetectRange = 150;

 

//Enable or disable AI death messages. Messages will be sent only to player responsible for killing the unit. Messages will be sent in System chat in the format "(Unit name) was killed." (Default: false)

DZAI_deathMessages = false;                                    

 

 

/*    Static AI Spawning Settings

--------------------------------------------------------------------------------------------------------------------*/    

 

//Enable or disable static AI spawns. If enabled, AI spawn points will be generated in cities, towns, and other predefined areas. Does not affect custom-defined spawns (Default: true).

DZAI_staticAI = false;

 

//Set minimum and maximum wait time in seconds to respawn an AI group after all units have been killed. Applies to both static AI and custom spawned AI (Default: Min 300, Max 600).                                    

DZAI_respawnTimeMin = 900;

DZAI_respawnTimeMax = 1200;

 

//Time to allow spawned AI units to exist in seconds before being despawned when no players are present in a trigger area. Applies to both static AI and custom spawned AI (Default: 120)                                        

DZAI_despawnWait = 120;                                        

 

//Respawn limits. Set to -1 for unlimited respawns. (Default: -1 for each).

DZAI_respawnLimit0 = -1;     //Respawn limit for low level AI found in low-value areas (Default: -1)

DZAI_respawnLimit1 = -1;     //Respawn limit for mid level AI found in cities and other mid-value areas (Default: -1)

DZAI_respawnLimit2 = -1;     //Respawn limit for high level AI found in places with military loot (Default: -1)

DZAI_respawnLimit3 = -1;     //Respawn limit for very high level AI in places with high-grade military loot (Default: -1)

 

//Spawn probabilities

DZAI_spawnChance0 = 0.40;    //Spawn chance for low-skill AI typically found in small towns (Default: 0.40)

DZAI_spawnChance1 = 0.60;    //Spawn chance for mid-level AI typically found in cities and large towns (Default: 0.60)

DZAI_spawnChance2 = 0.80;    //Spawn chance for high-level AI typically found in places with military-grade loot (Default: 0.80)

DZAI_spawnChance3 = 0.90;    //Spawn chance for expert-level AI found in areas with high-grade military loot (Default: 0.90)

 

 

/*    Dynamic AI Spawning Settings

--------------------------------------------------------------------------------------------------------------------*/        

 

//Enable or disable dynamic AI spawns. If enabled, AI spawn locations will be generated for randomly selected players at randomized intervals (Default: true)                                    

DZAI_dynAISpawns = true;

 

//Time (seconds) required to reach maximum spawn probability per player, after which the probability is reset to 0%. Lower number = More frequent spawns, Higher Number = Less frequent. (Recommended range: 1200-2700, Default: 1200)

DZAI_maxSpawnTime = 1800;

 

//Time (seconds) to allow each player to retain maximum spawn probability. (Default: 1200).

DZAI_keepMaxSpawnTime = 1200;

 

//Probability for dynamic AI to actively hunt a targeted player. If probability check fails, dynamic AI will patrol the area instead of hunting (Default: 0.50)

DZAI_huntingChance = 0.75;

 

//Probability to send first available AI helicopter to reinforce dynamic AI group. No effect if DZAI_maxHeliPatrols is set to zero. (Default: 0.50)

DZAI_heliReinforceChance = 0.50;

 

//Array of area blacklist markers. Players within marker areas will not be targeted for dynamic AI spawns (Example: ["BlacklistArea1","BlacklistArea2","BlacklistArea3"])

//Epoch: DZAI will automatically set up 200m-radius blacklist areas around each trader area.

DZAI_dynAreaBlacklist = [];

 

//Time to wait before despawning all AI units in dynamic spawn area when no players are present. (Default: 120)

DZAI_dynDespawnWait = 120;

 

//Enable or disable dynamic spawn-free zones of 600m radius around player spawn areas. (Default: false)

DZAI_freshSpawnSafeArea = true;

 

 

/*    Random AI Spawning Settings (Feature in development)

--------------------------------------------------------------------------------------------------------------------*/        

 

//Maximum number of placed random spawns on map

DZAI_maxRandomSpawns = 20;

 

//Time to wait before despawning all AI units in random spawn area when no players are present. (Default: 120)

DZAI_randDespawnWait = 120;

 

//Array of area blacklist markers. Players within marker areas will not be targeted for random AI spawns (Example: ["BlacklistArea1","BlacklistArea2","BlacklistArea3"])

//Epoch: DZAI will automatically set up 200m-radius blacklist areas around each trader area.

//Tip: To use dynamic-spawn blacklist areas for random-spawn blacklist areas, simply set DZAI_randAreaBlacklist = DZAI_dynAreaBlacklist;

DZAI_randAreaBlacklist = [];

 

 

/*    AI Air vehicle patrol settings. These AI vehicles will randomly travel between different cities and towns.

--------------------------------------------------------------------------------------------------------------------*/        

 

//Global maximum number of active AI air vehicle patrols. Set at 0 to disable (Default: 0).                            

DZAI_maxHeliPatrols = 3;

 

//Set minimum and maximum wait time in seconds to respawn an AI vehicle patrol after vehicle is destroyed or disabled. (Default: Min 600, Max 900).

DZAI_respawnTMinA = 900;

DZAI_respawnTMaxA = 1200;

 

//Classnames of air vehicle types to use, with the maximum amount of each type to spawn.

DZAI_heliList = [

    ["UH1H_DZ",4],

    ["Mi17_DZ",3],

    ["Ka137_MG_PMC",2],

    ["An2_TK_EP1",3],

    ["GNT_C185",5]

];

 

//Difficulty level of air vehicle patrol units. Difficulty level also affects unit loadout and loot. Possible values: 0 to 3 (Default: 3)

DZAI_heliUnitLevel = 3;

 

//Maximum number of gunner units per air vehicle. Limited by actual number of available gunner positions. (Default: 2)

DZAI_heliGunnerUnits = 3;

 

//Specify vehicle weapon for air vehicles that are unarmed by default. DZAI will arm these air vehicles with the specified weapons upon spawning each vehicle.

//Weapon classnames are verified. If the classname is invalid (banned or nonexistent), it will not be added to the vehicle.

//Format: Each row containing a vehicle classname will be equipped with the weapon from the corresponding row in weapon classnames section. DZAI will automatically select ammo type.

DZAI_airWeapons = [

    //Air vehicle classnames (Remember: no comma for last entry! Otherwise, separate each string with commas)

    ["GNT_C185","An2_TK_EP1"]

    ,

    //Corresponding weapon classnames (Remember: no comma for last entry! Otherwise, separate each string with commas)

    ["M240","Helicopter2_Example_Weapon"]

];

 

 

/*AI Land vehicle patrol settings. These AI vehicles will randomly travel between different cities and towns.

--------------------------------------------------------------------------------------------------------------------*/    

 

//Global maximum number of active AI land vehicle patrols. Set at 0 to disable (Default: 0).    

DZAI_maxLandPatrols = 33;

 

//Set minimum and maximum wait time in seconds to respawn an AI vehicle patrol after vehicle is destroyed or disabled. (Default: Min 600, Max 900).

DZAI_respawnTMinL = 900;

DZAI_respawnTMaxL = 1200;

 

//Classnames of land vehicle types to use, with the maximum amount of each type to spawn.

DZAI_vehList = [

    ["UAZ_Unarmed_TK_EP1",3],

    ["SUV_TK_CIV_EP1",5],

    ["policecar",5],

    ["VolhaLimo_TK_CIV_EP1",3],

    ["KamazOpen",3],

    ["Old_moto_TK_Civ_EP1",5],

    ["TT650_TK_CIV_EP1",0],

    ["BTR40_TK_GUE_EP1",3],

    ["Pickup_PK_GUE",3],

    ["UAZ_RU",3],

    ["V3S_Civ",3],

    ["Ural_UN_EP1",3]

];

 

//Difficulty level of land vehicle patrol units. Difficulty level also affects unit loadout and loot. Possible values: 0 to 3 (Default: 3)

DZAI_vehUnitLevel = 3;

 

//Maximum number of gunner units per land vehicle. Limited by actual number of available gunner positions. (Default: 1)

DZAI_vehGunnerUnits = 2;

 

//Maximum number of cargo units per land vehicle. Limited by actual number of available cargo positions. (Default: 3)

DZAI_vehCargoUnits = 11;

 

 

/*    AI Vehicle (Air & Land) Settings

--------------------------------------------------------------------------------------------------------------------*/

 

//Array of area blacklist markers. Areas covered by marker will not be used as waypoints for vehicle patrols. (Example: ["BlacklistArea1","BlacklistArea2","BlacklistArea3"])

//Note: Vehicles may still pass through these areas but will not make stops unless enemies are encountered.

DZAI_waypointBlacklist = [];

 

 

/*    AI weapon selection settings

--------------------------------------------------------------------------------------------------------------------*/

 

//True: Dynamically generate AI weapon list from CfgBuildingLoot (DayZ loot tables). False: Use preset weapon tables located near the end of this file. (Default: true).

//Highly recommended to enable DZAI_verifyTables if this option is set to false.

DZAI_dynamicWeaponList = true;

 

//Determines whether DZAI reads from default DayZ loot tables for dynamic AI weapon generation or from user-installed custom loot tables. (Default: false)

//No effect if DZAI_dynamicWeaponList is 'false'. If DZAI is unable to find custom loot tables installed, default loot tables will be used instead. If no loot tables are found, DZAI will use prebuilt weapon tables.

DZAI_customLootTables = false;

 

//List of classnames of weapons that AI should never use. By default, AI may carry any lootable weapon. (Only if DZAI_dynamicWeaponList = true)  

//Example: DZAI_banAIWeapons = ["M107_DZ","BAF_AS50_scoped"] will remove the M107 and AS50 from AI weapon tables if dynamic weapon list is enabled.                                

//Note: It is recommended to add all melee weapon classnames into this list as AI have issues using melee weapons.

//Pre-banned weapons by DZAI: "Crossbow_DZ","Crossbow","MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeBaseball","MeleeBaseBallBat","MeleeBaseBallBatBarbed","MeleeBaseBallBatNails"

DZAI_banAIWeapons = ["M107_DZ","BAF_AS50_scoped"];                                        

 

//List of launcher-type weapons for mid/high-level AI to use (by default, weapongrade 1/2/3), example: ["M136"]. If left empty, AI will not use launcher weapons. (Default: [])

//If AI encounter an armored player vehicle, they will switch to a randomly-selected launcher-type weapon to engage.

//Weapon classnames added here are verified if DZAI_verifyTables is set to true. Note: Launcher weapons are removed from the AI unit upon death.

DZAI_launcherTypes = ["RPG7V"];    

 

//List of AI weapongrades that are permitted to use launcher-type weapons. Individual custom weapongrade levels may be added to allow launcher use (Default: [1,2,3])

DZAI_launcherLevels = [1,2,3];                                

 

//Limit of number of launcher-type weapons to add to each AI group. Groups cannot have more launcher weapons than their weapongrade value (Default: 1).

DZAI_launchersPerGroup = 2;

 

 

/*    AI loot quantity settings

--------------------------------------------------------------------------------------------------------------------*/

 

//Number of selections of medical items (Inventory)

DZAI_invmedicals = 1;

 

//Number of selections of edible items (Inventory)                                         

DZAI_invedibles = 1;    

 

//Number of selections of medical items (Backpack)                                    

DZAI_bpmedicals = 1;     

 

//Number of selections of edible items (Backpack)                                    

DZAI_bpedibles = 1;    

 

//Maximum number of items to select from DZAI_MiscItemS table.                                        

DZAI_numMiscItemS = 3;                        

 

//Maximum number of items to select from DZAI_MiscItemL table.                

DZAI_numMiscItemL = 1;                                        

 

 

/*    AI loot probability settings

--------------------------------------------------------------------------------------------------------------------*/

 

//Chance to add each medical item.

DZAI_chanceMedicals = 0.70;    

 

//Chance to add each edible item.                                

DZAI_chanceEdibles = 0.70;

 

//Chance to add each random item from DZAI_MiscItemS table.                                    

DZAI_chanceMiscItemS = 0.60;

 

//Chance to add each random item from DZAI_MiscItemL table.                                

DZAI_chanceMiscItemL = 0.15;                                

 

 

/*AI weapon/skill probabilities (gradeChances should add up to 1.00) - [Civilian, Military, MilitarySpecial, HeliCrash] - Note: AI with higher grade weaponry will also have higher skill settings.

--------------------------------------------------------------------------------------------------------------------*/

 

//equipType level 0 - most AI will have basic pistols or rifles, and occasionally common military weapons.

DZAI_gradeChances0 = [0.90,0.10,0.00,0.00];    

 

//equipType level 1 - most AI will have common rifles, many will have common military weapons. Very rarely, AI will spawn with high-grade military or helicrash weapons.                

DZAI_gradeChances1 = [0.65,0.30,0.04,0.01];    

 

//equipType level 2 - most AI carry military weapons, and occasionally high-grade military weapons.                

DZAI_gradeChances2 = [0.15,0.65,0.15,0.05];

 

//equipType level 3 - All AI will carry at least a military-grade weapon. Many will be carrying high-grade military weapons. Note: Air and land vehicle patrols use equipType level 3.                    

DZAI_gradeChances3 = [0.00,0.50,0.35,0.15];    

 

//equipType level "dynamic" - Weapongrade chances for dynamic-spawned AI. Majority of dynamic AI will be carrying low-grade military weapons, some will carry high-grade military.            

DZAI_gradeChancesDyn = [0.00,0.88,0.09,0.03];                

 

 

/*

    AI skill settings

    Skill Level: Description

    0-1: Low to medium-skilled AI. Most common type of AI encountered. Intended to challenge players.

    2-3: High-skilled AI. Uncommon/rare type of AI found in places with military loot. Intended to kill players.

    Hint: The best way to quickly adjust AI difficulty is by modifying aimingAccuracy value. For all skill types, higher number = better skill.

*/

 

//AI skill settings level 0 (Skill, Minimum skill, Maximum skill). Baseline skill level: 0.50

DZAI_skill0 = [    

    ["aimingAccuracy",0.325,0.125],

    ["aimingShake",0.50,0.59],

    ["aimingSpeed",0.50,0.59],

    ["endurance",0.50,0.59],

    ["spotDistance",0.50,0.59],

    ["spotTime",0.50,0.59],

    ["courage",0.50,0.59],

    ["reloadSpeed",0.50,0.59],

    ["commanding",0.60,0.69],

    ["general",0.60,0.69]

];

 

//AI skill settings level 1 (Skill, Minimum skill, Maximum skill). Baseline skill level: 0.60

DZAI_skill1 = [    

    ["aimingAccuracy",0.325,0.15],

    ["aimingShake",0.60,0.69],

    ["aimingSpeed",0.60,0.69],

    ["endurance",0.60,0.69],

    ["spotDistance",0.60,0.69],

    ["spotTime",0.60,0.69],

    ["courage",0.60,0.69],

    ["reloadSpeed",0.60,0.69],

    ["commanding",0.70,0.79],

    ["general",0.70,0.79]

];

 

//AI skill settings level 2 (Skill, Minimum skill, Maximum skill). Baseline skill level: 0.70

DZAI_skill2 = [    

    ["aimingAccuracy",0.275,0.225],

    ["aimingShake",0.70,0.79],

    ["aimingSpeed",0.70,0.79],

    ["endurance",0.70,0.79],

    ["spotDistance",0.70,0.79],

    ["spotTime",0.70,0.79],

    ["courage",0.70,0.79],

    ["reloadSpeed",0.70,0.79],

    ["commanding",0.80,0.89],

    ["general",0.80,0.89]

];

 

//AI skill settings level 3 (Skill, Minimum skill, Maximum skill). Baseline skill level: 0.80

DZAI_skill3 = [    

    ["aimingAccuracy",0.325,0.250],

    ["aimingShake",0.80,0.89],

    ["aimingSpeed",0.80,0.89],

    ["endurance",0.80,0.89],

    ["spotDistance",0.80,0.89],

    ["spotTime",0.80,0.89],

    ["courage",0.80,0.89],

    ["reloadSpeed",0.80,0.89],

    ["commanding",0.90,0.99],

    ["general",0.90,0.99]

];

 

 

/*

    Additional AI skill settings can be defined (DZAI_skill4 - DZAI_skill9) for the corresponding custom weapongrade level using the same format above.

    Note: If a custom weapongrade is used without defining the corresponding custom skill settings, DZAI_skill3 settings will be used instead.

    Instructions: replace "nil" with the skill array. Refer to the above preset skill arrays for examples.

    Custom AI skill settings can only be used with custom-defined spawns (spawns created using the DZAI_spawn function).

*/

 

//weapongrade 4 skills

DZAI_skill4 = nil;

 

//weapongrade 5 skills

DZAI_skill5 = nil;

 

//weapongrade 6 skills

DZAI_skill6 = nil;

 

//weapongrade 7 skills

DZAI_skill7 = nil;

 

//weapongrade 8 skills

DZAI_skill8 = nil;

 

//weapongrade 9 skills

DZAI_skill9 = nil;

 

 

/*

    AI weapon, loot, and equipment settings

    

    DZAI will first load the classname tables defined below, the modify the settings according to the DayZ map/mod being run.

    

    Example: DZAI will always first load the classname tables defined below, then if DayZ Epoch is detected, DZAI will add or overwrite settings specified by \world_classname_configs\epoch\dayz_epoch.sqf.

    

*/

 

//Default weapon classname tables - DZAI will ONLY use these tables if the dynamic weapon list (DZAI_dynamicWeaponList) is disabled, otherwise they are ignored and overwritten if it is enabled.

//Note: Low-level AI (weapongrade 0) may use pistols listed in DZAI_Pistols0 or DZAI_Pistols1. Mid/high level AI (weapongrade 1+) will carry pistol weapons but not use them - they will use rifle weapons instead.

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DZAI_Pistols0 = ["Makarov","Colt1911","revolver_EP1"];                 //Weapongrade 0 pistols

DZAI_Pistols1 = ["M9","M9SD","MakarovSD","UZI_EP1","glock17_EP1"];     //Weapongrade 1 pistols

DZAI_Pistols2 = ["M9SD","MakarovSD","UZI_EP1","glock17_EP1"];         //Weapongrade 2 pistols

DZAI_Pistols3 = ["M9SD","MakarovSD","UZI_EP1","glock17_EP1"];         //Weapongrade 3 pistols

 

DZAI_Rifles0 = ["LeeEnfield","Winchester1866","MR43","huntingrifle","LeeEnfield","Winchester1866","MR43"]; //Weapongrade 0 rifles

DZAI_Rifles1 = ["M16A2","M16A2GL","AK_74","M4A1_Aim","AKS_74_kobra","AKS_74_U","AK_47_M","M24","M1014","DMR_DZ","M4A1","M14_EP1","Remington870_lamp","MP5A5","MP5SD","M4A3_CCO_EP1"]; //Weapongrade 1 rifles

DZAI_Rifles2 = ["M16A2","M16A2GL","M249_DZ","AK_74","M4A1_Aim","AKS_74_kobra","AKS_74_U","AK_47_M","M24","SVD_CAMO","M1014","DMR_DZ","M4A1","M14_EP1","Remington870_lamp","M240_DZ","M4A1_AIM_SD_camo","M16A4_ACG","M4A1_HWS_GL_camo","Mk_48_DZ","M4A3_CCO_EP1","Sa58V_RCO_EP1","Sa58V_CCO_EP1","M40A3","Sa58P_EP1","Sa58V_EP1"]; //Weapongrade 2 rifles

DZAI_Rifles3 = ["FN_FAL","FN_FAL_ANPVS4","Mk_48_DZ","M249_DZ","BAF_L85A2_RIS_Holo","G36C","G36C_camo","G36A_camo","G36K_camo","AK_47_M","AKS_74_U","M14_EP1","bizon_silenced","DMR_DZ","RPK_74"]; //Weapongrade 3 rifles

 

    

/*

    Custom rifle tables can be defined below this line (DZAI_Rifles4 - DZAI_Rifles9) for the corresponding custom weapongrade level using the same format above.

    Note: If a custom weapongrade is used without defining the corresponding custom rifle array, the DZAI_Rifles3 array will be used instead.

    Instructions: Replace "nil" with the wanted rifle array. Refer to the above rifle arrays for examples on how to define custom rifle tables.

    Custom rifle tables can only be used with custom-defined spawns (spawns created using the DZAI_spawn function).

*/

 

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DZAI_Rifles4 = nil; //weapongrade 4 weapons

DZAI_Rifles5 = nil; //weapongrade 5 weapons

DZAI_Rifles6 = nil; //weapongrade 6 weapons

DZAI_Rifles7 = nil; //weapongrade 7 weapons

DZAI_Rifles8 = nil; //weapongrade 8 weapons

DZAI_Rifles9 = nil; //weapongrade 9 weapons

 

 

//AI skin classnames. DZAI will use any of these classnames for AI spawned. Note: Additional skins may be included on a per-map or per-mod basis - see folders in \world_classname_configs

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DZAI_BanditTypes = ["UN_CDF_Soldier_Crew_EP1", "Soldier_Bodyguard_AA12_PMC_DZ", "US_Delta_Force_AR_EP1"];

 

 

//AI Backpack types (for weapongrade levels 0-3)

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DZAI_Backpacks0 = ["DZ_Patrol_Pack_EP1","DZ_Czech_Vest_Puch","DZ_Assault_Pack_EP1"];

DZAI_Backpacks1 = ["DZ_Patrol_Pack_EP1","DZ_Czech_Vest_Puch","DZ_Assault_Pack_EP1","DZ_British_ACU","DZ_TK_Assault_Pack_EP1","DZ_CivilBackpack_EP1","DZ_ALICE_Pack_EP1"];

DZAI_Backpacks2 = ["DZ_CivilBackpack_EP1","DZ_British_ACU","DZ_Backpack_EP1"];

DZAI_Backpacks3 = ["DZ_CivilBackpack_EP1","DZ_Backpack_EP1"];

 

 

//AI Food/Medical item types. DZAI_Edibles: Drinkable and edible items. DZAI_Medicals1: List of common medical items to be added to AI inventory. DZAI_Medicals2: List of all medical items available only in hospitals to be added to AI backpack.

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DZAI_Edibles = ["ItemSodaCoke", "ItemSodaPepsi", "ItemWaterbottle", "FoodCanSardines", "FoodCanBakedBeans", "FoodCanFrankBeans", "FoodCanPasta", "ItemWaterbottleUnfilled","ItemWaterbottleBoiled","FoodmuttonCooked","FoodchickenCooked","FoodBaconCooked","FoodRabbitCooked","FoodbaconRaw","FoodchickenRaw","FoodmuttonRaw","foodrabbitRaw","FoodCanUnlabeled","FoodPistachio","FoodNutmix","FoodMRE"];

DZAI_Medicals1 = ["ItemBandage", "ItemPainkiller"];

DZAI_Medicals2 = ["ItemPainkiller", "ItemMorphine", "ItemBandage", "ItemBloodbag", "ItemAntibiotic","ItemEpinephrine"];

 

 

//AI Miscellaneous item types. DZAI_MiscItemS: List of random low-value items. DZAI_MiscItemL: List of random semi-valuable/useful items

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DZAI_MiscItemS = ["ItemHeatpack", "HandRoadFlare", "HandChemBlue", "HandChemRed", "HandChemGreen","SmokeShell","TrashTinCan","TrashJackDaniels","ItemSodaEmpty"];

DZAI_MiscItemL = ["ItemJerrycan", "PartWheel", "PartEngine", "PartFueltank", "PartGlass", "PartVRotor","PartWoodPile"];

 

 

//AI toolbelt item types. Toolbelt items are added to AI inventory upon death. Format: [item classname, item probability]

//Weapongrade level 0-1 AI will use DZAI_tools0 table, weapongrade level 2-3 AI will use DZAI_tools1 table. Custom-spawned AI will use DZAI_tools1 table.

//NOTE: Do not delete any elements from this list, set its chance to zero intead. Only add elements to the end of the array, not in the middle.

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DZAI_tools0 = [["ItemFlashlight",0.65],["ItemWatch",0.65],["ItemKnife",0.50],["ItemHatchet",0.40],["ItemCompass",0.40],["ItemMap",0.35],["ItemToolbox",0.15],["ItemMatchbox",0.15],["ItemFlashlightRed",0.05],["ItemGPS",0.005],["ItemRadio",0.005],["ItemCrowbar",0.15]];

DZAI_tools1 = [["ItemFlashlight",0.75],["ItemWatch",0.75],["ItemKnife",0.75],["ItemHatchet",0.70],["ItemCompass",0.75],["ItemMap",0.70],["ItemToolbox",0.35],["ItemMatchbox",0.40],["ItemFlashlightRed",0.10],["ItemGPS",0.10],["ItemRadio",0.075],["ItemCrowbar",0.35]];

 

 

//AI-useable toolbelt item types. These items are added to AI inventory at unit creation and may be used by AI. Format: [item classname, item probability]

//Weapongrade level 0-1 AI will use DZAI_gadgets0 table, weapongrade level 2-3 AI will use DZAI_gadgets1 table. Custom-spawned AI will use DZAI_gadgets1 table.

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DZAI_gadgets0 = [["binocular",0.40],["NVGoggles",0.00]];

DZAI_gadgets1 = [["binocular",0.60],["NVGoggles",0.05]];

 

 

//NOTHING TO EDIT BEYOND THIS POINT

diag_log "[DZAI] DZAI configuration file loaded.";

 

 

spawnVehiclePatrol.sqf

private ["_marker","_vehicleType","_weapongrade","_unitGroup","_driver","_vehicle","_gunnerSpots","_markerPos","_markerSize","_isAirVehicle","_unitType","_vehSpawnPos","_isArmed","_maxUnits","_maxCargoUnits","_maxGunnerUnits","_keepLooking"];

 

if (!isServer) exitWith {};

 

_vehicleType = _this;

 

_maxCargoUnits = 0;

_maxGunnerUnits = 0;

_weapongrade = 0;

_isAirVehicle = (_vehicleType isKindOf "Air");

_vehSpawnPos = [];

_spawnMode = "NONE";

_keepLooking = true;

_error = false;

 

call {

    if (_vehicleType isKindOf "Air") exitWith {

        //Note: no cargo units for air vehicles

        _maxGunnerUnits = DZAI_heliGunnerUnits;

        _weapongrade = DZAI_heliUnitLevel call DZAI_getWeapongrade;

        _vehSpawnPos = [(getMarkerPos "DZAI_centerMarker"),300 + (random((getMarkerSize "DZAI_centerMarker") select 0)),random(360),1] call SHK_pos;

        _vehSpawnPos set [2,150];

        _spawnMode = "FLY";

    };

    if (_vehicleType isKindOf "LandVehicle") exitWith {

        _maxGunnerUnits = DZAI_vehGunnerUnits;

        _maxCargoUnits = DZAI_vehCargoUnits;

        _weapongrade = DZAI_vehUnitLevel call DZAI_getWeapongrade;

        while {_keepLooking} do {

            _vehSpawnPos = [(getMarkerPos "DZAI_centerMarker"),300 + random((getMarkerSize "DZAI_centerMarker") select 0),random(360),0,[2,750]] call SHK_pos;

            if ((count _vehSpawnPos) > 1) then {

                _playerNear = ({isPlayer _x} count (_vehSpawnPos nearEntities [["CAManBase","Land","Air"], 300]) > 0);

                if(!_playerNear) then {

                    _keepLooking = false;    //Found road position, stop searching

                };

            } else {

                if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: Unable to find road position to spawn AI %1. Retrying in 30 seconds.",_vehicleType]};

                uiSleep 30; //Couldnt find road, search again in 30 seconds.

            };

        };

    };

    _error = true;

};

 

if (_error) exitWith {diag_log format ["DZAI Error: %1 attempted to spawn unsupported vehicle type %2.",__FILE__,_vehicleType]};

 

_unitGroup = [] call DZAI_createGroup;

_driver = _unitGroup createUnit [(DZAI_BanditTypes call BIS_fnc_selectRandom2), [0,0,0], [], 1, "NONE"];

[_driver] joinSilent _unitGroup;

 

_vehicle = createVehicle [_vehicleType, _vehSpawnPos, [], 0, _spawnMode];

_vehicle setPos _vehSpawnPos;

_driver moveInDriver _vehicle;

 

//Run high-priority commands to set up group vehicle

//_vehicle setFuel 1;

//_vehicle setVehicleAmmo 1;

//_vehicle engineOn true;

_nul = _vehicle call DZAI_protectObject;

if !(_vehicle isKindOf "Plane") then {

    _vehicle setDir (random 360);

};

 

//Set variables

_vehicle setVariable ["unitGroup",_unitGroup];

 

//Determine vehicle armed state

_turretCount = count (configFile >> "CfgVehicles" >> _vehicleType >> "turrets");

_isArmed = ((({!(_x in ["CarHorn","BikeHorn","TruckHorn","TruckHorn2","SportCarHorn","MiniCarHorn"])} count (weapons _vehicle)) > 0) or {(_turretCount > 0)});

 

//Determine vehicle type and add needed eventhandlers

if (_isAirVehicle) then {

    _vehicle setVariable ["durability",[0,0,0]];    //[structural, engine, tail rotor]

    _vehicle addEventHandler ["Killed",{_this call DZAI_heliDestroyed;}];                    //Begin despawn process when heli is destroyed.

    _vehicle addEventHandler ["GetOut",{_this call DZAI_airLanding;}];    //Converts AI crew to ground AI units.

    _vehicle addEventHandler ["HandleDamage",{_this call DZAI_hHandleDamage}];

} else {

    _vehicle addEventHandler ["Killed",{_this call DZAI_vehDestroyed;}];

    _vehicle addEventHandler ["HandleDamage",{_this call DZAI_vHandleDamage}];

};

_objectID = str(round(random 999999));

_vehicle setVariable ["ObjectID", _objectID, true];

_vehicle setVariable ["ObjectUID", _objectID, true];

PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_vehicle];

 

//Setup group and crew

0 = [_driver,_weapongrade] call DZAI_setSkills;

0 = [_driver,_weapongrade] call DZAI_setupLoadout;

_driver setVariable ["unithealth",[(DZAI_baseBlood + (random DZAI_bonusBlood)),0,false]];

_driver setVariable ["unconscious",false];

_driver setVariable ["bodyName",(name _driver)];

if (!(_driver hasWeapon "NVGoggles")) then {

    _nvg = _driver call DZAI_addTempNVG;

};

_driver addEventHandler [DZAI_healthType, DZAI_healthStatements];

_driver assignAsDriver _vehicle;

_driver setVariable ["isDriver",true];

_unitGroup selectLeader _driver;

 

_cargoSpots = _vehicle emptyPositions "cargo";

for "_i" from 0 to ((_cargoSpots min _maxCargoUnits) - 1) do {

    _cargo = _unitGroup createUnit [(DZAI_BanditTypes call BIS_fnc_selectRandom2), [0,0,0], [], 1, "NONE"];

    [_cargo] joinSilent _unitGroup;

    0 = [_cargo,_weapongrade] call DZAI_setSkills;

    0 = [_cargo,_weapongrade] call DZAI_setupLoadout;

    _cargo setVariable ["unithealth",[(DZAI_baseBlood + (random DZAI_bonusBlood)),0,false]];

    _cargo setVariable ["unconscious",false];

    _cargo setVariable ["bodyName",(name _cargo)];

    if (!(_cargo hasWeapon "NVGoggles")) then {

        _nvg = _cargo call DZAI_addTempNVG;

    };

    _cargo addEventHandler [DZAI_healthType, DZAI_healthStatements];

    _cargo assignAsCargo _vehicle;

    _cargo moveInCargo [_vehicle,_i];

};

if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Spawned %1 cargo units for %2 vehicle %3.",(_cargoSpots min _maxCargoUnits),_unitGroup,_vehicleType]};

    

for "_i" from 0 to ((_turretCount min _maxGunnerUnits) - 1) do {

    _gunner = _unitGroup createUnit [(DZAI_BanditTypes call BIS_fnc_selectRandom2), [0,0,0], [], 1, "NONE"];

    [_gunner] joinSilent _unitGroup;

    0 = [_gunner,_weapongrade] call DZAI_setSkills;

    0 = [_gunner,_weapongrade] call DZAI_setupLoadout;

    _gunner setVariable ["unithealth",[(DZAI_baseBlood + (random DZAI_bonusBlood)),0,false]];

    _gunner setVariable ["unconscious",false];

    _gunner setVariable ["bodyName",(name _gunner)];

    if (!(_gunner hasWeapon "NVGoggles")) then {

        _nvg = _gunner call DZAI_addTempNVG;

    };

    _gunner addEventHandler [DZAI_healthType, DZAI_healthStatements];

    _gunner assignAsGunner _vehicle;

    _gunner moveInTurret [_vehicle,[_i]];

};

if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Spawned %1 gunner units for %2 vehicle %3.",(_turretCount min _maxGunnerUnits),_unitGroup,_vehicleType]};

 

_unitGroup allowFleeing 0;

_unitGroup setBehaviour "AWARE";

_unitGroup setSpeedMode "NORMAL";

_unitGroup setCombatMode "YELLOW";

 

_unitType = if (_isAirVehicle) then {"air"} else {"land"};

_unitGroup setVariable ["unitType",_unitType];

_unitGroup setVariable ["weapongrade",_weapongrade];

_unitGroup setVariable ["assignedVehicle",_vehicle];

_unitGroup setVariable ["isArmed",_isArmed];

(units _unitGroup) allowGetIn true;

 

//If vehicle is air type and unarmed, check if user config has weapons specified.

if (_isAirVehicle && {!_isArmed}) then {

    _index = (DZAI_airWeapons select 0) find _vehicleType;

    if (_index > -1) then {

        _vehWeapon = (DZAI_airWeapons select 1) select _index;

        if ([_vehWeapon,"weapon"] call DZAI_checkClassname) then {

            _vehicle addWeapon _vehWeapon;

            _vehMag = getArray (configFile >> "CfgWeapons" >> _vehWeapon >> "magazines") select 0;

            _vehicle addMagazine _vehMag;

            if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Added weapon %1 and ammo %2 to AI %3 (Group: %1).",_vehWeapon,_vehMag,_vehicleType,_unitGroup]};

        };

    };

};

 

_rearm = [_unitGroup,_weapongrade] spawn DZAI_autoRearm_group;    //start group-level manager

//if (daytime < 6 or {daytime > 20}) then {_vehicle action ["lightOn", _vehicle]};

 

if (_isAirVehicle) then {

    //Set initial waypoint and begin patrol

    [_unitGroup,0] setWaypointType "MOVE";

    [_unitGroup,0] setWaypointTimeout [0.5,0.5,0.5];

    [_unitGroup,0] setWaypointCompletionRadius 200;

    [_unitGroup,0] setWaypointStatements ["true","[(group this)] spawn DZAI_heliDetectPlayers;"];

 

    _waypoint = _unitGroup addWaypoint [_vehSpawnPos,0];

    _waypoint setWaypointType "MOVE";

    _waypoint setWaypointTimeout [3,6,9];

    _waypoint setWaypointCompletionRadius 150;

    _waypoint setWaypointStatements ["true","[(group this)] spawn DZAI_heliRandomPatrol;"];

 

    [_unitGroup] spawn DZAI_heliRandomPatrol;

    //if (DZAI_heliReinforceChance > 0) then {_oncall = [_vehicle,_unitGroup] spawn DZAI_heliOnCall}; //helicopter listen for reinforcement summons

    _vehicle flyInHeight 125;

    

    if ((!isNull _vehicle) && {!isNull _unitGroup}) then {

        DZAI_curHeliPatrols = DZAI_curHeliPatrols + 1;

        if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Created AI helicopter crew group %1 is now active and patrolling.",_unitGroup];};

    };

} else {

    //Set initial waypoint and begin patrol

    [_unitGroup,0] setWaypointType "MOVE";

    [_unitGroup,0] setWaypointTimeout [5,10,15];

    [_unitGroup,0] setWaypointCompletionRadius 150;

    [_unitGroup,0] setWaypointStatements ["true","[(group this)] spawn DZAI_vehPatrol;"];

    [_unitGroup] spawn DZAI_vehPatrol;

 

    if ((!isNull _vehicle) && {!isNull _unitGroup}) then {

        DZAI_curLandPatrols = DZAI_curLandPatrols + 1;

        if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Created AI land vehicle crew group %1 is now active and patrolling.",_unitGroup];};

    };

};

 

if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: Created AI vehicle patrol at %1 with vehicle type %2 with %3 crew units.",_vehSpawnPos,_vehicleType,(count (units _unitGroup))]};

 

true

 

время очистки менял -DZAI_cleanupDelay   -  DZAI_respawnTMinL- не помогло

рпт в момент удаления техники покажите

возможно работает стандартный скрипт удаления техники с плохим ID

if (_isNotOk) exitWith { deleteVehicle _object; diag_log(format["Deleting object %1 with invalid ID at pos [%2,%3,%4]",typeOf _object,_object_position select 0,_object_position select 1, _object_position select 2]); };

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

рпт в момент удаления техники покажите

возможно работает стандартный скрипт удаления техники с плохим ID

if (_isNotOk) exitWith { deleteVehicle _object; diag_log(format["Deleting object %1 with invalid ID at pos [%2,%3,%4]",typeOf _object,_object_position select 0,_object_position select 1, _object_position select 2]); };

1:52:08 "DZAI Cleanup: Cleaned up 6 dead units and 2 destroyed vehicles."

 

Забрал у ботов 2 авто, с разницей в 5 мин, удалились одновременно через 25 мин.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Создайте аккаунт или войдите в него для комментирования

Вы должны быть пользователем, чтобы оставить комментарий

Создать аккаунт

Зарегистрируйтесь для получения аккаунта. Это просто!


Зарегистрировать аккаунт

Войти

Уже зарегистрированы? Войдите здесь.


Войти сейчас

  • Похожие публикации

    • Автор: BorizzK
      Дружбан ваяет тягач/грузовик и тп
      Он довольно большой и фургон/кузов загораживает обзор + ему надо было разглядеть подвеску в работе поподробней
      Те камеру надо было отодвинуть
      Поскольку бегемоты, то ли по глупости, то ли по скудоумию (скорее оба варианта ), в конфиге модели не предусмотрели таких параметров как
      дистанция камеры, углы ее наклона итд итп, а сделали это тупо в скрипте, пришлось моддидь.
       
      Вариант моддинга внешней (от 3го лица) камеры автомобильчика, как обычно через класс, но моддим конструктор (без override). Я не стал изобретать велосипед и поступил по "серверному"... Вроде получилось и все работает как надо. Зил кажет нормально, остальные то же.
       
      modded class DayZPlayerCamera3rdPersonVehicle extends DayZPlayerCameraBase { void DayZPlayerCamera3rdPersonVehicle (DayZPlayer pPlayer, HumanInputController pInput) { Print("CLIENT: КАМЕРА ДЛЯ ТОЧИЛЫ: ИГРОК: " + pPlayer.ToString() + ", ТОЧИЛА: " + pPlayer.GetCommand_Vehicle().GetTransport().GetType()); if (pPlayer.GetCommand_Vehicle().GetTransport().GetType() == "ZIL130") { m_fDistance = 8.0; //дистанция m_CameraOffsetMS = "0.0 1.3 0.0"; //стартовый наклон камеры Print("CLIENT: КАМЕРА ДЛЯ ТОЧИЛЫ: МОЯ КРУТАЯ ТОЧИЛА: ДИСТАНЦИЯ КАМЕРЫ: " + m_fDistance); return; } m_fDistance = 4.0; //стандартная дистанция m_CameraOffsetMS = "0.0 1.3 0.0"; //стартовый наклон камеры Print("CLIENT: КАМЕРА ДЛЯ ТОЧИЛЫ: СТАНДАРТНАЯ ТОЧИЛА: ДИСТАНЦИЯ КАМЕРЫ: " + m_fDistance); } }  
      Понятно что это для клиента (ну те для обычного мода) и на сервере бесполезно.
       
      Фото с тестового грузовика из АРМА 3 мод. свои он пока просил не показывать

      Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.

      Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.
    • Автор: 123new
      В данной теме напишу простенький гайд о том, как самому на своем собственном сервере DayZ установить костомный (мой) скрипт на спавн, респавн и чистку транспорта.
       
      Гайд пригодится тем, кто сам делает свою сборку сервера, либо по каким-то причинам пользуется не моей сборкой сервера (где это уже сделано), а чьей-либо еще. Обращаю ваше внимание на тот факт, что часть файлов, описанных в гайде, у вас могут уже быть вынесены в другое место или названы несколько иначе (это зависит от сборки сервера, которую вы используете, например, в сборке dankdayz вся mpmissions вынесена в отдельный файл в addons сервера), гайд основывается на чистых серверных файлах игры и отталкивается от них.
      Гайд сделан для версий игры с серверной частью 0.60-0.62, но может быть совместим и с другими версиями игры, если файлы серверной части игры не поменяли своего текущего месторасположения и содержания. Гайд составлен по версии серверных файлов игры 0.62 чистой "девственной" и не правленой никем версии игры.
      Напоминаю заранее, в моих серверных файлах версий 0.60, 0.61 и 0.62 из моих гайдов на данном форуме это уже сделано и делать это не нужно!!!

      Нам понадобятся:
      1. Notepad++ https://notepad-plus-plus.org/download/
      2. Ваши серверные файлы игры
       
      И так, приступим.
      1. Первое, что нам понадобится - создать сам скрипт. Создаем по пути: "MPMissions\dayz_Auto.ChernarusPlus\"  папку "scripts" , в ней папку "custom"  , и в ней файл с именем "SpawnCars.sqf" . Если такие папки у вас уже имеются, просто не создавайте их, а перейдите в них. Если файл с там именем уже имеется у вас, задайте ему другое имя.
      2. Вписываем в созданный файл код следующего содержания (либо скачайте его):
      Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.
      diag_log format [" SpawnCar: Reading Settings ..."]; /* Car Spawner for DayZ Standalone v 0.60.133.913 and high versions author: 123new Thanks for help: user BorizzK from s-platoon.ru for help and tests parts script and all community for this. Install: .\mpmissions\init.sqf Add in end file: init_spawn_cars = compile preprocessFileLineNumbers "scripts\custom\SpawnCars.sqf"; Call init_spawn_cars; and place this script file in: .\mpmissions\{your mission name}\scripts\custom\SpawnCars.sqf WARNING: add after string: dbInitEconomy CAUTION: When you are on the spawn cars in the game server with version 0.60 and higher (0.61 and 0.62 version it blocks events.xml) the transport can be re-spelled and re-spelled by the server itself, regardless of the script. For correct operation it is highly recommended to disable the official transport spawn! Info about script: This script will scan the server database for the specified transport types, push it to the server along with its parts in case of shortage, and clean the destroyed vehicles. A first massives - details for car (all details will be spawned) A second massives - possible spawn points of the technique (the spawn point will be selected randomly) A third (end) massive - configuration: specify the number of cars on writed type, a list of possible spawn points car for writed type and massive from first block with parts car. Settings format: A first massives: [count loot,type loot] A second massives: [(coordinate x),(coordinate y),(coordinate z)] A third (end) massive: [max count this type car, type car(classname) or massive types car for random select, selected second massive name, selected first massive name] If add after in 'A third (end) massive' 5 and more massives elements with details car, script will be select random details. */ // MAIN SETTINGS _enable_detect_old_ruined_cars = true; // Enable detect old ruined cars in server and delete him _enable_detect_old_cars_in_point_spawn_in_meters = true; // Enable detect old cars in point spawn in writed meters and secure him for spawn new car _meters_check_old_car_in_point_spawn = 10; // How many meters for chack old car in point spawn - wored only with _enable_detect_old_cars_in_point_spawn_in_meters = true - not recommend set up more 15 meters _check_damage_for_delete_ruined_car = 1; // How many damage for object car for delete him from server (for set up min 0.1 max 1) - wored only with _enable_detect_old_ruined_cars = true /////////////////////////// ---> A first massives <--- /////////////////////////// // (count this detail in vehicle),(type detail vehicle) _items_car_Volga = [ [4,"CivSedanWheel"], [1,"CivSedanDoors_Driver"], [1,"CivSedanDoors_CoDriver"], [1,"CivSedanDoors_BackLeft"], [1,"CivSedanDoors_BackRight"], [1,"CivSedanHood"], [1,"CivSedanTrunk"], [1,"CarRadiator"], [1,"CarBattery"], [1,"SparkPlug"], [2,"HeadlightH7"] ]; _items_car_Niva = [ [4,"HatchbackWheel"], [1,"HatchbackDoors_Driver"], [1,"HatchbackDoors_CoDriver"], [1,"HatchbackHood"], [1,"HatchbackTrunk"], [1,"CarRadiator"], [1,"CarBattery"], [1,"SparkPlug"], [1,"HeadlightH7"] ]; _items_car_Bus = [ [2,"TransitBusWheel"], [2,"TransitBusWheelDouble"], [1,"TruckBattery"], [1,"GlowPlug"], [1,"TruckRadiator"], [1,"LightBulb"], [1,"EngineBelt"] ]; _items_car_V3S = [ [4,"V3SWheel"], [4,"V3SWheelDouble"], [1,"V3SDoors_Driver"], [1,"V3SDoors_CoDriver"], [1,"V3SHood"], [1,"TruckBattery"], [2,"LightBulb"], [1,"EngineBelt"], [1,"HeadlightH7"] ]; _items_car_V3S_Blue = [ [4,"V3SWheel"], [4,"V3SWheelDouble"], [1,"V3SDoors_Driver_Blue"], [1,"V3SDoors_CoDriver_Blue"], [1,"V3SHood_Blue"], [1,"TruckBattery"], [2,"LightBulb"], [1,"EngineBelt"], [1,"HeadlightH7"] ]; _items_car_V3S_Grey = [ [4,"V3SWheel"], [4,"V3SWheelDouble"], [1,"V3SDoors_Driver_Grey"], [1,"V3SDoors_CoDriver_Grey"], [1,"V3SHood_Grey"], [1,"TruckBattery"], [2,"LightBulb"], [1,"EngineBelt"], [1,"HeadlightH7"] ]; _items_car_V3S_Orange = [ [4,"V3SWheel"], [4,"V3SWheelDouble"], [1,"V3SDoors_Driver_Orange"], [1,"V3SDoors_CoDriver_Orange"], [1,"V3SHood_Orange"], [1,"TruckBattery"], [2,"LightBulb"], [1,"EngineBelt"], [1,"HeadlightH7"] ]; /////////////////////////// ---> A second massives <--- /////////////////////////// // massives points spawn for vehicles _points_car_Volga = [ [10493.7,2348.17,0], [10150.7,1810.41,0], [11986.2,3839.67,0], [12883.2,6259.25,0], [12937.6,10185.7,0], [13845.8,13216.7,0], [4163.03,11104.75,0], [5954.25,10366.5,0], [3751.32,8858.37,0], [3048.92,7787.31,0], [2583.23,5073.8,0], [2654.09,5289.31,0] ]; _points_car_Niva = [ [13891.7,13425.6,0], [11262.4,12212.2,0], [4794.11,2539.87,0], [10740.4,10788.2,0], [10661.3,7994.43,0], [6063.77,7871.36,0], [4519.95,8291.32,0], [2182.85,3307.73,0], [3658.2,2194.58,0], [6855.9,2471.24,0], [6565.1,2547.52,0], [4262.06,11235,0], [6255.8,3256.48,0], [6682.32,3580.23,0], [13785.5,2930.17,0] ]; _points_car_Bus = [ [12275.8,9123.41,0], [11885.6,12469.2,0], [7185,7675.18,0], [4795.56,10250.1,0], [2716.53,10031.4,0], [2589.18,6355.03,0], [1672.24,3843.93,0], [1878.72,2254.03,0], [4334.19,2462.08,0], [5691.65,2579.14,0], [7805.4,3534.9,0], [12238.9,12635,0] ]; _points_car_V3S = [ [4767.29,9594.32,0], [13980.3,2931.02,0], [12238.9,12635,0], [12229.7,12590.2,0], [7216.52,7755.26,0], [3711.64,5969.98,0], [4392.4,10510.4,0], [1741.44,7930.12,0], [5590.24,2699.39,0] ]; /////////////////////////// ---> A third (end) massive <--- /////////////////////////// // (max count vehicles this type in server),(type vehicle or massive types for random select),(massive coords for spawn vehicle),(massive items for this car) // If add 5 and more massives elements with details car, script will be select random details. _types_car_V3S = ["V3S_Cargo_Orange","V3S_Cargo_Blue","V3S_Cargo_Grey","V3S_Cargo"]; /// massive types cars for random select _types_car_V3S_Chassis = ["V3S_Chassis_Orange","V3S_Chassis_Blue","V3S_Chassis_Grey","V3S_Chassis"]; /// massive types cars for random select _CarsSpawnConfig = [ [10,"CivilianSedan", _points_car_Volga, _items_car_Volga], [12,"TransitBus", _points_car_Bus, _items_car_Bus], [7,"OffroadHatchback", _points_car_Niva, _items_car_Niva], [4,_types_car_V3S, _points_car_V3S, _items_car_V3S,_items_car_V3S_Blue,_items_car_V3S_Grey,_items_car_V3S_Orange], [5,_types_car_V3S_Chassis, _points_car_V3S, _items_car_V3S,_items_car_V3S_Blue,_items_car_V3S_Grey,_items_car_V3S_Orange] ]; { if ((count _x) > 4) then { _rand = floor (random ((count _x) - 1)); while {(_rand < 4)} do { _rand = floor (random ((count _x) - 1)); }; _selected_items_car = _x select _rand; }; } foreach _CarsSpawnConfig; //////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////// ---> NEXT CODE DON'T EDIT <--- /////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////// diag_log format [" SpawnCar: Readed Settings! Start spawn car!"]; fnc_random_int_select = { private["_min","_max","_rand"]; _min = _this select 0; _max = _this select 1; _rand = round (random _max); if ((_rand < _min) or (_rand > _max)) then { while {(_rand < _min) or (_rand > _max)} do { _rand = round (random _max); }; }; _rand }; _massive_writed_alltypes_cars = []; _massive_writed_allcoords_cars = []; fnc_spawnCar = { _SelectedLine = _this; _selected_count_car = _this select 0; _selected_type_car = _this select 1; _selected_points_car = _this select 2; _selected_items_car = _this select 3; _count_incar_loot = 0; _count_aroundcar_loot = 0; _count_selected_type_car_in_server = 0; _count_selected_type_car_in_server = 0; if((typeName _selected_type_car) == "ARRAY") then { { _count_selected_type_car_in_server = _count_selected_type_car_in_server + (count (allMissionObjects _x)); } forEach _selected_type_car; diag_log format [" SpawnCar: %2 old cars of types '%1' has been detected on the server",_selected_type_car,_count_selected_type_car_in_server]; } else { _count_selected_type_car_in_server = count (allMissionObjects _selected_type_car); diag_log format [" SpawnCar: %2 old cars of type '%1' has been detected on the server",_selected_type_car,_count_selected_type_car_in_server]; }; if (_enable_detect_old_cars_in_point_spawn_in_meters) then { _temp_selected_points_car = _selected_points_car; { _selected_point_car = _x; { if (((typeOf _x) in _massive_writed_alltypes_cars) && (_selected_point_car in _massive_writed_allcoords_cars)) then { if (count _selected_points_car > 0) then { _selected_points_car = _selected_points_car - [_selected_point_car]; diag_log format [" SpawnCar: Detected previously spawned car in server: type '%1' at position %2 - point spawn %3 deleted from list spawn this type!",(typeOf _x),(getPos _x),_selected_point_car]; } else { diag_log format [" SpawnCar: Detected previously spawned car in server: type '%1' at position %2 - point spawn %3 can't be deleted from list spawn this type because spawnpoints this type allready <= 0!",(typeOf _x),(getPos _x),_selected_point_car]; }; }; } forEach (_selected_point_car nearObjects _meters_check_old_car_in_point_spawn); } forEach _temp_selected_points_car; }; if (_count_selected_type_car_in_server < _selected_count_car) then { _selected_count_car = _selected_count_car - _count_selected_type_car_in_server; if((typeName _selected_type_car) == "ARRAY") then { diag_log format [" SpawnCar: Required spawn %2 cars of type list '%1'",_selected_type_car,_selected_count_car]; } else { diag_log format [" SpawnCar: Required spawn %2 cars of type '%1'",_selected_type_car,_selected_count_car]; }; if (count _selected_points_car > 0) then { for "_j" from 1 to _selected_count_car do { _car_in_server = NULL; if (count _selected_points_car > 0) then { _selected_type_car_for_spawn = ""; if((typeName _selected_type_car) == "ARRAY") then { _selected_type_car_for_spawn = _selected_type_car select ([0,(count _selected_type_car)-1] call fnc_random_int_select); } else { _selected_type_car_for_spawn = _selected_type_car; }; if ((count _SelectedLine) > 4) then { _selected_items_car = _SelectedLine select ([3,(count _SelectedLine)-1] call fnc_random_int_select); diag_log format [" SpawnCar: Selected for next car massive details: %1 ",_selected_items_car]; }; _selected_point_car = _selected_points_car select ([0,(count _selected_points_car)-1] call fnc_random_int_select); _car_in_server = createvehicle [_selected_type_car_for_spawn, _selected_point_car, [], 0, "CAN_COLLIDE"]; if !(isNull _car_in_server) then { _selected_points_car = _selected_points_car - [_selected_point_car]; _car_in_server setDir floor(random 360); _selected_name_car = (displayName _car_in_server); _originalPos = getPosATL _car_in_server; _Damage = random 0.7; _map_pos_car = mapGridPosition _car_in_server; { _count_sel_loot = _x select 0; _type_sel_loot = _x select 1; for [{_i = 0}, {_i < _count_sel_loot}, {_i = _i + 1}] do { _loot_car = NULL; _loot_car = _car_in_server createInInventory _type_sel_loot; if (isNull _loot_car) then { _loot_car = createvehicle [_type_sel_loot, _originalPos, [], 5, "CAN_COLLIDE"]; if ((floor(random 4)) >= 2) then { _Damage_loot = random 0.7; _loot_car setDamage _Damage_loot; }; _count_aroundcar_loot = _count_aroundcar_loot + 1; } else { _count_incar_loot = _count_incar_loot + 1; }; }; } foreach _selected_items_car; diag_log format [" SpawnCar: Spawned %1 in %2 with %3 loot in Car and %4 loot around car ",_selected_name_car,_map_pos_car,_count_incar_loot,_count_aroundcar_loot]; } else { diag_log format [" SpawnCar: Type car '%1' is not spawned in server, because when i try spawn car in point '%2' exist errors!",_selected_type_car_for_spawn,_selected_point_car]; }; } else { if((typeName _selected_type_car) == "ARRAY") then { diag_log format [" SpawnCar: Random type car from array '%1' is not can be spawned in server, because setuped count cars this types > possible count points spawn this type!",_selected_type_car]; } else { diag_log format [" SpawnCar: Type car '%1' is not can be spawned in server, because setuped count cars this type > possible count points spawn this type!",_selected_type_car]; }; }; }; } else { if((typeName _selected_type_car) == "ARRAY") then { diag_log format [" SpawnCar: Spawn car from type list '%1' is not possible because not have possible points to spawn.",_selected_type_car]; } else { diag_log format [" SpawnCar: Spawn car type(s) '%1' is not possible because not have possible points to spawn.",_selected_type_car]; }; }; } else { if((typeName _selected_type_car) == "ARRAY") then { diag_log format [" SpawnCar: Random type car from array '%1' is not need spawn in server, because cars this types allready is max (or more max) in server!",_selected_type_car]; } else { diag_log format [" SpawnCar: Type car '%1' is not need spawn in server, because this cars allready is max (or more max) in server!",_selected_type_car]; }; }; }; if (_enable_detect_old_ruined_cars) then { _deleted_ruined_Cars = 0; { if (damage _x == _check_damage_for_delete_ruined_car) then { deleteVehicle _x; _deleted_ruined_Cars = _deleted_ruined_Cars + 1; }; } forEach (allMissionObjects "Car"); if (_deleted_ruined_Cars > 0) then { diag_log format [" SpawnCar: Deleted %1 old ruined cars from server",_deleted_ruined_Cars]; }; }; if (_enable_detect_old_cars_in_point_spawn_in_meters) then { { if((typeName(_x select 1)) == "ARRAY") then { { if (!(_x in _massive_writed_alltypes_cars)) then { _massive_writed_alltypes_cars = _massive_writed_alltypes_cars + [_x]; }; } foreach (_x select 1); } else { if (!((_x select 1) in _massive_writed_alltypes_cars)) then { _massive_writed_alltypes_cars = _massive_writed_alltypes_cars + [(_x select 1)]; }; }; { if (!(_x in _massive_writed_allcoords_cars)) then { _massive_writed_allcoords_cars = _massive_writed_allcoords_cars + [_x]; }; } foreach (_x select 2); } foreach _CarsSpawnConfig; }; { _x call fnc_spawnCar; } foreach _CarsSpawnConfig; 3. Создаем по пути: "MPMissions\dayz_Auto.ChernarusPlus\"  папку "scripts" , и в ней файл с именем "compiles.sqf" . Если такая папка у вас уже имеются, просто не создавайте ее,  а перейдите в нее. Если файл с там именем уже имеется у вас, то не создавайте его, а допишите информацию со следующего пункта инструкции в конец файла!
      4. Вставляем в файл следующую строку:
      init_spawn_cars = compile preprocessFileLineNumbers "scripts\custom\SpawnCars.sqf"; 5. Открываем по указанному далее пути файл в "Notepad++": "MPMissions\dayz_Auto.ChernarusPlus\init.sqf". Находим в файле строки с
      call compile preprocessFileLineNumbers 5. Вставляем после всех "call compile preprocessFileLineNumbers" следующее:
      call compile preprocessFileLineNumbers "scripts\compiles.sqf"; _Enable_SPAWNER_CARS = true; // Кастомный скрипт спавна транспорта (true - включить, false - выключить) 6. В этом же файле находим строки:
      simulWeatherSync; dbInitEconomy [true]; setTimeForScripts 0.03; 7. Добавляем после них:
      if (_Enable_SPAWNER_CARS) then { Call init_spawn_cars; }; Вот и все.
       
      ВАЖНО:
      Перед активацией скрипта отключите официальный спавнер транспорта сервера из официальной системы сервера игры. Инструкция есть тут:
       
      Как вы уже догадались, этой строкой мы можем включить или отключить сам кастомный скрипт без долгого копания в коде.
      _Enable_SPAWNER_CARS = false; // Кастомный скрипт спавна транспорта (true - включить, false - выключить) Все настройки по спавну транспорта есть в самом файле скрипта, который в п. 2 инструкции вы и создавали. Надеюсь, сложности с его настройкой не возникнет, пояснения там имеются.
    • Автор: Jdinovich
      Как-то мне надоели патрули и я в basiq.cfg сменил значение true на false. теперь же когда я захотел их вернуть,думаю поменяю значение и все. Но когда я сменил false на true при загрузке на сервер у меня стала постоянное "ожидание идентификации сервером"
    • Автор: buka
      Всем здорова, значит сервер 1.9.0  почти чистый, приват базы и пару ботов на этих базах заспавненые в миссии, Играть скучновато, да и вообще на старых версиях всегда DZAI боты стояли... но на прошлой версии и на этой так и не могу победить, делаю по гайду, леплю строчку как написано, но инициализации нет, в логе тишина, ровно как и в игровом процессе, не знаю куда рыть уже, далее. Так втрое, переделывал скрипт авиа поддержки, всё работало ровно на тех же версиях что и DZAI, там для старых версий кто в курсе помнит нужно было еще дополнительно изменить строку в server_cleanup.sqf иначе техника взрывалась при спавне... (ботовская) ну и собственно в этой же строке я убирал дамаг на заспавниную технику миссией... сейчас я не могу найти где это в коде, техника взрывается после появления через 10 сек, очень жаль потому как скрипт выдался не плохой.И третье, очень много старых полезных скриптов просто недоступны, срок хранения их на серверах истёк и ссылки битые, у кого есть скрипт вырубания травы топором??? помню такой был мелкий...
    • Автор: notani
      Привет всем. Пропадает техника после рестарта. Техника с замком, купленная и взятая с миссий и отбитая у патруля. Подскажите, как и где что поправить что б не пропадала техника?