Writing a Pakrat replacement

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Discovered a bug: If it fails trying to load clientregistry.blob, Steam is probably in-between being updated. Not much I can do about that except make an error message and pray Valve doesn't change their file format on me.

im gonna throw a crap ton of custom stuff into a map and see what happens, if that what this alpha does.
EDIT: It opens when I hit the run.bat and then immediately closes, is it me doing something wrong?
Unfortunately just double-clicking it won't work right now, you have to run it from the command line to you can type everything out. You could also do what I describe in the next paragraph...

And no, you dont need to when making custom models at all. You make a one liner .bat file and simply drag stuff into there which redirects to the valve one, and it all happens magically.

If it'd be more comfortable, do this:

Edit the batch file, add a "pause" at the end and replace the %* with all the stuff you'd normally type in. The pause prevents the screen from flickering out of existence as soon as it is done.

Then you can just alternate between tweaking it and double-clicking to launch. (Ensure spaces in filenames get quoted) Ex:
Code:
java -jar packbsp.jar -g "c:\program files\steam\steamapps\bob@example.com\team fortress 2\tf\" -e orangebox "c:\documents and settings\bob\bob's documents\foo.bsp" "c:\packedup.bsp"

Can't get it to work at all. Just constantly gives me the no game directory given and no Vproject environment variable found.
Try running vconfig.exe from the SDK and/or launching Hammer via the Source SDK launcher. Either activity ought to set the environment up.

----------------


While I still want to do a "real" GUI, on the next release I'll try making a really basic GUI wrapper for all this. (It'll just show you the output in a scrollable window.)
 
Last edited:

lustygoat

L2: Junior Member
Feb 14, 2009
66
23
Do you mean it ends, or that it freezes?

That ought to be where it starts parsing the BSP. Does running vbspinfo manually work? Perhaps the hllib.dll version doesn't work on x64? Hmmm.

It freezes... sits there using all of one processor thread, doesn't output anything or print anything else to the command window. Vbspinfo.exe works fine. Anything else I could try?
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
New Version: 1.0

See the Interloper thread for details.

