PAYDAY-2-BeardLib
PAYDAY-2-BeardLib copied to clipboard
Custom Narratives setup outside of the `Maps` folder do not correctly setup the Lobby.
Seems to be related to GetMapByJobId
only existing within MapFramework
only allowing it to "see" narratives added via the Map
folder.
+1 to this issue. Overhaul mods like Crackdown, HEAT, ResMod, all use this feature, by loading custom narratives (and more) through a submods folder within the mod folder.
Additionally, I use this functionality in the mod seen here: https://modworkshop.net/mod/41851
Would love to see this issue fixed. Other than this issue, levels loaded in this way function totally fine.
What actually IS the issue? Like, what isn't set up correctly?
Maps loaded from outside the 'maps' folder aren't correctly added to the narratives table in a way where they can be sync'd to other users from the lobby (IE: you can't see people hosting these levels on crimenet, and you're unable to join an active lobby/game if it's on one of these levels).
As said in the initial issue comment, it seems the logic for this only exists within MapFramework, so it doesn't get initialized for maps loaded outside of the 'maps' folder.
What actually IS the issue? Like, what isn't set up correctly?
Within Hooks/Network/NetworkMatchmakingSteam.lua
there is a check that relies on BeardLib.Frameworks.Map:GetMapByJobId
. This check is the gatekeeper for assigning custom narrative information to a lobby. This check is only properly setup for mods in the Maps
folder, as dictated by MapFramework.lua
As this check fails, the custom_map
flag is never set, causing the receiving end contained within a _call_callback
hook in the same file to never correctly view this lobby as using a custom heist, because of this and because vanilla just dumps any levels it doesn't recognise, any custom levels defined outside of the Maps
folder will never correctly be returned from lobby searches.
Ah so it doesn't show custom map lobbies even if the user has them?
Ah so it doesn't show custom map lobbies even if the user has them?
Yes, specifically for narratives defined in non Maps
folder mods.
Checking in. Crackdown has been released and uses the same submods system as MapAdd, thus none of its levels get added to the narrative table (as stated in above comments), would still like to see this issue addressed. Thanks!
@Luffyyy is this something you checked while working on BeardLib 5?
@Luffyyy is this something you checked while working on BeardLib 5?
I think so. I added the function to some utility class and changed the network code to check that there.
BeardLib 5.0 merged the frameworks so this issue should be fixed.