Textures

Discussion in 'Mapping/Modeling' started by Dat Cat, Jul 16, 2017.

Tags:
  1. Dat Cat

    Dat Cat Mildly Menacing Medic

    Steam:

    I am kind of interested in editing some of Skial's maps. I'm starting with the trade NY map, trying to optimize and make small things better (clip brushes and stuff). The thing is, is that I don't have the textures. In Hammer, everything is white and when compiled, it is all purple and black squares. Please help, if there is any download link or anything please let me know. Thank you :3
     
  2. Pedro the fabulous

    Pedro the fabulous TF2 Admin Contributor Master Mapper

    Steam:

    What are you using to decompile the map?
     
  3. Dat Cat

    Dat Cat Mildly Menacing Medic

    Steam:

    BSPSource
     
  4. Pedro the fabulous

    Pedro the fabulous TF2 Admin Contributor Master Mapper

    Steam:

    When decompiling the map with BSPSource, there is a tab named "Other". You need to click on it and check the "Extract embedded files" option so that while the map is being decompiled, it also takes the custom content from the .bsp and puts it in a folder next to the .vmf's target location. You can also do it the long way and extract specific content with GCFScape
     
  5. Dat Cat

    Dat Cat Mildly Menacing Medic

    Steam:

    Just did that, have new folder with all of the materials and texture, open decompiled map in Hammer, still white ;-;
     
  6. Pedro the fabulous

    Pedro the fabulous TF2 Admin Contributor Master Mapper

    Steam:

    You need to move the materials/models/sounds into their respective folders in your team fortress 2\tf\ directory. The custom folder does not work. The folder you received from decompiling should have a folder named materials (and models or sounds if it has that), so drag everything inside the materials folder into the team fortress 2's materials folder. This will make it a mess (even more so if you decompile a lot of maps), but it should work without editing every single .vmt (except for some cases). There's also another way which is just make a .vpk with all the custom content (not sure where this is stored though, and you need to find a program for it) which is the same method tf2 uses to store all it's vanilla content.

    The reason the custom folder doesn't work is because hammer doesn't read from that folder.

    Sorry if this is somewhat confusing, because it is.
     
  7. Dat Cat

    Dat Cat Mildly Menacing Medic

    Steam:


    Thank You! Everything is working now, I am greatly appreciated that you took time out of your day to help me :3
     
  8. Fragancia

    Fragancia Truly Feared Pyro Contributor

    Steam:

    Uhh, what?
    The custom folder works and Hammer was updated to work with Steampipe and it's waaaaaaaaaay better for organizing your content than using tf/materials etc...
    [​IMG]
    [​IMG]
     
  9. Pedro the fabulous

    Pedro the fabulous TF2 Admin Contributor Master Mapper

    Steam:

    Custom never works for me, even after steampipe.
     
  10. Fragancia

    Fragancia Truly Feared Pyro Contributor

    Steam:

    How do you install custom content inside the folder?
    Do you follow the proper folder/file structure as you are told in the readme.txt inside the custom folder?

    Code:
    When the game boots, this folder is automatically scanned for VPK files or
    subfolders. Each subfolder or VPK is added as a search path, so the files
    inside those VPK's or subfolders will override the default game files.
    
    See gameinfo.txt for more details.
    
    For example, you might have the following file structure:
    
        tf/custom/my_custom_stuff/   <<< This subfolder will be added as a search path
        tf/custom/my_custom_stuff/models/custom_model.mdl
        tf/custom/my_custom_stuff/materials/custom_material.vmt
        tf/custom/my_custom_stuff/materials/vgui/custom_ui_thing.res
        tf/custom/some_mod.vpk       <<< This VPK will be added as a search path
        tf/custom/another_mod.vpk    <<< This VPK will be added as a search path
    
    
    Mounting a VPK to the filesystem is more efficient than adding a subfolder,
    as each time the engine needs to open a file, it will need to make a call to the
    operating system to search the folder. VPKs can therefore be searched by the engine
    much more efficiently. Each subfolder is a new search path that must be checked each
    time the engine tries to open a file. So, for optimal load times, always use VPK files
    and don't make any subfolders in this folder!
    
    
    Note that the following directory structure is NOT correct:
    
        tf/custom/models/my_model.mdl
    
    That will add the directory "tf/custom/models" as a search path, in which case the
    file my_model.mdl actually exists at the root of the game's virtual filesystem.
    Instead, you would use something like:
    
        tf/custom/my_custom_stuff/models/my_model.mdl
     
  11. Pedro the fabulous

    Pedro the fabulous TF2 Admin Contributor Master Mapper

    Steam:

    Yeah, didn't work when I tried it out several times. It doesn't really matter a lot though.
     
  12. Fragancia

    Fragancia Truly Feared Pyro Contributor

    Steam:

    What's the situation for your gameinfo.txt like?

    Does it look like this?
    Code:
    "GameInfo"
    {
        game    "Team Fortress 2"
        type multiplayer_only
        nomodels 1
        nohimodel 1
        nocrosshair 0
        hidden_maps
        {
            "test_speakers"        1
            "test_hardware"        1
        }
        nodegraph 0
        GameData    "tf.fgd"
        InstancePath "D:/SteamLib/steamapps/common/Team Fortress 2/sourcesdk_content/tf/mapsrc" // Path Hammer looks at for instances, can be changed
        advcrosshair 1
        supportsvr 1
    
    
        FileSystem
        {
            SteamAppId                440
           
            //
            // Setup engine search paths.
            //
            // If a search path contains "_english", and the current language is not english, then
            // another search path will be inserted above the english one by replacing "_english" with
            // the appropriate language.
            //
            // To debug how the engine has parsed this file, type "path" at the console.
            //
            // Search paths are relative to the base directory, which is where hl2.exe is found.
            //
            // |gameinfo_path| points at the directory where gameinfo.txt is.
            // |all_source_engine_paths| points at the directory cintaining HL2 shared content.
            //
            SearchPaths
            {
    
                // First, mount all user customizations.  This will search for VPKs and subfolders
                // and mount them in alphabetical order.  The easiest way to distribute a mod is to
                // pack up the custom content into a VPK.  To "install" a mod, just drop it in this
                // folder.
                //
                // Note that this folder is scanned only when the game is booted.
                game+mod+custom_mod    tf/custom/*
    
                // We search VPK files before ordinary folders, because most files will be found in
                // VPK and we can avoid making thousands of file system calls to attempt to open files
                // in folders where they don't exist.  (Searching a VPK is much faster than making an operating
                // system call.)
                game_lv                tf/tf2_lv.vpk
                game+mod            tf/tf2_textures.vpk
                game+mod            tf/tf2_sound_vo_english.vpk
                game+mod            tf/tf2_sound_misc.vpk
                game+mod+vgui        tf/tf2_misc.vpk
                game                |all_source_engine_paths|hl2/hl2_textures.vpk
                game                |all_source_engine_paths|hl2/hl2_sound_vo_english.vpk
                game                |all_source_engine_paths|hl2/hl2_sound_misc.vpk
                game+vgui            |all_source_engine_paths|hl2/hl2_misc.vpk
                platform+vgui            |all_source_engine_paths|platform/platform_misc.vpk
    
                // Now search loose files.  We'll set the directory containing the gameinfo.txt file
                // as the first "mod" search path (after any user customizations).  This is also the one
                // that's used when writing to the "mod" path.
                mod+mod_write+default_write_path        |gameinfo_path|.
    
                // Add the TF directory as a game search path.  This is also where where writes
                // to the "game" path go.
                game+game_write        tf
    
                // Where the game's binaries are
                gamebin                tf/bin
    
                // Last, mount in shared HL2 loose files
                game                |all_source_engine_paths|hl2
                platform            |all_source_engine_paths|platform
    
                // Random files downloaded from gameservers go into a seperate directory, so
                // that it's easy to keep those files segregated from the official game files
                // or customizations intentially installed by the user.
                //
                // This directory is searched LAST.  If you visit a server and download
                // a custom model, etc, we don't want that file to override the default
                // game file indefinitely (after you have left the server).  Servers CAN have
                // custom content that overrides the default game files, it just needs to be
                // packed up in the .bsp file so that it will be mounted as a map search pack.
                // The map search pack is mounted at the top of the search path list,
                // but only while you are connected that server and on that map.
                game+download    tf/download
            }
        }
    
        ToolsEnvironment
        {
            "Engine"            "Source"
            "UseVPLATFORM"        "1"
            "PythonVersion"        "2.7"
            "PythonHomeDisable"    "1"
        }
    }
    
     
  13. Pedro the fabulous

    Pedro the fabulous TF2 Admin Contributor Master Mapper

    Steam:

    I tried it out with a test vtf and vmt, and it worked. Maybe I was just being dumb all this time, or it didn't actually work before. Thanks anyway!