I have two different servers both using http://op6.site.nfoservers.com/server/
If I websync both will they kind of like... combine? I noticed the directory for the first one is right in /server/
Will the fastdl's combine?
-
- New to forums
- Posts: 8
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Mon Mar 12, 2012 2:58 am
Re: Will the fastdl's combine?
They will combine, yes. This really isn't a problem if the files needed are the same, but in the case of garrysmod, it could be a problem for the cache files.
A work-around is to set up your web hosting with different folders, and a different subdomain pointing to each folder. You can then set the websync for each game server to sync to a different subdomain and related subfolder, keeping the files separated.
A work-around is to set up your web hosting with different folders, and a different subdomain pointing to each folder. You can then set the websync for each game server to sync to a different subdomain and related subfolder, keeping the files separated.
TimeX
Re: Will the fastdl's combine?
My models wont seem to download.
On my garrysmod I took the addon and in it made a lua file that added each file.
Here is an example:
The models download but do not work. There is an error!
On my garrysmod I took the addon and in it made a lua file that added each file.
Here is an example:
Code: Select all
if (SERVER) then
player_manager.AddValidModel( "Gordon Freeman", "models/player/Gordon.mdl" )
AddCSLuaFile( "gordon.lua" )
resource.AddFile("models/player/Gordon.mdl")
resource.AddFile("materials/models/gordon/eyeball_l.vmt")
resource.AddFile("materials/models/gordon/eyeball_l.vtf")
resource.AddFile("materials/models/gordon/eyeball_r.vmt")
resource.AddFile("materials/models/gordon/eyeball_r.vtf")
resource.AddFile("materials/models/gordon/Glass.vmt")
resource.AddFile("materials/models/gordon/Glass.vtf")
resource.AddFile("materials/models/gordon/Glasses_Frames.vmt")
resource.AddFile("materials/models/gordon/Glasses_Frames.vtf")
resource.AddFile("materials/models/gordon/gordon_facemap.vmt")
resource.AddFile("materials/models/gordon/gordon_facemap.vtf")
resource.AddFile("materials/models/gordon/gordon_facemap_n.vmt")
resource.AddFile("materials/models/gordon/grn_pupil_l.vmt")
resource.AddFile("materials/models/gordon/grn_pupil_r.vmt")
resource.AddFile("materials/models/gordon/grn_pupil_l.vtf")
resource.AddFile("materials/models/gordon/grn_pupil_r.vtf")
resource.AddFile("materials/models/gordon/hevsuit_normal.vtf")
resource.AddFile("materials/models/gordon/hevsuit_sheet.vtf")
resource.AddFile("materials/models/gordon/hevsuit_sheet.vmt")
resource.AddFile("materials/models/gordon/mouth.vtf")
resource.AddFile("materials/models/gordon/mouth.vmt")
resource.AddFile("materials/models/HEVsuit/hevsuit_sheet.vmt")
resource.AddFile("materials/models/HEVsuit/hevsuit_sheet.vtf")
resource.AddFile("models/player/Gordon.dx80.vtx")
resource.AddFile("models/player/Gordon.dx90.vtx")
resource.AddFile("models/player/Gordon.sw.vtx")
resource.AddFile("models/player/Gordon.vvd")
end
list.Set( "PlayerOptionsModel", "Gordon Freeman", "models/player/Gordon.mdl" )
Re: Will the fastdl's combine?
The function resource.AddFile intelligently adds files based on the one you put in. For example, if you put in a .vtf, it will also put it's accompanying .vmt into the sv_downloadurl list. If you put a .mdl, it will add the .dx80.vtx, dx90.vtx, sw.vtx, .vvd, and .phy for the model. If you only want to add just the one file, use resource.AddSingleFile.
As for the actual player model not working, I dunno. I always ha varying degrees of difficulty trying to get player models working without the client having them beforehand.
As for the actual player model not working, I dunno. I always ha varying degrees of difficulty trying to get player models working without the client having them beforehand.
Re: Will the fastdl's combine?
Buh. Apologies for the double post, but it wouldn't let me edit my first one.
Anyway, yeah, make seprate subdomains for your FastDL paths, like fastdl1.op6.site.nfoservers.com and fastdl2.op6.site.nfoservers.com, or something.
This is my forced download Lua:
It's in /garrysmod/lua/autorun/server/forced_downloads.lua. The bits of code that add the player models to the client's player model list are in the addon folder itself, with an if CLIENT statement. There's some more forced download in Lua in some of the addons' autorun, but they're simple and inconsequential...most of them are in this file, with that function at the top making it easier to add stuff in large quantities.
Anyway, yeah, make seprate subdomains for your FastDL paths, like fastdl1.op6.site.nfoservers.com and fastdl2.op6.site.nfoservers.com, or something.
This is my forced download Lua:
Code: Select all
function AddDir(dir) -- Recursively adds everything in a directory to be downloaded by client
local list = file.FindDir("../"..dir.."/*")
for _, fdir in pairs(list) do
if fdir != ".svn" then -- Don't spam people with useless .svn folders
AddDir(dir.."/"..fdir)
end
end
for k,v in pairs(file.Find(dir.."/*", true)) do
resource.AddFile(dir.."/"..v)
end
end
-- sb_new_worlds_2 skybox and models/textures
if game.GetMap() == "sb_new_worlds_2" then
AddDir("models/bynari")
AddDir("materials/bynari")
resource.AddFile("materials/maps/sb_new_worlds_2.vmt")
resource.AddFile("materials/skybox/new_worlds_bk.vmt")
resource.AddFile("materials/skybox/new_worlds_dn.vmt")
resource.AddFile("materials/skybox/new_worlds_ft.vmt")
resource.AddFile("materials/skybox/new_worlds_lf.vmt")
resource.AddFile("materials/skybox/new_worlds_rt.vmt")
resource.AddFile("materials/skybox/new_worlds_up.vmt")
end
-- GM_Galactic_RC1 models/textures
if game.GetMap() == "gm_galactic_rc1" then
AddDir("materials/models/spacemap")
end
-- Daft Punk player models
AddDir("models/player/daftpunk")
AddDir("materials/models/daftpunk")
resource.AddFile("models/player/daftpunk/Daft_Gold.phy")
resource.AddFile("models/player/daftpunk/Daft_Silver.phy")
-- Alien Swarm player models
AddDir("models/player/samzanemesis")
AddDir("materials/models/player/male")
resource.AddFile("models/player/samzanemesis/MarineMedic.phy")
resource.AddFile("models/player/samzanemesis/MarineOfficer.phy")
resource.AddFile("models/player/samzanemesis/MarineSpecial.phy")
resource.AddFile("models/player/samzanemesis/MarineTech.phy")
-- Star Trek sounds!
resource.AddFile("sound/cloak.wav")
resource.AddFile("sound/decloak.wav")
resource.AddFile("sound/phaserloop.wav")
resource.AddFile("sound/photontorpedo.wav")
resource.AddFile("sound/redalert.wav")
-- Photon Torpedo model
resource.AddFile("models/ApwnInTheDark's Starship Pack/Props/Photon Torpedo (Red).mdl")
resource.AddFile("materials/models/ApwnInTheDark's Starship Pack/Props/RedPhotonTorpedo+Animation.vmt")
-
- A semi-regular
- Posts: 25
- Joined: Tue Aug 28, 2012 4:33 pm
Re: Will the fastdl's combine?
Seperate domains arnt needed at all. The cache file name is a 30 digit long random string... It's more likely that the sun explodes tomorrow than two cache files have the same name.
USING THE SAME FOLDER IS ACTUALLY GOOD!
By using the same folder if you have overlapping content on your servers you wont have two copies of it cluttering up your web host!
USING THE SAME FOLDER IS ACTUALLY GOOD!
By using the same folder if you have overlapping content on your servers you wont have two copies of it cluttering up your web host!