Packing custom props/textures "into" .bsp ?

Discussion in 'Mapping Questions & Discussion' started by REEJ, Sep 24, 2010.

  1. REEJ

    REEJ L7: Fancy Member

    Messages:
    437
    Positive Ratings:
    167
    A thing I'm trying to figure out is:
    How exactly do I include custom props/textures with my map file?

    Should I just include them with bsp and all the root folders in a ZIP/RAR file?
    (will that give the instruction to steam peers on what to download?)

    Also,
    I've seen a sentence "...packing into .bsp" a few times around which sounds quite mysteriously, and didn't find any tutorial on that :facepalm:
     
  2. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    Packing into the BSP requires a special program, because it actually modifies the BSP file by pushing the data into a special section of it. You cannot use tools like Winzip or 7-zip.

    The "official" way is called bspzip.exe, which comes with Source SDK and Hammer. The only problem is that it is a command-line program, and it requires you to manually list every single file you want to insert.

    Most people use other utilities that can help you deal with large amount of custom content.
    • PackBsp (I'm biased, I wrote it recently)
    • Pakrat (discontinued in 2006, works a bit differently)
    • Map Analyst (don't know much about this one)

    http://developer.valvesoftware.com/wiki/Packbsp
     
    • Thanks Thanks x 1
    • Agree Agree x 1
    Last edited: Sep 24, 2010
  3. REEJ

    REEJ L7: Fancy Member

    Messages:
    437
    Positive Ratings:
    167
    Terrific!
     
  4. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,570
    I havn't had any problems with pakrat though some people complain its auto find feature is lacking consistency. But as long as you know what items you need to include and where to find them you should be able to pack all your content without complication.
     
  5. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    And whatever tool you use, giving your map a final test to make sure everything looks right before release is very important.

    To test that everything packed correctly, you need to make it so that the files are no longer available in the normal folders, so that if your custom brick texture shows up, you know it's coming from the BSP and not somewhere else.

    One way to do this is
    • Rename your "tf" folder to something like "tf-normal". For example, on my machine, that would be in:
      Code:
      c:\program files\steam\steamapps\Team Fortress 2\[b]tf[/b]
    • Starting TF2 will re-create the "tf" folder, this time with only default stuff in it. (No custom content, custom maps, screenshots, settings, etc.)
    • Copy your map from "tf-normal/maps/foo.bsp" to "tf/maps/foo.bsp" folder, so that you can load it up.
    • Start TF2 and run around to make sure your map looks right.
    • After testing, rename the "tf" folder into "tf-testing", and swap the "tf-normal" folder back to its original name. This way you have all your normal settings and files back in place.
     
    • Thanks Thanks x 2
    Last edited: Sep 24, 2010
  6. Rexy

    aa Rexy The Kwisatz Haderach

    Messages:
    1,795
    Positive Ratings:
    2,367
    Hey that's a great idea Terr, haha, previously I had been moving my folders to the desktop...I'm a real genius, that's for sure. I'll be renaming my folders from now on instead.
     
  7. XFunc_CaRteR

    XFunc_CaRteR L5: Dapper Member

    Messages:
    248
    Positive Ratings:
    17
    I packed my content using both Pakrat and PackBSP - made explicitly certain that the models were in the bsp - then tried your technique here and they didn't show up in-game.

    For Artpass I just included a zipped up folder, just to meet the deadline.

    Are you allowed to have custom folders inside custom content? My custom models that aren't appearing are inside a "models/artpass" folder.
     
    Last edited: Sep 25, 2010
  8. Draco18s

    Draco18s L9: Fashionable Member

    Messages:
    622
    Positive Ratings:
    136
    I did something similar to that and had some textures show up as fullbright (OH GOD, MY EYES) and an almost complete lack of any props what so ever.
     
  9. XFunc_CaRteR

    XFunc_CaRteR L5: Dapper Member

    Messages:
    248
    Positive Ratings:
    17
    It's a .qc file issue I think. I had NO idea that this needed to be done as well.

    The amount of esoteric steps that need to be taken to work with Source is really leaving a bad taste in my mouth. With the amount of money Valve makes, you'd think they could build simple, user-friendly tools that automate these under-the-hood steps.
     
    Last edited: Sep 25, 2010
  10. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    What does GCFScape show you about those folders in the BSP?
     
  11. Draco18s

    Draco18s L9: Fashionable Member

    Messages:
    622
    Positive Ratings:
    136
    Be thankful we have the tools we have at all. Hammer is amazingly well built as it is. We're working with (almost) the same tools Valve does, and the reason hammer doesn't auto-pack the textures and models is because they're assumed to be packed else where (the gfc files) because Valve maps shouldn't NEED to pack those assets.
     
  12. XFunc_CaRteR

    XFunc_CaRteR L5: Dapper Member

    Messages:
    248
    Positive Ratings:
    17
    I fixed it. I just didn't realize I had to pak the materials for the models as well.