Installing and Configuring CoDaM MiscMod

MiscMod is a CoDaM PowerServer replacement aimed at improving stability and adding some different kind of features to CoDaM.
This is the official guide for MiscMod. MiscMod may not be compatible with other mods. Other mods may cause problems or break stability.

MiscMod is available on GitHub.

Prerequisites

You must have a clean install of Call of Duty running on Linux and the following files configured:

Installation

Download CoDaM_MiscMod_v3.1.3_for_codextended.zip and extract the contents of the .zip archive to the servers main/ folder.
curl -LJO https://github.com/cato-a/CoDaM_MiscMod/releases/download/3.1.3/CoDaM_MiscMod_v3.1.3_for_codextended.zip
unzip CoDaM_MiscMod_v*_for_codextended.zip CoDaM_MiscMod.cfg ___CoDaM_MiscMod.pk3
rm CoDaM_MiscMod_v*_for_codextended.zip
Make sure you create the files miscmod_bans.dat and miscmod_reports.dat in the main/ folder that the server can read and write to, or the server may crash.

Configuration

The configuration options for MiscMod is already well explained inside CoDaM_MiscMod.cfg however there are many that struggle with the setup of permissions to get the server commands working. All fields represented by "less than" < and "greater than" > symbols are to be replaced with values. That means <field> should be replaced in its entirety including the "less than" < and "greater than" > symbols.

Edit and add the following to the codam/modlist.gsc file located in the servers main/ folder.
level.topText = &"<your text>";
level.bottomText = &"<your text>";

[[ register ]]( "Cato's MiscMod", codam\miscmod::main );
Ensure that the above mentioned Cato's MiscMod line is before HamGoodies or parts of HamGoodies will not load in the game.

INT represent an integer. An integer is a number. For example -1 or 1642.
BOOL represent a value of true or false. Number 1 means true and number 0 means false.
STRING represent a sequence of characters. A character is a letter, number or symbol.

The following is the complete CoDaM_MiscMod.cfg for MiscMod.
// miscmod settings
set scr_miscmod ""                      // BOOL - enable or disable MiscMod

set scr_mm_shellshock ""                // BOOL - enable shellshock on player damage (disables instantkill / hitmarker / damagemarker) (DEFAULT: false)
set scr_mm_hitmarker ""                 // INT - hitmarker options (DEFAULT: 0 | CHOICES: 0 = no marker, 1 = standard marker bolt weapons, 2 = standard marker all weapons, 3 = color marker all weapons and 4 = color marker bolt weapons)
set scr_mm_hitmarker_noscale ""         // BOOL - fixed size hitmarker (DEFAULT: false)
set scr_mm_damagemarker ""              // BOOL - show damage dealt (WARNING: should probably not be used with lots of players)
set scr_mm_damagemarker_minus ""        // BOOL - use a minus instead of a pluss (DEFAULT: false)
set scr_mm_instantkill ""               // BOOL - enable instant kill (bolt weapons) (DEFAULT: false)
set scr_mm_pistolkill ""                // BOOL - enable instant kill on pistols (DEFAULT: false)
set scr_mm_meleekill ""                 // BOOL - enable instant kill on melee (DEFAULT: false)
set scr_mm_meleekill_ignore ""          // STRING - ignore instantkill on specified weapon group, semicolon separated list for multiple groups (e.g "secondary;grenade") (DEFAULT: "" | VALUES: "bolt", "secondary", "grenade", "primary")
set scr_mm_headshots ""                 // BOOL - headshots only
set scr_mm_fastfire ""                  // INT - amount of fastfires before punishment (DEFAULT: 0 | CHOICES: 0 to disable, <num> fast fires or -1 for unlimited fastfire with no damage on hit players)
set scr_mm_fastfireaction ""            // STRING - punishment for fastfire (DEFAULT: "suicide" | CHOICES: "suicide", "disarm" or "spectator")
set scr_mm_weapon32 ""                  // BOOL - enable or disable weapon32 (DEFAULT: false)
set scr_mm_stuckmap ""                  // BOOL - enable map restarts on empty server to prevent stuck timer (DEFAULT: true)
set scr_mm_mapobjects ""                // BOOL - remove objects from map (DEFAULT: false)
set scr_mm_quickcommandlimit ""         // INT - enable quick commands max limit (DEFAULT: 5)
set scr_mm_nnn ""                       // INT - number of seconds to kick 999 player (DEFAULT: 60 | NOTE: disabled when sv_allowDownload "1")
set scr_mm_spawnprotection ""           // INT - number of seconds to protect a player on spawn (DEFAULT: 0)
//set scr_mm_rcm_compatibility ""       // BOOL - adds log output compatible with RCM (DEFAULT: false)
set scr_mm_bel_menu ""                  // BOOL - change regular menus into BEL menus (DEFAULT: false)
set scr_mm_badwords1 ""                 // STRING - space separated list of bad words, only lower case (DEFAULT: "")
set scr_mm_badwords2 ""                 // STRING - add more CVARs for more bad words by increasing last number
set scr_mm_badwords_checknames ""       // INT - number of seconds between each check, 0 to disable (DEFAULT: 0)
set scr_mm_emptymap ""                  // STRING - a map the server will switch to if server has no players, requires scr_mm_stuckmap to be enabled (DEFAULT "")
set scr_mm_rename ""                    // STRING - a space separated list of keywords (in lowercase) e.g "unnamed unknown codam" to rename, be sure to disable similar feature in CoDaM_HamGoodies (DEFAULT "")
set scr_mm_renameto ""                  // STRING - the name you want to rename player to, if name ends with a %, then a random number is added to name at the end (DEFAULT "^1Disallowed Name^3#^1%")

