Half-Life 2: VR Mod

Half-Life 2: VR Mod

Resident Evil 2: Source
AugustCoder  [developer] 17 Jan, 2023 @ 8:13am
VPK Packaging tips
Hi, just a tip for packaging this: Yes, each individual VPK is limited to 200MB, but the Workshop uploader and HL2VR support "split" VPKs. If you use the -M flag with vpk.exe then it will produce a content_dir.vpk file and then files like content_000.vpk, content_001.vpk, etc.. If you select the content_dir.vpk file, then the uploader tool will automatically upload all the associated files.

Secondly, I tested maps in VPKs before and they seemed to work fine. You put them in the maps/ subfolder, correct?
< >
Showing 1-13 of 13 comments
Qwazzy  [developer] 17 Jan, 2023 @ 8:37am 
Thanks for the tips. That's actually what I tried the first time - it made a small-size "dir" pack and three packs with the actual content in them, including the maps inside the maps/ folder.

To be clear, the game does see the maps in that circumstance, and I can select them and try to load them. The issue is that when I do, the console outputs an error message saying the BSPs are not valid and cannot be loaded.
Qwazzy  [developer] 17 Jan, 2023 @ 9:23am 
I think I figured out the first issue, though I ran into another.

The initial not loading thing is (I believe) due to the way Steam handles syncing workshop subscriptions. If HL2VR is closed but SteamVR is still running, it won't sync content until you close SteamVR. I was having content not sync until I did that. So I think that's what was happening. I packaged the four maps into a test VPK, uploaded that, and subbed to that while unsubbing to the four separated maps. And the maps load fine.

So you are correct about maps loading fine from VPKs.

However, there was another issue. When loading them from a VPK, multiple textures and models are broken with pink checkmarks/errors. When loading the separated ones instead (again, unsubbing and resubbing to the separated ones) they load fine. I'm wondering if it means there's textures and models baked into the BSPs that aren't getting loaded when they're inside a VPK for some reason. Or it could be something else entirely.

If I'm right, I probably need to investigate how to extract that content out of the BSPs and putting them with the rest of the assets.

If you're an admin and can see private files, the addon in my files labeled "test" is the four map BSPs in one VPK. Feel free to try loading that + Assets 1 and 2 and see if you get the same result of broken textures/models as I did.
AugustCoder  [developer] 17 Jan, 2023 @ 3:13pm 
Yep, it looks like that is what is causing the problem:

And I've verified there are lots of asset files packed in the BSP. So if you extract those then they should work.
Qwazzy  [developer] 17 Jan, 2023 @ 4:07pm 
I’ll look into that. To be fair, it won’t change much at this point. With assets extracted from the maps, it may likely push the total size up to require 4 total addons, not much better than 6.(Ignore that, I was misunderstanding the usage of "_dir" files when using the uploader, oops!) But in the interest of minimizing necessary addons, I’ll look into that when I have some free time later.

Thanks for the help.
Last edited by Qwazzy; 18 Jan, 2023 @ 12:28pm
Qwazzy  [developer] 18 Jan, 2023 @ 6:07am 
I missed the part you mentioned earlier about the tool recognizing the _dir vpk and uploading all files at once, so i was trying that just now in hopes of putting everything into one workshop submission.

Sadly it doesn't seem to work, I just keep getting "Failed to upload item. Please try again."

If it helps to know, the three packs plus the _dir all total to about 550 mb.
AugustCoder  [developer] 18 Jan, 2023 @ 7:23am 
I'll experiment a bit and see if I can get it to work.
AugustCoder  [developer] 18 Jan, 2023 @ 8:21am 
I got it to work. First I unpacked all of the BSP and VPK files from the workshop items you posted.
Then I combined them all into one folder named "content", ran "vpk.exe -M content", and it generated the _dir and four additional files (because the total size was a little over 600MB).
Then I selected the _dir file in the uploader tool and uploaded. It took a little while, but succeeded.
Lastly, I unsubbed from all the RE2-Source workshop items except the one I uploaded and tested it, and everything seemed correct.

