Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unable to load this file." After using ficool2's map_batch_updater to pack assets into maps #163

Closed
Bradasparky opened this issue Jul 16, 2024 · 3 comments
Assignees
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@Bradasparky
Copy link

Bradasparky commented Jul 16, 2024

Describe the Bug

Game: Team Fortress 2
Compiler: Hammer & Hammer++ (8867)

When using VPKEdit to open a map that was packed using https://github.com/ficool2/map_batch_updater, I get the error "Unable to load this file. Please ensure that a game or another application is not using this file."

Before packing a map with map_batch_updater, VPKEdit has no issue opening it. After packing a map using map_batch_updater, a fresh bsp is output that isn't possibly being used by any application. The attached bsp is a map I compiled using the base Hammer editor, not Hammer++. From my testing, compiling on either doesn't affect the outcome of the error. No matter which settings I change whether it's CompressPakFile, OperateMaps, or WritePakFile being set to 0, the output map cannot be opened by VPKEdit. However, when using map_batch_updater on maps compiled by Valve, VPKEdit has no problem opening them. The map is able to be ran on a TF2 server and is packed correctly from testing on my local server.

To Reproduce

Note: Following these steps will not pack assets into the map nor compress the map. Whether assets are packed into the map or not, and whether the map is compressed or not, the output bsp gives the same error.

  1. Download https://github.com/ficool2/map_batch_updater
  2. Open up config.ini
    2a. Under [Maps] remove Batchtest=3038124704 and add testbsp=C:/Location/Of/The/Attached/BSP
    2b. Under [Operations] remove the ADD and REMOVE example lines
    2c. Under [Tool] set OperateMaps=1, CompressPakFile=0, WritePakFile=1, and LogOperations=1.
  3. Run map_batch_updater.exe and observe that there aren't any errors logged in console.
  4. Open up VPKEdit and attempt to open up the output bsp in C:\Users%UserProfile%\AppData\Local\Temp\maps\workshop
  5. Observe the error "Unable to load this file. Please ensure that a game or another application is not using this file."

Operating System

Windows 10

Attachments

vsh_tinyrock_uv.zip

@Bradasparky Bradasparky added the bug Something isn't working label Jul 16, 2024
@craftablescience
Copy link
Owner

Thanks for adding so much information to this issue, I'll take a look

@craftablescience
Copy link
Owner

craftablescience commented Jul 18, 2024

This doesn't seem to be a problem with VPKEdit. I followed the steps you specified and got the same result as you. Looking at the code, it's failing to load the internal zip file that stores packed content. This zip file is literally invalid - I pulled it out of the BSP and tried opening it with a few tools, and the header seems to be broken. I also tried opening the modified map in TF2, and it hung the game until I had to kill it with Task Manager. I would suggest making an issue on the map_batch_updater repository, because something is broken here and it's not on my end.

@craftablescience craftablescience closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2024
@craftablescience craftablescience added the invalid This doesn't seem right label Jul 18, 2024
@craftablescience
Copy link
Owner

And for reference, this is the ZIP that I pulled out of the modified BSP. I'm not sure how it's broken, but maybe you'll find this useful: 4ce8e5d9-c1b5-6879-927e-9b7637752d3b.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants