Mapname.CFG

Discussion in 'Server Discussion' started by MjRNuT, Apr 16, 2008.

  1. MjRNuT

    MjRNuT L1: Registered

    Messages:
    21
    Positive Ratings:
    1
    Hello all,

    I have an issue that I thought would make sense to post here b/c it involves stock maps and custom maps with respect to my topic title. The cvars for the time being I'm hoping to get information on are:

    mp_timelimit
    mp_stalemate_enable
    mp_stalemate_enable_at_timelimit

    Background: I'm using SM latest stable release 1.0.0 along w/ MM:S 1.6.1. There are also several plugins installed. I have above cvars set to "default" in my server.cfg (e.g., 30, 1, 0, respectively). If I want a change to them for a specific map, I place that cvar in there with its changed value.

    Server.CFG and mapname.cfg are located in /tf/cfg folder per the SM forums. My understanding is that the server.cfg is read first, then the mapname.cfg is read. However, I have encountered the following things:

    1. Stock maps seem to take on cvars in the order as described. (i.e., if ctf_2fort is 20 minutes in ctf_2fort.cfg, then it is correctly reflected in game play).

    2. Custom maps I have mixed experience. Some custom maps behave like the No. 1, as expected. While others seem to not recognize the cvar in their mapname.cfg. Ex// cp_warpath does not recognize a mp_timelimit 2 in the cp_warpath.cfg. Nor does it when input via HLSW.

    My conclusion is that such features are built into a custom map, thus some will heed the cvar and some will not?

    The issue just described then impacts whether stalemate is activated or not.

    Can anyone shed light on this for me?

    (I'm considering implementing a SM plugin that changes the location of the mapname.cfg, but it may not do anything if my conclusion above is valid).

    Thanks
     
  2. Apex_

    Apex_ L3: Member

    Messages:
    122
    Positive Ratings:
    14
    Any time a server-side variable is set within the map itself, it will override the server's setting. Period. R3drum's ctf_torch map for example has a built-in winlimit of 6, which will always take precedence over a server.cfg/mapname.cfg setting as well as immediately reverting back to the map's setting if changed in-game (this may be dependent on the map's implementation however).

    In short, map settings > server settings. Changing the location of the map config won't change anything unfortunately.
     
    • Thanks Thanks x 1
  3. MjRNuT

    MjRNuT L1: Registered

    Messages:
    21
    Positive Ratings:
    1
    Thanks for your quick response and explanation, which validates my conclusion, there are cvars built-in to the map. How do you determine what those default map cvars are? But I guess that doesn't matter since they can never be overridden, however, I think the only cvar we are talking about here is mp_timilimit, right?
     
  4. Apex_

    Apex_ L3: Member

    Messages:
    122
    Positive Ratings:
    14
    A map author can use Hammer to build in any type of command they like using point_servercommand (if I remember right) to execute convars directly. Round time and setup time are part of the map's timer entity (not sent via a server command) however, so you can use entspy to read the properties of the timer if you need to. Entspy can be used to find the servercommand entity too actually.

    I've on occasion used entspy to remove forced instant respawn times from maps, and all that's required is to modify the server's copy. You can retain the same filename and it will still pass CRC so the regular copy on a mirror via sv_downloadurl will still work fine.
     
  5. MjRNuT

    MjRNuT L1: Registered

    Messages:
    21
    Positive Ratings:
    1
    Ok, ummm. I'm not a modder by any means, so I don't have the means of obtaining the information that you described. My experience is limited to cvar information and I think you addressed that previously.

    Main thing is that now I understand there are built in cvars for timelimit and maxrounds.

    I have an additional question that I'm not sure is map related or SRCDS specific.

    It has to do with cvar sv_gravity. A map is run w/ sv_gravity "100", upon change of map to one with "800", the Demoman nades and bombs still retain "100" effect. Solution thus far is to just manually restart the map. This still happens even though sv_gravity "800" is issued in the mapname.cfg AND server.CFG. Only time "100" is issued is in the lowgravmap.cfg.

    Can someone shed light on this? Thanks again in advance.