set scr_mm_commands ""                  // BOOL - enable MiscMod commands (DEFAULT: false)
set scr_mm_groups ""                    // STRING - user defined groups (FORMAT: "groupname1;groupname2")
set scr_mm_users_<group> ""             // STRING - <group> as defined in scr_mm_groups (FORMAT: "username1:password1 username2:password2")
set scr_mm_perms_<group> ""             // STRING - <group> as defined in scr_mm_groups (FORMAT: "*:<id>:<id1>-<id2>:!<id>" | NOTE: grant permissions are evaluated first. Not permissions must be before grant permissions and wildcard permission is evaluated last.)
set scr_mm_cmd_prefix ""                // STRING - in game command prefix (DEFAULT: "!")
set scr_mm_cmd_nameprefix ""            // STRING - in game name prefix (DEFAULT: "[MiscMod]")
set scr_mm_cmd_maps ""                  // STRING - specify maps allowed with !map command (DEFAULT: "mp_harbor mp_brecourt mp_carentan mp_railyard mp_dawnville mp_depot mp_rocket mp_pavlov mp_powcamp mp_hurtgen mp_ship mp_chateau")
set scr_mm_cmd_path ""                  // STRING - specify working directory for miscmod_bans.dat file (DEFAULT: "")
set scr_mm_ipaccess ""                  // STRING - specify usernames (as defined in users) and/or groups (as defined in groups) to be able to see IP addresses in game (FORMAT: "username1;group1;username2;...")

set scr_mm_mmkeys ""                    // BOOL - enable MiscMods keys
set scr_mm_meleefight ""                // BOOL - enable melee fights on SD maps (1 on 1) (DEFAULT: false)
set scr_mm_meleefight_spawns ""         // INT - alternative spawn facing eachother on a random spot (DEFAULT: 0 | CHOICES: 1 do randomly a spawnpoint or 2 do always a spawnpoint)
set scr_mm_meleefight_winner ""         // BOOL - give a reward to showdown winner (DEFAULT: false)
set scr_mm_meleefight_announce ""       // BOOL - display a message when there is 2 players left on team (DEFAULT: false)
set scr_mm_meleefight_test ""           // BOOL - enable testing of showdown spawns when doing MiscMod keycombo (DEFAULT: false | NOTE: only used to debug spawnpoints)

set scr_mm_msgb_enable ""               // BOOL - enable server messages
set scr_mm_msgb1 ""                     // STRING - "<time>;<type>;<message>" - prints <message> with <type> every <time> - type can be "c" - console, "m" - center bold, "o" - obituary. Time between 1 to 300 seconds.
set scr_mm_msgb2 ""                     // STRING - As many messages you want can be specified by adding CVAR with an increased number

set scr_mm_chat_maxmessages ""          // INT - number of messages allowed within penaltytime (DEFAULT: 0)
set scr_mm_chat_penaltytime ""          // INT - duration in seconds of penaltytime (DEFAULT: 2)

set scr_mm_scoreboard_text ""           // STRING - alternative sv_hostname text for the scoreboard (DEFAULT: "" | CHOICES: "^2Custom Text", "" to disable, or "namefix" to remove sv_hostname squares and other illegal chars)
set scr_mm_wmap_force ""                // BOOL - Ignore CoDaM's weapon map code forcing noMap under some conditions (e.g you pick up a weapon and it's not mapped, it will now be mapped) (DEFAULT: false)

