Repacking your maps

Geit

💜 I probably broke it 💜
aa
May 28, 2009
598
1,161
Is this a new standard now? Something that I should always do before I put a map up here and/or for gameday testing?

Yes - if I ever get around to it, the site uploader rewrite will urge you to repack your map before uploading it to the site.
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
Can we get egan/whoever to put a big flashing banner link to this thread in all the gameday threads from now on? I bet a lot of people haven't even looked at this thread yet.
 

HQDefault

...what
aa
Aug 6, 2014
1,056
535
Should do, most people tend to use BZ2s because it's faster to upload smaller files, but that's irrelevant if the map is repacked.

Uh, mine says it won't take BSP, or were you talking about the TF2 server, not the site?
 
Last edited:

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
Just to be clear... When we're finished with cubemaps, custom content packing, etc for a map that's also going to be on the workshop, we'll could have two copies --

1) one that's been versioned and compressed by hand for the download link here and for upload to the server; and

2) one that's unversioned/workshop versioned that's been compressed by the workshop upload tool when submitting there.

I'm assuming we don't want to manually compress and THEN have the workshop compress it again, correct?
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
Correct. The workshop submission system should always be given the unrepacked BSP. Though it probably wouldn't matter. You can use the resulting workshop map as your repacked one if you like, though it would probably be quicker to repack it locally than download it from the workshop.

You don't have to worry too much about unversioned workshop maps, at the moment. The server will update and run them regardless of any changes in file name. They use the UGC ID and the file name can be anything.
 

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
I knew versioning didn't matter for workshop copies, but I'd like to keep doing versioned ones for the tf2maps server prior to uploading to the workshop. Just as a QA check and to look for obvious issues that should be fixed first.

Anyway, thanks for the confirmation!
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
I understand. I thought you were preparing two maps: one with a version suffix and one without. I was hoping to save you some time by just producing one, version-suffixed map for both channels.

You are welcome :)
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
Hi, folks.

bsp_repack has a new parameter, -nocompress which works like the bspzip one in that it decompresses a repacked map. I experimented with tc_hydro, and the resulting file size was actually a few bytes higher than the uncompressed version, so I do not think it's a reliable way to obtain a copy of the original.
 

henke37

aa
Sep 23, 2011
2,075
515
I think it is more that the compression isn't quite reliable period. There are some bugs.
 

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
Quick question about the -compress command and cubemaps.

I use BspZip during the compile, in-between VRAD and it running the game. Currently, my BspZip parameters looks like this:
Code:
-addorupdatelist $path\$file "<map_bspzip.txt>" $path\$file
Assuming I added the -compress command to the line, what would happen if I then tried to build cubemaps? Would those cubemaps be compressed or would it break something?
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
You need to build the VIS table and lighting before you can compress the map, Werewolf. Repacking needs to be done after the compile. I'm not sure if it's possible to add things to a map after it's repacked. I expect it wouldn't work, or it would break something. Anything that gets added afterwards certainly wouldn't be automatically compressed, and I know from Crash that repacking a map a second time causes problems. You'd be better off repacking it only after you build the cubemaps. You can do that using the console command bsp_repack as the next thing you do after your cubemaps have been built. Repacking the cubemaps saves quite a lot of space.
 

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
You need to build the VIS table and lighting before you can compress the map, Werewolf.
I do already. vbsp > vvis > vrad >bspzip > run map

Also I find that when I use bsp_repack, all my packed content works except for custom .wav sounds. They suddenly go missing while all the custom textures stay. Any thoughts into that?
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
Ah, sorry mate. I got confused.

Do you mean they go missing from the bsp? I haven't had any reports of that happening, or wav files not working. I've tested it in one of my maps and they stick around and play, for me.
I can tell you that custom sound scripts and soundscapes included in Workshop maps don't work at all.
 

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
Do you mean they go missing from the bsp? I haven't had any reports of that happening, or wav files not working. I've tested it in one of my maps and they stick around and play, for me.
I can tell you that custom sound scripts and soundscapes included in Workshop maps don't work at all.
When the sounds should play, I get an error message in the console saying they are missing.
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
Strange, that. Would you like to send me the BSP to see if I can work out what's wrong? We have had problems in the past where certain kinds of file weren't being decompressed properly.
 
Last edited:

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
Today I used bsp_repack -nocompress on a map I had previously repacked. The contents of the resulting map were viewable in GCFscape, but VIDE failed to read the file when I tried to open it using its pak lump editor.
 

henke37

aa
Sep 23, 2011
2,075
515
Yeah, I am fairly certain that the lump compression is faulty. It "kinda" works "most" of the time, so it's not usually detected.