Git Product home page Git Product logo

pd2-useful-bots's Introduction

Useful Bots

A lightweight bot overhaul that improves how bots prioritize enemies, lets them help you dominate, lets them attack turrets, improves their civilian intimidation and other small tweaks.

Requires HopLib

Customizable Features

  • Highly customizable target priority settings to tweak which enemies have priority and how priority is calculated
  • Option to make bots dominate enemies on their own or assist player domination attempts (normal game rules apply to bots, only works with custom target priority enabled)
  • Option to make bots help securing loot once the player they follow does it
  • Option to make bots not crouch and always use a standing pose
  • Option to make bots not abandon their positions when they are too far from the player
  • Option to make bots stop at the player's position when they are told to hold position
  • Option to make bots announce when they are low on health, just like player characters do
  • Option to disable bots marking special enemies
  • Option to disable bot battle cries
  • Option to make weapons shots of bots go through tied down enemy hostages
  • Option to prevent bots from getting into slow vehicles like forklifts
  • Option to disable ammo drops from enemies killed by bots
  • Option to make bots avoid using Inspire when they are already within revive range
  • Option to make a bots defend a reviving player
  • Option to increase revive range for bots reviving other bots
  • Option to make bots drop bags only when they exceed a certain weight threshold

Target priority

By default, there is some basic setup for improved bot target priority which should already feel a lot better than the vanilla targeting. You can fine tune all priority modifiers to your liking in the mod options. Multipliers you set in the options are applied to the calculated base priority of a target. The base priority settings define the initial priority of an enemy, based on the setting:
"By weapon stats" prioritizes targets based on the bots weapon stats for the target distance. "By distance" prioritizes targets only based on their distance to the bot, the bot's weapon stats will not be accounted for. "No changes" disables the custom target priority code entirely and use the vanilla code. Any multipliers defined will be ignored if this setting is used.

Loot securing

If the option is enabled, bots will pick up and secure loot bags when certain conditions are met. For bots to start securing loot, the player they follow must have secured at least one loot bag already. Bots will then pick up bags if they or the player they follow are close to a bag and they will secure bags they carry if they or the player they follow are close to a secure zone. If a player calls a bot that was following them while the bot is trying to pick up or secure bags, that player will have to secure loot again for the bot to continue doing it again as well.

Improvements

  • Improved special spotting code so bots only mark targets they see and are higher priority
  • Improved civilian intimidation code so bots will keep civilians down more reliably and not only when civilians are already running away
  • Improved distance check to determine which bot is selected to revive a player
  • Improved Inspire check to not rely on detected attention objects
  • Changed weapon raycast and enemy slot masks so bots can shoot through each other and target SWAT turrets
  • Escort targets are now considered for civilian intimidation and bots will shout at stopped escorts to keep them moving
  • Bots will use player animations for spotting enemies and intimidating civilians
  • Bots will try to kill Cloakers and Tasers before starting to revive
  • Bots and Jokers will follow more directly to better keep up with players
  • Bots will stop reviving when someone else starts reviving the same person
  • Bots will stop immediately when told to stay and will return to their positions after helping up a downed player

Changes

  • Bots will now fully count for game balancing
  • Bots will now count for the crew alive bonus

pd2-useful-bots's People

Contributors

gabsf avatar gullwing-door avatar milesfox92 avatar segabl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pd2-useful-bots's Issues

Navigation issue - San Martin Bank

The bots seem to be unable to understand how to hold around the front door of San Martin Bank. I was thinking maybe it's specific to buying "Vlad's Surprise" in preplanning but the location doesn't seem to line up. It's probably due to the hold at player feature but I've managed to get them into some really weird spots so them refusing here is unusual.

Video of the bug: https://youtu.be/qnKiZRPdZN8

Note: Second clip is extremely long due to us kinda giving up on getting Hoxton into place. Feel free to skip around.

Inconsistent hold on certain maps

So recently, the bots wouldn't always stay in one place as they were told on the tiny stairs in the middle of "The Diamond - Holdout" and at the doors of "Boat Load - Holdout". I can't find a correlation why, but it hasn't happened to me on any other levels yet. I have got footage of it on Boat Load below. I doubt it's due to the doors, as the spot on The Diamond doesn't have a moving object.

Video: https://youtu.be/VfCrosPnyis

teamailogictravel.lua crash on Firestarter Day 3

While hosting, if a client tries to place the thermal drill before shutting off the power so they get electrocuted, the game will crash.

Happened while playing with a friend. I tried recreating it while playing solo, didn't crash. I then asked my friend to come along and try getting electrocuted again. Crashed. I removed Useful Bots and had my friend get electrocuted again, no crash.

Application has crashed: C++ exception
[string "lib/units/player_team/logics/teamailogictrave..."]:174: attempt to index field 'objective' (a nil value)



SCRIPT STACK

update() lib/units/enemies/cop/copbrain.lua:239
clbk() @mods/Full Speed Swarm/lua/teamaibrain.lua:35
_execute_queued_task() lib/managers/enemymanager.lua:600
_update_queued_tasks() @mods/Full Speed Swarm/lua/enemymanager.lua:43
update() @mods/Full Speed Swarm/lua/enemymanager.lua:31
original() lib/setups/gamesetup.lua:809
update() @mods/base/req/core/Hooks.lua:264
update() lib/setups/networkgamesetup.lua:21
core/lib/setups/coresetup.lua:559


-------------------------------

Callstack:

         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     ???                                                 
                      KERNEL32  (???)     BaseThreadInitThunk                                 
                         ntdll  (???)     RtlGetAppContainerNamedObjectPath                   
                         ntdll  (???)     RtlGetAppContainerNamedObjectPath                   


-------------------------------

Current thread: Main

-------------------------------

System information:
	Application version : 1.139.195
	CPU : AMD Ryzen 5 5600X 6-Core Processor (6 cores); SSE; SSE2; SSE3; SSSE3; SSE4.1
	DirectX : 12.0 
	GPU : NVIDIA GeForce RTX 3070 / nvldumd.dll[31.0.15.3129]
	Language : english
	Memory :     32682MB 64KB
	OS : 6.2.9200 () 0x300-0x1 (64 bits)
	Physics : threaded
	Renderer : DX9 threaded
	Sound : Realtek Semiconductor Corp. (Speakers (Realtek(R) Audio))


Allow bots to melee enemies?

I noticed while playing with this mod that when enemies get to close the the bots they usually try to shoot them, “somehow they miss, may be a game bug,” or just stare at them while trying to reload and I think It would be nice to let the bots melee enemies that get to close, “probably not as strong as better bots,” this could also be integrated with your other mod, Bots Weapons and Equipment, to allow other users to customize the melee weapon the bots use, “think it should be for decoration only and not affect how much melee damage the bots can deal for balancing reasons,” but this could help improve the bots ability to survive by allowing them to deal damage to enemies that get to close them, especially for bots that have a sniper rifle for a weapon or a weapon with a long reload time.

Problems with "Save from Tazer" feature

I didn't realize this was even added with the version you gave me until a friend noticed a pattern in the footage I had, but this new feature seems to cause the bots to stay in follow mode even after the situation is resolved until they are either downed or actually told to follow.

Video of the bug: https://youtu.be/i7nw23Hf6Ck

Note: In the second clip, we didn't realize he was following for a long time. You can even see my confusion at the end of it.

Another problem is they will move all the way to the player's location first, even if during their move the situation was dealt with. If there's no way to abort their movement immediately once the Tazer is down, I'd like this to be an optional feature, as that could be more problematic to me than having the bot revive me after the fact or having the Tazer give up for no reason like usual. Even if that's possible, this probably should be an optional one.

Useful bots causing crashes

I think there's an issue with the targeting/turning logic (I think it's for the Cloaker, considering the mention of "Spooc"), per the crash.txt I keep getting;

