Server rentals :: NFOservers.com

Forums

All times are UTC - 8 hours



Author Message
PostPosted: Sat Mar 17, 2012 12:49 pm 
Offline
New to forums
New to forums

Joined: Mon Mar 12, 2012 2:58 am
Posts: 7
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/


Top
 Profile  
 
PostPosted: Sat Mar 17, 2012 3:24 pm 
Offline
Staff
Staff
User avatar

Joined: Thu Jul 22, 2004 12:24 am
Posts: 1028
Location: Big Bear, CA
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.

_________________
TimeX


Top
 Profile  
 
PostPosted: Wed Mar 21, 2012 6:15 pm 
Offline
New to forums
New to forums

Joined: Mon Mar 12, 2012 2:58 am
Posts: 7
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:

Code:
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" )


The models download but do not work. There is an error!


Top
 Profile  
 
PostPosted: Fri Mar 30, 2012 12:58 am 
Offline
A regular
A regular

Joined: Fri May 20, 2011 3:01 pm
Posts: 35
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.


Top
 Profile  
 
PostPosted: Fri Mar 30, 2012 1:20 am 
Offline
A regular
A regular

Joined: Fri May 20, 2011 3:01 pm
Posts: 35
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:

Code:
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")


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.


Top
 Profile  
 
PostPosted: Tue Aug 28, 2012 5:51 pm 
Offline
A semi-regular
A semi-regular

Joined: Tue Aug 28, 2012 4:33 pm
Posts: 24
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
It is currently Thu May 23, 2013 7:57 pm
Powered by phpBB® Forum Software © phpBB Group