Uploading Hl2 Content to Gmod Dedicated Server

From GMod Wiki

Spring to: navigation, search

Contents

  • 1 Data in this section applies to all Operating Systems
    • i.1 Publishing a server
      • 1.i.1 Locking a automobile to a private IP address
      • 1.ane.2 Port redirection
      • i.1.3 Done
  • 2 Fastdownload (sv_downloadurl)
    • 2.1 What exactly is Fast Download or sv_downloadurl?
    • 2.2 Requirements
      • ii.ii.1 Webspace
    • 2.iii Setup and Configuration
    • 2.4 So how does Fast Download piece of work exactly?
      • ii.4.1 Content that is automatically downloaded
      • 2.4.two Content that must be manually added
    • 2.5 What exactly is needed for a server to part with sv_downloadurl?
      • ii.five.1 The Cache
      • 2.5.2 Maps
      • 2.v.3 Addons
    • 2.6 Gamemodes
    • 2.vii And you're done!
    • 2.8 Actress Things
      • 2.viii.1 Automation Utilities
      • two.8.2 Bzip2 File Compression
      • ii.8.3 I see red error models / purple and black textures!
      • 2.viii.4 People have to download files every fourth dimension they bring together!
    • two.9 Overall
  • iii SetupArrayProps_R: array prop '(null)' is at alphabetize nada.
  • four tier0.dll error
  • 5 How many slots can I get on my connectedness?
  • 6 Extra content
    • 6.1 Counter Strike: Source
      • half dozen.1.1 Windows / ReactOS:
      • half dozen.1.two Linux:
      • half dozen.1.three Wine:
    • 6.2 Day of Defeat: Source
      • 6.2.1 Windows / ReactOS:
      • 6.2.two Linux:
      • half dozen.two.three Wine:
    • 6.3 Half Life 2: Deathmatch
      • six.iii.ane Windows / ReactOS:
      • 6.3.ii Linux:
      • 6.3.3 Wine:
    • vi.four Team Fortress 2
      • vi.iv.1 Windows / ReactOS:
      • six.four.two Linux:
      • 6.four.iii Wine:
    • 6.5 Episodic content
      • half dozen.5.ane Windows / ReactOS:
      • 6.5.ii Linux:
      • 6.v.3 Vino:
    • half-dozen.6 Left four Dead/Left 4 Dead 2 content
      • half-dozen.6.one Windows / ReactOS:
      • 6.6.two Linux:
      • 6.6.3 Wine:
    • half dozen.7 Portal

Data in this section applies to all Operating Systems

Publishing a server

Once you have your server running, if it is your own auto, you take to permit people connect to it. To exercise that, yous accept to open a pinhole in your firewall. This is not the place to go into the reasons why yous should accept a separate hardware firewall; nosotros will simply assume that you practice. Making a pinhole will require that you log in to your firewall (normally from Internet Explore, Firefox, or some other browser), lock your server to a unmarried private IP accost, and so direct a port to that address.

Locking a machine to a private IP accost

The server must always be at the aforementioned accost on your in-house network, otherwise game requests will become somewhere else and nobody will be able to log in. And then you must ensure that every time your machine is turned on or connected, it gets the aforementioned address. The technique used to assign addresses to machines is called DHCP. On almost hardware firewalls, on the DHCP page yous have options to set "reservations". Many are particularly friendly in that you tin notice your auto's DHCP "charter" and merely copy that into a reservation. Otherwise, you lot take to enter the "MAC address" of the server, and the IP address, into the reservation manually.

Once you have set a reservation for your server, record the IP address.

Port redirection

For the server to be reachable, network requests must attain information technology. On almost hardware firewalls, y'all need to set up this in the Advanced pages. You are looking for "pinholes", "virtual servers", or "port redirects". In one case you have found the page y'all need, you lot desire to set up a rule that says incoming UDP requests on port 27015 are sent to port 27015 on the IP accost of your server.

NOTE that if yous set a not-standard port when you started the server, as described above, and so the port you lot want to gear up to be redirected is the aforementioned as the nonstandard port. So for instance, if you are running a TF2 server on 1 machine at IP address 192.168.0.105 and a GM server on some other auto at address 192.168.0.101, you would set the TF2 server to the default port 27015 and the GM server to port 27035, every bit described above. You would and so set ii port redirect rules, one that directs UDP port 27015 traffic to port 27015 at 192.168.0.105, and ane that redirects UDP port 27035 traffic to port 27035 at 192.168.0.101.

Feel indicates that it is not a good idea to accept two servers using the aforementioned UDP port and trying to use the port remap in the firewall to expose dissimilar external port numbers. The port number of the server itself apparently needs to be identical to the port number visible to the Net at large.

Once you lot've completed this step, you may want to start your server and visit this SRCDS port checking utility to verify that the forwarding is working and that people will be able to connect to your server.

Done

Once your firewall is accepting traffic and forwarding information technology to your server, you lot are washed. When your server starts upwards, it contacts the Steam servers, and from so on it will show up in the available server lists for GM, every bit long every bit it stays alive.

