Jump to content

dimitri_harkov

Member
  • Content Count

    812
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by dimitri_harkov


  1. I'm sorry, I couldn't find the old scripts.

    They would have been heavily dependent on RHS stuff anyway.

    But I mashed together a quick and dirty proof of concept.

    It concentrates on the range issue mostly.

    I have a loop based on the position of a 'radar vehicle' that checks for air vehicles within the chosen 'radar range'.

    If there is one, he starts a seperate loop for one of the SAM launchers:

    This loop:

    1- reveals the target to the SAM (reveal command)

    2- and commands the gunner to aim at the target (commandTarget command)

    3- wait for a reasonable period (so the SAM can actually point at the target) until...

    4- you force the SAM to shoot at the target (fireAtTarget command)

    This most simple approach works pretty well.

    You just have to make sure that the SAMs are not ordered to shoot faster than they can reload.

    It's hard to see that it REALLY makes a difference with the Tunguska, but the KRUG usually kills targets 25+ km (!) away.

    The radar loop stops once the radar is destroyed.

    If that happens, you can either remove the SAMs' magazines as eggbeast proposed.

    Or you can have a seperate loop that checks if fired rockets still have a lock.

    If not, replace the rockets with a new one on the same spot where they are at the moment. They replacement will spawn without any kind of target info and will just keep flying straight, most probably hitting nothing (EDIT: If I remember correctly, this was connected to an 'IncomingMissile' EH in the original script, to make it a bit easier).

    I'd also recommend making the SAM units as 'blind' as possible, making it difficult for them to acquire targets on their own.

    Cheers,

    D.


  2. Thank you SnakeTheFox for your nice comments :)

    As Foxy already pointed out, we had no problem with the HIP - ASR_AI combo during our tests.

    Indeed, I took the greatest care to ensure compatibility wherever possible, because I'm a great fan of ASR_AI too.

    Still, HIP as a team can not gurantee that HIP runs with any 3rd party mods, as we can not control their development.

    However, I just had a short firefight with ASR_AI enabled and it seems it runs as flawless as ever :)

    Here are my ASR_AI settings I use for most missions, maybe they are of use for you. I have turned off/tweaked some things where I was not sure if they might cause trouble:

    class asr_ai {

    version = 6; // will increment this when structure changes

    class sys_airearming {

    feature = 1; // All the other settings of this class matter only if we have 1 here

    run = 1; // Enable rearming at mission start

    radius = 50; // Rearming search radius - how far will AI go to grab stuff

    civ = 0; // Civilians will try to arm themselves

    sidearm = 1; // Units will take handguns

    binocs = 1; // Units will take binoculars

    // List of secondary weapons that any unit may take. Other launchers not in this list will only be picked by specialists

    launchers[] = {

    "M136","RPG18","cwr2_AT4","cwr2_LAW","cwr2_RPG75",

    "ACE_M136_CSRS","ACE_M72A2","ACE_M72","ACE_RPG22","ACE_RPG27","ACE_RPOM","ACE_RSHG1","ACE_RMG"

    };

    // List of frag grenades that units will look for

    grenades[] = {

    "HandGrenade","HandGrenade_West","HandGrenade_East","BAF_L109A1_HE","ACE_DM51","ACE_DM51A1"

    };

    // List of smoke grenades that units will look for

    smokes[] = {

    "SmokeShell","SmokeShellRed","SmokeShellGreen","SmokeShellYellow","SmokeShellPurple","SmokeShellBlue","SmokeShellOrange",

    "ACE_M34","ACE_RDG2","ACE_RDGM","ACE_DM25","ACE_DM31","ACE_DM32","ACE_DM33","ACE_DM34","ACE_DM36","ACE_M15"

    };

    };

    class sys_aiskill {

    feature = 1; // All the other settings of this class matter only if we have 1 here

    civ = 0; // Enable advanced skills for civilians

    radionet = 1; // AI groups share known enemy locations over radio

    radiorange = 500; // Maximum range for radios

    nightspotting = 0.3; // Spotting range night reduction coefficient

    gunshothearing = 1; // Gunshot hearing range coefficient (applied to shooter's weapon sound range; 0 will disable the feature)

    buildingSearching = 0.7; // Chance the AI group will search nearby buildings when in combat mode (0 to 1 values, 0 will disable the feature)

    buildingSearchingAlwaysUp = 1; // Prefer UP stance (value: 1) when doing the house search or let AI choose automatically (value: 0)

    throwsmoke = 0.3; // AI throws smoke when hit (set 0 to disable or a number up to 1 to enable, higher number means better chance to do it)

    join_loners = 0; // Groups left with only one unit merge with nearest group of the same side or faction (1-enabled, 0-disabled)

    join_loners_sameFaction = 0; // Single units will only join groups of the same faction, if join_loners = 1 above (1-faction, 0-side)

    serverdvd = 1; // Dynamic dedicated server viewdistance adjustment

    setskills = 1; // Configure AI skills based on their unit type (faction, training etc.)

    recoilMod = 1; // Lower recoil when using MGs; also increased recoil for wounded AI (1-enabled, 0-disabled)

    stayLow = 1; // Units using MG, AR or sniper should fight from prone position and the others crouch more (1-enabled, 0-disabled)

    split_legged = 0; // Units unable to walk for this time will separate from their group to prevent slowing it down (time in seconds, set 0 to disable)

    reactions[] = {1,1,0}; // Infantry groups will randomly react with basic, scripted, random actions, to detecting the enemy or being shot at; format: {enableAttack,enableDefend,enableSupport}

    auto_srrs = 0; // Auto-enable BIS Surrendering module (1-enabled, 0-disabled)

    radionet_debug = 0; // Log info sharing to RPT (1-enabled, 0-disabled)

    setskills_debug = 0; // Log skill assignments to RPT (1-enabled, 0-disabled)

    gunshothearing_debug = 0; // Gunshot hearing debug: shows a hint with max range the AI will detect the shots fired by player (1-enabled, 0-disabled)

    /*

    Units are classified into skill sets between 1 and 10

    By default, a lower level number means a better skilled unit

    Levels 8-10 are special:

    - 8-9 are for pilots, very good by default, but some of their skills are now automatically reduced when they leave the aircraft (accuracy, courage)

    - 10 is for trained snipers

    */

    class sets {

    // only classes of arrays under this

    class level_0 { // perfect (only used for testing)

    aimingAccuracy[] = {1.00, 0.00};

    aimingShake[] = {1.00, 0.00};

    aimingSpeed[] = {1.00, 0.00};

    spotDistance[] = {1.00, 0.00};

    spotTime[] = {1.00, 0.00};

    endurance[] = {1.00, 0.00};

    courage[] = {1.00, 0.00};

    reloadSpeed[] = {1.00, 0.00};

    commanding[] = {1.00, 0.00};

    general[] = {1.00, 0.00};

    units[] = { // add class names to this to override their default (or inherited) skill set

    };

    };

    class level_1 { // sf 1

    aimingAccuracy[] = {0.40, 0.20}; // skilltype = {<min value>, <random value added to min>};

    aimingShake[] = {0.40, 0.20};

    aimingSpeed[] = {0.55, 0.20};

    spotDistance[] = {0.65, 0.30};

    spotTime[] = {0.40, 0.20};

    endurance[] = {0.80, 0.20};

    courage[] = {0.80, 0.20};

    reloadSpeed[] = {0.80, 0.20};

    commanding[] = {0.80, 0.20};

    general[] = {0.80, 0.20};

    units[] = {

    "sf_18d","sf_18c","sf_18z","sf_18b","sf_18e","sf_18a"

    };

    };

    class level_2 { // sf 2

    aimingAccuracy[] = {0.35, 0.20};

    aimingShake[] = {0.35, 0.20};

    aimingSpeed[] = {0.50, 0.20};

    spotDistance[] = {0.60, 0.30};

    spotTime[] = {0.35, 0.20};

    endurance[] = {0.70, 0.20};

    courage[] = {0.70, 0.20};

    reloadSpeed[] = {0.70, 0.20};

    commanding[] = {0.70, 0.20};

    general[] = {0.70, 0.20};

    units[] = {

    "ibr_mutant"

    };

    };

    class level_3 { // regular 1

    aimingAccuracy[] = {0.30, 0.20};

    aimingShake[] = {0.30, 0.20};

    aimingSpeed[] = {0.45, 0.20};

    spotDistance[] = {0.55, 0.30};

    spotTime[] = {0.30, 0.20};

    endurance[] = {0.60, 0.20};

    courage[] = {0.60, 0.20};

    reloadSpeed[] = {0.60, 0.20};

    commanding[] = {0.60, 0.20};

    general[] = {0.60, 0.20};

    units[] = {

    "bink_usmc_tl","bink_usmc_sl","bink_usmc_dmr","bink_usmc_scout","bink_usmc_scout_l","bink_usmc_tl_des","bink_usmc_sl_des","bink_usmc_dmr_des",

    "bink_usmc_scout_des","bink_usmc_scout_l_des",

    "rb_teamleader"

    };

    };

    class level_4 { // regular 2

    aimingAccuracy[] = {0.25, 0.20};

    aimingShake[] = {0.25, 0.20};

    aimingSpeed[] = {0.40, 0.20};

    spotDistance[] = {0.50, 0.30};

    spotTime[] = {0.25, 0.20};

    endurance[] = {0.50, 0.20};

    courage[] = {0.50, 0.20};

    reloadSpeed[] = {0.50, 0.20};

    commanding[] = {0.50, 0.20};

    general[] = {0.50, 0.20};

    units[] = {

    "ibr_bodyguard"

    };

    };

    class level_5 { // militia or trained insurgents, former regulars

    aimingAccuracy[] = {0.20, 0.20};

    aimingShake[] = {0.20, 0.20};

    aimingSpeed[] = {0.35, 0.20};

    spotDistance[] = {0.45, 0.30};

    spotTime[] = {0.20, 0.20};

    endurance[] = {0.40, 0.20};

    courage[] = {0.40, 0.20};

    reloadSpeed[] = {0.40, 0.20};

    commanding[] = {0.40, 0.20};

    general[] = {0.40, 0.20};

    units[] = {

    "ibr_arl_officer","ibr_arl_sniper","ibr_arl_sab"

    };

    };

    class level_6 { // civilians with some military training

    aimingAccuracy[] = {0.15, 0.20};

    aimingShake[] = {0.15, 0.20};

    aimingSpeed[] = {0.30, 0.20};

    spotDistance[] = {0.40, 0.30};

    spotTime[] = {0.15, 0.20};

    endurance[] = {0.30, 0.20};

    courage[] = {0.30, 0.20};

    reloadSpeed[] = {0.30, 0.20};

    commanding[] = {0.30, 0.20};

    general[] = {0.30, 0.20};

    units[] = {

    "ibr_rebel11","ibr_rebel22","ibr_rebel33","ibr_rebel44","ibr_rebel55","ibr_rebel66","ibr_rebel77","ibr_rebel83","ibr_rebel95","ibr_rebel102",

    "ibr_rebel111","ibr_rebel125","ibr_rebel132","ibr_rebel145","ibr_rebel151","ibr_rebel162","ibr_rebel173","ibr_rebel184","ibr_rebel195",

    "ibr_rebel206","ibr_rebel217",

    "ibr_arl_rif","ibr_arl_rif2","ibr_arl_mg","ibr_arl_ar","ibr_arl_at","ibr_arl_aa","ibr_arl_crew","ibr_arl_medic",

    "ibr_drg_man1","ibr_drg_man2","ibr_drg_man3","ibr_drg_man4","ibr_drg_man5","ibr_drg_man6","ibr_drg_man7"

    };

    };

    class level_7 { // civilians without military training

    aimingAccuracy[] = {0.10, 0.20};

    aimingShake[] = {0.10, 0.20};

    aimingSpeed[] = {0.25, 0.20};

    spotDistance[] = {0.35, 0.30};

    spotTime[] = {0.10, 0.20};

    endurance[] = {0.20, 0.20};

    courage[] = {0.20, 0.20};

    reloadSpeed[] = {0.20, 0.20};

    commanding[] = {0.20, 0.20};

    general[] = {0.20, 0.20};

    units[] = {

    "ibr_arl_stoner1","ibr_arl_stoner2","ibr_arl_stoner3","ibr_arl_stoner4","ibr_arl_stoner5","ibr_arl_stoner6","ibr_arl_stoner7"

    };

    };

    class level_8 { // pilot 1

    aimingAccuracy[] = {0.40, 0.20};

    aimingShake[] = {0.40, 0.20};

    aimingSpeed[] = {0.55, 0.20};

    spotDistance[] = {0.65, 0.30};

    spotTime[] = {0.40, 0.20};

    endurance[] = {0.60, 0.20};

    courage[] = {0.60, 0.20};

    reloadSpeed[] = {0.60, 0.20};

    commanding[] = {0.60, 0.20};

    general[] = {0.60, 0.20};

    units[] = {

    };

    };

    class level_9 { // pilot 2

    aimingAccuracy[] = {0.35, 0.20};

    aimingShake[] = {0.35, 0.20};

    aimingSpeed[] = {0.50, 0.20};

    spotDistance[] = {0.60, 0.30};

    spotTime[] = {0.35, 0.20};

    endurance[] = {0.50, 0.20};

    courage[] = {0.50, 0.20};

    reloadSpeed[] = {0.50, 0.20};

    commanding[] = {0.50, 0.20};

    general[] = {0.50, 0.20};

    units[] = {

    "ibr_arl_pilot"

    };

    };

    class level_10 { // sniper

    aimingAccuracy[] = {0.75, 0.20};

    aimingShake[] = {0.75, 0.20};

    aimingSpeed[] = {0.60, 0.20};

    spotDistance[] = {0.70, 0.30};

    spotTime[] = {0.75, 0.20};

    endurance[] = {0.70, 0.20};

    courage[] = {0.70, 0.20};

    reloadSpeed[] = {0.70, 0.20};

    commanding[] = {0.70, 0.20};

    general[] = {0.70, 0.20};

    units[] = {

    };

    };

    };//sets

    };//sys_aiskill

    };

    Cheers,

    D.


  3. I use to call the following function to get an array of radios the unit (_u) has:

    private ["_u","_ret"];
    
    _u = _this select 0;
    _ret = [];
    
    {
    if (getText(configFile >> "CfgWeapons" >> _x >> "simulation") == "ItemRadio") then {_ret = _ret + [_x];};
    } forEach weapons _u;
    
    _ret

    You can then cycle through the returned array and remove the radio(s) using the 'removeWeapon' command.

    There used to be a function quite like this in ACRE, but it is/was broken, that's why I used my own ever since.

    Cheers,

    D.


  4. Cao bang island - Can't do anything with this no source files and nobody able to crack it open and fix.

    M113 - No Mlods can't fix

    At least, you do not need any source files to add the airfield to Cao Bang. That's a pure config issue.

    I'm also pretty sure you can disable the turn out option on the M113 without an MLOD.

    Concerning ACE_compact: It would be great it this file would use a different key than the rest of Unsung indeed.

    Thx for response

    &

    Cheers,

    Dimitri


  5. Since it looks like there will be an other patch now, here's my 'wish list': :)

    Cao Bang:

    -the airfield should be set up as one in Cao Bang's config too, so the AI can use it too.

    -make bridges passable for AI,

    -there are 2 flying bunkers in village in grid 066/075

    F4 Phantom:

    -people have reported it starts jumping now and then... maybe the land contact points are a bit too high (inside the model's geometry)?

    M79:

    -please add smoke rounds to the M79 and/or other grenade launchers (see stock M79 from OA for how to)

    ACE_compact files:

    -please sign the ACE files with a different key. So server admins could prevent people from joining none-ace servers with the ace files, potentially causing issues.

    M113s:

    -The M113s have a none working turn out option on the driver position (view stuck in the middle if the vehicle)

    M48 Patton:

    -shouldn't the commander's MG be useable from the inside too?

    Keep it up,

    it seems to me that this version of UNS is a great success :)

    Cheers,

    D.

×