A3XAI ported to Desolation Redux

Discussion in 'Addons' started by moosemilker, Apr 15, 2018.

  1. moosemilker

    moosemilker Member

    Joined:
    Mar 1, 2018
    Messages:
    41
    Likes Received:
    9
    I published the A3XAI Desolation Redux AI port detail here:
    I spent many hours getting this to work (dev time and testing). If you want to see a working example, check out my profile which will lead you to a server I have that is running A3XAI 24/7.

    Enjoy!

    - Moose

    This is a modified version of @SnarkIndustries (Face)'s A3XAI-DesolationRedux 3.0 version. This AI has been updated to work with [Desolation Redux] mod.

    A3XAI Features
    • Automatically-generated static AI spawns: A3XAI will spawn an AI group at various named locations on the map if players are nearby.
    • Dynamic AI spawns: A3XAI will create ambient threat in the area for each player by periodically spawning AI to create unexpected ambush encounters. These AI may occasionally seek out and hunt a player.
    • Random AI spawns: A3XAI will create spawns that are randomly placed around the map and are periodically relocated. These spawns are preferentially created in named locations, but may be also created anywhere in the world.
    • Air and land vehicle AI patrols: AI patrol in vehicles around the map, looking for players to hunt down. Cars and trucks may roam the road, and helicopters (or jets) search the skies for players. Helicopters with available cargo space may also occasionally deploy an AI group by parachute.
    • Loot drops from AI via a sleeping bag container (Look for sleeping bag drops from AI) - This was done to work around [Desolation Redux] garbage collection system without modifying the mod's server files.
    • UAV and UGV patrols: Currently an experimental feature in testing. UAVs and UGVs patrol around the map, and if armed, will engage detected players. UAVs and UGVs may also call for AI reinforcements.
    • Custom AI spawns: Users may also define custom infantry and vehicle AI spawns at specified locations.
    • Error-checking ability: A3XAI checks config files for errors upon startup. If errors are found, A3XAI will use backup settings and continue operating as normal.
    • Classname verification: A3XAI filters out invalid or banned classnames and prevents them from being used by AI.
    • Universal map support: A3XAI supports any and every map for Arma 3 without changing any settings.
    • Plug-and-play installation: Installing and upgrading A3XAI is a simple copy and paste job and does not require modifying any [Desolation Redux] files, except editing the mission.sqm ask stated above so the AI shoot at you.
    • Easy configuration: A single configuration file contains all settings for A3XAI. This config file is external to the A3XAI pbo, so configuration changes can be made without ever having to unpack or repack the pbo file.
    • Headless Client support: Offload AI calculations from your dedicated server to a headless client to improve server performance. The A3XAI HC can be started/stopped/restarted any time without causing problems.
     
    Last edited: Apr 16, 2018
  2. B.A.D.

    B.A.D. Active Member

    Joined:
    Dec 21, 2017
    Messages:
    105
    Likes Received:
    28
    Awesome!
     
  3. neotres

    neotres New Member

    Joined:
    Apr 18, 2018
    Messages:
    4
    Likes Received:
    0
    Nice work , but i can't find A3XAI Editor Tool, to make static spawns.
    Any ideas?
     
  4. moosemilker

    moosemilker Member

    Joined:
    Mar 1, 2018
    Messages:
    41
    Likes Received:
    9
    I'll add it to the repo. That tool is from the 0.2.x version that includes that tool. I built this off of the latest 0.3.0 version with final updates from the origianl author, and he did not include it.
     
    Last edited: Apr 22, 2018
  5. neotres

    neotres New Member

    Joined:
    Apr 18, 2018
    Messages:
    4
    Likes Received:
    0
    Ty, cant see on the repo, its for make static spawns like Sector B, i´ll try to make with custom _defs:sqf
     
  6. moosemilker

    moosemilker Member

    Joined:
    Mar 1, 2018
    Messages:
    41
    Likes Received:
    9
    I added the static spawn editor tool to the repo for the next guy. :)
     
  7. neotres

    neotres New Member

    Joined:
    Apr 18, 2018
    Messages:
    4
    Likes Received:
    0
    So ty for replys and work,
    Kind regards
     
  8. enoanot

    enoanot New Member

    Joined:
    Oct 5, 2017
    Messages:
    18
    Likes Received:
    0
    Hello, I have a problem. I used the Chernarus 2035 Map, my server runs on Ubuntu 18.04. There are no Ai's spawning with me.
    I have this mod as server mod inserted.
    The lock then follows

    Code:
    16:24:23 "[A3XAI] Initializing A3XAI version 3 using base path A3XAI."
    16:24:23 "[A3XAI] Compiling A3XAI functions."
    16:24:23 Big-endian unicode not supported
    16:24:23 Error in expression <"A3XAI\compile\A3XAI_antistuck_uav.sqf"
    ⌀椀渀挀氀甀搀攀 ∀尀䄀㌀å>
    16:24:23   Error position: <⌀椀渀挀氀甀搀攀 ∀尀䄀㌀å>
    16:24:23   Error Invalid number in expression
    16:24:23 File A3XAI\compile\A3XAI_antistuck_uav.sqf, line 1
    16:24:23 Error in expression <"A3XAI\compile\A3XAI_antistuck_uav.sqf"
    ⌀椀渀挀氀甀搀攀 ∀尀䄀㌀å>
    16:24:23   Error position: <⌀椀渀挀氀甀搀攀 ∀尀䄀㌀å>
    16:24:23   Error Invalid number in expression
    16:24:23 File A3XAI\compile\A3XAI_antistuck_uav.sqf, line 1
    16:24:23 "[A3XAI] A3XAI functions compiled."
    
    16:24:23 "[A3XAI] A3XAI loading completed in 0.0119991 seconds."
    
    16:24:23 "A3XAI Debug: A3XAI Startup is running required script files..."
    16:24:23 "A3XAI Debug: A3XAI finished building weighted unitLevel tables in 0.00200081 seconds."
    16:24:23 "A3XAI Error: Could not dynamically generate A3XAI_pistolList0. Classnames from A3XAI_config.sqf used instead."
    16:24:23 "A3XAI Error: Could not dynamically generate A3XAI_pistolList1. Classnames from A3XAI_config.sqf used instead."
    16:24:23 "A3XAI Error: Could not dynamically generate A3XAI_pistolList2. Classnames from A3XAI_config.sqf used instead."
    16:24:23 "A3XAI Error: Could not dynamically generate A3XAI_pistolList3. Classnames from A3XAI_config.sqf used instead."
    16:24:23 "A3XAI Error: Could not dynamically generate A3XAI_rifleList0. Classnames from A3XAI_config.sqf used instead."
    16:24:23 "A3XAI Error: Could not dynamically generate A3XAI_rifleList1. Classnames from A3XAI_config.sqf used instead."
    16:24:23 "A3XAI Error: Could not dynamically generate A3XAI_rifleList2. Classnames from A3XAI_config.sqf used instead."
    16:24:23 "A3XAI Error: Could not dynamically generate A3XAI_rifleList3. Classnames from A3XAI_config.sqf used instead."
    16:24:23 "A3XAI Error: Could not dynamically generate A3XAI_machinegunList0. Classnames from A3XAI_config.sqf used instead."
    16:24:23 "A3XAI Error: Could not dynamically generate A3XAI_machinegunList1. Classnames from A3XAI_config.sqf used instead."
    16:24:23 "A3XAI Error: Could not dynamically generate A3XAI_machinegunList2. Classnames from A3XAI_config.sqf used instead."
    16:24:23 "A3XAI Error: Could not dynamically generate A3XAI_machinegunList3. Classnames from A3XAI_config.sqf used instead."
    16:24:23 "A3XAI Error: Could not dynamically generate A3XAI_sniperList0. Classnames from A3XAI_config.sqf used instead."
    16:24:23 "A3XAI Error: Could not dynamically generate A3XAI_sniperList1. Classnames from A3XAI_config.sqf used instead."
    16:24:23 "A3XAI Error: Could not dynamically generate A3XAI_sniperList2. Classnames from A3XAI_config.sqf used instead."
    16:24:23 "A3XAI Error: Could not dynamically generate A3XAI_sniperList3. Classnames from A3XAI_config.sqf used instead."
    
    
     
  9. moosemilker

    moosemilker Member

    Joined:
    Mar 1, 2018
    Messages:
    41
    Likes Received:
    9
    I reviewed the map definition code and technically it should work with any map.

    Can you do me a favor and test running A3XAI with regular Chernarus or Chernarus Redux map?
    1. If AI spawns and works with those maps, I will know you set everything up properly.
    2. If not, there may be steps you missed.
    If the answer is #1, where you see AI spawning in appropriately, I will take on this task of loading the Chernarus 2035 map and troubleshoot the code... If you tell me #1 and the result is really #2, you will owe me $100 USD. Deal? ;-)
     
  10. enoanot

    enoanot New Member

    Joined:
    Oct 5, 2017
    Messages:
    18
    Likes Received:
    0
    I got it, I had A3XAI_antistuck_uav.sqf because of the error message ("
    Error in expression <" A3XAI \ compile \ A3XAI_antistuck_uav.sqf "
    AOE € æ¤ € æ € æŒ € æ ° ç € "€ æ æ ?? €" â € â € €€ å ° € ä "AOE € € å>
    ) in notepad ++ rewrite. There were Windows formations in the text that Linux can not read and thus can not do it. Because of the other message
    (A3XAI Error: Could not dynamically generate A3XAI_pistolList0. Classnames from A3XAI_config.sqf used instead.)
    I just turned everything off in config.cpp.
    Code:
        //1: Generate AI weapons from Exile trader tables (Default)
        //0: Weapons defined by pistolList, rifleList, machinegunList, sniperList
        //dynamicWeaponBlacklist: Classnames of weapons to ignore from Exile trader tables
        generateDynamicWeapons = 0;
        dynamicWeaponBlacklist[] = {};
     
        //1: Use Exile loot table data as whitelist for AI-usable weapon scopes (Default)
        //0: Scopes defined by weaponOpticsList
        //dynamicOpticsBlacklist: List of optics classnames to ignore from Exile trader tables.
        generateDynamicOptics = 0;
        dynamicOpticsBlacklist[] = {};
     
        //1: Generate AI uniform types from Exile trader tables (Default)
        //0: Uniforms defined by uniformTypes0, uniformTypes1, uniformTypes2, uniformTypes3
        //dynamicUniformBlacklist: List of uniform classnames to ignore from Exile trader tables.
        generateDynamicUniforms = 0;
        dynamicUniformBlacklist[] = {};
     
        //1: Generate AI backpack types from Exile trader tables (Default)
        //0: Backpacks defined by backpackTypes0, backpackTypes1, backpackTypes2, backpackTypes3
        //dynamicBackpackBlacklist: List of backpack classnames to ignore from Exile trader tables.
        generateDynamicBackpacks = 0;
        dynamicBackpackBlacklist[] = {};
     
        //1: Generate AI backpack types from Exile trader tables (Default)
        //0: Vests defined by vestTypes0, vestTypes1, vestTypes2, vestTypes3
        //dynamicVestBlacklist: List of vest classnames to ignore from Exile trader tables.
        generateDynamicVests = 0;
        dynamicVestBlacklist[] = {};
     
        //1: Generate AI headgear types from Exile trader tables (Default)
        //0: Headgear defined by headgearTypes0, headgearTypes1, headgearTypes2, headgearTypes3
        //dynamicHeadgearBlacklist: List of headgear classnames to ignore from Exile trader tables.
        generateDynamicHeadgear = 0;
        dynamicHeadgearBlacklist[] = {};
     
        //1: Generate AI food types from Exile trader tables (Default)
        //0: Food defined by foodLoot
        //dynamicFoodBlacklist: List of food classnames to ignore from Exile trader tables.
        generateDynamicFood = 0;
        dynamicFoodBlacklist[] = {};
     
        //1: Generate AI medical types from Exile trader tables (Default)
        //0: Food defined by medical Loot
        //dynamicMedicalBlacklist: List of medical classnames to ignore from Exile trader tables.
        generateDynamicMedical = 0;
        dynamicMedicalBlacklist[] = {};
     
        //1: Generate AI generic loot types from Exile trader tables. Includes "Hardware", "Smoke", "Flare" -class items. (Default)
        //0: Loot defined by MiscLoot
        //dynamicLootBlacklist: List of loot classnames to ignore from Exile trader tables.
        generateDynamicLoot = 0;
        dynamicLootBlacklist[] = {};

    everything works now
     
  11. moosemilker

    moosemilker Member

    Joined:
    Mar 1, 2018
    Messages:
    41
    Likes Received:
    9
    Well done! When I find time, I will try to clean up the unnecessary Unicode characters in the github repo. Nice work!!
     
  12. enoanot

    enoanot New Member

    Joined:
    Oct 5, 2017
    Messages:
    18
    Likes Received:
    0
    Thx did not think of it as the first thing that could be it. At some point it occurred to me. Yes, that's life as a Linux user :)
     
  13. TheProdigyTMx

    TheProdigyTMx New Member

    Joined:
    Jul 2, 2018
    Messages:
    4
    Likes Received:
    0
    Hey man! first off I want to say awesome job porting this over I've been looking for something like this for a while now!

    I'm having an issue running the query for the database tho. MariaDB keeps saying the syntax is wrong but I cant figure out why!! I really want to get this working on my server for me and my roommates but this is stopping me!
     
  14. moosemilker

    moosemilker Member

    Joined:
    Mar 1, 2018
    Messages:
    41
    Likes Received:
    9
    Looks like I have an extra tick mark in there.
    Try this:
    Code:
        UPDATE `desolationredux`.`charactershareables` 
        SET `classname` = 'I_G_Survivor_F' 
        WHERE `classname` = 'C_man_p_beggar_F';
    
    Please reply with the result.

    Thank you!
     
  15. TheProdigyTMx

    TheProdigyTMx New Member

    Joined:
    Jul 2, 2018
    Messages:
    4
    Likes Received:
    0
    That worked thank you so much!! Its been driving me nuts lol
     
  16. moosemilker

    moosemilker Member

    Joined:
    Mar 1, 2018
    Messages:
    41
    Likes Received:
    9
    Glad to hear!
     
  17. TheProdigyTMx

    TheProdigyTMx New Member

    Joined:
    Jul 2, 2018
    Messages:
    4
    Likes Received:
    0
    Hey i have another question! Do these shoot at zombies as well on the server? i had a guy run STRAIGHT to me passed a bunch of zombies and gunned me down.
     
  18. moosemilker

    moosemilker Member

    Joined:
    Mar 1, 2018
    Messages:
    41
    Likes Received:
    9
    Yeah. Technically the "AI" are all on the same side. I tried to change this, but can't recall why it solders and zombies would not engage. I was happy to solve the AI / soldiers being hostile toward players! It was many, many hours to get this system to the state it is in today. ;)

    Honestly at the end of the day, I am happy with where it is. Since AI is roaming and zombies can be completely cleared in Desolation Redux, it is better they don't engage, or soldiers could clear out all zombies in an area before a player goes through it.
     
    George Tritton likes this.

Share This Page