Making model auto download with fast dl

I’m almost done creating my dedicated server and i have a question when joining my server how come fast DL doesn’t auto download the models

Also IK that i need to use resources generator to generate the file what tell fastdl to include models in the download but I have a question in rosource gen do I select the whole model for example this

resource.AddFile( “/Link/materials/models/playerlink/blade.vmt” )
resource.AddFile( “/Link/materials/models/playerlink/blade.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/blade_exponent.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/face.vmt” )
resource.AddFile( “/Link/materials/models/playerlink/face.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/face_exponent.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/face_normal.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/grip.vmt” )
resource.AddFile( “/Link/materials/models/playerlink/grip.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/grip_exponent.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/grip_normal.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/inside.vmt” )
resource.AddFile( “/Link/materials/models/playerlink/inside.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/inside_exponent.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/inside_normal.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/iris2.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/link1.vmt” )
resource.AddFile( “/Link/materials/models/playerlink/link1.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/link1_exponent.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/link1_normal.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/link2.vmt” )
resource.AddFile( “/Link/materials/models/playerlink/link2.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/link2_exponent.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/link2_normal.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/link3.vmt” )
resource.AddFile( “/Link/materials/models/playerlink/link3.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/link3_exponent.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/link3_normal.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/l_eye.vmt” )
resource.AddFile( “/Link/materials/models/playerlink/l_eye.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/l_eyewhite.vmt” )
resource.AddFile( “/Link/materials/models/playerlink/l_eyewhite.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/r_eye.vmt” )
resource.AddFile( “/Link/materials/models/playerlink/r_eye.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/r_eyewhite.vmt” )
resource.AddFile( “/Link/materials/models/playerlink/r_eyewhite.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/sheath.vmt” )
resource.AddFile( “/Link/materials/models/playerlink/sheath.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/sheath_exponent.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/sheath_normal.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/shield.vmt” )
resource.AddFile( “/Link/materials/models/playerlink/shield.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/shield_exponent.vtf” )
resource.AddFile( “/Link/materials/models/playerlink/shield_normal.vtf” )

or just select the models/player_link.mdl file

thanks for you help

Get rid of the /Link/ part from each of those.

but i have over 25 models to do do i need to remove the starting name from each one so it says /meterials/models etc etc

Also Resource.AddFile(“blabla.vmt”) should also add all referencing vtfs with it.

Never heard of Search and Replace (on Notepad and Notepad++ it is CTRL+H)?



resource.AddFile( "/Link/materials/models/playerlink/shield_normal.vtf" )

This must turn into



resource.AddFile( "materials/models/playerlink/shield_normal.vtf" )

Use Find&Replace of any text editor.

do i do the same to this “materials/models/player/danboard_body_sheet.vtf”