`Application has crashed: C++ exception
[string "lib/units/enemies/cop/logics/coplogicattack.lua"]:1193: attempt to call field 'chk_should_turn' (a nil value)

SCRIPT STACK

_upd_aim() @mods/base/req/core/Hooks.lua:262
force_attention() @mods/pd2-useful-bots-master/lua/teamailogicbase.lua:129
force_attention() @mods/pd2-useful-bots-master/mod.lua:152
func() @mods/pd2-useful-bots-master/lua/actionspooc.lua:8
init() @mods/base/req/core/Hooks.lua:269
new() core/lib/utils/coreclass.lua:35
action_request() lib/units/enemies/cop/copmovement.lua:1133
_chk_request_action_spooc_attack() lib/units/enemies/spooc/logics/spooclogicattack.lua:293
_upd_spooc_attack() lib/units/enemies/spooc/logics/spooclogicattack.lua:233
clbk() lib/units/enemies/spooc/logics/spooclogicattack.lua:141
_execute_queued_task() lib/managers/enemymanager.lua:600
_update_queued_tasks() lib/managers/enemymanager.lua:615
update() lib/managers/enemymanager.lua:52
original() lib/setups/gamesetup.lua:809
update() @mods/base/req/core/Hooks.lua:262
update() lib/setups/networkgamesetup.lua:21
core/lib/setups/coresetup.lua:559


Callstack:

     payday2_win32_release  (???)     ???                                                 
     payday2_win32_release  (???)     ???                                                 
     payday2_win32_release  (???)     ???                                                 
     payday2_win32_release  (???)     zip_get_name                                        
                     ntdll  (???)     RtlGetCurrentDirectory_U                            
                     ntdll  (???)     RtlAnsiStringToUnicodeString                        
     payday2_win32_release  (???)     ???                                                 
     payday2_win32_release  (???)     ???                                                 
     payday2_win32_release  (???)     ???                                                 
     payday2_win32_release  (???)     ???                                                 
     payday2_win32_release  (???)     ???                                                 
     payday2_win32_release  (???)     ???                                                 
     payday2_win32_release  (???)     ???                                                 
     payday2_win32_release  (???)     ???                                                 
     payday2_win32_release  (???)     ???                                                 
     payday2_win32_release  (???)     ???                                                 
     payday2_win32_release  (???)     ???                                                 

`

Mod is fully up to date AFAIK, this has been happening since the latest update.

teamailogicbase.lua crash

Occurred on Election Day - Plan C in twice in a row.

Crash Logs:

----------------------------------------------------------------------

Sat Jan 07 22:36:13 2023


Application has crashed: C++ exception
mods/pd2-useful-bots-master/lua/teamailogicbase.lua:13: attempt to index a nil value



SCRIPT STACK

_set_attention_obj() @mods/base/req/core/Hooks.lua:294
clbk() lib/units/player_team/logics/teamailogictravel.lua:199
_execute_queued_task() lib/managers/enemymanager.lua:600
_update_queued_tasks() lib/managers/enemymanager.lua:615
update() lib/managers/enemymanager.lua:52
update() lib/setups/gamesetup.lua:809
update() lib/setups/networkgamesetup.lua:21
original() core/lib/setups/coresetup.lua:559
@mods/base/req/core/Hooks.lua:288


-------------------------------

Callstack:

         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     zip_get_name                                        
                         ntdll  (???)     RtlAllocateHeap                                     


-------------------------------

Current thread: Main

-------------------------------

System information:
	Application version : 1.134.165
	CPU : 12th Gen Intel(R) Core(TM) i7-12700K (10 cores); SSE; SSE2; SSE3; SSSE3; SSE4.1; SSE4.2
	DirectX : 12.0 
	GPU : NVIDIA GeForce RTX 3070 Ti / nvldumd.dll[31.0.15.2756]
	Language : english
	Memory :     32538MB 116KB
	OS : 6.2.9200 () 0x300-0x1 (64 bits)
	Physics : threaded
	Renderer : DX9 threaded
	Sound : Razer Inc. (Headphones (Razer Nari - Game))
----------------------------------------------------------------------

Sat Jan 07 22:55:16 2023


Application has crashed: C++ exception
mods/pd2-useful-bots-master/lua/teamailogicbase.lua:13: attempt to index a nil value



SCRIPT STACK

_set_attention_obj() @mods/base/req/core/Hooks.lua:294
clbk() lib/units/player_team/logics/teamailogictravel.lua:199
_execute_queued_task() lib/managers/enemymanager.lua:600
_update_queued_tasks() lib/managers/enemymanager.lua:615
update() lib/managers/enemymanager.lua:52
update() lib/setups/gamesetup.lua:809
update() lib/setups/networkgamesetup.lua:21
original() core/lib/setups/coresetup.lua:559
@mods/base/req/core/Hooks.lua:288


-------------------------------

Callstack:

         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     zip_get_name                                        
                         ntdll  (???)     RtlAllocateHeap                                     


-------------------------------

Current thread: Main

-------------------------------

System information:
	Application version : 1.134.165
	CPU : 12th Gen Intel(R) Core(TM) i7-12700K (10 cores); SSE; SSE2; SSE3; SSSE3; SSE4.1; SSE4.2
	DirectX : 12.0 
	GPU : NVIDIA GeForce RTX 3070 Ti / nvldumd.dll[31.0.15.2756]
	Language : english
	Memory :     32538MB 116KB
	OS : 6.2.9200 () 0x300-0x1 (64 bits)
	Physics : threaded
	Renderer : DX9 threaded
	Sound : Razer Inc. (Headphones (Razer Nari - Game))

coplogictravel.lua crash with unknown reason

Another one I can't seem to reproduce. Happened on one of the window roofs on The Bomb: Dockyard when I told the bot to stay still. I noticed I see no mention of this being caused by the mod, but I have no other mods that modify coplogictravel.lua.

Crash Log:

----------------------------------------------------------------------

Wed Jan 11 01:46:15 2023


Application has crashed: C++ exception
[string "lib/units/enemies/cop/logics/coplogictravel.lua"]:1581: attempt to index a nil value



SCRIPT STACK

update() lib/units/enemies/cop/logics/coplogictravel.lua:235
lib/units/enemies/cop/copbrain.lua:234


-------------------------------

Callstack:

         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     zip_get_name                                        
                         ntdll  (???)     RtlDosSearchPath_Ustr                               
                         ntdll  (???)     RtlRestoreLastWin32Error                            
                         ntdll  (???)     ZwQueryVirtualMemory                                
                    KERNELBASE  (???)     VirtualQueryEx                                      
                    KERNELBASE  (???)     SetUnhandledExceptionFilter                         
                    KERNELBASE  (???)     SetUnhandledExceptionFilter                         
         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     zip_get_name                                        


-------------------------------

Current thread: Main

-------------------------------

System information:
	Application version : 1.134.165
	CPU : 12th Gen Intel(R) Core(TM) i7-12700K (10 cores); SSE; SSE2; SSE3; SSSE3; SSE4.1; SSE4.2
	DirectX : 12.0 
	GPU : NVIDIA GeForce RTX 3070 Ti / nvldumd.dll[31.0.15.2802]
	Language : english
	Memory :     32538MB 116KB
	OS : 6.2.9200 () 0x300-0x1 (64 bits)
	Physics : threaded
	Renderer : DX9 threaded
	Sound : Razer Inc. (Headphones (Razer Nari - Game))

Border Crossing - coplogictravel.lua crash upon travelling to Mexico

Crashes every time if the bots are in hold mode while initiating the tunnel's "Somewhere in Mexico" sequence.

----------------------------------------------------------------------

Thu Jan 19 21:01:30 2023


Application has crashed: C++ exception
[string "lib/units/enemies/cop/logics/coplogictravel.lua"]:1464: attempt to index local 'objective' (a nil value)



SCRIPT STACK

update() lib/units/enemies/cop/logics/coplogictravel.lua:227
lib/units/enemies/cop/copbrain.lua:234


-------------------------------

Callstack:

         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     zip_get_name                                        
                         ntdll  (???)     RtlAllocateHeap                                     


-------------------------------

Current thread: Main

-------------------------------

System information:
	Application version : 1.134.167
	CPU : 12th Gen Intel(R) Core(TM) i7-12700K (10 cores); SSE; SSE2; SSE3; SSSE3; SSE4.1; SSE4.2
	DirectX : 12.0 
	GPU : NVIDIA GeForce RTX 3070 Ti / nvldumd.dll[31.0.15.2802]
	Language : english
	Memory :     32538MB 116KB
	OS : 6.2.9200 () 0x300-0x1 (64 bits)
	Physics : threaded
	Renderer : DX9 threaded
	Sound : Razer Inc. (Headphones (Razer Nari - Game))

Feature Request - Don't shoot shield's front

Would it be possible to either have an optional tickbox for if bots will shoot shields from the front so that the player can tick it on or off depending on if they have piercing rounds equipped or even better have it automatically detect whether the bot is using a sniper rifle or the piercing round perk is enabled?

I assume this would be quite challenging to implement it, especially with having the behaviour trigger based on what's equipped, and that even more if only one of the bots has a piercing weapon.

From my point of view, feel free to disregard this if it's not worth your time. It's not that big of an issue if you keep it always in mind in your crew setup.

Crash when i Rescue up by a bot

Application has crashed: C++ exception
mods/pd2-useful-bots-master/lua/teamailogicassault.lua:4: attempt to call method 'char_tweak' (a nil value)

SCRIPT STACK

_interact_check() @mods/[更好的AI]Better Bots/betterbots.lua:1012
original() @mods/[更好的AI]Better Bots/betterbots.lua:1023
_set_attention_obj() @mods/base/req/core/Hooks.lua:265
clbk() lib/units/player_team/logics/teamailogictravel.lua:199
_execute_queued_task() lib/managers/enemymanager.lua:562
_update_queued_tasks() @mods/Full Speed Swarm/lua/enemymanager.lua:29
update() lib/managers/enemymanager.lua:51
original() lib/setups/gamesetup.lua:744
update() @mods/base/req/core/Hooks.lua:265
_update() lib/setups/networkgamesetup.lua:21
update() @mods\PocoHud3\poco\common.lua:310
core/lib/setups/coresetup.lua:557


Callstack:

     payday2_win32_release  (???)     ???                                                 
     payday2_win32_release  (???)     ???                                                 
     payday2_win32_release  (???)     ???                                                 
     payday2_win32_release  (???)     zip_get_name                                        
                     ntdll  (???)     RtlDosSearchPath_Ustr                               
                     ntdll  (???)     RtlFreeHeap                                         
                     ntdll  (???)     RtlSetLastWin32Error                                
                KERNELBASE  (???)     CreateFileW                                         
                KERNELBASE  (???)     CreateFileW                                         
                     ntdll  (???)     ZwQueryVirtualMemory                                
                KERNELBASE  (???)     VirtualQueryEx                                      
                KERNELBASE  (???)     SetUnhandledExceptionFilter                         
                KERNELBASE  (???)     SetUnhandledExceptionFilter                         
     payday2_win32_release  (???)     ???                                                 
     payday2_win32_release  (???)     zip_get_name                                        

Current thread: Main


Option to disable bots counting as players (And some strange degrease in bot performance)

Hey!

I like the mod so far, but ive noticed some very steep decline in bot efficiency.

Before i installed, i ran better bots and bot weapon and eguipment mods together. I used the bwe fix teamai balance, and better bots flashbangs, dominate and maskup feature.

I could tell the bots to stay in one stop, and they would hold the position almost the entire heist without problem (I play on overkill with ur randomizer mod for fun, not unlocking achievments etc).

But now when i have Useful Bots installed it seems they go down ever 2 minutes and get overwhelmet every time. Im not sure whats really causing this, but the bots are now even worse and cant even survive with two of them near eachother. I dont and dint have Better Bots combat improvments on, since theyr a bit too good imo.

And yes i have tried without Better Bots mod. (for whatever reason, i dint experience any crashes or bugs when the three bot mods are installed)

It would be nice to have an option to toggle the bots caunting as players, to see if that helps a bit.

Ik this is just for my personal taste. The only thing ive got left to do in the game is about just play random heists with randomizer on and see what i get XD.

Mods that effect bots used: Useful Bots, Better Bots (With and without), Iter, Bot Weapon and Eguipment and (Maybe?) Streamlined heisting.

I hope you atleast got something out of this, since i cant really explain whats really happening. It just seems that the bots are worse than before when Useful Bots is installed. (Maybe the priority system is at fault too?). I dont mean to offend you or anyone else by this and i hope you werent. I though it would be best that i type what i have experienced as a bit weird.

Cheers!

EDIT: I tweaked the setting a bit and now the bots seem to be much more efficient. It seems the default setting are quite unefficient from my testing. Ill test some more. If youd like screenshots about my settings, please say so!

EDIT 2: It seems that theyr a bit too efficiant now. Clearing everything like no problem. Also they dont dominate enemies anymore, since i put the dominable enemies priority to about 1, wich is lower than everything else.

Possible Compatibility Issue - coplogicattack.lua crash

As Useful Bots doesn't have a coplogicattack.lua, and I haven't encountered this crash before installing the upcoming version, I'm assuming it's a compatibility issue if it's not a base game crash. Only two mods I have contain this lua file, that being Deadlocke and The Fixes. I've been using Deadlocke again (the version from 24.11.20) for 10 days now, and The Fixes for exactly 13 months on this install.

Video of crash: https://youtu.be/cZ_OBHRDlX0

Crash log:

----------------------------------------------------------------------

Sat Jan 14 23:53:36 2023


Application has crashed: C++ exception
[string "lib/units/enemies/cop/logics/coplogicattack.lua"]:1193: attempt to call field 'chk_should_turn' (a nil value)



SCRIPT STACK

clbk() lib/units/player_team/logics/teamailogictravel.lua:233
_execute_queued_task() lib/managers/enemymanager.lua:600
_update_queued_tasks() lib/managers/enemymanager.lua:615
update() lib/managers/enemymanager.lua:52
update() lib/setups/gamesetup.lua:809
update() lib/setups/networkgamesetup.lua:21
original() core/lib/setups/coresetup.lua:559
@mods/base/req/core/Hooks.lua:288


-------------------------------

Callstack:

         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     zip_get_name                                        
                         ntdll  (???)     RtlDosSearchPath_Ustr                               
                         ntdll  (???)     RtlRestoreLastWin32Error                            
                         ntdll  (???)     ZwQueryVirtualMemory                                
                    KERNELBASE  (???)     VirtualQueryEx                                      
                    KERNELBASE  (???)     SetUnhandledExceptionFilter                         
                    KERNELBASE  (???)     SetUnhandledExceptionFilter                         
         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     zip_get_name                                        


-------------------------------

Current thread: Main

-------------------------------

System information:
	Application version : 1.134.167
	CPU : 12th Gen Intel(R) Core(TM) i7-12700K (10 cores); SSE; SSE2; SSE3; SSSE3; SSE4.1; SSE4.2
	DirectX : 12.0 
	GPU : NVIDIA GeForce RTX 3070 Ti / nvldumd.dll[31.0.15.2802]
	Language : english
	Memory :     32538MB 116KB
	OS : 6.2.9200 () 0x300-0x1 (64 bits)
	Physics : threaded
	Renderer : DX9 threaded
	Sound : Razer Inc. (Headphones (Razer Nari - Game))

Possible conflicting code:

Deadlocke

local _CopLogicAttack_update = CopLogicAttack.update
function CopLogicAttack.update(data)
	_CopLogicAttack_update(data)
	DeadLocke:inform_law_enforcements(data)	
end

The Fixes

TheFixesPreventer = TheFixesPreventer or {}
if not TheFixesPreventer.crash_upd_aim_coplogicattack then
	-- coplogicattack.lua:1080: attempt to index 'weapon_range' (a nil value)
	local origfunc =  CopLogicAttack._upd_aim
	function CopLogicAttack._upd_aim(data, my_data, ...)
		if data.attention_obj
			and AIAttentionObject.REACT_AIM <= data.attention_obj.reaction
			and (data.attention_obj.verified or data.attention_obj.nearly_visible)
			and not (my_data and my_data.weapon_range)
		then
			return
		end
		
		return origfunc(data, my_data, ...)
	end
end

if not TheFixesPreventer.crash_aim_allow_fire_coplogicattack then
	-- coplogicattack.lua:1259: attempt to index field 'chatter' (a nil value)
	local aim_allow_fire_orig = CopLogicAttack.aim_allow_fire
	function CopLogicAttack.aim_allow_fire(shoot, aim, data, ...)
		if shoot then
			data.char_tweak.chatter = data.char_tweak.chatter or {}
		end
		return aim_allow_fire_orig(shoot, aim, data, ...)
	end
end

Shield lights block bot bullets

So the game has a feature, that I assume is left over from when piercing weapons didn't exist, where if you shoot the Shield's lights they get destroyed. This blocks a bullet even if it's a piercing one, but lets you shoot through it once it's destroyed.

Bots on the other hand can't destroy these objects (which I assume was done, so they don't destroy artefacts?). This causes them to sometimes get stuck trying unsuccessfully to shoot through a Shield until either of them moves.

