Code Monkey home page Code Monkey logo

payday-2-blt-lua's People

Contributors

bangl avatar chromka avatar jameswilko avatar justalemon avatar kamikaze94 avatar luffytesting avatar muzuwi avatar nhellfire avatar nuintun avatar phantomgamers avatar takriuto avatar tdlq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

payday-2-blt-lua's Issues

Regarding Linux compatibility issues

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.

Move DLL updater in to Windows BLT

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.

LuaNetworking has missing validty checks

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:
LuaNetworking error

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.

"mods/base/lua/MenuManager.lua:155: table index is nil" crash when accessing Options » Lua Mods after reinstalling previously removed mod

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.

Crash while clicking on update tab in mods list

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))

Regarding BLT 2.x updating system

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.

Attempt to call global 'decode' (a nil value)

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.

Chatmanager.lua attempted to index field '_muted_peers' (a nil value)

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))

DB:create_entry currently not availble under linux

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.

BLT options only in main menu?

Why is BLT creating the options menu node only in main menu there are clearly mods that use the options menu in game.

CoreClass.overwrite_class function not working

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.

random downloader freezes

-- Holy shit this is hacky, but to make sure we can update the UI correctly to reflect whats going on, we run this in a coroutine

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.

Latest payday update breaks certain interfaces used by BLT LUA

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.

Make some text displaying panels content-sensitive

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.

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.