Banner
📢 PSA: Custom mask mods - Changes required for Payday 2 Update 243

Originally posted by Rex on Steam Discussions

With update 243 we made adjustments to how masks can be customized, which required shader changes that now needs the "material_config" files to be updated.

Custom mod masks will not automatically support this new format so to make it work in the new system you will need to make the following changes!

Rename the render_template from "solid_mask" to "solid_mask:MATS_3" Add material_amounts vector3 parameter Add diffuse_layer0_texture parameter Add diffuse_layer1_texture parameter Add diffuse_layer2_texture parameter

If you are uncertain on how to add these parameters; See the below codeblocks for an old and new version of a mask material.

Old material code block for reference:

<material name="mat_template" unique="true" render_template="solid_mask" version="2"> <diffuse_texture file="units/payday2/masks/msk_template/template_df"/> <bump_normal_texture file="units/payday2/masks/msk_template/template_nm"/> <reflection_texture file="units/payday2/matcaps/matcap_plastic_df"/> <material_texture file="units/payday2/masks/shared_textures/patterns/pattern_no_color_no_material_df"/> <variable value="0 0 0" type="vector3" name="tint_color_a"/> <variable value="0 0 0" type="vector3" name="tint_color_b"/> <variable value="1" type="scalar" name="material_amount"/> </material>

Same material in the new format.

<material name="mat_template" unique="true" render_template="solid_mask:MATS_3" version="2"> <diffuse_texture file="units/payday2/masks/msk_template/template_df"/> <bump_normal_texture file="units/payday2/masks/msk_template/template_nm"/> <reflection_texture file="units/payday2/matcaps/matcap_plastic_df"/> <material_texture file="units/payday2/masks/shared_textures/patterns/pattern_no_color_no_material_df"/> <variable type="scalar" name="material_amount" value="1"/> <variable type="vector3" name="material_amounts" value="2 2 2"/> <diffuse_layer0_texture file="units/payday2/matcaps/matcap_plastic_df"/> <diffuse_layer1_texture file="units/payday2/matcaps/matcap_plastic_df"/> <diffuse_layer2_texture file="units/payday2/matcaps/matcap_plastic_df"/> </material>

I need help! It's not working!

Make sure you have not made changes to "diffuse_texture", "bump_normal_texture", "reflection_texture", "material_texture" or the parameter "material_amount". Check to see if you have the right variable type for your "material_amounts" parameter, it should be "vector3" and NOT "scalar". Make sure the parameters for "tint_color_a" and "tint_color_b" are not present in the material. If all else fails make a comment under this post and someone can point out any mistakes that may have been made.
SuperBLT for Linux
Thumbnail
Downloads8,604
Views29,497
Publish Date3 years ago
Last Updated2 years ago
Version3.4.7-master-save-fixes-and-lua-changes
Tags
Members
Avatar
ZNixCollaborator
Avatar

I getting crashed with this log
Segmentation fault!

Obtained 19 C++ stack frames:
0x7f7270f22127 libsuperblt_loader.so : blt::error::handler(int)+0x87
0x7f7270451f50 libc.so.6 : +0x38f50
0x7f72704a08ec libc.so.6 : +0x878ec
0x7f7270451ea8 libc.so.6 : gsignal+0x18
0x7f727043b53d libc.so.6 : abort+0xd7
payday2_release() [0xfa7717]
payday2_release() [0xf6ee9f]
payday2_release() [0xb24715]
payday2_release() [0xb290dd]
payday2_release() [0xaaff06]
payday2_release() [0xaab909]
payday2_release() [0xaac0b8]
payday2_release() [0xaac185]
payday2_release() [0xab6545]
payday2_release() [0xa7b915]
payday2_release() [0xaa7e61]
0x7f727049ebb5 libc.so.6 : +0x85bb5
0x7f7270520d90 libc.so.6 : +0x107d90

Note: I tried to launch a Restoration Mod Overhaul and get this, no mods included expect beardlib, linux io a ResMod itself. It works fine on vanilla thought but not in overhauls. It's on my side or blt issue?

Avatar

Resmod is likely the cause. I'll take a look in a few hours.

Avatar

I asked some questions on discord server of resmod and what i can say:

  1. it's actually problem of native version of pd2 because some features of beardlib not working in native version and so it crashes.
  2. Using proton version of pd2 seems to work fine, so i guess i'm switching to proton version.
    There is no problems with blt4l, it just native version sucks.
Avatar

@MRKARTOFAN Well I'd love to know what the crash involved. If you can send me a detailed log (found in the mods/logs folder), then I can look at working out what's wrong (or find people who can). It's not hugely surprising ResMod breaks on native, given how many moving parts to it there are, but blaming the port, and saying the "native version sucks" doesn't solve anything but build up unneccesary hate, and I'd rather just try and fix the issues than go that far off the rails.

Scanning through Github briefly, the first thing that catches my eye is the custom animation replacements, which yeah, will break on Linux due to the animation headers being 64-bit and no conversions being done via Beardlib yet, but I can't imagine that causing crashing on startup. I'll look into this, if nothing else but out of curiosity.

Also, BLT4L has been deprecated for years. I really hope you're not using that old loader.

EDIT: Managed to successfully launch Resmod on native, so I know it at least loads -- albeit it does appear to like crashing due to some apparently malformed lua files.

Avatar

@Dribbleondo-Van-Pelt You can succesfully launch pd2 with resmod, yes, but when i tried to change mask/weapon it's just crashes.
I can't provide you full blt log because i wiped out pd2 completly and now it's on proton

Avatar

@MRKARTOFAN That's consistent with my experience, but still, I wanna work out why it's happening. It really shouldn't crash there.

Avatar

@Dribbleondo-Van-Pelt Same error here :(

Segmentation fault!

Obtained 23 C++ stack frames:
 0x7f4028322127 libsuperblt_loader.so : blt::error::handler(int)+0x87
 0x7f40276bef50 libc.so.6 : +0x38f50
                payday2_release() [0x5843a0]
                payday2_release() [0x54272b]
                payday2_release() [0x90a310]
                payday2_release() [0x8f4db6]
                payday2_release() [0x8f19b2]
                payday2_release() [0x8f2a85]
                payday2_release() [0x8fbf7a]
                payday2_release() [0x9077ae]
                payday2_release() [0xf6b2b0]
                payday2_release() [0x563aa4]
                payday2_release() [0x991ba8]
                payday2_release() [0x993a6d]
 0x7f40282be59d libsuperblt_loader.so : blt::dt_Application_update(void*)+0x65
                payday2_release() [0x9935ef]
                payday2_release() [0xa4f63c]
                payday2_release() [0xa505a5]
                payday2_release() [0xa4f2b4]
 0x7f40276a9790 libc.so.6 : +0x23790
 0x7f40276a984a libc.so.6 : __libc_start_main+0x8a
                payday2_release() [0x4213f4]

I really want to use to native version tho...
Also I had some issues with the provided basemode as it would crash when loading Resmod luckily there's a fix on github
If I can provide more information let me know I also commeted on a Gitlab Issue

Avatar

@Bilal Resmod currently doesn't work; don't use it. Among other things, it has misnamed filepaths (damn you captilisation!) and it uses custom animations, so even if you got past the main menu, you'd crash in-game the moment a new enemy spawned.

So yeah. stay away from mods that add custom animations (and mods of this kind usually mention this).

Avatar

@Dribbleondo-Van-Pelt What a bummer... Thanks for the answer

Avatar

@Dribbleondo-Van-Pelt I am getting the same error however upon leaving the "BLT mods, mod options, and mod keybinds" causes the crash as I commented under the steam guide. Tried to remove all custom animation mods (there is only one and its perfect viewmodel) once and it still crashed doing the same thing

Avatar

@konny da cherry Delete blt_data.txt in PAYDAY 2/mods/saves .The game will regenerate that file when you next start the game up. Given that it affects mod settings (which is what blt_data.txt houses), it's likely your file got corrupted somewhere along the line.

Not a linux specific issue, this happens plenty on Windows too, but it can be annoying.

32 953