Fastdownload (sv_downloadurl)

What exactly is Fast Download or sv_downloadurl?

Fast Download (also know as sv_downloadurl) is a do used to get content from the server to the customer faster. By default the download limit is capped in Garrysmod at 20kb/due south. So to become content to clients faster, we use Fast Download which allows the client to download at standard http speeds.

Requirements

Fast Download has some bones requirements. If you take a dedicated game server, you lot will most likely have the resources to make a fast download server.

Webspace

Webspace is required for a identify to store the files then the client tin can download them. It is suggested that you accept at least 1GB of space on the server, and at least 20GB of Bandwidth for a small server.

To detect a webhost use www.google.com or a similar search engine.

Setup and Configuration

Setting up the initial configuration for Fastdownload is piece of cake enough. In your garrysmod/cfg folder, yous'll accept a file called server.cfg. In that, add the following lines below:

  • sv_downloadurl "http://world wide web.mysvdownloadurl.com/garrysmod/"
  • sv_allowupload "0"
  • sv_allowdownload "0"

And there you accept it. The outset part of Fast Download has been ready upwardly. It'southward now on to configuring the Webspace and preparing it to be used.

So how does Fast Download work exactly?

Fast Download works by mirroring your "garrysmod/" folder. However, it can only mirror sure folders for information technology to function. These are:

  • cache This is the about important one, explanation below
  • materials
  • models
  • resources
  • audio

Note: the names of both the files and folders are instance sensitive

Content that is automatically downloaded

At that place is some content which source volition automatically attempt to ship to the client. These are:

  • The Cache (Clientside Lua Files)
  • Maps

Content that must be manually added

Oftentimes there is content that a server owner volition desire clients to have yet source does non automatically forcefulness these to be downloaded. Using resources.AddFile this tin be forced and the files sent. The following content will not automatically exist sent:

  • Materials
  • Models
  • Sounds
  • Resources (east.g. fonts etc)
  • Particles

What exactly is needed for a server to part with sv_downloadurl?

The Cache

Constitute under garrysmod/cache/ the cache file contains 'all clientside data that the client has to know. This file(due south) is autogenerated by your server each time it starts.

It is important that the cache file is on the Fast Download server for without it the customer will non run into the gamemode correctly and will be given a warning about the server cache beingness misconfigured.

Maps

Maps will automatically be downloaded from the server if the file is placed on the Web Server. The advantage of this is that instead of downloading the map at 20kb/s, the customer will download information technology at their average internet speed. There are even tricks to help them download faster, however that will be discussed farther on.

If yous are using sv_downloadurl, y'all must upload the maps to the server otherwise clients will exist unable to play on the server unless they already ain the map.

Addons

For some, this tin exist slightly complex to understand. The Addons folder is "emulated" if you like in game to exist the garrysmod folder, which is how the content is used and sent. And then to apply the models / materials / sounds, you must excerpt them from the /addons binder, and into the correct folders on the webserver. Yous tin go on the addon normally on the game server, but on the webserver the extraction must occur.

Expect below for an example.

  • addons/myaddon/materials/mymaterial.vtf => materials/mymaterial.vtf on the webserver
  • addons/myaddon/models/mymodel.mdl => models/mymodel.mdl on the webserver
  • addons/myaddon/sound/policesounds/police1.wav => sound/policesounds/police1.wav

Hopefully from the in a higher place examples you lot get the idea.

Gamemodes

Y'all do non actually need to upload any gamemode files whatsoever to Fast Download. However, if you wish to use custom content in your Gamemode, you lot tin can under your gamemodes directory add a content folder, and so replicate materials / models under that. For instance:

  • gamemodes/mygamemode/content
  • gamemodes/mygamemode/content/materials/mymaterials/mymaterial123.vtf

Content works like to that of the addon format. If you tin sympathise one, you can empathize the other.

And yous're washed!

That is the general usage of Fast Download covered. Yet, below is some help, along with some tricks y'all tin use to assistance your server and your players in the long run.

Automation Utilities

SourceRSC tin can update your fast download server automatically. If custom content is missing from the fast download server it will bzip the files, create the appropriate folder construction, and properly 'virtualize' the addons and gamemodes folders on the fast download server. Supports accessing the game and fastdownload server locally or with FTP. Works on Windows and Linux.

Bzip2 File Compression

Bzip2 is a plan which can exist used to significantly reduce the size of the files on the Fast Download server. Source natively supports Bzip2, and then it'due south known that this will work. Bzip2 can reduce a file's size by up to 75%. This means a 50mb file can be 15mb or less, allowing players to download information technology faster. This likewise means if you have bandwidth limits, yous'll save bandwidth with smaller files. Every single file that tin can be used by Fast Download can be Bzipped. However, the files on the Game Server must be the original files. Only the Web Server needs the bzipped files The normal files exercise non need to exist on the spider web server if you use Bzip2.

Once the files take been uploaded to the Fast Download server (and put in the appropriate places), that's your work done. Source automates the rest, when the client downloads the file, they'll be automatically unzipped and buried etc.

