Posts by Elysium317

    Are you playing with hardcore flea, tiered flea, and randomized traders? With med changes? Are you using other mods that might be messing with bot loadouts? The mod is balanced around all the mechanics that have been added. It'd probably be pretty easy if those features were disabled. I'm not trying to make the bots or PMCs mimic real players, but instead make a single player experience, so it doesn't make sense to me to not give them items on the basis that it'd be in their containers. I tried to give them stims that aren't that great, like propitol is rare. Vulkans on Bear PMCs have a 1 in 37 chance or something like that, I don't see how that every other Bear could have one? In my testing I rarely seem them, like I've been spawning bots into Factory in horde mode without weapons to do armor testing and I've yet to see one.


    I'll be the first to admit the way I like to play SPT is probably unlike most, but I'm not sure that entirely invalidates my opinion, but take it as you will. I like to take things slow, I dislike jumping ahead and taking shortcuts, and I dislike free loot (I created a fork of immersive raids just to delete corpses I did not kill)


    I do not have any mods that change bot loadouts or traders, only the way in which they spawn in.


    To be honest, I tried the trader changes and got frustrated after bandaids and other basic items were sold out 5 times in a row. I understand what you are going for here, but I do not think the entire trader stock availability should be randomized. I also encountered some kind of bug where traders were charging 4-6x the base price for ammo, making some low to average tier ammo cost over 1000 rubles a round. And then later on I found out I could buy helmets and other gear from the flea for cheap and sell them back to ragman for profit (don't ask me how that works no idea). Ultimately decided it conflicted too much with my playstyle and turned it off


    As for the flea, very early on I decided I would not be buying equipment and barters from the flea, and to never sell anything on it. It works fine for live, but feels a bit too cheesy for me in SPT.


    I also turned off the med changes. As a newer tarkov player they were quite confusing at first (I barely understood how normal meds worked) but I've since learned and now I understand. I do plan to give them another try at some point, but at the time being it was just another variable that I did not want to deal with.


    I guess its impossible to balance with so many options and playstyles, and if you intend for everything to be enabled that is fair, but maybe my input still has value. I am a major supporter of end user configuration.


    To help you understand my perspective, here is what has accumulated in my stash over the past week or two


    With a conservative estimate, 90% of that is is from PMCs or Scavs, and it would likely be more if I didn't intervein and make changes myself. I also vendor all of my morphine. While morphine is meh in vanilla, it is still worth 15-16k to the trader. This is a theme with all injectors, there is about ~4.4m in vendor value alone in this screenshot.


    As for the Vulkan, I just looked into it again and perhaps I was unlucky, but 1/37 (or roughly 3%) does not seem to match up to what I see in game and in the data. Now, I can't claim to know exactly how your weighting system works, but based on my basic programming knowledge and experience with other similar systems, I estimate that level 3 bears have about a 15% chance to spawn with a vulkan, and lvl 4 bears have a 6% chance (based on v0.6.5 for SPT v3.4.1)



    Again, I understand my experience is highly subjective and I certainly don't expect you to change anything based off of it, but perhaps some of it is useful in some form.

    While I didn't encounter as many rogues as I was sure to make sure they had vanilla spawning behavior, I did feel like the mid to higher level PMCs generally had really high quality ammo and headgear, loot and medical injectors. To the point where it felt like looting anything except barter items was kind of pointless when I could just find some PMCs to farm. Every other PMC I killed was wearing a vulkan with a shield which vendors for insane amounts. In online tarkov, you never find medical injectors on PMCs because its in their secure, and people rarely run faceshields. tbh I have not even noticed the bots use the injectors so I'm not even sure why they spawn on them. I had to go through the loadouts and lower the weighting on a lot of better gear and remove some items from the loot pool. Although I was already rich from the spoils at that point so it didn't really matter.

    Have no idea why this happening, some bots after death just standing or sitting like that,main problem - theu not lootable. Any idea how fix this?

    Last I checked (about a week ago), it was NoBushESP causing this error, however I thought it has since been fixed. IDK I'm still using 3.4.1 so I can't confirm.

    You can use bot.AIData.Player.ClearHands() before setting the object inactive to fix the floating ghost weapons. This is probably the solution you would use if not using the destructive route.


    I'm personally going to continue to use dipose along with destroy as it frees up memory. I've tested it enough at this point to where I can confidently say it causes no issues. The end raid cleanup throws some NREs when it looks for the bots but it is harmless.

    Got a player check working. I know this is a support thread and you may not be personally interested, but I doubt I am the only one who would appreciate this functionality.



    bot cleanup - Pastebin.com
    Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
    pastebin.com


    Noticed some false positives if I was recently engaged with a bot who died to another bot, but if you are not near the engagement it works. In this case a false player detection only results in the corpse lasting a little longer. More or less does what I want for personal use, which was to clean loot I did not feel I earned. Any performance gain is a cherry on top, but it feels mostly negligible on my end, probably due to a memory bottleneck.

    Oh okay, I only tested it briefly. I came across LootItem.RemoveLootItem and RagdollClass.ClearWeapon which seemed potentially useful but I was unable to make use of them so far.


    Edit: Didn't make any progress in that area. Came across so BotsClass.Remove. Seems like that is the trick but I'm too dumb to figure it out I guess. On the bright side I have not run into any issues yet, and I realized it is pretty easy to track corpse lifetime and have it clean up more frequently.

    if (Time.time - botOwner.Memory.LastTimeHit >= 180f) would include any bot that has not been hit in the last 3 minutes, for example.

    Currently experimenting with a 10 minute clean-up cycle (separated the airdrop event) with a range of 30m and LastTimeHit at 3 minutes, seems to be working as intended.


    I'm thinking I can also use Memory.GoalEnemy to check if the bot was last looking at the player when it died, if I can figure out how to check for players.


    Edit#2: Looks like the the end-raid cleanup outputs an error for what looks like each destroyed bot object, so yeah maybe not ideal. I see what you mean by lots of issues. Will have to settle with deactivate for now.

    I figured it out. You have to use botOwner.gameObject.DestroyAllChildren or UnityEngine.Object.Destroy(botOwner.gameObject) to effectively remove the equipped weapon. The trace will complain about destroying a player body before properly disposing of it. There is a dispose method but it didn't seem to help with the complaints when I tried. Either way I'm fairly certain GC will clean up anything left over in memory, if a dead bot even has anything.


    Now to figure out how to check the last aggressor or killed by data before deciding which bodies to clean up.

    Been trying to figure out why the currently held weapon of the bot does not get cleaned up with the bot. You can't grab it or anything but it is still rendered. Not a huge deal but I've been trying to minimize lag on my client. They add after awhile, especially if they happened to have a light on it. I tried a few different things with the code with no luck. Seems like the held weapon is not part of the bot like a holstered weapon is.