set scr_mm_welcome1 ""                  // STRING - prints welcome message + player name
set scr_mm_welcome2 ""                  // STRING - prints welcome message
set scr_mm_welcome3 ""                  // STRING - prints welcome message
set scr_mm_repeatwelcome ""             // BOOL - repeat welcome messages on every round

set scr_mm_mapvote ""                   // BOOL - enable or disable mapvoting
set scr_mm_mapvotetime ""               // INT - mapvote duration (DEFAULT: 15s | MIN: 10s | MAX: 60s)
set scr_mm_mapvotereplay ""             // BOOL - display replay map choice (replay this map) (DEFAULT: false)
set scr_mm_mapvoterandom ""             // BOOL - display random map choice (mystery map) (DEFAULT: false)
set scr_mm_mapvotegametype ""           // BOOL - display gametype on winning map screen (DEFAULT: true)
set scr_mm_mapvotebans ""               // INT - amount of rounds to ignore a map (WARNING: TOTAL_MAPS - 5 = MAX)
set scr_mm_mapvotebans_playercount ""   // STRING - (untested, use at own risk) remove these maps when server has fewer than X players in a colon separated, space separated list (FORMAT: "<count>:<mapname> <count>:<mapname> ...") (WARNING: server must have at least 5 maps left) (DEFAULT: "")
set scr_mm_mapvotesound ""              // BOOL - play beep sound on vote choice (DEFAULT: false)

set scr_mm_anticamp ""                  // BOOL - enable anticamp features
set scr_mm_spawncamprange ""            // INT - range in units to untrigger spawncamper (DEFAULT: 100)
set scr_mm_spawncamper ""               // INT - time before punishment (DEFAULT: 20s)
set scr_mm_anticamprange ""             // INT - range in units to untrigger anticamper (DEFAULT: 50)
set scr_mm_anticamper ""                // INT - time before punishment (DEFAULT: 30s)
set scr_mm_campaction ""                // STRING - action to take as punishment (DEFAULT: "compass" | CHOICES: "spectator", "compass" or "suicide")

//set scr_mm_restrict_<weapon> ""       // INT - restrict a weapon to a specific amount (overrides weapon_assign)
set scr_mm_allow_pistols ""             // INT - restrict amount of pistol ammo (DEFAULT: "")
set scr_mm_allow_pistols_ammotype ""    // STRING - "chamber" or "clip" (reload) ammo (DEFAULT: "chamber")
set scr_mm_allow_grenades ""            // INT - restrict amount of grenades (DEFAULT: "")
set scr_mm_weaponsmapgt ""              // BOOL - enable the ability to set different weapons per map or gametype (e.g scr_allow_mp44_mp_harbor "1" or scr_allow_panzerfaust_sd "1")
set scr_mm_banlist_limit ""             // INT - maximum number of bans to display in !banlist command (DEFAULT: 90)
set scr_mm_bansearch_limit ""           // INT - maximum number of results in !bansearch command (DEFAULT: 90)
set scr_mm_reportlist_limit ""          // INT - maximum number of results in !reportlist command (DEFAULT: 30)
set scr_mm_reportlimit_permap ""        // INT - limit the number of reports can be made per map (DEFAULT: 2)

// Example map rotation
set sv_mapRotation "gametype sd map mp_harbor map mp_brecourt map mp_carentan map mp_railyard map mp_dawnville map mp_depot map mp_rocket map mp_pavlov map mp_powcamp map mp_hurtgen"

// Example map rotation extended (optional)
set sv_mapRotation1 "gametype dm map mp_harbor map mp_brecourt map mp_carentan map mp_railyard map mp_dawnville map mp_depot map mp_rocket map mp_pavlov map mp_powcamp map mp_hurtgen"
set sv_mapRotation2 "gametype re map mp_harbor map mp_brecourt map mp_carentan map mp_railyard map mp_dawnville map mp_depot map mp_rocket map mp_pavlov map mp_powcamp map mp_hurtgen"
set sv_mapRotation3 "gametype tdm map mp_harbor map mp_brecourt map mp_carentan map mp_railyard map mp_dawnville map mp_depot map mp_rocket map mp_pavlov map mp_powcamp map mp_hurtgen"
To configure the permissions and get the commands working, we have to look at the following CVARs.
set scr_mm_commands ""              // BOOL - enable MiscMod commands (DEFAULT: false)
set scr_mm_groups ""                // STRING - user defined groups (FORMAT: "groupname1;groupname2" | INFO: You can override group 'default' by specifying it.)
set scr_mm_users_<group> ""         // STRING - <group> as defined in scr_mm_groups (FORMAT: "username1:password1 username2:password2")
set scr_mm_perms_<group> ""         // STRING - <group> as defined in scr_mm_groups (FORMAT: "*:<id>:<id1>-<id2>:!<id>" | NOTE: Grant permissions are evaluated first. Not permissions must be before grant permissions and wildcard permission is evaluated last.)
scr_mm_commands should be set to 1.
scr_mm_groups should contain a semicolon separated list of groups. For example Staff;Moderator;Member.
scr_mm_users_<group> should contain a space separated string of colon separated username:password for one or more users.
scr_mm_perms_<group> should contain a colon separated string of permissions. For example 15:!22:20-25:27:29-40. A full list of permission IDs later in this guide.

<group> should be replaced in its entirety by one group specified in the scr_mm_groups CVAR.

The following is a working example that also allows users to use !pm and !re commands.
set scr_mm_commands "1"                                       // BOOL - enable MiscMod commands (DEFAULT: false)
set scr_mm_groups "default;Staff;Moderator;Member"            // STRING - user defined groups (FORMAT: "groupname1;groupname2" | INFO: You can override group 'default' by specifying it.)

set scr_mm_perms_default "1-4:25-26"  

set scr_mm_users_Staff "Cato:mysecretpassword Thor:hammer"    // STRING - <group> as defined in scr_mm_groups (FORMAT: "username1:password1 username2:password2")
set scr_mm_perms_Staff "*"                                    // STRING - <group> as defined in scr_mm_groups (FORMAT: "*:<id>:<id1>-<id2>:!<id>" | NOTE: Grant permissions are evaluated first. Not permissions must be before grant permissions and wildcard permission is evaluated last.)

set scr_mm_users_Moderator "Peter:cookies Maria:kitties"      // STRING - <group> as defined in scr_mm_groups (FORMAT: "username1:password1 username2:password2")
set scr_mm_perms_Moderator "5-24:27:43-51"                    // STRING - <group> as defined in scr_mm_groups (FORMAT: "*:<id>:<id1>-<id2>:!<id>" | NOTE: Grant permissions are evaluated first. Not permissions must be before grant permissions and wildcard permission is evaluated last.)

set scr_mm_users_Member "George:bush Barack:obama"            // STRING - <group> as defined in scr_mm_groups (FORMAT: "username1:password1 username2:password2")
set scr_mm_perms_Member "12-15:43-51"                         // STRING - <group> as defined in scr_mm_groups (FORMAT: "*:<id>:<id1>-<id2>:!<id>" | NOTE: Grant permissions are evaluated first. Not permissions must be before grant permissions and wildcard permission is evaluated last.)
The above configuration allows:
  1. every user to use commands with permission IDs 1 to 4, 25 and 26 specified in group default.
  2. users in group Staff to use every command.
  3. users in group Moderator to use commands with permission IDs 5 to 24, 27 and 43 to 51 as well as the default IDs 1 to 4, 25 and 26.
  4. users in group Member to use commands with permission IDs 12 to 15 and 43 to 51 as well as the default IDs 1 to 4, 25 and 26.
Following is a list of commands and their IDs. <num> can be replaced with a string and a player number will be matched based on the string.
Command:                              Description:                                                Permission ID:

!login <user> <pass>                  Login to access commands.                                   0 - always default
!help                                 Display this help.                                          1 - default
!version                              Display MiscMod version.                                    2 - default
!name <new name>                      Change name.                                                3 - default
!fov <value>                          Set field of view.                                          4 - default
!rename <num> <new name>              Change name of a player.                                    5
!logout                               Logout.                                                     6
!say <message>                        Say a message with group as prefix.                         7
!saym <message>                       Print a message in the middle of the screen.                8
!sayo <message>                       Print a message in the obituary.                            9
!kick <reason>                        Kick a player.                                              10
!reload                               Reload MiscMod commands and settings.                       11
!restart (*)                          Restart map (soft).                                         12
!endmap                               End the map.                                                13
!map <mapname> (gametype)             Change map and gametype.                                    14
!status                               List players.                                               15
!mute <num>                           Mute a player.                                              16
!unmute <num>                         Unmute a player.                                            17
!warn <num> <message>                 Warn a player.                                              18
!kill <num>                           Kill a player.                                              19
!weapon <num> <weapon>                Give a weapon to player.                                    20
!heal <num>                           Heal a player.                                              21
!invisible <on|off>                   Become invisible.                                           22
!ban <num> <time> <reason>            Ban a player.                                               23
!unban <ip>                           Unban a player.                                             24
!pm <player> <message>                Private message a player.                                   25
!re <message>                         Respond to a private message.                               26
!who                                  Display logged in users.                                    27

