Fin's AI Loader (FAIL) 1.4.1b

A standalone and customizable AI mod, based on FAIT.

I've been asked a few times about the possibility of separating FAIT into smaller and more purpose-built mods, and so I've adapted some of its code into FAIL. FAIL can work independently or in conjunction with FAIT, and its purpose is to not only be a series of standalone AI changes, but to allow users to completely customize their difficulty settings beyond what FAIT would allow, without having to muck around in AKI_Data or mod.js.


The readme goes into details on how it all works, but I'd like to emphasize this part:


If you are using this mod alongside FAIT: The config settings inside FAIL will be ignored, but the AI Template you create will be used by FAIT instead of its usual hard-coded one.


If anyone creates a particularly interesting or fun AI Template that they'd like to see included inside of FAIL's releases, please let me know, I'd be happy to package a wider variety of preset templates into the mod.

  • Version 1.4.1b

    Further bugfix:


    • Fixed a more important error in the default AI template. I would highly recommend either downloading this update, or checking the comments for the change you'd need to make to (roughly) match the new, fixed default.
  • Version 1.4.1a

    Bugfix:


    • Fixed errors in default config, as well as a minor error in the stat rounding process
  • Version 1.4.1

    Version 1.4.1 for AKI 3.1.x

    • Difficulty update: The default AI Template has been re-synced with FAIT's current settings
      • The old template is still present, and has been renamed to Pre-July2022Difficulty.json
  • Version 1.4.0

    Version 1.4.0 for AKI 3.1.x

    • Compatibility update for AKI 3.1.x
  • Version 1.3.0

    Version 1.3.0 for AKI 3.0.x


    1.3.0 - (June 26, 2022)

    • Updated to work with AKI 3.0.x
  • Version 1.2.1

    1.2.1


    • Small fix to default values. ScatteringClosePerMeter's last two entries had the decimal one space to the left of where it should have been.


    1.2.0

    • Just a package file update for 2.x.x compatibilty
  • Version 1.1.0a

    Version 1.1.0 for AKI 2.2.x


    1.1.0a

    • Bugfix to stop this mod breaking the controls screen
    • Changes to the config file to make things a little clearer


    1.1.0

    • Compatibility changes for 2.2.x
  • Version 1.0.0c

    Version 1.0.0c for AKI 2.1.x (May be incompatible with 2.1.2)



    Instructions can be found inside the readme file. The default AI template is (Nearly) identical to the one found in FAIT 1.19.4c.


    Version 1.0.0c

    • A debugging option has been added to print out all the current difficulty settings for every bot into the newly-added 'debug' folder.
      • This prints out information for all bots, whether or not they're changed by FAIL


    Version 1.0.0b

    • Game-breaking bug fixed, no longer attempts to create proper square / square root values for bots with no AI values to start with, which would cause the game to hang when trying to load into a map


    Version 1.0.0a

    • Small fix to prevent boss AI from being accidentally changed
  • TypeError: Cannot set property ConfigServer of #<Object> which has only a getter

    TypeError: Cannot set property ConfigServer of #<Object> which has only a getter

    at Function.setupInitialValues (Z:\SPT\user\mods\Fin-AILoader\src\mod.js:252:37)

    at AILoader.postAkiLoad (Z:\SPT\user\mods\Fin-AILoader\src\mod.js:11:18)

    at PostAkiModLoader.executeMods (C:\snapshot\project\obj\loaders\PostAkiModLoader.js)

    at PostAkiModLoader.load (C:\snapshot\project\obj\loaders\PostAkiModLoader.js)

    at ModCallbacks.onLoad (C:\snapshot\project\obj\callbacks\ModCallbacks.js)

    at App.load (C:\snapshot\project\obj\utils\App.js)

    TypeError: Cannot set property ConfigServer of #<Object> which has only a getter

    TypeError: Cannot set property ConfigServer of #<Object> which has only a getter

    at Function.setupInitialValues (Z:\SPT\user\mods\Fin-AILoader\src\mod.js:252:37)

    at AILoader.postAkiLoad (Z:\SPT\user\mods\Fin-AILoader\src\mod.js:11:18)

    at PostAkiModLoader.executeMods (C:\snapshot\project\obj\loaders\PostAkiModLoader.js)

    at PostAkiModLoader.load (C:\snapshot\project\obj\loaders\PostAkiModLoader.js)

    at ModCallbacks.onLoad (C:\snapshot\project\obj\callbacks\ModCallbacks.js)

    at App.load (C:\snapshot\project\obj\utils\App.js)



    Doesnt work for me in 3.5.5 :(

  • Hello. Will there be an update for this modification?

  • Can this mod be used along side All the Bosses?

  • Hello. Version 1.4.1b (Jun 30, 2022) shows only support for SPT-AKI 3.1.1. Will this mod be getting a final update to 3.2.2/3.2.3 like FAIT did? Thanks in advance, and all your work over the years.

  • Hi, first of all really thanks you for your mods!!! it help me so much...

    But i come to a bug, i use 1.3.0 with aki 3.0.0 and it work well since three days, the AI come back to full terminator and it's like the mod doesn't afflict them anymore.
    _the server doesn't shown errors

    _the server shown that the mod is loaded

    _any errors related in the logs (many about items with no ID but it's scavs raids)

    _try to reinstall the mod

    _no changes to configs or db and it's the only mod i use

    do you have any idea?

    thanks you very much, have a good day.

    • I'm afraid I have no idea what might have changed three days ago, if you didn't do anything to alter the mod.


      All I can suggests is to verify that the mod is, in fact, changing the AI settings. -To do this, go into the config and set the DEBUGGING_print_current_AI_settings option to 'true', and compare the files found in your debug folder to the base bot difficulty settings in Aki_Data\Server\database\bots\types.


      Note that if you do that, the debug files aren't updated until you run the game itself, and reach the main menu. This is to be certain they're being properly applied. You may also notice that all four difficulty options, easy, normal, hard, and impossible, will use the same settings for a given bot: This is because of how SPT assigns difficulties across different bot types. Only some bots are able to use anything other than 'normal', and so to keep things consistent the four settings have been flattened out for all bots.

    • Hey Fin!

      I just wanted to give my input on this thread as I'm having the same issue.

      Right now I only have FAIL loaded and when comparing both files I can see that FAIL's settings are not being applied.


      Just as an example for the "assault" bot under normal settings:


      FAIL:


      Code
             "Aiming": {
                  "MAX_AIM_PRECICING": 1,
                  "BETTER_PRECICING_COEF": 1,


      Database:


      Code
            "Aiming": {
              "MAX_AIM_PRECICING": 2,
              "BETTER_PRECICING_COEF": 0.8,
    • What's making you certain FAIL's settings aren't being applied? That looks like exactly what I'd expect to see, assuming Assault were set to a difficulty of 0, with the standard template (Edit: actually, I'd be curious to know what Assault is set to in your config. If it's not 0, that might be the problem?).


      If FAIL's settings weren't being applied, the two files would look identical.

    • Hey Fin!


      My assault difficulty is at 3, overallAIDifficultyMod is at 2.


      It was my understanding that the settings in the database folder were supposed to match the ones found in the debug folder. Did I understood wrong?

    • Ah! -You did misunderstand, yes.


      So, the way it works, the files in the database folder are what the server loads in when it first starts. It doesn't grab the files themselves, rather it makes copies of them in local memory. Mods then modify these copies without altering the original file in the database folder.


      What the debug files from this mod do are show you what that copy in SPT's memory look like, letting you get a peak under the hood, so if the debug file is the same as the one in the database folder, then nothing has been changed.


      That's odd that you're at difficulty 3, though, there may be a bug there. I'll look into that!

  • Hey Fin, first off, loving your mods, you are one of the most valuable modders on sp tarkov, so giving you the props you rightfully deserve.


    Now a question, i see your FAIT mod lets us tweak AI spawning weapons and ammo, but do you have any plans on extending this to their barter/random loot too? What i mean is i remember using some mod some time ago where it made the AI have a chance to spawn with cases and containers in their inventory, such as ammo cases and such. It was rare but was a exciting and lucrative find every once in a while.


    I haven't played SP tarkov in a while so maybe it already happens in the base game now, but if not, it would be cool if you added some customizability/chance for bots to spawn with rarer random loot and cases and such. We can already tweak their guns and armor with your mods and that's awesome, so i feel all it's missing is some fine control of other AI loot in their inventories.


    Keep up the good work!

    • It may eventually be added to one of the advanced configs, but at the moment how AKI handles that has been changing fairly often, so it's not high on the priority list.


      Glad you enjoy the mods ^ ^

    • Gotcha. I'm glad you're at least considering it.


      Thanks for the quick reply.

    • @iStrong I believe the the "Server Value Modifier" mod can do the thing you are asking, they are under the second bot section.

    • I checked it out, and it seems it could do the thing i'm asking for indeed, but i'm afraid it might conflict with FAIT, because both of them modify bot equipment as well. And if i were to disable gear changes on FAIT, then i couldn't specify the helmet, armor and ammo rarity for SPT, since Server Value Modifier doesn't seem to have that customizability.

  • Killa = bosskilla; Shturman = bosskojaniy, etc., but what's Tagilla's name? And what are the names of the three new bosses?

    • Oh, oops. Looks like I forgot to update that. bosstagilla, bossknight, followerbigpipe, and followerbirdeye.


      I'll add that to the config when I get a minute.

      Thumbs Up 1
    • Forgot to add: rogues are also "pmcbot", just like raiders, right?

    • Rogues are exusec, actually. ..Which is unfortunately also SPT's default for USEC PMCs, so any changes made to them will affect both unless you're using a mod to alter their bot type.


      ..Speaking of which, that's probably something else I should mention in the config..

  • Hi, found this in the default.json


    "ScatteringClosePerMeter": [0.273,0.233,0.195,0.156,1.17],


    the 1.17 at the end looks wrong


    Maybe thats why some bots shoot so bad


    In general the difficulty of the bots decreased greatly with the new config format.

    The Pre-July values are insane if you set the difficulty to 10+

    I liked it more this way

    • Ah, that's probably it. I must have accidentally transcribed that as 1.17, instead of 0.117. I'll update the template this afternoon.

  • Hello, for me the scav AI is completely buggy in version 1.4.1a. They shoot everywhere sometimes while turning on themselves without succeeding in touching me even if I do not move. Lots of pmc bots, scav, raiders, infinity shots. I went back to version 1.4.0 which works well, but I find much less pmc, 1 to 2 per game. Is there a way to increase pmc? I haven't changed anything in the mod, it's default and I don't have any other mods. I don't have any errors either.

    • same here

      Thumbs Up 1
    • FAIL shouldn't be able to affect how many PMCs spawn, as it only affects their AI. -I'll look into weird shooting behaviour, though, and see if I can replicate that issue.

      Thumbs Up 1
    • Seems someone else found the issue for me: There's a value where I placed the decimal one to the left of where it should have been, which means that the curve spikes up the AI's scattering *super* fast on higher settings (Literally increasing it about 10x higher per difficulty level).


      "ScatteringClosePerMeter": [0.273,0.233,0.195,0.156,1.17],


      Change that to:

      "ScatteringClosePerMeter": [0.273,0.233,0.195,0.156,0.117],


      That should fix it, but I'll check for any other errors like that.

    • Thanks for your reply, I'll correct it in my file.


      Moreover, I noticed PMC walking backward and not noticing me, even if I shoot at them...

    • Problem is still present for me with latest version, though it not happens everytime

  • Hello, is there a way to make AI shoot faster? Maybe if I set the Aiming time?

    • There's a few ways. AI spotting speed is determiend by FarDeltaTimeSec, MiddleDeltaTimeSec and CloseDeltaTimeSec. Aiming speed is some mix of AccuratySpeed (That's their typo, not mine) and MAX_AIM_TIME


      But I highly encourage you to experiment yourself, because I for sure don't know everything about how it's all set up.

  • I was playing raids just fine, no issues, and then out of nowhere, the next raid was empty and zero AI. Now all my raids are empty. I tried deleting FAIL and even using the defaults settings and nothing has worked.

    • That's odd. That sounds like something damaged your 'locations' files. Try re-downloading AKI, to replace those base files?

  • Hello,

    I'm getting the stuck on 0 deploying with no errors on the latest update 1.4.1. I went back to 1.4.0 and it works fine.

    Like 1
    • Same

    • ditto


      reverted back to previous version and game/raid loads and plays like normal

    • same here

    • Working on a fix now.


      Good news: That 100% confirms the AI are having FAIL's settings applied :D

      Haha 1
    • Hello, Looks like you fixed it 1.4.1a is working for me. Thank you very much for your hard work.

  • Hello, I'm getting a "The file is either in a unknown file format or damaged" error when I'm trying to open the Fin-AILoader1.4.0.rar archive file.

    • That's odd. What program are you trying to open it with? WinRar is what I used to make it, and you might also try re-downloading, in case it got corrupted somewhere along the way.

    • I was trying it with WInRAR on my Windows machine, I was able to open it on a MAC OS with whatever archive viewer it has and transfer it. Thanks Fin.

  • Apologies if this has been asked. Too many comments here to dig through all of them. Anyway, you are supposed to just unpack this mod into the mods folder, yes? (I'm on 3.1.1) I have done so, made my edits to the configs, but when loading the server it does not show FAIL in the list (it's the only mod im using). Does the newer AKI version not show the names of the mods in the load list now? Or am I doing something wrong here?

    I tried using another 3.1.1 compatible mod that adds in-game items, and it will show the actual item IDs it is adding, but not the name of the mod itself. So I can't tell if FAIL is actually loading or not. The difficulty still seems standard (I tried some pretty drastic changes as a test, doesn't feel any different to standard difficulty). Any assistance/advice appreciated! Love your work, Fin!

    • I'd also like to add to this.

      As per my comment below, I thought it might just be a visual bug but after running a few raids with the same drastic changes that you described I am also certain the mod didn't load.


      Otherwise 10/10 mod.

    • What exactly do you mean by 'the list'? -If you're referring to the server console, then mods only appear there if they've been programmed to send a message to the console, which FAIL has not been.


      If you'd like to verify that the mod is working, you can set the DEBUGGING_print_current_AI_settings option to 'true', and compare the files found in your debug folder to the base bot difficulty settings in Aki_Data\Server\database\bots\types.


      Note that if you do that, the debug files aren't updated until you run the game itself, and reach the main menu. This is to be certain they're being properly applied. You may also notice that all four difficulty options, easy, normal, hard, and impossible, will use the same settings for a given bot: This is because of how SPT assigns difficulties across different bot types. Only some bots are able to use anything other than 'normal', and so to keep things consistent the four settings have been flattened out for all bots.

    • I checked the debug files and as you said there are some changes.

      What confuses me is that when cranking up the difficulty in FAIT to 15, I get absolutely lasered.

      When doing so in FAIL, the AI runs around completely braindead most of the time, and even when they see me takes 10 seconds to even shoot at me.


      I'll try some more changes in the template file itself to see if I can fix whatever problem I created out of thin air.


      Thanks again, Fin!

    • That could be down to the template being very old. -There have been a few big AI changes by BSG since it was last fully updated, so I'll see about re-syncing it with FAIT's current default.

    • That sounds awesome.

      Thanks a lot, Fin.

  • Hi Fin,

    Can this mod change the difficulty of the new rouge boss trio? I cannot figure out what their name value is in the game files. I have been killed by Knight 5 raids in a row lol.

    • Yes, you would just need to add their names to the botDifficulties entry, as you would other bots or bosses whose difficulty you wanted to alter.


      Their names are bossKnight, followerBirdEye, and followerBigPipe

  • Hey Fin, the mod loader says the 3.1.1 version of your mod is not compatible with the current version of aki. ;)

    • Can you paste the specific error text you're getting? -I'm not able to produce that error on my end, so I can't tell just what might be causing it.

    • Did a little digging because I thought it must be conflicting with another mod.

      Some trial and error later, this is my console output with FAIL only.


      ModLoader: loading mods...

      Server: executing startup callbacks...

      Importing database...

      Started webserver at http://127.0.0.1:6969

      Started websocket at ws://127.0.0.1:6969

      Server is running. Happy playing!!


      As soon as I add another mod, even if it's just Eerie Silence, this is the output I get.


      Mod Fin-Fin's AI Tweaks is not compatible with the current version of AKI. You may encounter issues - no support will be provided!


      Note that I am really using FAIL 1.4.0, uploaded 5 hours ago.


      I'm confused.


      No error text, nothing.

    • That's.. Weird. This is AKI 3.1.1? -What does the mod's package.json look like, specifically the "akiVersion" entry? It should say

      "akiVersion": "3.*.*"


      Edit: Also, I believe that message is just a warning, it shouldn't actually disable the mod itself, so you should be able to ignore it without issue. ..But then again, it also shouldn't be appearing at all.

    • Fresh install AKI 3.1.1

      package.json is "3.*.*"


      Very weird indeed.


      Thanks for the quick response ;)

  • Any place we can go for user created templates with this mod? know way I have the attention span for this lmao. This has some real potential though

  • Hi Fin, myself and another user had the same issue with your mod (thread is here: RE: Stuck on "deploying in 00:00.000", no errors showing up in server?) where we get stuck on deploying with a timer of 00:00:00.


    The other guy rolled back to the previous version and it works for him. I can test tonight by rolling back, too. Just wanted to put this on your radar.

    • Were you using 1.23.2, 1.23.2a, or 1.23.2b?

    • I'm using FAIL 1.3.0.


      Seems like the other guy went from FAIT 1.23.2b to 1.23.2a.

  • Hi, looking forward to trying this out. Stupid question: where is the readme file? I downloaded the .rar. and looked around in it but couldn't find a readme file. Just wondering if it's absent in the most recent upload because I saw it mentioned in a couple of places.


    Thanks.

    • Oh, oops! I forgot to include it in the upload. I'll put that back in there now.


      If you'd like to get the readme without re-downloading it, I've put it on a pastebin here, as well

    • Thank you!

  • Anyone on 3.0.0 that has a FAIL config they particularly enjoy? I'm trying to tinker myself but I have no clue what I'm doing outside of changing baseline difficulty levels.

    • I'm terribly sorry, I forgot to upload the readme alongside the latest version. -I've fixed that now, the download should come with a readme file, and I've also included a link to a pastebin of the readme in my reply to the comment above. I hope that makes things a bit clearer, though it's still a bit complicated to work with, given all the variables BSG has for bots.

  • Hey, while I was messing around with the ai template, I noticed that the list called ScatteringClosePerMeter in Core was a little bit strange.

    The value of it is [0.273, 0.234, 0.195, 0.156, 1.17, 0.78]. The last two are bigger than those before them. Shouldn't the list to be a decreasing one?

    • I haven't changed them myself. These are the defaults.

    • Oops, yes. Back when I was initially making these I had to transcribe some of the values manually for weird and annoying reasons, and it looks like I shifted the decimal place one to the right, for the last few in that entry.


      It *should* be [0.273, 0.234, 0.195, 0.156, 0.117, 0.078]


      I'll adjust that and reupload FAIL with the fixed defaults soon!

  • Does this still work with SPT-AKI 2.3.0? Will it be getting an update? Or can we just update the package.json ("akiVersion": "2.2.0",)? Thanks

    • It should still work with a package update, yes ^ ^. -I'll try and remember to give it a proper update this weekend.

  • Is there something that affects/helps with instant headshots?


    I have all the bots on 0 difficulty, changed max spread to very high, (as tests) but I still get headshot as the first shot constantly by PMCs.


    The mod is loading ok according to the server.

  • Question about difficulty. The early 12.12 builds included some very deadly PMC's and towards the full release the difficulty was reduced significantly. I simply want to recreate that level of difficulty for the PMC's and was wondering if you had an idea on the value I should place next to USEC and Bear in your config file. I am only asking because Chomp commented that he made the adjustments with your recommendation so maybe you have a good number for me to at least start at. I have USEC and Bear set at 6 but are still very easy.

    • I don't have any specifics, I'm afraid, but the numbers can go as high as you'd like. I remember doing some tests ~12 before, and that proved fairly challenging, though it would have been with different base settings behind it.

      Like 1
  • Question about bots recognized by FAIL. The readme says PMC's are cursedassault, is that still the case or should I add test and bosstest to botDifficulties for PMC's?


    What is the range for botDifficulties? 1-10 or?

    • I'm just about to upload a patch, and I'll include some changes to the config's information to make it clearer, but PMCs are now just 'bear' and 'usec', and it has internal logic that will automatically target whatever BotConfig has those bots set to use.

      Like 1
  • Having an issue with this mod specifically where the entire settings menu says default values and if I back out of settings menu it bugs and wont let me do anything resulting in an alt f4.

    • I have to thank you for pointing this out.


      Unironically, I thought my game was just broken, and I never traced that problem back to this mod. -Now that you've pointed it out, though, it took two seconds to see that I'd forgotten to return the right response to a static route, and a quick test confirms that fixed it. I'll upload a patch momentarily.

    • Thank you very much, friend. Took me like an hour to figure out which mod was causing this issue but I'm glad it's going to be resolved.

    • Would also like to say I love your work. Its enjoyed and appreciated.

  • what does the string " "XZ_COEF": [0.48,0.475,0.45,0.4,0.35,0.3,0.25,0.2] " do?

    • have a config with hard/impossible settings?

    • I'm afraid I don't, though the default one can be used with high bot difficulty settings (9+), and that's generally quite challenging.


      And that string determines the possible values of XZ_COEF. -A bot set to a difficulty of 0 will use the first value in the list, difficulty 1 will use the second, etc. etc.

  • Hello Fin,


    Sorry for keep bugging you on this, trying to get 1.0.0.c working.


    I figured there is a new line 1.0.0.c at line 30:


            HttpRouter.onStaticRoute["/client/languages"][this.modname] = AILoader.runOnGameStart


    With it, server start but can never get to game title screen, without it, game is able to start.


    I haven't tested raid yet, but what does this line do? Will it affect the mod without it?

    • Disabling that should be fine, though I have.. ..Absolutely no idea why that would cause any errors whatsoever. All it does is check to see if the config has DEBUGGING_print_current_AI_settings set to true, and if so prints out the current AI settings.


      But if removing it fixes the issue, then by all means ^ ^. It shouldn't hurt the mod at all.

    • Will removing this line cause issue on generating log? I was able get it generate once, but after that, logs seems not generating. I have tried deleted the old log, or pull the mod out and in of the mod folder. Any suggestion?

    • It shouldn't, but we may be talking about two different things here. -What precisely do you mean by 'generating logs', in this case?

    • I am mentioning the new feature on 1.0.0c, that new feature of creating a list of AI setting under debug folder that reflect value for each individual class. I had it created once, but wasn't able to create another debug log after I changed some AI setting.

    • Ah, yes. -Unfortunately, that line is vital for generating those logs


      Have you tried backing up your current AI settings, and then replacing them with a fresh copy? The logging function involves printing out a json file of your settings, so if there's something especially weird it could be throwing a syntax error or some sort.

  • is there fast way to set spawn chance for all bosses on all maps to 100%? was looking at config tool but cant find such option or not sure which one is it...thanks

    • I believe AIO has an option like that, you might check that out.

  • Is this mod compatible with aio that just came out? when i load the server it shows no errors but when i launch it opens the game but the main screen never comes up.

    • It should be, yes

    • Yeah its still doing the same shows title screen then main menu never comes up even with only this mod. i can still use the ai tweak mod though so no biggie!

    • I think you run into the same error that some of us is experiencing. where game froze and not able to get into title screen. See above for temporary solution with a slight inconvenience draw back.


      [ERROR] Trace:

      TypeError: Cannot read property 'includes' of undefined

      at Function.getResponse (B:\AKI211\obj\bundle.js:26283:16)

      at Function.sendResponse (B:\AKI211\obj\bundle.js:26504:29)

      at Inflate.cb (B:\AKI211\obj\bundle.js:26539:22)

      at Inflate.zlibBufferOnEnd (zlib.js:153:10)

      at Inflate.emit (events.js:315:20)

      at endReadableNT (internal/streams/readable.js:1327:12)

      at processTicksAndRejections (internal/process/task_queues.js:80:21)

    • @Madcowdsis, I saw in the comments you were working on getting an 'authentic' online feel with the templates. I'm basically trying to do the same with leaving everything besides PMC unchanged and making the PMC harder and react very quickly with greater accuracy. Were you able to do this? and maybe have some tips on what to change? Thanks for any help.