Help with custom surfaceprop.txt

orange_blossom

L1: Registered
Mar 31, 2018
4
1
I want to include a custom surface in my map, however there isn't really any documentation on how to do this except for the instructions from the surfaceproperties_manifest.txt located in: tf2_misc_dir.vpk, scripts/

Well what I've done so far is copying the manifest to the scripts folder and adding the following line:

(Under "// List additional surface property files here:")
"file" "scripts/surfaceproperties_jackson.txt"

"jackson" is also the name of my map.

Then creating the surfaceproperties_jackson.txt file and adding this into the file:

"hardgravel"
{
"base" "rock"
"stepleft" "Gravel.StepLeft"
"stepright" "Gravel.StepRight"
}

However this doesn't work in the game and doesn't throw any errors in the console.

(basically i want a surface with properties from "rock" but with the gravel soundsteps)

"base" "rock" is a reference to the rock properties in the surfaceproperties.txt located in: hl2/hl2_misc_dir.vpk, scripts/
also like entries from the surfaceproperties_tf.txt back in tf2_misc_dir are referring to that hl2 file, as there isn't such file anywhere in tf directory.

Someone smarter enought attend me please !
 
Last edited:
May 25, 2015
390
307
I tried creating the surface property exactly like you specified in the original post, as well as a material to test it out, and it works for me. I think the problem you might have is with the game's load order. I'm assuming you're putting your modified "surfaceproperties_manifest.txt" in "Team Fortress 2/tf/scripts/". This won't work since the game loads the file from the VPKs before loading loose files, which means it won't be overriden by your custom files.

What you should do is place the "surfaceproperties_manifest.txt" file in the "tf/custom/" folder, since it's read before the VPK files. You need to place it in it's own mod folder under custom, so the path to your modified "surfaceproperties_manifest.txt" should look like this: "Team Fortress 2/tf/custom/<name of mod folder>/scripts/surfaceproperties_manifest.txt".

I have attached a zip file with an example of the file paths, as well as an example vmf and bsp to show the material working in game.
 

Attachments

  • hardgravel.zip
    26.2 KB · Views: 297

orange_blossom

L1: Registered
Mar 31, 2018
4
1
Thank you very much sir. I always thought that load order goes this way:
(vpk files<game folder's files<custom folder's files)

I can also confirm that it still works after packing contents of the map into bsp.

Case closed.