!drop <num> <height>                  Drop a player.                                              28
!spank <num> <time>                   Spank a player.                                             29
!slap <num> <damage>                  Slap a player.                                              30
!blind <num> <time>                   Blind a player.                                             31
!runover <num>                        Run over a player.                                          32
!squash <num>                         Squash a player.                                            33
!rape <num>                           Rape a player.                                              34
!toilet <num>                         Turn a player into a toilet.                                35

!explode <num>                        Explode a player.                                           36
!force <axis|allies|spectator> <num|all> (...)  Force players to team.                            37
!mortar <num>                         Mortar a player.                                            38
!matrix                               Matrix.                                                     39
!burn <num>                           Burn a player.                                              40
!cow <num>                            BBQ a player.                                               41
!disarm <num>                         Disarm a player.                                            42

!os                                   Snipers only.                                               43
!aw (*)                               All weapons (1 sniper).                                     44
!omp                                  Only machine guns.                                          45
!rifles <on|off|only>                 Rifle settings.                                             46
!health <off|0|1|2|3>                 Health settings.                                            47
!grenade <off|0|1|2|3|reset>          Grenade settings.                                           48
!pistols <on|off|reset>               Pistol settings.                                            49
!1sk <on|off>                         Enable or disable instant kill.                             50
!roundlength <time>                   Set roundlength. (sd|re)                                    51
!psk <on|off>                         Enable or disable instant kill on pistols.                  52

!belmenu <on|off>                     Enable BEL menu instead of normal menu.                     53
!report <on|off>                      Report a player.                                            54

!rs                                   Reset your scores in the scoreboard.                        56
!optimize                             Set optimal connection settings for a player.               57

!pcvar <num> <cmd> <value>            Set/modify a player CVAR.                                   58
!respawn <num> <sd|dm|tdm>            Move a player to a new spawnpoint.                          59

!wmap <wapon=map>                     Change CoDaM's weapon_map setting.                          60
!meleekill <on|off>                   Enable or disable scr_mm_meleekill.                         61
!teleport <num> (<num>|<x> <y> <z>)   Teleport a player to a player or (x, y, z) coordinates.     62
!teambalance <on|off|force>           Adjust team balance settings or force a team balance.       63
!swapteams (*)                        Swap teams (no reset).                                      64
!freeze <on|off> <num|all>            Freeze certain players (on the map).                        65
!move <num> <u|d|l|r|f|b> <units>     Move player in specified direction by specified units.      66
!scvar <cvar> <value>                 Set/modify a server CVAR.                                   67
!bansearch <query>                    Search for bans in the banlist.                             68
!banlist                              List most recent bans.                                      69
!reportlist                           List most recent reports.                                   70
!namechange <on|off>                  Turn nonamechange on/off.                                   71

Final note

If you followed the Create a Call of Duty 1 server on Linux guide ensure that all your newly added files has correct permissions for the codserver user.

The # symbol will be used to illustrate a root shell command.
# chmod 660 CoDaM_MiscMod.cfg ___CoDaM_MiscMod.pk3 miscmod_bans.dat
# chown codserver:codserver CoDaM_MiscMod.cfg ___CoDaM_MiscMod.pk3 miscmod_bans.dat
If you have feature requests, bug reports or some adjustment you'd like in the official release you can kindly ask Cato on TeamSpeak.
If you do ask Cato on TeamSpeak make sure you set aside enough time to test all newly written code thoroughly and that you have a test server available.

A guide by Cato

Original URL: https://de.dvotx.org/dump/cod1/server_guide.miscmod.html
Author(s): Cato
Created on: 2021-08-27 15:05:57
Last update: 2023-10-18 20:42:24

Revision(s):
2023-04-23 22:35:53 by Cato: MiscMod 3.1.1
2023-09-07 01:50:12 by Cato: MiscMod 3.1.2
2023-10-18 20:42:24 by Cato: MiscMod 3.1.3