CSGO Listen Server with KZTimer

Discussion in 'General Discussion' started by darksy, Jan 30, 2016.

  1. darksy

    darksy New

    Joined:
    Aug 18, 2015
    Messages:
    16
    Likes Received:
    2
    Not sure in which forum this belongs, I'll try here for now.

    Hi there, as I've been in the process of making a map for the better part of a year now (I get distracted easily, and I'm a lazy cunt) I realized that the most common question that comes in to new mappers' minds is: "How do I test this map with KZ settings?".

    The most common answer seems to be to download a config for KZ settings and some other config for teleporting and saving and some other jazz that I couldn't be bothered with. It just didn't cut it for me so I did some digging on how to get KZTimer to run on a listen server. Turns out it's not that much different from installing the plugin for a dedicated server, actually it's exactly the same, you just have to run the game in "insecure" mode for Metamod to load.

    1. Download Metamod from Metamod:Source - Download mmsource-1.10.6-windows.zip and extract it into your csgo folder at ..\steamapps\common\Counter-Strike Global Offensive\csgo
    2. Make a new .vdf file Metamod:Source - Make a VDF File and place it in your addons folder.
    3. Download Sourcemod from SourceMod: Half-Life 2 Scripting extract the addons to addons and cfg to cfg.
    4. Grab KZTimer from 1NutWunDeR/KZTimerOffical · GitHub, same deal with the files.
    5. Edit the file addons/sourcemod/configs/databases.cfg and add an entry along the lines of "kztimer" { "driver" "sqlite" //mysql also supported "host" - Pastebin.com.
    6. Add your steamId to the Mappers in ..steamapps\common\Counter-Strike Global Offensive\csgo\addons\sourcemod\configs\kztimer\mapmakers.txt
    We should be all set addon wise, let's move on to hammer. Open the KZ map you're working on.
    Press F9 to run the map and edit the Additional game parameters. Add the parameters

    Code:
    -insecure -tickrate 128 -windowed
    
    Click OK, run your map with KZTimer installed. I honestly have no idea where it saves the stats like LJ records etc. (since I don't have a DB running) but it does.

    Want to run a private server to grind a specific map?

    After installing the plugins just go to your csgo folder, make a desktop shortcut of the csgo.exe, right click the shortcut > Properties. Edit the Target field and add -tickrate 128 after the ending quotes (add everything you have in your launch options to be honest). Since you aren't starting the game through Steam when you launch it via a desktop shortcut it will automatically start in insecure mode.

    Subscribe to your favorite kz maps in the workshop and load them up, KZTimer will automatically run on any map with a "kz_" prefix. If you've already played the map on a server and it's downloaded all you have to do is type "map kz_mapname" into your console.

    Note: Loading maps other than those with a "kz_" prefix while in insecure mode ended up with me not being able to move, or do anything really. Probably fixable if I bothered to read the documentation for SM, MM and KZTimer but I haven't, but you can easily disable the plugins by altering the name of the addon folder in your csgo folder if you want to do something else than KZ while in insecure mode.

    Maybe someone will find this useful.
     
    #1 darksy, Jan 30, 2016
    Last edited by a moderator: Feb 24, 2016
    • Informative Informative x 3
    • Useful Useful x 2
    • Like Like x 1
  2. eNtity

    eNtity : - ) Staff Member KZ Admin EU

    Joined:
    Jun 7, 2015
    Messages:
    101
    Likes Received:
    18
    This is actually incredibly useful, thanks a lot. Probably obvious, but I'm assuming the same thing applies to any mod?
     
  3. darksy

    darksy New

    Joined:
    Aug 18, 2015
    Messages:
    16
    Likes Received:
    2
    I'm going to say probably. It's likely that having multiple plugins (surf, kz and bhop for example) installed at the same time might clash so I recommend reading up on Sourcemod and Metamod documentation. I've never tried it, if you happen to try it please share the results :)
     
  4. eNtity

    eNtity : - ) Staff Member KZ Admin EU

    Joined:
    Jun 7, 2015
    Messages:
    101
    Likes Received:
    18
    I can't think of any others I'd even use besides KZ, was just asking out of curiosity really, but if I ever do try it I'll let you know :)
     
  5. Kellz

    Kellz New Staff Member YouTube Manager

    Joined:
    May 10, 2014
    Messages:
    23
    Likes Received:
    1
    Nice! I already have mine setup but good documentation here, hopefully helps someone that needs it.
     
  6. Salty Doge

    Salty Doge Scrub VIP

    Joined:
    Nov 4, 2015
    Messages:
    41
    Likes Received:
    2
    Thx mate! i will defenitely try it out
     
  7. MMZ_Kask

    MMZ_Kask I am CS:GO KZ Staff Member Administrator

    Joined:
    Oct 31, 2014
    Messages:
    1,104
    Likes Received:
    109
    Nice guide.

    FYI, if you look in the /csgo/cfg/sourcemod/kztimer/map_types/ folder, there's settings for each map prefix (kz_, surf_, cs_, etc), that determine how KZTimer behaves for those maps.
     
  8. Ŧяuccølø

    Ŧяuccølø New

    Joined:
    Feb 24, 2016
    Messages:
    2
    Likes Received:
    0
    Hey,
    i tried to run the kz plugin local, did everything you sayed i should do, but unfortunately it is not running :(
    here is all my console gets out when i load any kz map.
    I just spawn there with 1 bot and the kz plugin is not running (!menu or anything not working)

    ] map kz_aztec
    ---- Host_NewGame ----
    env_cubemap used on world geometry without rebuilding map. . ignoring: de_aztec/road01
    #######################################
    Map kz_aztec missing stringtable dictionary, don't ship this way!!!
    Run with -stringtables on the command line or convar
    stringtable_alwaysrebuilddictionaries enabled to build the string table
    #######################################
    Host_NewGame on map kz_aztec
    L 02/24/2016 - 14:00:57: -------- Mapchange to kz_aztec --------
    L 02/24/2016 - 14:00:57: [GEOIP] GeoIP database info: GEO-106FREE 20160202 Build 1 Copyright (c) 2016 MaxMind
    CGameEventManager::AddListener: event 'teamplay_win_panel' unknown.
    CGameEventManager::AddListener: event 'teamplay_restart_round' unknown.
    CGameEventManager::AddListener: event 'arena_win_panel' unknown.
    L 02/24/2016 - 14:00:57: [SM] Plugin encountered error 25: Call was aborted
    L 02/24/2016 - 14:00:57: [SM] Native "SetFailState" reported: [KZTimer] Unable to connect to database (Configuration "kztimer" not found)
    L 02/24/2016 - 14:00:57: [SM] Displaying call stack trace for plugin "KZTimerGlobal.smx":
    L 02/24/2016 - 14:00:57: [SM] [0] Line 337, kztimerGlobal/sql.sp::db_setupDatabase()
    L 02/24/2016 - 14:00:57: [SM] [1] Line 837, F:\csgo-ds\server01\csgo\addons\sourcemod\scripting\KZTimerGlobal.sp::OnPluginStart()
    GameTypes: missing mapgroupsSP entry for game type/mode (custom/custom).
    GameTypes: missing mapgroupsSP entry for game type/mode (cooperative/cooperative).
    GameTypes: missing mapgroupsSP entry for game type/mode (cooperative/coopmission).
    bot_autodifficulty_threshold_high - 5.0
    bot_autodifficulty_threshold_low - -2.0
    bot_chatter - normal
    bot_defer_to_human_goals - 0
    bot_defer_to_human_items - 1
    bot_difficulty - 1
    bot_quota - 10
    bot_quota_mode - normal
    bot_allow_grenades - 1
    bot_allow_pistols - 1
    bot_allow_sub_machine_guns - 1
    bot_allow_shotguns - 1
    bot_allow_rifles - 1
    bot_allow_snipers - 1
    bot_allow_machine_guns - 1
    sv_auto_adjust_bot_difficulty - 1
    sv_bots_get_easier_each_win - 0
    sv_bots_force_rebuy_every_round - 0
    sv_bots_get_harder_after_each_wave - 0
    mp_playercashawards - 1
    cash_player_bomb_defused - 300
    cash_player_bomb_planted - 300
    cash_player_damage_hostage - -30
    cash_player_interact_with_hostage - 150
    cash_player_killed_enemy_default - 300
    cash_player_killed_enemy_factor - 1
    cash_player_killed_hostage - -1000
    cash_player_killed_teammate - -300
    cash_player_rescued_hostage - 1000
    cash_player_respawn_amount - 0
    cash_player_get_killed - 0
    mp_teamcashawards - 1
    cash_team_elimination_bomb_map - 3250
    cash_team_elimination_hostage_map_t - 1000
    cash_team_elimination_hostage_map_ct - 2000
    cash_team_hostage_alive - 0
    cash_team_hostage_interaction - 500
    cash_team_loser_bonus - 1400
    cash_team_loser_bonus_consecutive_rounds - 500
    cash_team_planted_bomb_but_defused - 800
    cash_team_rescued_hostage - 0
    cash_team_terrorist_win_bomb - 3500
    cash_team_win_by_defusing_bomb - 3250
    cash_team_win_by_hostage_rescue - 3500
    cash_team_win_by_time_running_out_bomb - 3250
    cash_team_win_by_time_running_out_hostage - 3250
    cash_team_survive_guardian_wave - 1000
    mp_afterroundmoney - 0
    mp_buytime - 90
    mp_buy_anywhere - 0
    mp_buy_during_immunity - 0
    mp_startmoney - 800
    mp_maxmoney - 16000
    sv_buy_status_override - -1
    mp_death_drop_defuser - 1
    mp_death_drop_grenade - 2
    mp_death_drop_gun - 1
    mp_deathcam_skippable - 1
    mp_defuser_allocation - 0
    mp_give_player_c4 - 1
    mp_free_armor - 0
    mp_molotovusedelay - 15.0
    mp_weapons_allow_zeus - 1
    mp_weapons_allow_map_placed - 0
    mp_weapons_glow_on_ground - 0
    mp_ct_default_melee - weapon_knife
    mp_ct_default_secondary - weapon_hkp2000
    mp_ct_default_primary -
    mp_ct_default_grenades -
    mp_t_default_melee - weapon_knife
    mp_t_default_secondary - weapon_glock
    mp_t_default_primary -
    mp_t_default_grenades -
    mp_buy_allow_grenades - 1
    mp_weapons_allow_typecount - 5
    mp_freezetime - 6
    mp_force_pick_time - 15
    mp_halftime - 0
    mp_match_can_clinch - 1
    mp_maxrounds - 0
    mp_roundtime - 5
    mp_roundtime_defuse - 0
    mp_roundtime_hostage - 0
    mp_timelimit - 5
    mp_warmuptime - 30
    mp_warmuptime_all_players_connected - 60
    mp_warmup_pausetimer - 0
    mp_halftime_pausetimer - 0
    mp_default_team_winner_no_objective - -1
    mp_hostagepenalty - 10
    mp_solid_teammates - 1
    sv_allow_votes - 1
    sv_alltalk - 0
    sv_auto_full_alltalk_during_warmup_half_end - 1
    sv_deadtalk - 0
    sv_ignoregrenaderadio - 0
    mp_teammates_are_enemies - 0
    mp_damage_scale_ct_body - 1.0
    mp_damage_scale_ct_head - 1.0
    mp_damage_scale_t_body - 1.0
    mp_damage_scale_t_head - 1.0
    mp_friendlyfire - 0
    ff_damage_reduction_bullets - 0.1
    ff_damage_reduction_grenade - 0.25
    ff_damage_reduction_grenade_self - 1
    ff_damage_reduction_other - 0.25
    mp_limitteams - 2
    spec_freeze_panel_extended_time - 0.0
    spec_freeze_time - 5.0
    mp_forcecamera - 1
    mp_respawn_immunitytime - 4.0
    mp_respawn_on_death_t - 0
    mp_respawn_on_death_ct - 0
    mp_display_kill_assists - 1
    mp_use_respawn_waves - 0
    mp_respawnwavetime_ct - 10.0
    mp_respawnwavetime_t - 10.0
    mp_randomspawn - 0
    mp_randomspawn_los - 1
    mp_randomspawn_dist - 0
    mp_radar_showall - 0
    mp_force_assign_teams - 0
    sv_gravity - 800
    sv_accelerate - 5.5
    sv_stopspeed - 80
    sv_airaccelerate - 12
    sv_wateraccelerate - 10
    sv_waterfriction - 1
    sv_friction - 5.2
    sv_bounce - 0
    sv_maxvelocity - 3500
    sv_maxspeed - 320
    sv_bot_buy_grenade_chance - 33
    sv_bot_buy_smoke_weight - 1
    sv_bot_buy_flash_weight - 1
    sv_bot_buy_decoy_weight - 1
    sv_bot_buy_molotov_weight - 1
    sv_bot_buy_hegrenade_weight - 6
    sv_guardian_min_wave_for_heavy - 0
    sv_guardian_max_wave_for_heavy - 0
    sv_guardian_heavy_count - 0
    sv_guardian_heavy_all - 0
    mp_ggprogressive_round_restart_delay - 15.0
    mp_ggtr_bomb_defuse_bonus - 1.0
    mp_ggtr_bomb_detonation_bonus - 1.0
    mp_ggtr_bomb_pts_for_flash - 4
    mp_ggtr_bomb_pts_for_he - 3
    mp_ggtr_bomb_pts_for_molotov - 5
    mp_ggtr_bomb_pts_for_upgrade - 2.0
    mp_ggtr_bomb_respawn_delay - 0.0
    mp_ggtr_end_round_kill_bonus - 1
    mp_ggtr_halftime_delay - 0.0
    mp_ggtr_last_weapon_kill_ends_half - 0
    sv_arms_race_vote_to_restart_disallowed_after - 0
    mp_coop_force_join_ct - 0
    bot_allow_rogues - 1
    mp_guardian_special_kills_needed - 10
    mp_guardian_special_weapon_needed - awp
    mp_guardian_player_dist_min - 1300
    mp_guardian_player_dist_max - 2000
    mp_guardian_target_site - -1
    mp_hostages_spawn_force_positions -
    mp_hostages_spawn_same_every_round - 1
    mp_guardian_bot_money_per_wave - 800
    sv_disable_show_team_select_menu - 0
    mp_hostages_max - 2
    spec_replay_enable - 0
    mp_round_restart_delay - 7.0
    mp_coopmission_bot_difficulty_offset - 0
    sv_duplicate_playernames_ok - 0
    mp_anyone_can_pickup_c4 - 0
    mp_c4_cannot_be_defused - 0
    mp_c4timer - 40
    mp_coopmission_mission_number - 0
    weapon_reticle_knife_show - 0
    mp_death_drop_c4 - 1
    Executing listen server config file
    exec: couldn't exec gamemode_casual_server.cfg
    PlayerModelInfo: missing terrorist models for map kz_aztec. Adding the default model tm_phoenix.
    PlayerModelInfo: missing counter-terrorist models for map kz_aztec. Adding the default model ctm_st6.
    Commentary: Could not find commentary data file 'maps/kz_aztec_commentary.txt'.
    Error parsing BotProfile.db - unknown attribute 'Rank'
    Error parsing BotProfile.db - unknown attribute 'Rank'
    Error parsing BotProfile.db - unknown attribute 'Rank'
    Error parsing BotProfile.db - unknown attribute 'Rank'
    Error parsing BotProfile.db - unknown attribute 'Rank'
    Error parsing BotProfile.db - unknown attribute 'Rank'
    Error parsing BotProfile.db - unknown attribute 'Rank'
    Error parsing BotProfile.db - unknown attribute 'Rank'
    Initializing Steam libraries for INSECURE Internet server. Authentication and VAC not requested.
    Logging into anonymous listen server account.
    Connection to Steam servers successful.
    Public IP is 11.111.111.111.
    Assigned anonymous gameserver Steam ID [A:1:139338754(6429)].
    Server using '<none>' lobbies, requiring pw no, lobby id ffffffffffffffff
    VAC secure mode disabled.
    GC Connection established for server version 288, instance idx 1

    Counter-Strike: Global Offensive
    Map: kz_aztec
    Players: 1 (0 bots) / 20 humans
    Build: 6317
    Server Number: 1

    No pure server whitelist. sv_pure = 0
    PutClientInServer: no info_player_start on level
    Ŧяuccølø #2 connected.
    Ethan connected.
    CT bot spawned outside of a buy zone (-211, 621, 0)
    CT bot spawned outside of a buy zone (-320, 768, 0)

    I hope you can help me :)
     
  9. darksy

    darksy New

    Joined:
    Aug 18, 2015
    Messages:
    16
    Likes Received:
    2
    The error seems to be here:

    L 02/24/2016 - 14:00:57: [SM] Native "SetFailState" reported: [KZTimer] Unable to connect to database (Configuration "kztimer" not found)

    Go in to: addons > sourcemod > config > databases.cfg

    Check that the entry for kztimer looks like:

    Code:
    "kztimer"
        {
              "driver"         "sqlite" //mysql also supported
              "host"           "localhost"
              "database"       "kztimer-sqlite"
              "user"           "root"
              "pass"           ""
        }
    
    Make sure closing brackets etc. aren't missing.
     
  10. Ŧяuccølø

    Ŧяuccølø New

    Joined:
    Feb 24, 2016
    Messages:
    2
    Likes Received:
    0
    Ty you so much <3
    My mistake was to put it behind all brackets
    now its works perfectly