INFO How to make an HLDS Dedicated Server for MS:C

cartman-2000

New Adventurer
Blades of Urdual
Joined
Jun 6, 2010
Messages
160
Reaction score
0
Age
39
Location
Beaverton, Oregon
A word of caution of using the -num_edicts flag for servers.

If you use the -num_edicts flag then it "has" to be used client side, or you might get invalid entity disconnects on clients (this is how it's done in SC with it's new version, both servers and clients get that flag.). There's another way of doing it, but you need amxx to do it easily, and to keep people from doing manual connects when the server is full, you can run a server with 32 slots and use the slot reservations plugin in it to hide the extra slots, each slot adds another 15 entities to the servers max.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Interesting... Although the client doesn't seem to accept the parameter. :\

Edicts are server side... Tempents are client side... The client never actually interpets edicts (the data form doesn't even exist in the client.dll) so I'm not sure how that works.
 

cartman-2000

New Adventurer
Blades of Urdual
Joined
Jun 6, 2010
Messages
160
Reaction score
0
Age
39
Location
Beaverton, Oregon
I don't remember what the exact error was that you would get disconnected with, but you would get the disconnect error on entity heavy maps client side if the server has that flag set, and the client doesn't. The sc4.0 installers set's the max_edicts flag to the mods launch options in steam, so the clients have the flag as well. I tried this max_edicts flag on my sven servers before 4.0 and it would get people disconnected form the server on maps that are close to the entity limit, unless they set the flag in there launch options.
 

The Man In Black

Administrator
Staff member
Administrator
Moderator
RiP
Joined
Jul 9, 2006
Messages
6,904
Reaction score
71
IIRC, clients don't have an 'edict' class type, but they still use the indexes of server edicts to make arrays of entities.
 

cartman-2000

New Adventurer
Blades of Urdual
Joined
Jun 6, 2010
Messages
160
Reaction score
0
Age
39
Location
Beaverton, Oregon
That's probably the reason why it get disconnects when using the flag only server side, dynamically generated server side entities(like an entity spawning a bunch of npc entities.) could have an invalid index number on the client as the client is bound, for server side ents, by the default max entity count + number of slots on the server times 15. And the client will either use the default max or the max set by the num_edicts flag in the clients launch options.

found the error it gives you, I posted about it about a year and a half ago on the sc forums.
Host_Error: CL_EntityNum: 1103 is an invalid number, cl.max_edicts is 1095
http://www.svencoop.com/forums/showthre ... post421636
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Never got that error, but interesting nonetheless.
 

cartman-2000

New Adventurer
Blades of Urdual
Joined
Jun 6, 2010
Messages
160
Reaction score
0
Age
39
Location
Beaverton, Oregon
Found the command for hiding slots, it's sv_visiblemaxplayers, you set it to the amount of slots you want the public to see, although with out a slot reservation plugin in an admin plugin like amxx it won't stop people from manually connecting to the server through their console.
 

BioRage

New Adventurer
Blades of Urdual
Joined
May 21, 2006
Messages
446
Reaction score
0
Location
Toronto
:O!

Hmmm..


Installed C:\HLDS\HldsUpdateTool

Extracted HLDSUPDATETOOL without touching it.

Window + R
C:\HLDS\HldsUpdateTool -dir "." -command update -game valve

Open's folder, does nothing, Do I run the EXE?

-----------------------
Running the .EXE
"Getting Version of 41 HLDS UPDATE TOOL"
Creates ClientRegistry.blob, HldsUpdateTool_41.mst

Is that correct? It doesn't create a Valve Folder... Can I just move on to placing the MS:C folder in?
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
BioRage said:
Hmmm..


Installed C:\HLDS\HldsUpdateTool

Extracted HLDSUPDATETOOL without touching it.

Window + R
C:\HLDS\HldsUpdateTool -dir "." -command update -game valve

Open's folder, does nothing, Do I run the EXE?

-----------------------
Running the .EXE
"Getting Version of 41 HLDS UPDATE TOOL"
Creates ClientRegistry.blob, HldsUpdateTool_41.mst

Is that correct? It doesn't create a Valve Folder... Can I just move on to placing the MS:C folder in?

Download: http://www.thothie.com/ms/hldsupdatetool.zip

Extract the exec file in the c:\hlds folder

Run the exec with paramters via Windows+R (or Start->Run):

c:\hlds\HldsUpdateTool -dir "." -command update -game valve

Should get a stream of text showing HL1 server files being downloaded. (This will include all the files required for hosting HLDM - ie. all the media from Half-life.)

I've not tried putting an HLDS in my Windows 7 boot, but my Vista laptop didn't require I run as administrator or anything, so the procedure should be the same, even outside of XP.

Output should look something like this:
Code:
Checking bootstrapper version ...
Getting version 41 of Steam HLDS Update Tool
Downloading. . . . . . . . . .Checking bootstrapper version ...
Updating Installation
No installation record found at .
No installation record found at .
Checking/Installing 'Win32 Server Engine' version 43

0.02%   downloading .\platform\Admin\admin_english.txt
0.06%   downloading .\platform\Admin\admin_french.txt
0.10%   downloading .\platform\Admin\admin_german.txt
0.14%   downloading .\platform\Admin\admin_italian.txt
0.17%   downloading .\platform\Admin\admin_korean.txt
0.20%   downloading .\platform\Admin\admin_schinese.txt
0.24%   downloading .\platform\Admin\admin_spanish.txt
0.28%   downloading .\platform\Admin\admin_tchinese.txt
0.69%   downloading .\platform\Admin\AdminServer.dll
0.69%   downloading .\platform\Admin\BanPanel.res
0.69%   downloading .\platform\Admin\ChatPanel.res
0.70%   downloading .\platform\Admin\ConfigPanel.res
0.70%   downloading .\platform\Admin\CreateMultiplayerGameServerPage.res
0.71%   downloading .\platform\Admin\DialogAddBan.res
0.71%   downloading .\platform\Admin\DialogAddServer.res
0.71%   downloading .\platform\Admin\DialogAdminServer.res
0.72%   downloading .\platform\Admin\DialogCvarChange.res
0.72%   downloading .\platform\Admin\DialogGamePanelInfo.res
0.72%   downloading .\platform\Admin\DialogKickPlayer.res
0.72%   downloading .\platform\Admin\DialogServerPassword.res
0.73%   downloading .\platform\Admin\game_ready.wav
0.73%   downloading .\platform\Admin\GamePanelInfo.res
0.74%   downloading .\platform\Admin\GraphPanel.res
0.74%   downloading .\platform\Admin\HelpFile.vdf
0.74%   downloading .\platform\Admin\HelpFile_adminmod.vdf
0.75%   downloading .\platform\Admin\HelpFile_cstrike.vdf
0.75%   downloading .\platform\Admin\hlds_logo.tga
0.75%   downloading .\platform\Admin\MainServerConfig.vdf
0.75%   downloading .\platform\Admin\MapCycleEditDialog.res
0.75%   downloading .\platform\Admin\MOTDPanel.res
0.75%   downloading .\platform\Admin\PasswordPanel.res
0.76%   downloading .\platform\Admin\PlayerPanel.res
0.76%   downloading .\platform\Admin\RawLogPanel.res
0.76%   downloading .\platform\Admin\RulesPanel.res
0.76%   downloading .\platform\Admin\server_english.txt
0.77%   downloading .\platform\Admin\server_french.txt
[...]
[[followed by a whole lot more files]]
[...]
Checking/Installing 'Half-Life Base Content' version 12

11.74%  downloading .\valve\cl_dlls\client.dll
12.62%  downloading .\valve\dlls\hl.dll
14.42%  downloading .\valve\dlls\hl_i386.so
14.42%  downloading .\valve\events\crossbow1.sc
14.43%  downloading .\valve\events\crossbow2.sc
14.43%  downloading .\valve\events\crowbar.sc
14.43%  downloading .\valve\events\egon_fire.sc
14.43%  downloading .\valve\events\egon_stop.sc
14.43%  downloading .\valve\events\firehornet.sc
14.43%  downloading .\valve\events\gauss.sc
14.44%  downloading .\valve\events\gaussspin.sc
14.44%  downloading .\valve\events\glock1.sc
14.44%  downloading .\valve\events\glock2.sc
14.44%  downloading .\valve\events\mp5.sc
[...]
[[followed by a whole lot more files]]
[...]
Entire folder structure should be there, including valve, as demonstrated in top post.
 

BioRage

New Adventurer
Blades of Urdual
Joined
May 21, 2006
Messages
446
Reaction score
0
Location
Toronto
Thanks it worked.

Another question, do you know how to run the HLDS in a black box like the "Start -> Run -> CMD", I don't like the big green box personally.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Yeah, if you don't give it a proper command line, it defaults to the GUI version of the HLDS, which has issues all its own.

Example command line ye can use:
Code:
c:\hlds\hlds.exe -num_edicts 4096 -insecure -game msc +maxplayers 10 -port 27016 +port 27016 -noipx -console +ms_pklevel 0 +exec crashed.cfg

If you do that from the run line, it should give you the proper DOS-like console box. You should really setup a restarter though. An example batch file is provided in the tutorial in the first post, or you can one of the restarter programs, also linked there.
 

cartman-2000

New Adventurer
Blades of Urdual
Joined
Jun 6, 2010
Messages
160
Reaction score
0
Age
39
Location
Beaverton, Oregon
-autoupdate is a flag for the linux hlds only, it causes the restarter script that comes with it to run an update before starting the server.

For automatically restarting the server, serverdoc would also be good to use, it'll restart a frozen server which can happen from time to time.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Oh, yeah, forgot about that... I just pasted part of my own command line - forgot to take that out (TBH I still have -pingboost in there too, cuz I copied it from an NS linux server ages ago, and never got around to editing it). :/ Neither of those switches does anything in winderz.

serverdoc tends to fail at restarting hung MSC servers, which is why the Thothie restarter was made, but it has its own issues on some systems. There are other alternatives out there (some linked), but none are 100%.

The -insecure switch turns of VAC, which saves a bit of CPU, since we aren't VAC supported anyways. However, omitting it would save you the hassle of having known hackers on your server. Once upon a time, a great number of MSC players were VAC banned for using Bloom Mod (not a cheat, just a visual enhancement, but VAC thought otherwise), however, as that was more than a year ago, their bans should all be up... As such I've been considering re-enabling it myself.
 

BioRage

New Adventurer
Blades of Urdual
Joined
May 21, 2006
Messages
446
Reaction score
0
Location
Toronto
Okay, thanks I sha'll give that a go'es.

... Yes Bloom mod.. I remember that quite well actually ......
 

Marisa

New Adventurer
Blades of Urdual
Joined
Feb 18, 2010
Messages
115
Reaction score
0
I remember seeing screens of that, never used it though. The glowy text, right?
 

CrazyMonkeyDude

New Adventurer
MSC Developer
RiP
Joined
Jun 29, 2007
Messages
2,619
Reaction score
2
Age
35
Made everything a bit more vibrant, but it was a bit rough on the eyes if you didn't get it set up right.

And yes, it made text glow a bit.
 

BioRage

New Adventurer
Blades of Urdual
Joined
May 21, 2006
Messages
446
Reaction score
0
Location
Toronto
Thothie said:
Yeah, if you don't give it a proper command line, it defaults to the GUI version of the HLDS, which has issues all its own.

Example command line ye can use:
Code:
c:\hlds\hlds.exe -num_edicts 4096 -insecure -game msc +maxplayers 10 -port 27016 +port 27016 -noipx -console +ms_pklevel 0 +exec crashed.cfg

If you do that from the run line, it should give you the proper DOS-like console box. You should really setup a restarter though. An example batch file is provided in the tutorial in the first post, or you can one of the restarter programs, also linked there.

Where do I put the command line?

EDIT: Windows + R I think, i'll try it
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Strongly suggest reading top post in more detail. ^_^
 

cartman-2000

New Adventurer
Blades of Urdual
Joined
Jun 6, 2010
Messages
160
Reaction score
0
Age
39
Location
Beaverton, Oregon
I can see that the RKS servers are using the num_edicts flag, I've gotten that invalid entity error on there server, which I had to put the flag in my launch options to play on some of the maps on there servers.
 

BioRage

New Adventurer
Blades of Urdual
Joined
May 21, 2006
Messages
446
Reaction score
0
Location
Toronto
How do you execute the .bat file.

I followed the steps and puzzled by it, I can not seem to run it from the ".bat" file.

I posted the <X> into a notepad, and re-named it as msc.bat (File type did not change though).
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Eh, if you have "hide extensions for known file types" checked in folder options, first, beat yourself with something sharp and heavy, then realize that you'll have to save any batch files created in notepad with "quotes" around the name or notepad will automagically stick a .txt extension on the end of them. In anycase, the file type should be "MS-DOS Batch file", or "Batch Command File", or "Windows Batch File", or "Automated Command File" depending on which version of Windows you are using, and what mood it's in. Assuming everything is working proper with Winderz, and the file is properly named, it should run with a double-click, like any other program.
 

BioRage

New Adventurer
Blades of Urdual
Joined
May 21, 2006
Messages
446
Reaction score
0
Location
Toronto
Thothie said:
Eh, if you have "hide extensions for known file types" checked in folder options, first, beat yourself with something sharp and heavy, then realize that you'll have to save any batch files created in notepad with "quotes" around the name or notepad will automagically stick a .txt extension on the end of them. In anycase, the file type should be "MS-DOS Batch file", or "Batch Command File", or "Windows Batch File", or "Automated Command File" depending on which version of Windows you are using, and what mood it's in. Assuming everything is working proper with Winderz, and the file is properly named, it should run with a double-click, like any other program.

Thanks :)
 

BioRage

New Adventurer
Blades of Urdual
Joined
May 21, 2006
Messages
446
Reaction score
0
Location
Toronto
I think you should add this to the list:

sv_region 255 [Will show your server on the master list]
 

Wishbone

New Adventurer
MSC Developer
Heroes of Dawn
Blades of Urdual
Joined
Jun 15, 2010
Messages
211
Reaction score
1
Location
Lost in my mind.
I followed the instructions to make a server. I start up my server then when I join it a error window pops up and says "Cache_TryAlloc: 9125552 is greater then free hunk"
 
Top