Neverwinter Nights 2 Multiplayer Patch

I’m trying to setup a multiplayer patch/extension for NWN2 since the old GameSpy servers are now dead. This patch also fixes a variety of bugs.

You can read about and acquire this patch here: https://neverwintervault.org/project/nwn2/other/nwn2-client-extension

I think that it makes sense to include this into the default installer (or maybe forked), however while trying to get this setup I’ve ran into a roadblock. The NWLauncher.exe (right now the installer just jumps straight to the game with nwn2main.exe) that must be ran in order to load the extension crashes. I’ve tried logging it and it seems to consistently crash at this error:

Unhandled Exception:
System.Runtime.InteropServices.MarshalDirectiveException: [MarshalAs] attribute required to marshal arrays to managed code.
[ERROR] FATAL UNHANDLED EXCEPTION: System.Runtime.InteropServices.MarshalDirectiveException: [MarshalAs] attribute required to marshal arrays to managed code.

I’m looking for someone with a more experienced eye who could help me break past this error. I can take care of the rest. I’ve tried the latest Wine, Proton, and TKG versions all with the same result (though Proton and TKG seemed to get a little farther visually).

Here’s a full log:

000b:fixme:winediag:start_process Wine Staging 3.21 is a testing version containing experimental patches.
000b:fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.
wine: cannot find L"C:\\windows\\system32\\winemenubuilder.exe"
000b:err:wineboot:ProcessRunKeys Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (2)
002a:fixme:thread:RtlCreateUserThread stack_commit != 0 is unimplemented
002a:fixme:d3d:wined3d_check_device_format_conversion wined3d 0x19d5f0, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, src_format WINED3DFMT_B8G8R8A8_UNORM, dst_format WINED3DFMT_B8G8R8X8_UNORM stub!
002a:fixme:d3d:debug_d3dformat Unrecognized 0x41415353 (as fourcc: SSAA) WINED3DFORMAT!
002a:fixme:d3d:wined3d_get_format Can't find format unrecognized (0x41415353) in the format lookup table.
002a:fixme:d3d:debug_d3dformat Unrecognized 0x36314644 (as fourcc: DF16) WINED3DFORMAT!
002a:fixme:d3d:wined3d_get_format Can't find format unrecognized (0x36314644) in the format lookup table.
002a:fixme:d3d:debug_d3dformat Unrecognized 0x34324644 (as fourcc: DF24) WINED3DFORMAT!
002a:fixme:d3d:wined3d_get_format Can't find format unrecognized (0x34324644) in the format lookup table.
002a:fixme:wbemprox:client_security_SetBlanket 0xf0349938, 0x1c4a68, 10, 0, (null), 3, 3, (nil), 0x00000000
002a:fixme:wbemprox:client_security_Release 0xf0349938
002a:fixme:wbemprox:enum_class_object_Next timeout not supported
002a:fixme:wbemprox:wbem_services_CreateInstanceEnum unsupported flags 0x00000010
002a:fixme:heap:GetPhysicallyInstalledSystemMemory stub: 0x3390b0
002a:fixme:dsound:IKsPrivatePropertySetImpl_Get unsupported property: {f2957840-260c-11d1-a4d8-00c04fc28aca}
002a:fixme:setupapi:CM_Get_Child 0x3390b0 0x00000000 0x00000000: stub
002a:fixme:setupapi:CM_Open_DevNode_Key 0x00000000 0x00020019 0x00000000 0x00000001 0x3390a4 0x00000001 : stub
002a:fixme:setupapi:CM_Get_Child 0x3390b0 0x00000001 0x00000000: stub
002a:fixme:setupapi:CM_Open_DevNode_Key 0x00000000 0x00020019 0x00000000 0x00000001 0x3390a4 0x00000001 : stub
002a:fixme:ddraw:ddraw7_Initialize Ignoring guid {67685559-3106-11d0-b971-00aa00342f9f}.
002a:fixme:ddraw:ddraw7_Initialize Ignoring guid {6768555a-3106-11d0-b971-00aa00342f9f}.
002a:fixme:dsound:IKsPrivatePropertySetImpl_Get unsupported property: {1aeaa606-35f0-11d1-b161-00c04fc28aca}
002a:fixme:dsound:IKsPrivatePropertySetImpl_Get unsupported property: {1aeaa606-35f0-11d1-b161-00c04fc28aca}
002a:fixme:dsound:IKsPrivatePropertySetImpl_Get unsupported property: {1aeaa606-35f0-11d1-b161-00c04fc28aca}
002a:fixme:dsound:IKsPrivatePropertySetImpl_Get unsupported property: {1aeaa606-35f0-11d1-b161-00c04fc28aca}
002a:err:ole:COMPOBJ_DllList_Add couldn't load in-process dll L"C:\\windows\\system32\\dpnet.dll"
002a:err:ole:CoGetClassObject no class object {286f484d-375e-4458-a272-b138e2f80a6a} could be created for context 0x1
002a:fixme:dpvoice:dpvclient_GetCompressionTypes 0x1cbc90 (nil) 0x339a3c 0x339a40 0 semi-stub
002a:fixme:dpvoice:dpvclient_GetCompressionTypes 0x1cbc90 0xda2a68 0x339a3c 0x339a40 0 semi-stub
0017:fixme:mountmgr:harddisk_ioctl The DISK_PARTITION_INFO and DISK_DETECTION_INFO structures will not be filled
0017:fixme:mountmgr:harddisk_ioctl The DISK_PARTITION_INFO and DISK_DETECTION_INFO structures will not be filled
002a:fixme:ntdll:server_ioctl_file Unsupported ioctl 700a0 (device=7 access=0 func=28 method=0)
002a:err:wbemprox:wql_error syntax error, unexpected TK_ID, expecting $end
002a:err:wbemprox:wql_error syntax error, unexpected TK_ID, expecting TK_SELECT
002a:fixme:d3d:wined3d_query_create Unhandled query type 0x4.
002a:fixme:d3d:wined3d_swapchain_set_gamma_ramp Ignoring flags 0x1.
002a:fixme:imm:ImmReleaseContext (0x20058, 0x48a96a0): stub
sh-4.4$ Log set to "c:\game\nwn2reportlog.log".

Client Extension version 1.0.0.28 - built Dec 22 2014 15:19:59
Copyright (C) 2008-2014 Skywing.
This release is paired with game build 1765.
Initializing in client extension mode...
Modules present: [standalone] [dm assistant] [dm scry] 

Cleaning up defunct resource manager instance 'NWN2CliExt_69'...
0046:fixme:mscoree:get_runtime_info unsupported startup flags 3
002a:fixme:thread:RtlCreateUserThread stack_commit != 0 is unimplemented
0039:fixme:d3d:state_linepattern_w Setting line patterns is not supported in OpenGL core contexts.

Unhandled Exception:
System.Runtime.InteropServices.MarshalDirectiveException: [MarshalAs] attribute required to marshal arrays to managed code.
[ERROR] FATAL UNHANDLED EXCEPTION: System.Runtime.InteropServices.MarshalDirectiveException: [MarshalAs] attribute required to marshal arrays to managed code.