If you're still having trouble, try running "HL2VRWorkshopUploader.exe > log.txt" and post the log after you get the error.
Last edited by AugustCoder; 18 Jan, 2023 @ 8:25am
Qwazzy  [developer] 18 Jan, 2023 @ 11:27am 
I tried, and it does output a log file, but it stays empty with no text in it, even after the fail and subsequent closing of the program.

What program did you use to unpack the BSPs, by the way? I used VIDE 0.45b, I'm starting to wonder if maybe it didn't do the job right. Though I wouldn't know why that would potentially make an upload fail if that were the case anyway.
Last edited by Qwazzy; 18 Jan, 2023 @ 11:29am
AugustCoder  [developer] 18 Jan, 2023 @ 11:36am 
I used the bspzip.exe in the Half-Life 2 VR/bin folder (same folder as vpk.exe).
bspzip.exe -extract re2_1_gmod.bsp map1.zip -game "path/to/Half-Life 2 VR/hlvr"

Strange that the log is empty though, it should at minimum have "Loaded results..." in it.
You are using the latest version, with the upload progress bar and tags support, right?
Last edited by AugustCoder; 18 Jan, 2023 @ 11:39am
Qwazzy  [developer] 18 Jan, 2023 @ 11:39am 
Yes, it was the latest version.

I just managed to upload. I'm not 100% certain on this, but I think the fails were due to the thumbnail I was trying to use? Because the success was with using a different image and the exact same VPK files.

I tested the previous thumbnail with some other random VPK and it again fails, so I think that's the reason.

As for why, the filename is "2021-12-02 14.04.46.jpg" so I think the extra "." marks are confusing the uploader tool?

At any rate, I'll test my upload like you did, and assuming it plays well with no issues, I'll be able to update the first submission to have everything consolidated into one sub instead of six.
Last edited by Qwazzy; 18 Jan, 2023 @ 12:29pm
Qwazzy  [developer] 18 Jan, 2023 @ 11:40am 
Oh, and it did output this time to a log. The first upload mentioned is the successful re2 repack, the second is the test of that bad thumbnail:

Loaded results... Updating Title... Updating Description... Updating Image... Updating Content... Creating C:\Users\imabo\AppData\Local\Temp\jqszvmob.o5j\content_dir.vpk Creating C:\Users\imabo\AppData\Local\Temp\jqszvmob.o5j\content_000.vpk Creating C:\Users\imabo\AppData\Local\Temp\jqszvmob.o5j\content_001.vpk Creating C:\Users\imabo\AppData\Local\Temp\jqszvmob.o5j\content_002.vpk Successfully uploaded workshop item with fileId 2920041082 Loaded results... Updating Title... Updating Description... Updating Image... Updating Content... Creating C:/Users/imabo/AppData/Local/Temp/2yr4aani.ygl/content.vpk src\common\pipes.cpp (602) : m_OutstandingCallbackThreadId != ThreadGetCurrentId() src\common\pipes.cpp (602) : m_OutstandingCallbackThreadId != ThreadGetCurrentId() src\common\pipes.cpp (602) : m_OutstandingCallbackThreadId != ThreadGetCurrentId() src\steamnetworkingsockets\clientlib\steamnetworkingsockets_lowlevel.cpp (3243) : Trying to close low level socket support, but we still have sockets open!
AugustCoder  [developer] 18 Jan, 2023 @ 11:41am 
Interesting... I had a similar problem with it not uploading when trying to use a PNG file, which is why I disabled that as an input. Unfortunately, the Steam API wasn't really give much info as to why it failed. I might have the uploader tool copy it to a "safe" name first and see if that helps.

In any case, I'm glad you got it working. Thanks for figuring it out with me, cause conversations like this can help me improve it in the future.
Last edited by AugustCoder; 18 Jan, 2023 @ 11:43am
Qwazzy  [developer] 18 Jan, 2023 @ 12:13pm 
Thank you for your help especially, I doubt I would have been able to figure it all out on my own.
< >
Showing 1-13 of 13 comments
Per page: 1530 50