Guest Alex Posted November 10, 2012 Share Posted November 10, 2012 When using custom maps on dedicated servers, the CT models often load as giant "ERROR" signs. This tutorial will explain how to fix this problem. Now you can use any custom map with no model errors! In CS:GO, Valve changed the way maps are loaded by dedicated servers. This is true for both standard and custom maps. In previous CS games, putting the map's files in the ~/maps folder was good enough to be able to load them on your server. In CS:GO, each map has to be configured in the "gamemodes.txt" or "gamemodes_server.txt" files. This configuration specifies things like 'how many players can play on this map' (maxplayers) and 'which models should I use for CT and T' (t_models & ct_models). Here is a sample configuration section for a standard map from a server's "gamemodes.txt" file: "de_dust" { "nameID" "#SFUI_Map_de_dust" "name" "de_dust" "imagename" "map-dust-overall" "t_arms" "models/weapons/t_arms.mdl" "t_models" { "tm_leet_variantA" "" "tm_leet_variantB" "" "tm_leet_variantC" "" "tm_leet_variantD" "" "tm_leet_variantE" "" } "ct_arms" "models/weapons/ct_arms_idf.mdl" "ct_models" { "ctm_idf" "" "ctm_idf_variantB" "" "ctm_idf_variantC" "" "ctm_idf_variantD" "" "ctm_idf_variantE" "" } } As a server administrator, when you copy custom maps to your server, it is your responsibility to create a configuration section similar to the one above in your "gamemodes_server.txt" file. The easiest way to do this is to simply copy an existing entry from the "gamemodes.txt" file and change what you need. Make sure you have all the right sections and opening/closing braces or your server will fail to read the file properly. Here is an example "gamemodes_server.txt" file with one custom map as well as a custom mapgroup which includes this map: // Values here override the default gamemodes.txt "GameModes_Server.txt" { "gameTypes" { "classic" { "gameModes" { "competitive" { "mapgroupsMP" { "mg_custom_competitive" "" } } } } } "mapgroups" { "mg_custom_competitive" { "name" "mg_custom_competitive" "maps" { "de_dust2" "" "cs_office" "" "de_train" "" "de_inferno" "" "de_dust" "" "cs_italy" "" "de_aztec" "" "de_nuke" "" "de_vertigo" "" "de_cambodia_bx" "" } } } "maps" { "de_cambodia_bx" { "nameID" "Cambodia" "name" "de_cambodia_bx" "imagename" "" "t_arms" "models/weapons/t_arms.mdl" "t_models" { "tm_leet_variantA" "" "tm_leet_variantB" "" "tm_leet_variantC" "" "tm_leet_variantD" "" "tm_leet_variantE" "" } "ct_arms" "models/weapons/ct_arms_idf.mdl" "ct_models" { "ctm_idf" "" "ctm_idf_variantB" "" "ctm_idf_variantC" "" "ctm_idf_variantD" "" "ctm_idf_variantE" "" } } } } Let me explain what is happening here... The first section is declaring that when the server is running in Classic Competitive mode it should use a map group called "mg_custom_competitive" The second section is defining the map group itself by listing all maps which are included in its rotation The third section is a list of custom maps (only one in this example) which can be used in the list of maps above You will notice that the third section is almost an exact copy of de_dust's configuration with only the map name changed. This is because I just copy/pasted it to avoid typos and only changed as little as necessary. At this point, you probably think you are ready to load your new custom map on your server. So you load up CS:GO, connect to your server, and use your admin to switch the map. You get a loading screen and all seems fine... ...until you join a team and notice all the CT player models look like this... All the CT models are giant red "ERROR" words! You assume there is something wrong with the map itself and remove it from your server. You likely even comment on the map's thread on this site saying something like "This map is great except for the CT models won't load. All I see is giant red ERRORs. Please fix it and I will add it to my rotation.". Unfortunately, the map creators have no idea what you are talking about because they don't administer dedicated servers and nobody else has complained about the problem. This leads to your server not being able to enjoy many custom maps and the map creators not being able to please you because they cannot "fix" the problem. There is a solution! The problem has nothing to do with the map itself. The root cause is in the map's configuration that we added to the "gamemodes_server.txt" file. Most custom maps come with a ".kv" file that lives beside the ".bsp" map file. This KV file, if it exists, contains the same configuration section we added to the "gamemodes_server.txt" file. Let's take a look at the KV file that came with the custom map from our example, de_cambodia_bx: "de_cambodia_bx" { "name" "de_cambodia_bx" "imagename" "map-cambodia-overall" "t_arms" "models/weapons/t_arms_pirate.mdl" "t_models" { "tm_pirate" "" "tm_pirate_varianta" "" "tm_pirate_variantb" "" "tm_pirate_variantc" "" "tm_pirate_variantd" "" } "ct_arms" "models/weapons/ct_arms_st6.mdl" "ct_models" { "ctm_st6" "" "ctm_st6_variantA" "" "ctm_st6_variantB" "" "ctm_st6_variantC" "" "ctm_st6_variantD" "" } } You will notice that it looks very familiar to the section we added to our "gamemodes_server.txt" file by copying the de_dust section. The main difference is that the CT and T models are totally different than the ones we used. This is the cause of our model loading errors. If there is any conflicts of player models between the map definition in the "gamemodes_server.txt" file and the map's KV file, the T models will load fine but the CT models will be giant red ERROR words. There is 2 fixes for this problem: Copy the CT and T model definitions from the map's KV file and use those in your "gamemodes_server.txt" file Delete the map's KV file from the server The first solution is preferred because any map creator who has created a KV file likely did so because they wanted to use specific player models on their map to fit better with the setting and theme of their map. If you delete the KV file, you are basically acknowledging that you want to override any player models they have defined so you can choose your own. I hope this help some other server admins! Additional thanks goes to prasadudwadia of NFO Forums who made me aware of the solution to this common problem. Here is the original threadwhich helped me solve this problem when I first encountered it. I also want to apologize to all the great mappers out there who have had to put up with server admins blaming you for this problem. Feel free to direct them here from now on! Lastly, I want to credit Tanuki for creating one of the best custom maps in CS:GO. I used his custom map, de_cambodia_bx for my example in this tutorial. It is truly amazing, I recommend it to all the server admins out there... use it on your servers! Link to comment Share on other sites More sharing options...
Recommended Posts