I took two or three hours and put on a GUI that wraps the command-line output and lets you use a file picker etc. It should feel a lot more comfy to use. It should also be a bit clearer when things explode. (It's also pleasingly fast once you click "RUN", after the initial startup time.)
 
Last edited:

Darth Cyrax

L2: Junior Member
Nov 29, 2008
94
8
Sorry for the ambiguity, I was asking if it packed custom sounds, and stating that it would be nice if it did. I thought it didn't because you don't have that on the list of items it detects and packs:p.
Anyways I'll test this out one of my maps with custom skybox, models, textures, soundscapes, sounds, particles, and intro page. I'll let you know how it goes.
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
Downloading now, I'll be sure to run something through it some time in the next few days if not tonight.
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
I'm going to magically assume that all the "won't start" problems people had with the pure-command-line version aren't happening with the GUI one, unless someone disagrees :p

Right now the direction of the organic growth of the project (largely driven by my own creative mania) is:
  • Splitting off TF2-specific map parsing (like custom flag models), making it easier to slot in things for other mods' entities.
  • Displaying a graph of dependencies so that people can verify that it is detecting things correctly with less pain than reading the console output.
And by graph, I mean the mathematical usage of the term (not a screenshot):
directed_acyclic_graph.png
 
Last edited:

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
I need some clarification/confirmation on the following points:

  • Is it a good idea to pack soundcache files? Is it better to make the clients generate and store them as needed?
  • I'm assuming people will want to pack their own AIN files, since they may be customized especially for games like L4D.
  • For AIN/Soundcache files, does the "out of date" bug still exist, where the .ain needs to have a timestamp a leeeetle-bit newer than the BSP that contains it? If so, then I need to code in something to do it automatically.
  • True or False: TF2 map intro movies and intro pictures can't be packed, they have to exist in the map directory.
  • Map descriptions, however, can be packed, as maps/mapname.txt
  • Is it just TF2, or do various other games look for maps/mapname_languagename.txt?

On a related note, once I get the L4D2 demo downloaded, I'll use it to make sure that PackBSP can handle the VPK files instead of GCF files, etc. (It ought to once I change a single line of code, but...)
 
Last edited:

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Just a bump for if anybody can double-check my assumptions in the last post before I put them into code.

Currently I'm rewriting the whole node/graph/dependency system in order to (A) deal with a special case of logic for model dependencies and (B) make the whole thing easy to draw as an on-screen dynamically growing self-organizing flowchart of dubiously-useful awesomeness.
 

Cameron:D

L6: Sharp Member
Sep 28, 2008
363
145
True : TF2 map intro movies and intro pictures can't be packed, they have to exist in the map directory.
All I can answer

But this program is going to the teh awesome!
 

Nutomic

L11: Posh Member
Feb 7, 2009
888
177
Last edited:

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,776
7,672
"intro pictures" is an ambiguous term referring to nothing in particular. There are map description pictures (packable) and server browser map thumbnails (unpackable).
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Sorry, I was referring to the same "intro pictures" you would see in proximity to the "intro movie", after already joining the map. (That is, the "map description pictures".)
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Hey look everybody, it's the Swamp Pack vignette map... with friends!




The blue nodes are not really dependencies, they're a bit of algorithmic fluff I had to put in in order to accurately simulate how MDL files have multiple search paths for their skins. (Anything leading into a blue node is a model, Materials (M) and Textures (T) are most everything else.)
 

Fraz

Blu Hatte, Greyscale Backdrop.
aa
Dec 28, 2008
944
1,152
I don't know, but I don't think it's working for me.

The GUI Version sits at:

Packbsp1.jpg


If I try running it via double clicking packbspgui.bat:

Packbsp2.jpg


If I try going to run -> packbsp.bat it flashes a window then disappears.

Now, I don't know if the first one was running or not, it stayed like that for around 10 mins with no change, even though I KNOW custom stuff is in the map, (swamp content) any ideas?
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
I'll look into it. But if it can't find jawaw, then I'm not sure how you're getting the GUI to launch at all...

It might be that the last-uploaded version still has a bug I fixed regarding certain error messages. Does it work right if you change the destination file to an absolute location? (C:\...etc)

It seems the invisible hand has decided I'll have a lot more free time to work on it in the next few weeks.
 

Ravidge

Grand Vizier
aa
May 14, 2008
1,544
2,818
I downloaded 1.0 and tested it with plr_panic_b1. And it seems to get most of it right but there were some issues.

It didn't pack my custom sound (.wav)
It didn't pack all custom materials. (the 'chaos' and 'shmitz' folders, various files in 'ravidge')
It packed unused model skins. (operativebeam01 and 02, dynamite_sm_02)
Missing a lot of modelfiles, I don't really know if they are important, but I will assume they are! (.vtx .vdd and .phy)


SS-2009.11.22-13.42.03.png


SS-2009.11.22-13.52.19.png


No errors with the application itself, worked great.
 
Last edited:

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
Jimbombcb: I'll check that it's doing overlay textures correctly. AFAIK it's relying on vbspinfo as a way to detect them, but I haven't tested them explicitly... I need to just bite the bullet and make a new map for my unit-tests that includes more special stuff.

Ravidge: Domo.
  • Could you post or PM me the text output?
  • The lack of .phy, .vtx, and .vvd files is "normal" in that I haven't made it look for them yet. AFAIK they're all useful to include, so that'll be in the next version.
  • Are the WAVs via a soundscape, or via something like ambient_generic or a control-point sound?
  • For some models (like control-point models) it needs to pack the "unused" skins because the skin can be dynamically changed during playtime. I figure it's better to treat all the models like that to be safe: The extra filesize shouldn't be that significant... It could be a possible optimization in the future, however: To determine which models (esp. prop_static) can't possibly have their skins switched.
  • It should only pack materials which are "in use", regardless of how big your collection is on the hard drive. Are you sure something in your map is actually using those textures? If so, please tell me what so I can catch it next time.
 
Last edited: