segabl / pd2-bot-weapons Goto Github PK
View Code? Open in Web Editor NEWBLT mod for choosing the team AI's weapons and equipment
License: GNU General Public License v3.0
BLT mod for choosing the team AI's weapons and equipment
License: GNU General Public License v3.0
Do you think it's possible to also include any NPC specific weapons like the specifically attached Car-4 or the Light Swat's (and Cloaker's) Compact 5, shotguns, etc? (Even as its own separate group?)
The option when marked
FIX TEAM AI WEAPON BALANCE
Make crash
Application has crashed: C++ exception
[string "lib/units/enemies/cop/copmovement.lua"]:2766: attempt to index local 'weapon_usage_tweak' (a nil value)
SCRIPT STACK
clbk() @mods/base/req/core/Hooks.lua:260
call() lib/utils/eventlistenerholder.lua:34
_call_listeners() lib/units/beings/player/playerinventory.lua:698
equip_selection() lib/units/beings/player/playerinventory.lua:536
equip_selection() lib/units/player_team/teamaiinventory.lua:114
post_init() lib/units/enemies/cop/copmovement.lua:596
old_post() lib/units/player_team/teamaibase.lua:7
post_init() @mods/Better Bots/betterbots.lua:194
lib/units/player_team/teamaisound.lua:5
spawn_unit() =[C]
spawn_one_teamAI() lib/managers/group_ai_states/groupaistatebase.lua:3061
fill_criminal_team_with_AI() lib/managers/group_ai_states/groupaistatebase.lua:3392
spawn_players() lib/network/base/basenetworksession.lua:1524
update() lib/states/ingamewaitingforplayers.lua:310
update() core/lib/utils/game_state_machine/coregamestatemachine.lua:92
update() lib/setups/setup.lua:940
original() lib/setups/gamesetup.lua:802
update() @mods/base/req/core/Hooks.lua:260
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 (???) RtlInitializeExceptionChain
ntdll (???) RtlClearBits
Current thread: Main
System information:
Application version : 1.143.243
CPU : Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz (6 cores); SSE; SSE2; SSE3; SSSE3; SSE4.1; SSE4.2
DirectX : 12.0
GPU : AMD Radeon RX 580 2048SP / aticfx32.dll[31.0.21912.14]
Language : portuguese
Memory : 16225MB 76KB
OS : 6.2.9200 () 0x100-0x1 (64 bits)
Physics : threaded
Renderer : DX9 threaded
Sound : Microsoft (Alto-falantes (2- H710 Audio Device))
Weapons or parts of the weapons the bots can use turn invisible if a player happens to use the same gun. Those weapon parts that are also part of a players gun only show up for the player and turn invisible. Strange as the game totally supports multiple players having the same gun. Some expert that could give insight on this would be appreciated.
See the title. Killerwolf made a mod that adds, well, more weapon categories to the game so it's 1000x easier to find things in the blackmarket menu because you don't have to wade through NEARLY as much crap to get to what you want. The only problem with this is that, for some reason, when BW&E checks whether or not a weapon can be used by team AI it checks against a list of allowed weapon categories instead of disallowed weapon categories.
An easy 10-15 minute fix would be to either change the list so that it's a list of disallowed categories and change the conditions of the handful of functions that use the list accordingly. An even easier and arguably faster fix would be to just set up a hook that adds appropriate custom categories if an installation of MWC/CCFCW is detected to the allowed category list.
For the record, Killerwolf already had to do something similar to the aforementioned checks but in reverse to prevent BW&E crashing the game if you give a bot the RPK with MWC installed so the burden of bugfixing goes here instead of on his end. Probably.
Now weapons marked as carbines/machine pistols/DMRs are no longer marked as unavailable to AI, but attempting to equip a weapon from any of the above categories leads to the default AI weapon (CAR-4) being equipped instead.
Whenever this mod is installed, Shadow Raid crashes on the preplanning screen 100% of the time. Looking at the crash.txt though, I can't find exactly why that is.
Application has crashed: C++ exception
[string "lib/units/enemies/cop/logics/coplogictravel.lua"]:135: attempt to index a nil value
SCRIPT STACK
enter() @mods/Iter/lua/coplogictravel.lua:22
set_logic() lib/units/enemies/cop/copbrain.lua:390
_exit() lib/units/enemies/cop/logics/coplogicbase.lua:198
on_new_objective() lib/units/enemies/cop/logics/coplogicidle.lua:483
set_objective() lib/units/enemies/cop/copbrain.lua:268
_administer_objective() lib/managers/mission/elementspecialobjective.lua:682
on_executed() lib/managers/mission/elementspecialobjective.lua:277
_execute_random_SO() lib/managers/mission/elementspecialobjectivegroup.lua:145
on_executed() lib/managers/mission/elementspecialobjectivegroup.lua:55
execute_on_executed() core/lib/managers/mission/coremissionscriptelement.lua:209
_trigger_execute_on_executed() core/lib/managers/mission/coremissionscriptelement.lua:147
on_executed() core/lib/managers/mission/coremissionscriptelement.lua:131
on_executed() lib/managers/mission/missionscriptelement.lua:18
callback() lib/managers/mission/elementenemydummytrigger.lua:21
event() lib/managers/mission/elementspawnenemydummy.lua:132
produce() lib/managers/mission/elementspawnenemydummy.lua:111
on_executed() lib/managers/mission/elementspawnenemygroup.lua:90
execute_on_executed() core/lib/managers/mission/coremissionscriptelement.lua:209
_trigger_execute_on_executed() core/lib/managers/mission/coremissionscriptelement.lua:147
on_executed() core/lib/managers/mission/coremissionscriptelement.lua:131
on_executed() lib/managers/mission/missionscriptelement.lua:18
execute_on_executed() core/lib/managers/mission/coremissionscriptelement.lua:209
_trigger_execute_on_executed() core/lib/managers/mission/coremissionscriptelement.lua:147
on_executed() core/lib/managers/mission/coremissionscriptelement.lua:131
on_executed() lib/managers/mission/missionscriptelement.lua:18
execute_on_executed() core/lib/managers/mission/coremissionscriptelement.lua:209
_trigger_execute_on_executed() core/lib/managers/mission/coremissionscriptelement.lua:147
on_executed() core/lib/managers/mission/coremissionscriptelement.lua:131
f() lib/managers/mission/missionscriptelement.lua:18
update() core/lib/utils/coreevent.lua:158
update() core/lib/managers/mission/coremissionmanager.lua:531
update() core/lib/managers/mission/coremissionmanager.lua:160
core/lib/setups/coresetup.lua:520
Callstack:
payday2_win32_release (???) ???
payday2_win32_release (???) ???
payday2_win32_release (???) ???
payday2_win32_release (???) zip_get_name
ntdll (???) RtlDosSearchPath_Ustr
ntdll (???) LdrLoadEnclaveModule
ntdll (???) LdrLoadEnclaveModule
Any help or am I just boned with this mod on Shadow Raid?
Crashes when bots equip masks, be it in heist or entering henchmen menu
Application has crashed: C++ exception
[string "lib/units/maskext.lua"]:40: attempt to index field 'color_a' (a nil value)SCRIPT STACK
ready_clbk() lib/managers/menu/menuscenemanager.lua:1961
clbk() lib/managers/menu/menuscenemanager.lua:2058
lib/managers/dynamicresourcemanager.lua:220
Hey!
I tested to see what mod causes the crashes im having on Beneath the mountain (and Whitehouse if i remember correctly) heists. Then after about hour of testing what might cause it, it was this mod. I tested the options and when the above option is disabled, the game doesent crash anymore. I gave the bots stock AMCAR weapons to see if it was a weapon i gave them, but no, same result. I have other mods installed say maybe a conflict but i cant pinpoint where, since i have a lot of them. But if you want, i can go though the progress of deleting them one by one, just to see what causes it.
Heres the crashlog:
Application has crashed: C++ exception
[string "lib/units/enemies/cop/logics/coplogictravel.lua"]:135: attempt to index a nil value
SCRIPT STACK
set_logic() lib/units/enemies/cop/copbrain.lua:390
_exit() lib/units/enemies/cop/logics/coplogicbase.lua:198
on_new_objective() lib/units/enemies/cop/logics/coplogicidle.lua:483
set_objective() lib/units/enemies/cop/copbrain.lua:268
_administer_objective() lib/managers/mission/elementspecialobjective.lua:682
on_executed() lib/managers/mission/elementspecialobjective.lua:277
execute_on_executed() core/lib/managers/mission/coremissionscriptelement.lua:209
_trigger_execute_on_executed() core/lib/managers/mission/coremissionscriptelement.lua:147
on_executed() core/lib/managers/mission/coremissionscriptelement.lua:131
on_executed() lib/managers/mission/missionscriptelement.lua:18
on_executed() lib/managers/mission/elementspawnenemydummy.lua:150
execute_on_executed() core/lib/managers/mission/coremissionscriptelement.lua:209
_trigger_execute_on_executed() core/lib/managers/mission/coremissionscriptelement.lua:147
on_executed() core/lib/managers/mission/coremissionscriptelement.lua:131
on_executed() lib/managers/mission/missionscriptelement.lua:18
on_executed() core/lib/managers/mission/coreelementrandom.lua:39
execute_on_executed() core/lib/managers/mission/coremissionscriptelement.lua:209
_trigger_execute_on_executed() core/lib/managers/mission/coremissionscriptelement.lua:147
on_executed() core/lib/managers/mission/coremissionscriptelement.lua:131
on_executed() lib/managers/mission/missionscriptelement.lua:18
execute_on_executed() core/lib/managers/mission/coremissionscriptelement.lua:209
_trigger_execute_on_executed() core/lib/managers/mission/coremissionscriptelement.lua:147
on_executed() core/lib/managers/mission/coremissionscriptelement.lua:131
on_executed() lib/managers/mission/missionscriptelement.lua:18
on_executed() core/lib/managers/mission/coreelementarea.lua:121
_check_amount() core/lib/managers/mission/coreelementarea.lua:270
f() core/lib/managers/mission/coreelementarea.lua:235
update() core/lib/utils/coreevent.lua:158
update() core/lib/managers/mission/coremissionmanager.lua:531
update() core/lib/managers/mission/coremissionmanager.lua:160
original() core/lib/setups/coresetup.lua:520
@mods/base/req/core/Hooks.lua:265
I saw on the modpage that you prefer to send any problems here, so i desided to post this in here. If theres any other unformation you need please let me know!
EDIT: Also crashes on shadowraid, right in the planning screen. I saw another person mention this in the issues. Im going to look if we have a same mod that conflicts with this one.
EDIT 2: Okay, i think i have an assumption of whats causing it. Its either WeaponLib or a weapon in mod_overrides based on the previes issue maker. This is going to be an painful one to track down
this happens as of the newest update to the mod
http://steamcommunity.com/sharedfiles/filedetails/?id=1190313977
I learned an interesting thing just earlier about this mod. It turns out, the flashlight/lasers are already preset at certain coordinates, that being 0,0,0 (X,Y,Z) right? Well, for Framing Frame Day 1/Art Gallery, those flashlights are obviously visible in the security room since the true origin coordinates lie there.
Gonna have to reopen this since a similar thing is happening when a player joins in. This time is happened when a bot was in custody and I think that was the bot to be replaced by a joining player.
Bots have Default Masks and Reinfields in Crew Management. Various Armors and masks in mod options. I tried setting them all to use the just Reinfields with the override but I still crash.
crash.txt
`Application has crashed: C++ exception
mods/BeardLib/Classes/utils.lua:273: attempt to index field 'primary' (a nil value)
SCRIPT STACK
Callstack:
payday2_win32_release (???) ???
payday2_win32_release (???) ???
payday2_win32_release (???) ???
payday2_win32_release (???) zip_get_name`
I am facing the issue that crew abilities + crew boosts for LOADOUT2 and LOADOUT3 is the same in all 15 profiles.
I cleared all character loadouts and unset all crew abilities + boosts in all 15 profiles manually.
I restarted the game and immediately after clean start and setting ability and/or boost in loadout 2 or 3 for the 1st time it is also set in all other profiles.
Application has crashed: access violation
Callstack:
payday2_win32_release (???) ???
payday2_win32_release (???) ???
payday2_win32_release (???) ???
payday2_win32_release (???) zip_get_name
payday2_win32_release (???) ???
Current thread: Main
Script stack:
functionCall() @mods/Bot
Weapons/botweapons.lua:138
Update()
@mods/base/req/core/DelayedCalls.lua:24 func()
@mods/base/req/core/DelayedCalls.lua:10
Call()
@mods/base/req/core/Hooks.lua:109 update()
@mods/base/lua/GameSetup.lua:6
update()
lib/setups/networkgamesetup.lua:21 core/lib/setups/coresetup.lua:537
Moments before the crash, someone joined and the game froze as normal. At the same time, someone else dc'd during the freeze. Once that person spawned in (which is right after the freeze frame) the crash occurred.
game crashes consistently when trying to convert a cop offline
crashes with this error
Application has crashed: C++ exception
mods/Bot Weapons/lua/teamaiinventory.lua:45: attempt to concatenate local 'factory_name' (a nil value)
Application has crashed: C++ exception
mods/Bot Weapons/lua/teamaimovement.lua:69: attempt to index a nil value
SCRIPT STACK
-------------------------------
Callstack:
payday2_win32_release (???) ???
payday2_win32_release (???) ???
payday2_win32_release (???) ???
payday2_win32_release (???) zip_get_name
ntdll (???) RtlAllocateHeap
??? (???) ???
So I choose a bot I want to give a unique loadout, I attempt to give it a mask from a set, in this example a mega mask. It shows up. I apply loadout to characters to save it, mask gets reset to their character preferred. Same thing happens to all the mask sets and random mask option.
Works fine if it's a mask picked manually from your inventory.
Started happening not so long ago, I think after the Sangres shirt feature was added?
Video of the bug in gfycat link: https://gfycat.com/WeeShamelessAntlion
Application has crashed: C++ exception
[string "core/lib/utils/corecode.lua"]:100: attempt to index local 'obj' (a number value)
SCRIPT STACK
functionCall() @mods/Bot Weapons/botweapons.lua:161
Update() @mods/base/req/core/DelayedCalls.lua:24
func() @mods/base/req/core/DelayedCalls.lua:10
Call() @mods/base/req/core/Hooks.lua:109
update() @mods/base/lua/GameSetup.lua:6
update() lib/setups/networkgamesetup.lua:21
core/lib/setups/coresetup.lua:537
Doesn't matter if I just updated, Bot Weapons asks to update every time. I've tried getting a fresh copy and it still does this.
I would like to create a cusom menu for mask selection that would list all of the users masks with two custom entries, one for random selection and one for "same as me" selection. Ideally this should just look like the users mask inventory. I'm not too sure if there is an easy way to use the existing mask inventory code and modify slight parts to make it work like it should for the mod.
My payday 2 is crashing after this update I will leave a crash file for possible warnings to help me, I thank you for the help and I'm sorry, I'm Brazilian.
crash.txt
Application has crashed: C++ exception
[File] Cannot read from file "C:\Program Files (x86)\Steam\steamapps\common\PAYDAY 2\assets\all_48.bundle" => error code 998: Invalid access to memory location. (d:\jenkins\shared-workspace\diesel\engine\dieselx\dieselx\blobs../utility/Archive.cpp:2470)
SCRIPT_STACK
set_character() lib/units/armorskinext.lua:282
set_character_anim_variables() lib/units/beings/player/huskplayermovement.lua:318
set_unit() lib/network/base/networkpeer.lua:2276
spawn_unit_original() lib/network/base/networkpeer.lua:2132
spawn_unit() @mods/Bot Weapons/lua/networkpeer.lua:5
_spawn_dropin_player() lib/network/base/hostnetworksession.lua:701
chk_spawn_member_unit() lib/network/base/hostnetworksession.lua:680
lib/network/base/hostnetworksession.lua:287
Callstack:
payday2_win32_release (???) zip_get_name
payday2_win32_release (???) ???
payday2_win32_release (???) ???
payday2_win32_release (???) ???
payday2_win32_release (???) ???
payday2_win32_release (???) ???
payday2_win32_release (???) ???
payday2_win32_release (???) ???
payday2_win32_release (???) ???
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.