[GUIDE] The best way to organize your custom content

Discussion in 'Tutorials & Resources' started by sevin, Mar 2, 2016.

  1. sevin

    aa sevin

    Messages:
    952
    Positive Ratings:
    647
    INTRO

    Are you a neat freak? Are you not a neat freak? If you answered yes or no to either of those questions, you are ready to organize your custom Source engine content like a pro!

    The use of custom assets is often what takes a well-playing, average looking map to the next level. Custom content can help flesh out a theme, define style (and subsequently the author), and generally keep your map looking fresh. I believe every map should incorporate at least a few custom textures or models to help differentiate and diversify itself from the likely thousands of other custom maps using the same theme. If you feel similarly to me, then you probably have loads of custom assets piling up on your hard drive. It can be a chore to sift through, especially when that custom content is mixed in with default assets.

    Enter the "development" folder approach. I've been organizing all my custom content this way since TopHattWaffle made a video and subsequent article on the subject. Instead of dropping all of your freshly made/downloaded assets into your tf or even tf/custom folder, instead drop it in an entirely separate root folder in the Team Fortress 2 directory. You can call this folder whatever you want; I like "tf_dev".

    [​IMG]

    UPDATE 2016-08-13:
    I've actually figured out an even cleaner method than just a simple tf_dev folder. I kept getting bugged by the fact that I couldn't have separate folders inside tf_dev to contain individual content packs or models/materials etc. I wanted to be able to browse the folder and dive straight into a particular pack or something and have everything separate.

    So instead of:
    Code:
    tf_dev/materials/japan
    I could have:
    Code:
    tf_dev/content_packs/japan_assets/materials/japan
    I figured it out. It recycles the way the custom folder works, so buffers can be created without needing to add too much to the gameinfo.txt.


    SETUP

    Now, it's all well and good to have your own folder to drop stuff into, but how are we going to get Hammer to see it and preserve the default assets while we're at it? Simple, we need to create a custom gameinfo file that Hammer will reference to pull assets.
    1. Copy the gameinfo.txt file from the root tf directory into our new tf_dev directory.
    2. Scroll underneath the "SearchPaths" heading.
    3. Add a "game+mod" entry and enter "tf_dev/*" on the same line. You will also need to add any additional folders you have inside the tf_dev folder here as well. Remember that when we use the "*" modifier, these folders get treated like the custom folder, so you need a buffer folder in between it and your assets for them to be seen. This is actually a blessing because it makes it easy to separate the assets.
    4. When we have Hammer reference this file, it will still find the default content, but also search our tf_dev folder as a game path.

    [​IMG]


    Once you have your gameinfo file setup, we're almost done. Now we just need to let Hammer know it exists!

    1. Open Hammer and navigate to the options in the tools menu.
    2. Under the Team Fortress 2 configuration, find the game directory section.
    3. Change the final directory from "tf" to "tf_dev".
    4. Hammer will now use our tf_dev directory to pull the gameinfo file (and subsequently, all assets).

    [​IMG]

    You should be all set! Just treat your tf_dev folder exactly like the custom folder. You can create container folders in there and drop all of your custom content inside them. Just be sure to add any container folders to your gameinfo. Since we're using the "asterisk method", you don't need to reference each folder inside the container folders because they will be automatically scanned.

    [​IMG]

    Now, open up Hammer and check to be sure everything is properly loaded in the messages box at the bottom of the screen.

    [​IMG]

    You should see your tf_dev folder in the list, as well as any content you have in your custom folder and everything else referenced in the gameinfo file we created earlier.

    MAPS_DEV

    I also want to make a special note of the maps_dev folder I created inside tf_dev. Thanks to the asterisk method, you don't need to separate your map files and their content. Inside maps_dev, you just need to create a container folder for your map and then you can have all your content in there as well as your map files. Since it's all set up in the gameinfo and Hammer reads it, the content will be viewable in Hammer and will be packed automatically by CompilePal.

    Code:
    maps_dev/
    ├ tfdb_toolsheds/
    │  └ b2/
    │    └ tfdb_toolsheds_b2.vmf
    │    └ tfdb_toolsheds_b2.vmx
    │    └ tfdb_toolsheds_b2.log
    │    └ ...
    │  └ scripts/
    │    └ soundscapes_tfdb_toolsheds_b2.txt
    
    ├ arena_goldtooth
    │  └ rc6/
    │    └ arena_goldtooth_rc6.vmf
    │    └ arena_goldtooth_rc6.vmx
    │    └ arena_goldtooth_rc6.log
    │    └ ...
    │  └ materials
    │    └ goldtooth
    │      └ goldtooth_material.vtf
    │      └ goldtooth_material.vmt
    │  └ ...

    EXTRAS
    • You will be able to see your assets in Hammer, but because the tf_dev folder is not referenced by the game, none of the content will be visible when you load up your map unless it's been properly packed. This is a great way to check to be sure you've packed correctly without having to move your files around.
    • Since this method reuses the way the custom folder is handled, we can create subfolders inside of tf_dev that can be named whatever we want, so content can be separated and organized. You will also be able to drop VPKs and tools you use in the root tf_dev folder and they will be picked up by Hammer. I have ABS's stuff dropped in there, as well as .bat scripts for repacking and un-repacking maps.
    • This method will of course work for any Source game, so you can use it for your next CS:GO project as well.

    Thanks for reading, and happy mapping!
     
    • Thanks Thanks x 6
    • Like Like x 3
    • Useful Useful x 1
    Last edited: Aug 14, 2016
  2. Nicky

    aa Nicky Rotten Tops

    Messages:
    907
    Positive Ratings:
    1,663
    Nice to see other people using this technique, it's really useful. Nice job on the tutorial :)
     
  3. MrHatlf

    MrHatlf engineer main, majoring in exploiting

    Messages:
    78
    Positive Ratings:
    44
    Now, how do you port over ABS?
     
  4. The Siphon

    The Siphon L6: Sharp Member

    Messages:
    255
    Positive Ratings:
    118
    Very useful, thank you.
     
  5. sevin

    aa sevin

    Messages:
    952
    Positive Ratings:
    647
    Just figured out an even better method, I've edited the OP. Now you can add container folders for more content separation, as well as a maps_dev folder to hold all your maps and their content. Everything will still be seen by Hammer and CompilePal, but not the game! This truly is the ideal custom content organization method now.
     
    • Thanks Thanks x 2
  6. Wkay

    Wkay L1: Registered

    Messages:
    41
    Positive Ratings:
    12
    Additionally, you can create some mod folders like mods_skins, mods_sounds, etc. Just a quick tip.

    Anyhow, thank you!
     
    • Thanks Thanks x 1
  7. sevin

    aa sevin

    Messages:
    952
    Positive Ratings:
    647
    Yup, I have some extra folders like that listed in the creation steps.
     
  8. Yrr

    aa Yrr An Actual Deer

    Messages:
    968
    Positive Ratings:
    1,800
    I don't really get the benefits of using this over tf/custom if it works exactly the same, as you say.

    All it seems to do is add an extra step to the process that can fuck things up if done wrong.

    The reason TopHattWaffle suggests it is because CSGO doesn't allow the custom folder to be used so it's a workaround there, but it does work in tf2 without needing the workaround.


    e: I guess it's useful for syncing custom content in a team project but it's still quicker to just share the content than to set this up.
     
  9. sevin

    aa sevin

    Messages:
    952
    Positive Ratings:
    647
    It works like the custom folder, but with a lot more control. The custom folder is unique in that it is allowed to have outlier folders that can contain assets, but it is limited to one container folder. Because of that, every time you install something, it just goes in a root folder in custom. You can't organize it any deeper than this, so all your content packs, loose materials and models, map assets, and anything else you install will all be mixed in together.

    But with this approach, we can create container folders for every category you could want. It's just an organizational thing. Now I can install things in whatever hierarchy I want and can easily browse through and rearrange and/or delete assets.

    I should mention in the OP that you can also select the tf_dev folder in the model browser mod dropdown, so you can isolate all your custom content from the stock content and browse that way.

    It's just the best way to do it. You organize however you want, it won't be seen by the game, it will be packed by CompilePal, you can have development folders for your individual maps to store VMFs and their content; the list goes on.
     
  10. Mikroscopic

    aa Mikroscopic

    Messages:
    588
    Positive Ratings:
    585
    [​IMG]

    I got this error when I tried to open hammer.

    CompilePal gave this error too when trying to compile.
     
  11. sevin

    aa sevin

    Messages:
    952
    Positive Ratings:
    647
    I think I need to make a video or something. Remember that tf_dev is treated like the custom folder when we add the * modifier to the path. You need buffer folders in-between it and your assets/maps. Can you screenshot your tf_dev folder and your gameinfo code?

    I assume you've got your maps inside that map folder, but really you should create a container maps_dev folder, like I have in the tutorial, and then have your map folders inside that.
     
  12. Mikroscopic

    aa Mikroscopic

    Messages:
    588
    Positive Ratings:
    585
    [​IMG]
    Left is \tf_dev, right is gameinfo.txt

    I didn't create the maps folder. All my vmfs are still in \mapsrc.
     
  13. sevin

    aa sevin

    Messages:
    952
    Positive Ratings:
    647
    Like I said, you need buffer folders for your content. If you want to keep your cfg, maps, and materials folders together, you can just create another folder inside tf_dev, drop everything in there and it will work.
     
  14. Mikroscopic

    aa Mikroscopic

    Messages:
    588
    Positive Ratings:
    585
    I didn't create those folders, though. All of my custom content is inside content_packs. I don't know why those are there.
     
  15. sevin

    aa sevin

    Messages:
    952
    Positive Ratings:
    647
    Then delete them? How did they get there?
     
    • Thanks Thanks x 1
  16. sevin

    aa sevin

    Messages:
    952
    Positive Ratings:
    647
    Made a video tutorial. Hopefully this will help with first-time setup.

     
    • Thanks Thanks x 1
  17. Yrr

    aa Yrr An Actual Deer

    Messages:
    968
    Positive Ratings:
    1,800
    I'm gonna be honest, every time you call this the "best" rather than your "favourite" or "preferred" method, it really rubs me the wrong way because it is completely impractical for the majority of mappers and it seems like you're misleading people over this.

    TopHattWaffle's method was purely based on how CSGO's custom content detection works differently to TF2's, and any benefits gained from it are either entirely personal preference, or specific to CSGO.

    For most people it's not worth the effort for an extra level of folders when most people seem to be able to organise their custom content just fine with tf/custom, and it's definitely not the "best" method. You should be offering this as a potential method and telling people how to figure out if its what they want*, not telling them that this is the "best" method and that they should be using it.

    *as opposed to currently where you are saying "if you use custom content at all then you should be using this".
     
    • Agree Agree x 2
  18. sevin

    aa sevin

    Messages:
    952
    Positive Ratings:
    647
    It is the best. If you can't be bothered to take 5 minutes to edit a text file and create some folders, then you probably don't like keeping organized. I don't know how messy of a person you are, but I've spent time being messy and organized. I've found out that being organized tends to make doing things quite a bit easier. If I need to spend 5 minutes setting up a structure to help me stay organized, I'm going to do it. Doing things in a way that's going to save you time and headache in the future isn't a "personal preference", it's just plain better.
     
    • Respectfully Disagree Respectfully Disagree x 4
  19. TyeZenneth

    TyeZenneth L6: Sharp Member

    Messages:
    331
    Positive Ratings:
    272
    That's objectively untrue.
    See, I can do it too.
     
  20. sevin

    aa sevin

    Messages:
    952
    Positive Ratings:
    647
    Alright. I'm wrong. It's not the best. Everyone is different. I know there are a lot of people out there who don't care much for organization or efficiency. So this method may not be the best for them.
     
    • Respectfully Disagree Respectfully Disagree x 1