You can either get Bzip2 and utilize the command line, or use 7Zip which has support for zipping into Bzip2 format.

Note: As of Gmod update 81, the cache is now one file ranging between 100 - 275kb. This means zipping the cache could be useless and actually increase the size of the file.

I see red error models / purple and black textures!

This means you haven't placed or added the files correctly on the Fast Download Server

People have to download files every fourth dimension they join!

This means y'all forgot something on the FastDL binder. It's trying to download information technology every time they join. It also tells y'all what you have to motility at that place. If you have the files already, you will not need to re-download them.

There could besides be an issue regarding the files name. Case sensitivity matters with sv_downloadurl, so ensure that the filepath and filename are exactly the same on both the webserver and gameserver.

Overall

Fast Download is certainly worth the time and money to set upwards. Your players become their models and whatnot faster and you get a slight peace of listen knowing that your server is that bit more secure and safer.

SetupArrayProps_R: array prop '(null)' is at index goose egg.

If you receive this message trying to run your Garry's Mod dedicated server, it means it is conflicting with the Team Fortress 2 version of the source engine. You lot can set this by first updating all your other games, and and then running update on Garry's Mod by using the following command (notice the -verify_all -retry):

hldsupdatetool -command update -dir <yourdirectory> -game "garrysmod" -verify_all -retry        

Thank you to g0dFather at facepunch.com (link: http://www.facepunch.com/showpost.php?p=16926473&postcount=21)

A second style of fixing this fault is to delete everything in orangebox/bin and orangebox/garrysmod/bin and then updating Garry's Modern through the hldsupdatetool.

tier0.dll error

The procedure entry point GetThreadedLoadLibraryFunc could not be located in the dynamic link library tier0.dll

Get to the root directory of your dedicated server (C:\srcds if you followed this tutorial exactly) , and rename tier0.dll and vstdlib.dll to something else. Now try starting your server once again.

How many slots tin I go on my connexion?

In my feel, each role player slot takes up almost 32 kilobits per second. That's upload speed. As long as your download speed isn't the bottleneck, the following seems to hold:

  • 64kb/southward = ii players max
  • 128kb/s = 4 players max
  • 256kb/s = 8 players max
  • 512kb/southward = xvi players max
  • 1Mb/s = 32 players max
  • 2Mb/s = 64 players max

Those are calculated values. They may be non correct on every PC/Server, due many factors would need to be calculated in.

Actress content

If yous don't wish to add extra content (Counter-Strike: Source, Twenty-four hour period of Defeat: Source), then you can skip this section.

Counter Strike: Source

The following lines will add Counter Strike:Source content to your server

Windows / ReactOS:

hldsupdatetool -control update -game "Counter-Strike Source" -dir .        

Linux:

Info 64.png If css does not mount, open up the css binder (root/css) and motion the cstrike folder in it to the orangebox folder (root/orangebox).
./steam -command update -game "Counter-Strike Source" -dir .        

Wine:

vino hldsupdatetool -command update -game "Counter-Strike Source" -dir .        

Day of Defeat: Source

The post-obit lines will add Day of Defeat:Source content to your server

Windows / ReactOS:

hldsupdatetool -control update -game "dods" -dir .        

Linux:

./steam -control update -game "dods" -dir .        

Wine:

vino hldsupdatetool -command update -game "dods" -dir .        

Half Life 2: Deathmatch

The following lines will add Half Life two: Deathmatch content to your server

Windows / ReactOS:

hldsupdatetool -command update -game "hl2mp" -dir .        

Linux:

./steam -command update -game "hl2mp" -dir .        

Vino:

wine hldsupdatetool -control update -game "hl2mp" -dir .        

Team Fortress 2

The following lines will add together Team Fortress 2 content to your server

Windows / ReactOS:

hldsupdatetool -control update -game "tf" -dir .        

Linux:

./steam -command update -game "tf" -dir .        

Wine:

vino hldsupdatetool -command update -game "tf" -dir .        

Episodic content

The following lines will add the episodic content to your server (episode 1 and 2)

Windows / ReactOS:

hldsupdatetool -control update -game "episode1" -dir .        

Linux:

./steam -command update -game "episode1" -dir .        

Wine:

wine hldsupdatetool -command update -game "episode1" -dir .        

Left iv Dead/Left iv Dead 2 content

The following lines will add together content from Left iv Dead to your server. To install content for Left 4 Dead 2, replace "left4dead" with "left4dead2".

Windows / ReactOS:

hldsupdatetool -control update -game "left4dead" -dir .        

Linux:

./steam -command update -game "left4dead" -dir .        

Wine:

wine hldsupdatetool -command update -game "left4dead" -dir .        

Portal

Portal is unmarried-thespian game, and thus, you volition demand to excerpt the content from the GCFs manually. All of these go into the orangebox/ subfolder of your srcds binder:

portal content.gcf portal english.gcf        

blumessirld.blogspot.com

Source: https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index4c2c.html

0 Response to "Uploading Hl2 Content to Gmod Dedicated Server"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel