Fin's AI Tweaks (FAIT)

  • Hi, I was wondering if using the "start server at specific time" option would mess with the insurance timers, since it's resetting the server timer to a specific time. Is it safe to use? will the time to get gear back from insurance be retained or does it have any issues? thanks!

  • I'll put out an update to fix this when I get the chance, but it's a fairly easy fix to implement yourself.


    Open mod.js and find the lines (It should occur three times):


    delete(bot.inventory.equipment[slot][bot.inventory.equipment[slot].indexOf(itemID)])


    And replace them with this:

    delete(bot.inventory.equipment[slot][armorItem])


    Hi Finn, (I'm writing through a translator, sorry for the text) I have a question for you, is there a way to make bots walk on the map and not sit still? Fin

    I'm not sure what you mean. -Bots should be able to walk as-is?



    Im getting this issue:


    [snip]

    [ERROR] Trace:

    TypeError: Cannot read property '_name' of undefined

    at Function.saveDebugFiles (E:\Aki 16909\user\mods\zFin-AITweaks\src\mod.js:6236:32)

    [snip]

    You're using an old version of the mod. Updating to the latest version should fix that error.

    Hi, I was wondering if using the "start server at specific time" option would mess with the insurance timers, since it's resetting the server timer to a specific time. Is it safe to use? will the time to get gear back from insurance be retained or does it have any issues? thanks!

    It should be safe, yes.

  • I keep getting this error anytime I try and launch the server with this mod, mod version is 2.2.2 and SPT verison is 2.2.2

    Error: ENOENT: no such file or directory, open 'G:\spt-aki\user\mods\zFin-AITweaks\donottouch\debug\~spawnOverview.json'] {

    errno: -4058,

    code: 'ENOENT',

    syscall: 'open',

    path: 'G:\\spt-aki\\user\\mods\\zFin-AITweaks\\donottouch\\debug\\~spawnOverview.json'

  • OK, I'll try.


    New problems have emerged.


  • Scavs have been spawning with virtually the same loadout for me. Not 100% sure it is due to this mod, but it's the only mod that has any effect on bot inventories. Scavs are either spawning with a PACA & Tarzan rig, or with a 6B5-16 armored rig. Been searching for a TV rig for Sewing It Good for days now but I just can't seem to figure this out. Checked the assault file under bot_inventories and it seems like it's fine, all of the item id's are showing 1 as they should, but it doesn't appear to be selecting anything else from the list...


    Other mods I have installed are:

    KcY-SeeItemValue

    Lua-CustomSpawnPoints

    Lua-ExamineTracker

    Lua-SpawnRework

    r1ft-BotNames

    Sotthata-SleepyTime

    zThatGuyXIV-RandomLootGen

  • So it seems to have been fixed. I deleted my SPT install and installed everything from scratch. Pretty sure I already tried that, but there is a chance I just copied some of my configs and was lazy.

  • Hi, I seem to be having an issue with Scavs and my Player Scav not having any weapons or gear. In the config I only changed the Overall Difficulty multipliers, Silly Changes at the bottom of the file and a few other values but nothing that would drastically change the gear for the AI.


    The screenshots I have attached are all from consecutive raids and not from the same one, I wanted to make sure that it didn't just happen in a single raid.


    Update: I messed around with some of the settings for the last 12+ hours and I have found that 1 in 5 or 6 Player Scav raids there is no gear for my Player Scav and in my PMC raids about 30-35% of the Scavs (of all total AI spawned) in the raid stand still frozen/won't aggro with no gear or weapons. It could be user error or there's just something not working together, still unsure but hopefully I can figure it out.

  • Hey, Ive been having the same issue as Rad Roach that makes scavs not aggro, but instead they do have gear and run around with their melee. I am using the last version of the mod and barely any other mods (none affect AI spawns or behaviour).

  • I'm getting this error when starting the server with this mod. I'm using both the latest version of this mod and the latest for the server itself.

    Oops, look like I missed something during the big inventory changes update. I got it for primary weapons, but missed it for secondPrimary.


    I'll put out a fix for it either tonight or tomorrow, however if you'd like it fixed faster you can open up mod.js and find this line:

    let weapon = DatabaseServer.tables.templates.items[bot.inventory.equipment.SecondPrimaryWeapon[i]]


    And replace it with this one:


    let weapon = DatabaseServer.tables.templates.items[id]

  • Hey, I need clarification since I cant find it in readme 😅 might be just blind...

    bot_inventories.json generates all loot possible to spawn, each ID had 1 at the end

    "6040de02647ad86262233012": 1,


    is the values 0/1 on-off or its probability factor? So I can tweak who ofter certain items will be spawned?

    Other than that I noticed that even if I put IDs in blacklist, they still get generated within bot_inventories :/

  • I used the new feature where a bot can use your weapon presets. I have a preset for an AKMN and when the bots use it they use the wrong ammo. They use .366 instead of BP ammo and on top of that they have different magazines in their rig then in the gun itself. Any idea on how I could fix this?


    Another thing I've noticed, and I'm not sure if I can somehow go into the files and change this myself, is that a majority of the PMC bots always wear the Tarzan rig. I'd say 95% of them. Is there a way to adjust the probability of a PMC spawning with that rig? Not a big deal but when I kill 5 PMC's and all of them are wearing the same rig it is a bit immersion breaking. I haven't seen any PMC's with the MK3, Blackrock, CR MK2, LBCR for example. Just wondering if I can fix this on my end.


    Otherwise love your mod thank you for the great work!

  • Hey, I need clarification since I cant find it in readme 😅 might be just blind...

    bot_inventories.json generates all loot possible to spawn, each ID had 1 at the end

    "6040de02647ad86262233012": 1,


    is the values 0/1 on-off or its probability factor? So I can tweak who ofter certain items will be spawned?

    Other than that I noticed that even if I put IDs in blacklist, they still get generated within bot_inventories :/

    The first bit is just the new inventory structure AKI uses, the value is the relative weight the item is given.


    Since I'm answering that question: The blacklist should be being respected, doing a quick test on my end to remove '5648a7494bdc2d9d488b4583' seemed to work as expected. However, I need a debug hash to do any sort of bug fixing.


    I used the new feature where a bot can use your weapon presets. I have a preset for an AKMN and when the bots use it they use the wrong ammo. They use .366 instead of BP ammo and on top of that they have different magazines in their rig then in the gun itself. Any idea on how I could fix this?


    Another thing I've noticed, and I'm not sure if I can somehow go into the files and change this myself, is that a majority of the PMC bots always wear the Tarzan rig. I'd say 95% of them. Is there a way to adjust the probability of a PMC spawning with that rig? Not a big deal but when I kill 5 PMC's and all of them are wearing the same rig it is a bit immersion breaking. I haven't seen any PMC's with the MK3, Blackrock, CR MK2, LBCR for example. Just wondering if I can fix this on my end.


    Otherwise love your mod thank you for the great work!

    As the config settings in the advanced files aren't part of the debug hash, I can help a bit here. This seems to be an oversight on my part, on both counts. When updating to the new inventory system, a chunk of the code became actively harmful and would remove all non-armor rigs from bot inventories, which causes a safety I built in to automatically give them the Tarzan so that they still have a rig, if they aren't allowed both armored rigs and armored vests. As for the ammo issue, I hadn't considered weapons that could use multiple calibers.


    So.. To fix these things (And I'll release a proper patch this weekend), you'd want to do this, for the rig problem:


    Find these lines:

    //Non armors only

    for (let id in bot.inventory.equipment[armorSlots[slot]])

    if ((!itemdb[id]._props.armorZone || itemdb[id]._props.armorZone.length == 0) && (!itemdb[id]._props.armorClass || itemdb[id]._props.armorClass * 1 <= 0))

    delete bot.inventory.equipment[armorSlots[slot]][id]


    And delete them.


    For the ammo issue, I believe this will work, but can't verify it without ingame testing, which I can't do right now.


    You'd want to find this line:


    let newAmmoTpl = ammoPool[RandomUtil.getInt(0, ammoPool.length - 1)]


    And add this line right above it:


    ammoPool = ammoPool.filter(i => itemdb[i]._props.Caliber == itemdb[rootItem._tpl]._props.ammoCaliber)

    Edited once, last by Fin ().

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!