jameswilko / payday-2-blt-lua Goto Github PK
View Code? Open in Web Editor NEWMods folder that controls the ingame aspects of the Payday 2 BLT.
License: MIT License
Mods folder that controls the ingame aspects of the Payday 2 BLT.
License: MIT License
I have heard from my users that the latest mod manager relies on DB: for images.
Until we can figure out a way to deal with DB, as we did with mod_overrides, I figured that I would drop on to let you know about a BLT4L API feature that might be helpful for compatibility reasons.
When running via BLT4L, scripts can call BLT::PlatformName
, which will yield a string describing the platform. For BLT4L, this is linux
.
I had added this with the intention that mods that needed windows-only features (DB) could check this to fall back to compatibility or graceful failure (rather than killing the game).
Currently, per blt4l#79, we (really just @dribbleondo) have been unofficially maintaining an even more unofficial base mod fork that disables image loading. While have yet to personally test neither the unofficial fork of, nor the upstream (this) base mod, I think that BLT adopting BLT::PlatformName
might help resolve the issues in the interim.
The DLL updater is causing issues on Linux, as some users have accidentally run it which results in the updater dialog getting stuck on their screen until they exit PAYDAY.
The hook binary should be its own responsibility, not the base mod's.
Some functions like LuaNetworking:GetPeers()
or LuaNetworking:GetNumberOfPeers()
(which actually could use the former in it's loop) reference managers.network:session()
directly, without making sure if it's still valid, the Chat Manager mod for example causes a DelayedCall error if you get kicked by one of those lobby requirement mods:
One could probably argue that it's careless to call a LuaNetworking
function without checking if you have valid network session, but imo this class is trying to hide some underlying challenges, and shouldn't cause any errors on it's own trying to do so.
On startup, I'm being told I'm missing Announcer & Fading Contour even though they are installed (and up-to-date).
Log attached. Using BLT-Lua 0c62569
2017_04_23_log.txt
I have recently installed a mod (put its folder in the '\PAYDAY 2\mods' directory) after previously disabling it, and then removing it from the 'mods' folder afterwards (prior to version r14).
After I've installed the mod, when I go to Options » Lua Mods, the game crashes with crash.txt log:
Application has crashed: C++ exception
mods/base/lua/MenuManager.lua:155: table index is nil
I've looked at that file, and it's this part of function ModMenuCreator.create_lua_mods_menu:
if not _hooks[ hook ] then
hooks_str = hooks_str .. " " .. tostring(hook) .. "\n"
_hooks[ hook ] = true
end
It crashes in the _hooks[ hook ] = true
line. I fixed it by modifying the code above to:
if hook and not _hooks[ hook ] then -- added check for 'hook' variable
hooks_str = hooks_str .. " " .. tostring(hook) .. "\n"
_hooks[ hook ] = true
end
... which allowed me to access Options » Lua Mods without crashing.
Fixed in Custon BLT
BLT shows mods updates are available and when i click on update tab in mods viewer the game crashes..
here's the crashlog
Application has crashed: C++ exception
mods/base/req/ui/BLTUIControls.lua:313: attempt to call method 'IsCritical' (a nil value)
SCRIPT STACK
new() @mods/base/req/utils/UtilsClass.lua:26
_setup() @mods/base/req/ui/BLTDownloadManagerGui.lua:125
init() @mods/base/req/ui/BLTDownloadManagerGui.lua:34
new() @mods/base/req/utils/UtilsClass.lua:26
create() @mods/base/req/ui/BLTDownloadManagerGui.lua:257
set_active_components() lib/managers/menu/menucomponentmanager.lua:429
set_active_components() @mods/base/lua/MenuComponentManager.lua:19
core/lib/managers/menu/coremenulogic.lua:89
_execute_action_queue() core/lib/managers/menu/coremenulogic.lua:54
update() core/lib/managers/menu/coremenulogic.lua:64
update() core/lib/managers/menu/coremenumanager.lua:159
update() lib/managers/menumanagerpd2.lua:17
update() lib/setups/setup.lua:740
update() lib/setups/menusetup.lua:294
update() @mods/base/lua/MenuSetup.lua:6
core/lib/setups/coresetup.lua:537
Callstack:
payday2_win32_release (???) ???
payday2_win32_release (???) ???
Current thread: Main
System information:
Application version : 1.76.327.
CPU : Intel(R) Pentium(R) Dual CPU E2200 @ 2.20GHz (1 core); SSE; SSE2; SSE3; SSSE3
DirectX : 10.0
GPU : AMD Radeon HD 5700 Series / aticfx32.dll[8.17.10.1404]
Language : @ID94cca2fdaccfc2cd@
Memory : 3069MB 260KB
OS : 6.1.7601 (Service Pack 1) 0x100-0x1 (64 bits)
Physics : threaded
Renderer : DX9 threaded
Sound : Realtek Semiconductor Corp. (Speakers (Realtek High Definition Audio))
Hello James, I would like to ask something about the updating behaviour regarding BLT 2.2 (I'm assuming that's the latest stable release?).
I installed BLT 2.2 a week ago, after a near 2 month break from the game, and I noticed that the mod manager detects a "new" version of the BLT available, even after I tested re-updating it trough the BLT's download manager. After that it still detected a "newer" version available, making it an endless process.
I didn't find anything related to this on the Steam/Mod Workshop forums or reddit, so I decided to ask here to try to find a solution for the issue.
Thank you for your time.
I've seen a few differences between the original json4lua file and the one attached to the BLT. One thing I can't understand is the removal of json.decode referrences etc. Substituting the file to the original and adding the Global namespace line works great, and doesn't throw an error in the logs.
Sat Oct 21 13:56:18 2017
Application has crashed: C++ exception
[string "lib/managers/chatmanager.lua"]:103: attempt to index field '_muted_peers' (a nil value)
SCRIPT STACK
receive_message_by_peer() lib/managers/chatmanager.lua:61
send_message() lib/managers/chatmanager.lua:46
SendStringThroughChat() /req/core/Networking.lua:134
SendToPeers() /req/core/Networking.lua:98
SendState() /lua/menumanager.lua:274
_determine_objective_for_criminal_AI() /lua/groupaistatebase.lua:63
on_criminal_jobless() lib/managers/group_ai_states/groupaistatebase.lua:3076
kpr_original_teamailogicidle_update() lib/units/player_team/logics/teamailogicidle.lua:213
update() /lua/teamailogicidle.lua:27
lib/units/enemies/cop/copbrain.lua:180
Callstack:
payday2_win32_release (???) ???
payday2_win32_release (???) zip_get_name
payday2_win32_release (???) zip_get_name
Current thread: Main
System information:
Application version : 1.79.387.
CPU : AMD FX(tm)-6350 Six-Core Processor (3 cores); SSE; SSE2; SSE3; SSSE3; SSE4.1; SSE5
DirectX : 12.0
GPU : NVIDIA GeForce GTX 760 / nvldumd.dll[22.21.13.8494]
Language : english
Memory : 8139MB 36KB
OS : 6.2.9200 () 0x100-0x1 (64 bits)
Physics : threaded
Renderer : DX9 threaded
Sound : Realtek Semiconductor Corp. (Speakers (Realtek High Definition Audio))
See for this: blt4linux/blt4l#70
The thing is, that you use it in the BLTMod.lua file.
Can we use a current workaround like this one to check if we are under a linux environment and just return nil
in that function? Other mods, depending on DB:create_entry
just not work by now iirc. But for now, it would be a nice to have function, so you could use the same mods folder structure for windows and linux.
Why is BLT creating the options menu node only in main menu there are clearly mods that use the options menu in game.
When shooting at targets (Wick's shooting range) in safehouse, you'll get the following crashlog:
[string "lib/managers/mission/elementunitdamage.lua"]:88: attempt to call method 'override_value_on_element_type' (a nil value)
SCRIPT STACK
clbk() lib/managers/mission/elementunitdamage.lua:72
call() lib/utils/eventlistenerholder.lua:33
damage_damage() lib/units/unitdamage.lua:41
on_collision() lib/units/weapons/raycastweaponbase.lua:2068
_fire_raycast() lib/units/weapons/raycastweaponbase.lua:617
fire_original() lib/units/weapons/raycastweaponbase.lua:459
fire() @mods/WolfHUD/lua/BurstFire.lua:87
trigger_pressed() lib/units/weapons/raycastweaponbase.lua:356
_check_action_primary_attack() lib/units/beings/player/states/playerstandard.lua:4690
_update_check_actions() lib/units/beings/player/states/playerstandard.lua:885
update_original() lib/units/beings/player/states/playerstandard.lua:413
update() @mods/WolfHUD/lua/BurstFire.lua:196
lib/units/beings/player/playermovement.lua:275
The class ElementUnitDamage calls the function "override_value_on_element_type", but doesn't define it.
If we look at the parentclass of ElementUnitDamage, we find CoreMissionScriptElement.MissionScriptElement, which doesn't define the function as well.
Now, there is a MissionScriptElement in 'lib/managers/mission' as well, and that one does declare the funtion and gets used by the call "CoreClass.override_class(CoreMissionScriptElement.MissionScriptElement, MissionScriptElement)" at the end of the file.
this whole thing does not work properly at all, i am getting a lot random 'freezes' while downloading stuff.
i added some log lines, to see where the freezes are happening, and sometimes it even happens while building the local path vars. seems like the coroutine just gets stopped at random points.
Due to a mistake in BLTPersistScripts.lua variable in global has to be set to false or nil in order for the script to run and set to anything else to stop the script
03:17:21 PM Error: lua_call: error in lua_pcall: [string "lib/managers/playermanager.lua"]:1125: attempt to index field 'network' (a nil value)
03:17:21 PM Error: lua_call: error in lua_pcall: [string "lib/setups/setup.lua"]:598: attempt to index global 'game_state_machine' (a nil value)
This carries on ad infinitum. It may be the case that those symbols have been renamed.
(circa blt4linux/blt4l#27)
This code doesn't have a license, and is currently sitting in a legal grey area. Please to fix, thanks.
I seem to remember being able to unbind keys by pressing ESC in the keybind, please allow that functionality again.
update_mods.lua
does not provide a download progress callback when calling dohttpreq, which causes the download progress dialog to jump from zero to one-hundred while appearing to be frozen in between.
Please fix this problem.
Content-sensitive can be making those panels scrollable if the contents outgrows them, or automatically expand as long as there's free space left.
This is much needed for the new Mod Details panel which has on the left description, author and contact all in one panel,
if a mod now decides to make either of those multiline (using \n
) space inside can run out pretty quickly with the text vanishing.
(it might be that the panel actually does get scrollable, but then too late as one of the lines was already half-gone without having a scrollbar)
The Debug info isn't really needed to take up space if not enabled (and since there's a toggle button for it anyway, why not make it use a popup dialog instead)
or make the debug panel collapse-able (collapsing the mod info and vice versa) and removing / merging that toggle button altogether.
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.