Compilepal v20 - improved paking

fubarFX

The "raw" in "nodraw"
aa
Jun 1, 2009
1,720
1,978
So CompilePal was just updated, I have personally been working on the code for it and I can tell you it's a pretty great paking tool. But what I'm saying has no value and remains to be proven (that's where you come in). Try out the paking feature of compilepal and tell me what you think.

you can get the lastest version of CompilePal here https://github.com/ruarai/CompilePal/releases/download/v022/Compile.Pal.022.zip

If anything is not getting paked correctly, anything at all that is missing, report it here and I will add support for it eventually. The tool is pretty complete right now tho, we'll fetch all your level textures, models, model textures, (and we even support textures that are referenced in particle files) and custom sounds. Then we have particle manifests, soundscapes, soundscripts, detail files (vbsp), nav... you name it!

for now, my aim was to support the orange box 100%. l4d and p2 are on the radar, they will work but some things may be missing.
 
Last edited:

fubarFX

The "raw" in "nodraw"
aa
Jun 1, 2009
1,720
1,978
Does it allow you to choose the folder you want scanned? I have all of my custom content in a folder in the root directory to keep it cleaner. I'm on mobile or I'd check myself.

how does that even work? do you have to reference the folder in your gameinfo.txt file? if so, then yes, it probably works. (I wouldn't know, I didn't work on the part that parses gameinfo).

you'll know what folders it's looking in from the compile log.
 

seth

aa
May 31, 2013
1,019
851
Yeah, I have a gameinfo.txt file in the folder and I have Hammer reference it as my game folder so it'll pull assets both from there and the stock files. If I could specify to have that folder scanned, that'd be great.

I've mostly been very happy with CompilePal, but one thing I don't like is you don't have much control over the compile parameters. I can't add any. I want to add -hijack to the game section so I can recycle the current instance of TF2, but I can't do that with CompilePal, so if I'm just tweaking stuff and compiling often with TF2 open, I typically don't use CompilePal.
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
I can't seem to get it to run. I have extracted the zip to tf/bin/Compile.Pal.20 and am running CompilePalX.exe but it doesn't come up on the screen. Nor does it leave a frozen .exe in Task Manager. I'm sorry if I missed something, but I can't find a guide on the web to using it and there are screenshots of a GUI.

Does it pack custom rope textures? Pakrat and VIDE don't seem to find them.

Does it scan soundscape and soundscript files for references to custom wav and MP3 files? Pakrat and VIDE only scan the BSP, and so if you use soundscripts exclusively, and never refer to a sound file in the map using its raw filename, they won't pick it up and I have to pack them manually. It's quite annoying.

Does it include VGUI images like menu_photo VTF and VMT?

Does it find alternative language map information files? E.G.:
  • maps/mapname_dutch.txt
  • maps/mapname_english.txt
  • maps/mapname_finnish.txt
  • maps/mapname_german.txt
  • maps/mapname_italian.txt
  • maps/mapname_norwegian.txt
  • maps/mapname_polish.txt
  • maps/mapname_romanian.txt
  • maps/mapname_russian.txt
  • maps/mapname_spanish.txt
  • maps/mapname_swedish.txt

Is it smart enough to know when a particular model skin is never used in the map, and exclude it from the pak to save space?

If it can do all that it would be a one-stop compiling and packing solution. If we could just hit one button to do EVERYTHING then I would die happy.

Thanks for taking time to update it, fubar!

EDIT: One more suggestion: If it could be told to remove cubemaps after compiling, that would save us having to manually remove all those black cubemaps that Hammer inserts (though Frozen said a fix for that may be coming). We would be able to go straight in to TF2 and... and... *splurge*
 
Last edited:

tyler

aa
Sep 11, 2013
5,102
4,621
Thanks Fubar, I can't wait to try this. Though you should link to the downloads area rather then direct to the zip so you don't have to edit the link every update.
 

seth

aa
May 31, 2013
1,019
851
Matty, you don't need to extract it to the bin directory. I just have it in a folder on my desktop. I know you're smart enough not to do this, but be sure you have all the dll's in the same folder as the .exe before you run it.
 

worMatty

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

I started to put my tools in the bin folder for some unknown reason a long time ago, so I just put any new ones in there. I know it shouldn't make a difference, it's just habit.

Err... DLLs? Sorry, I don't know about those.
 

taxicat

L1: Registered
Dec 29, 2012
43
152
Finally figured out how to get it launch, you have to install the old broken Source SDK and select a game configuration there. I uninstalled Source SDK after the steampipe update broke it two years ago and all of its tools were moved to TF2's bin folder. Run steam://install/211
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
Ah. That's probably not a great thing, then; would it be possible to patch SDK dependency out?
 

Kube

Not the correct way to make lasagna
aa
Aug 31, 2014
1,342
1,849
I got the packing tools to pack my custom textures, but not the custom models included in the Construction Pack (in their default directory as-installed). Can you give any indication of what I'm doing wrong?

I might as well note one nit-picky 'complaint' I have with the tool: When you compile a map, the compiling screen has no link back to the first screen if you cancel the compile (or maybe at all?). If I'm compiling a sequence of maps in a row, it would be helpful to be able to go back to this screen and load the next map without having to close out of CompilePal.

Seriously, though, CompilePal is great, and I plan on using it in the 72-Hour Contest :)

