About this mod
Lets you play the heist in a p2p fashion where players can join you without the need for servers.
This is a proof of concept, very far from ideal.
Supports only steam for the time being, but adding epic should be relatively easy.
- Permissions and credits
- Changelogs
First of, this is proof of concept. Installing the mod and using it can be a bit tricky. Some features are either broken or missing.
Installation:
This mod requires 3 pieces to work + 1 extra for usability. One of the required pieces will break online gameplay, this is known and there is no workaround for it other than removing when p2p is not needed.
- You need UE4SS. This is a standard step in modding, however, the version is important. Nadz version didn't work with P2P since it is using an older commit. You will have to use the one I am including or it won't load the p2p dll file.
All you need to do is to extract it, then copy the files to your binaries folder inside the game. Since we only support steam at the moment, xbox users are not supported.Files go intoC:\Program Files (x86)\Steam\steamapps\common\PAYDAY3\PAYDAY3\Binaries\Win64
if you have the installation on the C drive. - You will need the ue4ss P2P mod. This is the actual mod which includes both c++ code and lua code.
You extract and paste the folder into ue4ss mods folderC:\Program Files (x86)\Steam\steamapps\common\PAYDAY3\PAYDAY3\Binaries\Win64\Mods
then you enable it by adding the following line P2P: 1
to your `mods.txt`, or simple remove the semicolon if you have my mods.txt. (You can use all your old ue4ss mods by just updating your ue4ss.dll and keeping the rest) - (Optional) You need a pak mod which will adjust the heist selection widget so you can host, have background, and select which security modifiers to use.
This is a normal pak mod, it goes intoC:\Program Files (x86)\Steam\steamapps\common\PAYDAY3\PAYDAY3\Content\Paks\~mods
Although without it, the p2p will work, I really encourage you to add it. - BREAKING REQUIREMENT You need to tell the game to use steam for game connection instead of ip (ip requires port forwarding and is less secure in p2p). This can be added using a pak or by manually modifying a file. The following lines will break normal online games using SBZ dedicated servers, so you will need to remove them for online matchmaking to work.
You will add and remove once you used it, the following lines
to the text file
[/Script/Engine.GameEngine]
!NetDriverDefinitions=ClearArray
NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[OnlineSubsystemSteam]
bInitServerOnClient=true C:\Users\<YOUR_USERNAME>\AppData\Local\PAYDAY3\Saved\Config\WindowsClient\Engine.ini
Without these line, others will see your game but won't be able to join.
Limitations:
Too many to list all but I will give you a sample so you wouldn't have to report it as bug since these are known.
- Since there is no lobby at the moment, both host and client will not be able to select loadout and would spawn with the default set with no skills. A workaround for host is already done see usage. Clients can't use the same code and there is no medium to send the data from client to server yet.
- Game will crash on mission end. Issue about accessing client data which doesn't exist.
- Game will spin indefinitely when attempting restart since sbz didn't add code to handle restart on listen server. I think this issue will be solved in my mod next update.
- For clients only, some animations are missing, no clue why or how since they work on online and also it is not affecting all animations. You will see NPC and swat moving with a free fall animation (wavy hands and legs).
- Melee sometimes doesn't work, I am not sure what breaks it or when it break.
- SBZ uses map index rather than name. So, if you are hosting a custom heist, the client must have the map on the same index or it would behave weirdly (didn't test it though).
Usage:
Shift + F10 to open heist selection for hosting.
Ctrl + F10 to open P2P server browser for joining.
If you are host, once you spawned, press F10 to set your loadout.
If you are client, you will need to press F10 to spawn once the timer is done and the map loaded (you will spectate by default if you joined from start or will be stuck at job info). DON'T press that key in main menu or you will crash.
Wishlist:
Hopefully this will encourage modders create custom heists, if this doesn't encourage them, nothing well.
Credits:
As usual, this was done by the help of GamerrHours.
Donations:
If you like my work and want to support me spending more time modding, feel free to donate at https://www.buymeacoffee.com/abkarino