To fix this, either you'll need to find a way to let the bots shoot through breakable objects (which could fix other issues no one noticed if there's actually other breakable objects that block their bullets without breaking line of sight) or you could make a separate ""bugfix"" mod that makes the Shield's lights not block bullets and then mark it as required on Useful Bot's modworkshop page.

Jokers move like bots, bots and jokers can shoot though dominated cops and player can shoot though bots features.

Hey!

I was wondering if any of these would make it to useful bots mod?

Jokers move like bots: Pretty self explanatory, jokers have the same movement as AI teammates

Bots and jokers shoot though dominated cops: Also self explanatory, less accidental bot killing dominated enemies

Shoot though bots: Im not sure if this is a feature already, but i recall seeing a mod that did this already. It maybe could break some things, but i thought i wanted to hear your input on it

I really enjoy Useful Bots mod and even ditched Better Bots for this one! But Better bots do have some (the upper mentioned) features that would be nice to see in this one, if they go with the scope of the mod. What do you think about these suggestions, and would they fit in the scope of the mod?

Ben

Game crash after recent update.

Game crashes whenever the assault starts. Even though the mod isn't directly mentioned in the crashlog, it is the only one that was recently updated and hooks to this file. Crash log:

[string "lib/units/player_team/logics/teamailogicassau..."]:198: attempt to compare number with nil



SCRIPT STACK

update() lib/units/player_team/logics/teamailogicassault.lua:104
lib/units/enemies/cop/copbrain.lua:234


-------------------------------

Callstack:

         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     ???                                                 
         payday2_win32_release  (???)     zip_get_name                                        
                         ntdll  (???)     RtlAllocateHeap                                     


-------------------------------

Current thread: Main

-------------------------------

System information:
	Application version : 1.136.176
	CPU : Intel(R) Core(TM) i3-6100 CPU @ 3.70GHz (1 core); SSE; SSE2; SSE3; SSSE3; SSE4.1; SSE4.2
	DirectX : 12.0 
	GPU : NVIDIA GeForce GTX 960 / nvldumd.dll[31.0.15.3118]
	Language : english
	Memory :     16336MB 484KB
	OS : 6.2.9200 () 0x100-0x1 (64 bits)
	Physics : threaded
	Renderer : DX9 threaded
	Sound : SteelSeries ApS (SteelSeries Sonar - Gaming (SteelSeries Sonar Virtual Audio Device))

It is possible but unlikely that it's just a collision between mods so here's the full list:

base
BeardLib
BeardLib-Editor
Berserk Helper
Better Assault Indicator
Borderless Windowed Updated
BuilDB
Corpse Disposal
CustomFOV_Fixed
Everything Meth
Extra Heist Info
FloatingHealthBars-master
GoonMod's Custom Waypoints
introcinematics125
Iter
Keepers
Less Inaccurate Weapon Laser
logs
Money In Hud
Monkeepers
No Duplicated Bullets
Overdrill Activator
PD2-AdvancedCrosshairs
PD2-ColorPicker
pd2-hoplib-master
pd2-useful-bots-master
QuickKeyboardInput
REBuyAssets
Remove Contour on Death
Rich Presence Definitive
RNGModifier
saves
SecretAchievementHighlightFilter
Simple Mod Updater
STI Simple Toggleable Interactions
The Fixes

If any more info is needed I will be happy to provide it

Revive Issue (can't reproduce)

Currently, the bots will attempt to kill Cloakers and Tazers before attempting a revive. While this is a very useful feature, I think it needs failsafes if it doesn't already have any. I had an issue where the bot was trying to shoot one of them across the map due to the long sightline and so failed to revive me in time before something else killed it.

The two failsafes I was thinking of are a distance check that equals the unit's respective ranges for their special attack and a time check for how long the revive has remaining, having the bot ignore everything if there are only a few seconds left.

Feature Request - Stay after Inspired

Currently, bots will start to follow the player that inspired them, as the game treats using Inspire the same as calling someone over. This means that when they are helped up with Inspire, they will no longer guard an area or follow the player you want them to.

If possible, I'd suggest making the bots ignore follow commands while downed to hopefully change that behaviour.

Another small change that'd be nice but unnecessary would be making the Inspire boost skill unusable on bots, since they don't benefit from it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.