Edit: Congrats on the big three-o-o-o, steve!
 
Last edited:

fubarFX

The "raw" in "nodraw"
aa
Jun 1, 2009
1,720
1,978
I got the packing tools to pack my custom textures, but not the custom models included in the Construction Pack (in their default directory as-installed). Can you give any indication of what I'm doing wrong?
nope, no idea what's going on with that.

I might as well note one nit-picky 'complaint' I have with the tool: When you compile a map, the compiling screen has no link back to the first screen if you cancel the compile (or maybe at all?).
you have two tabs at the top called "config" and "output", config takes you back to the first screen.
the UI has some usability issues I might try to improve at some point

Does it pack custom rope textures?
maybe, the method we have is pretty "catch all" but I cannot say I have tested those.

Does it find alternative language map information files? E.G.:
no, to be implemented.

Is it smart enough to know when a particular model skin is never used in the map, and exclude it from the pak to save space?
not yet, it's actually impossible to do with the current documentation. I have it almost figured out but there's one missing puzzle piece I can't quite put my finger on. I'll have to take a closer look at the binaries and see what I can make out of it. We're in uncharted territories.

everything I have not commented on should be supported.

as for the sdk dependency, I'm not in that part of the codebase but I may get to it eventually, along with the gameinfo stuff. As a side note, BspPack is an independent executable that can be used from the command line without CompilePal. I probably should document its usage at some point
 
Last edited:

taxicat

L1: Registered
Dec 29, 2012
43
152
So I just tried to compile with it for the first time, and it gave me a material-not-found error for every material in my map, including tool textures. The material directory it listed was correct - J:\Steam\ ... \tf\materials\.
 

fubarFX

The "raw" in "nodraw"
aa
Jun 1, 2009
1,720
1,978
So I just tried to compile with it for the first time, and it gave me a material-not-found error for every material in my map, including tool textures. The material directory it listed was correct - J:\Steam\ ... \tf\materials\.

I wouldn't know about what happens during vbsp, maybe some configuration problem.
 

Fruity Snacks

Creator of blackholes & memes. Destroyer of forums
aa
Sep 5, 2010
6,394
5,571
So I just tried to compile with it for the first time, and it gave me a material-not-found error for every material in my map, including tool textures. The material directory it listed was correct - J:\Steam\ ... \tf\materials\.

Is this the engine error when you try to boot up the map?
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
I eventually got CompilePalX to work by running it as Administrator, and bypassing the Microsoft SmartScreen prompt (Windows 8.1). After that it runs normally.

Two problems, though and one piece of feedback.

1. I am having trouble packing the stuff in one of my maps. The compile process goes fine, but the pack bit does not. I get an error:
Finding sources of game content...
Found search paths...
Found wildcard path: C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf\custom\
Found search path: C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf
Found search path: C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf\bin
Found search path: C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf\download
Reading BSP...
Initializing pak file...
Something broke:
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.Add(KeyValuePair`2 keyValuePair)
at BSPPack.PakFile..ctor(BSP bsp, List`1 sourceDirectories)
at BSPPack.Program.Main(String[] args)

2. I have changed my output directory (Copy) in Hammer but it has not changed in CompilePal.

Feedback: It does not pack custom rope materials.