resource.AddFile( "materials/models/playerlink/blade.vmt" )
resource.AddFile( "materials/models/playerlink/blade.vtf" )
resource.AddFile( "materials/models/playerlink/blade_exponent.vtf" )
resource.AddFile( "materials/models/playerlink/face.vmt" )
resource.AddFile( "materials/models/playerlink/face.vtf" )
resource.AddFile( "materials/models/playerlink/face_exponent.vtf" )
resource.AddFile( "materials/models/playerlink/face_normal.vtf" )
resource.AddFile( "materials/models/playerlink/grip.vmt" )
resource.AddFile( "materials/models/playerlink/grip.vtf" )
resource.AddFile( "materials/models/playerlink/grip_exponent.vtf" )
resource.AddFile( "materials/models/playerlink/grip_normal.vtf" )
resource.AddFile( "materials/models/playerlink/inside.vmt" )
resource.AddFile( "materials/models/playerlink/inside.vtf" )
resource.AddFile( "materials/models/playerlink/inside_exponent.vtf" )
resource.AddFile( "materials/models/playerlink/inside_normal.vtf" )
resource.AddFile( "materials/models/playerlink/iris2.vtf" )
resource.AddFile( "materials/models/playerlink/link1.vmt" )
resource.AddFile( "materials/models/playerlink/link1.vtf" )
resource.AddFile( "materials/models/playerlink/link1_exponent.vtf" )
resource.AddFile( "materials/models/playerlink/link1_normal.vtf" )
resource.AddFile( "materials/models/playerlink/link2.vmt" )
resource.AddFile( "materials/models/playerlink/link2.vtf" )
resource.AddFile( "materials/models/playerlink/link2_exponent.vtf" )
resource.AddFile( "materials/models/playerlink/link2_normal.vtf" )
resource.AddFile( "materials/models/playerlink/link3.vmt" )
resource.AddFile( "materials/models/playerlink/link3.vtf" )
resource.AddFile( "materials/models/playerlink/link3_exponent.vtf" )
resource.AddFile( "materials/models/playerlink/link3_normal.vtf" )
resource.AddFile( "materials/models/playerlink/l_eye.vmt" )
resource.AddFile( "materials/models/playerlink/l_eye.vtf" )
resource.AddFile( "materials/models/playerlink/l_eyewhite.vmt" )
resource.AddFile( "materials/models/playerlink/l_eyewhite.vtf" )
resource.AddFile( "materials/models/playerlink/r_eye.vmt" )
resource.AddFile( "materials/models/playerlink/r_eye.vtf" )
resource.AddFile( "materials/models/playerlink/r_eyewhite.vmt" )
resource.AddFile( "materials/models/playerlink/r_eyewhite.vtf" )
resource.AddFile( "materials/models/playerlink/sheath.vmt" )
resource.AddFile( "materials/models/playerlink/sheath.vtf" )
resource.AddFile( "materials/models/playerlink/sheath_exponent.vtf" )
resource.AddFile( "materials/models/playerlink/sheath_normal.vtf" )
resource.AddFile( "materials/models/playerlink/shield.vmt" )
resource.AddFile( "materials/models/playerlink/shield.vtf" )
resource.AddFile( "materials/models/playerlink/shield_exponent.vtf" )
resource.AddFile( "materials/models/playerlink/shield_normal.vtf" )


I have done it to all my models if the correct now http://pastebin.com/j2wvCZQt

As stated earlier in the thread, you only need to do it for the vmt file.
When you do it for the vmt file it will automaticly include the vtf file too.
But the rest looks fine.

Read the description here: http://wiki.garrysmod.com/page/resource/AddFile

well I have encountered a problem some of the models download just fine but the others are just errors now

also i have reconnected twice now and both times it just downloads the other player models but in pointshop they are just errors

proof

Just out of curiosity, what did the /Link/ even mean? I thought that would atleast say /garrysmod/

/Link/ is the addon folder, but they are mounted. So /addons/Link/models would be /models/ for other addons or the engine to acces it

Here’s how to set up and use FastDL: https://dl.dropboxusercontent.com/u/26074909/tutoring/server_srcds_steamcmd/fastdl_setup_instructions.lua.html

It is possible to have files download to the wrong folder; make sure you read the doc and follow troubleshooting if necessary.

I’ll be releasing fileio very soon on my dev base. This means that I’ll also be releasing an automated resource system…

But, for now you can use this ( Install into garrysmod/addons/acecool/lua/autorun/server/sv_add_gamemode_resources.lua ):
https://dl.dropboxusercontent.com/u/26074909/tutoring/_systems/simple_recursive_resource_loader/sv_add_gamemode_resources.lua ( View in HTML with syntax Highlighting: https://dl.dropboxusercontent.com/u/26074909/tutoring/_systems/simple_recursive_resource_loader/sv_add_gamemode_resources.lua.html )

It’ll automatically resource.AddSingleFile every file inside your gamemodes/<gamemode_name>/content/ directory. It’ll also resource.AddWorkshop( ) any file inside of your gamemodes/<gamemode_name>/content/workshop/ directory ( simple create empty file and name it ds_1234567_m-nine-k-guns.gma for each file that you want the client to download – fantastic feature if you just want to use the models from an addon and removed the .lua files… )