Hammer
12-27-2002, 01:14 PM
Here's a server-side mod that allows for fully customizable map fixes, honesty settings, skin control and more. :D :evil: :D I know, you're saying "oh no, not another one!", well it is my hope that this will help end them all. 8O
The latest version: 2.2 hothothot
Get it here: http://www.filefront.com/?filepath=/mohaacrew/hammer/Hammer_Goodies_2.2.zip
(see README.txt in the ZIP archive for release history)
eggface IMPORTANT: starting with version 2.0, I've integrated this mod with the MoH_AdminMod (MAM) framework. For the mod to work, you must download and install MoH_AdminMod -- see the MAM section at:
http://www.mohadmin.com/nuke/modules.php?name=Forums&file=viewforum&f=16. Make sure that the Goodies' config file (con_Hammers_Goodies.cfg) is started AFTER the one from MoH_AdminMod (MoH_AdminMod.cfg).
Note: As of 0.3 Beta, I've incorporated another file to correct certain maps that do not contain a map script, hence do not execute DMprecache.scr. As more maps are identified, I will be updating this file. Should you come across maps that do not work with my mod, please let me know its name.
Here's a highlight of what it can do:[list]* Play OBJ maps as FFA, TDM or RBM
* Create areas in maps and perform actions when players use or touch them (great for anti-under map, anti-landsharking). Includes fixes to prevent MG "problems" (soft cheats).
* Integrates with MoH_AdminMod
* Guarantees map rotation established in sv_maplist is processed correctly (fixes bug in MoH:AA and Spearhead)
* Dynamically configure bomb settings in OBJ/TOW maps
* Add simple custom messages (periodic)
* Integrate other mods (scalable) [removed: handled by MoH_AdminMod]
* Dynamic custom map rotation with individual pre-sets for each map (works just as "well" as other map rotation mods :rolleyes:, but you don't need to hack individual map scripts)
* Implement custom maps changes, like map fixes from the config file
* Ability to customize round limits in OBJ/RBM/TOW maps (yes, now Omaha can last longer ... eeek)
* Dynamically configure respawning in OBJ/TOW maps
* Force models OFF or ON (on is useful with the feature below)
* Force skins with timed, round-robin rotation of skins
* Customizable honesty settings
* Send custom commands to all clients [removed: handled by MoH_AdminMod]
* Banning (as soon as I figure out how to obtain player's IP from within a mod)[/list:u]Everything but banning is working!!!!
--[MC] Hammer
__________________________________________________ ____________________
My intention from the beginning was to have as many configurable options as possible in an effort to avoid having to hack the actual mod scripts and also be able to make changes on a running server. The resulting config file used by this mod while extensive, does provide for a lot of flexibility. However, it requires some explaining. :rolleyes: Here's a tutorial on how to configure things:
[code:1]//
///////////////////////////////////////////////////////////////////////////////
// Mod Control -- register the mod with MoH_AdminMod
///////////////////////////////////////////////////////////////////////////////
append mam_register_mod "global/Hammer_Goodies.scr"
[/code:1]
The above line MUST be present for this mod to be properly registered with MoH_AdminMod. Do not remove or edit it.
[code:1]set _ham_showmsg 120 // Display Goodies' info: 0=no, > 0 interval
[/code:1]
If you want the mod to operate quietly (stealth mode), disable the above option (set to zero), otherwise players will see an info message every number of seconds interval chosen (min. = 60 secs.)
[code:1]///////////////////////////////////////
// GaSplat requested additions -- 1/9/2003
// Additional messages to display after Goodies' info
// 0= disable, #= number of _ham_xtramsg_# entries to show
set _ham_xtramsgs 0
set _ham_xtramsg_1 ""
set _ham_xtramsg_2 "<< Mohaa Crew Clan Server #1 >>"
set _ham_xtramsg_3 ""
set _ham_xtramsg_4 "<< by [MC] Hammer >>"
set _ham_xtramsg_5 ""
[/code:1]
Use the above to add extras messages to the Goodies' info output.
[code:1]//
///////////////////////////////////////////////////////////////////////////////
// Map Preset settings
///////////////////////////////////////////////////////////////////////////////
// Map Presets control - do we manage map settings?
// 0= disable, 1= enable
set _ham_presets 1
[/code:1]
The above setting determines whether the mod will attempt to manage game parameters automatically based on map names. Parameters for game type, time/frag/round limit, friendly fire, realism (in Spearhead) and respawning (for round-based maps) can be controlled using the following config statements. Map presets are useful when you want to run a mixed-map rotation, i.e. TDM and OBJ. Note that MoH:AA has problems starting round-based maps from a death match one; the mod attempts a crude work around this problem as you will no doubtedly soon discover.
[code:1]///////////////////////////////////////
// For non-OBJ/TOW matches, what is the default game type
// 1= FFA, 2= TDM, 3= RBM, other= use g_gametype
set _ham_gametype "*"
// For OBJ/TOW maps, force game type to one of the following ...
// 1= FFA, 2= TDM, 3= RBM, other= use g_gametype
set _ham_gametype_obj "*"
[/code:1]
By default, g_gametype will be used to determine what match will be run for a map (normal game behavior). Death match maps (those with names prefixed by dm/) can be forced to be of a specific game type by setting this config. For example, if you want to prevent FFA or RBM matches, set this to 2 to force all DM maps as TDM. As of version 2.1, OBJ maps can be forced to play as either FFA, TDM, RBM by setting _ham_gametype_obj accordingly. Most maps will play well, although some have spawn points that can easily lead to spawn killing. Some maps will even enable objectives, although they will not complete a map in a non-objective match. To be most effective, you should start out playing a regular DM map. Please note, as with everything MOHAA, this feature will work most of the times, and sometimes will probably not (there's really no way to test every map out there).
[code:1]///////////////////////////////////////
// For Spearhead, do we force obj/tow maps to their proper type or let
// them use whatever g_gametype is set to?
// 0= use g_gametype, 1= force type
set _ham_sh_force_obj 1
[/code:1]
On Spearhead, OBJ/TOW maps can be played in FFA, TDM or RBM modes depending on the value set for g_gametype. In mixed map rotations, it may be desireable to force said maps to their respective game types, i.e. 4 & 5. The above entry instructs the mod to handle such cases.
[code:1]///////////////////////////////////////
// Match-type defaults ...
// Entry Format (fields):
// timelimit - Overall map duration in seconds (0= infinite)
// fraglimit - Number of kills before map ends (0= no limit)
// roundlimit - Round duration in seconds RBM/OBJ/TOW
// respawn - Force respawn: 0= disable, 1= enable
// g_teamdamage - Friendly Fire: 0= disable, 1= enable
// g_realismmode - Realism: 0= disable, 1= enable (Spearhead)
// ======== ONLY FOR OBJ/TOW types ========
// bomb_defuse_time - Time needed to defuse a bomb (in seconds)
// bomb_set_time - Time needed to set a bomb (in seconds)
// bomb_tick_time - How long before bomb blows (in seconds)
//
// Fields are separated by a colon (:). Entries are separated by a single
// space. A field value of asterisk (*) indicates to use the settings from
// game variables (cvars). Errors will occur is this format is not followed!!
// NOTE: ENTRIES MUST BE LISTED IN GAME-TYPE ORDER (FFA=1, TDM=2, RBM=3,
// OBJ=4, TOW=5) AND THERE MUST BE EXACTLY ONE FOR EACH GAME TYPE.
set _ham_defaults ""
append _ham_defaults "15:0:0:1:*:*" // FFA
append _ham_defaults "25:200:0:1:*:*" // TDM
append _ham_defaults "20:5:*:*:*:*" // RBM
append _ham_defaults "20:5:*:*:*:*:6:5:45" // OBJ
append _ham_defaults "20:5:*:*:*:*:6:5:15" // TOW
[/code:1]
The above lets you configure global defaults for all game types. An asterisk (*) in any of the fields tells the mod to use the normal game settings, e.g. timelimit, otherwise the values will be forced. NOTE: the order of the append statements above must be maintained!
[code:1]///////////////////////////////////////
// Same format as above, this can be used to force an override on any map preset
// Useful when you want to enable/disable certain options, e.g. respawning
// NOTE: this will apply to all maps started after the parameter is set.
set _ham_force_presets "*:*:*:*:*:*:*:*:*"
[/code:1]
If you ever need to force map presets for all maps (ignoring all other map preset settings in this config), use the above option. It uses the same format as the _ham_defaults option above.
[code:1]///////////////////////////////////////
// Map-specific presets ...
// Entry Format (fields):
// g_gametype - Force match type FFA=1, TDM=2, RBM=3, OBJ=4, TOW=5
// timelimit - Overall map duration in seconds (0= infinite)
// fraglimit - Number of kills before map ends (0= no limit)
// roundlimit - Round duration in seconds RBM/OBJ/TOW
// respawn - Allow respawn in OBJ & TOW (see above)
// g_teamdamage - Friendly Fire: 0= off, 1=on
// g_realismmode - Realism Mode: 0= disable, 1=enable
// mapname - Map name, e.g. dm/mohdm1
// ======== ONLY FOR OBJ/TOW types ========
// bomb_defuse_time - Time needed to defuse a bomb (in seconds)
// bomb_set_time - Time needed to set a bomb (in seconds)
// bomb_tick_time - How long before bomb blows (in seconds)
//
// Fields are separated by a colon (:). Entries are separated by a single
// space. A field value of asterisk (*) indicates to use the settings from
// game variables (cvars). Errors will occur is this format is not followed!!
set _ham_maplist ""
append _ham_maplist "*:*:*:*:*:*:*:dm/mohdm1"
append _ham_maplist "*:*:*:*:1:*:*:obj/obj_team2:*:*:*"
append _ham_maplist "*:*:*:8:*:*:*:obj/obj_team3:*:*:*"
[/code:1]
The mod provides the opportunity to configure map-specific presets. Individual map parameters are configured in the section shown above. You also have the option of hard-coding the game-type for a map, should it be required. NOTE: You can add as many entries to _ham_maplist as necessary as long as you don't overrun the MoH:AA cvar limit of 1024 characters. Should it ever become necessary to have such a long map list, please contact me and I'll look into making the needed changes. There's also a limit on the total cvars allowed during server run of 1024.
[code:1]//
///////////////////////////////////////////////////////////////////////////////
// Map fixes
///////////////////////////////////////////////////////////////////////////////
// Map fix control - do we perform map fixes?
// 0= disable, #= enable (indicates number of _ham_mapfix_# entries to check)
set _ham_fixmaps 4
///////////////////////////////////////
// Map fixes/additions ...
// Entry Format (fields) can take one of two different formats:
// -- Spawning in-game objects
// type - Model class type: 1= ScriptModel, 2= ScripSlave, other= regular
// mapname - Map name, e.g. dm/mohdm1, to spawn this object
// x_origin -
// y_origin -
// z_origin -
// p_angle - Pitch angle
// y_angle - Yaw angle
// r_angle - Roll angle
// scale - Scale factor (*= use TIKI default)
// visibility - 0= hide, 1=show (default)
// damage - 0= no (default), 1= yes
// solid - 0= no, 1= yes (default)
// TIKI filename - Model name (leave out models/ and .tik)
//
// -- Spawning special triggers (areas in maps that perform an action when
// players touch or use them)
// type - Trigger types -- can be one of:
// trig_touch : activates when players enter trigger
// trig_use : activates when USE key pressed
// trig_fire : activates when FIRE key pressed
// trig_mg: : special trigger for MGs
// mapname - Map name, e.g. dm/mohdm1, this trigger is for
// wtime - Time to wait before trigger acts (in seconds)
// action - What should happen when the trigger activates.
// Currently can be one of:
// none : no action (can also be *)
// hurt1 : cause 1 health drop
// hurt5 : cause 5 health drop
// hurt10 : cause 10 health drop
// hurt25 : cause 25 health drop
// hurt50 : cause 50 health drop
// die : cause full health drop
// kill : cause suicide
// respawn : cause player to respawn
// <others> : sent directly to client
// switchDelay - Period in which team switch is banned (in seconds)
// x1, y1, z1,
// x2, y2, z2 - The trigger's bounding box coordinates
//
// Fields are separated by a colon (:). Entries (rows) are separated by a
// single space. Errors will occur is this format is not followed!!
set _ham_mapfix_1 ""
append _ham_mapfix_1 "1:dm/mohdm2:-2600:1430:340:0:90:0:*:1:0:1:vehicles/stuka_d"
append _ham_mapfix_1 "1:dm/mohdm4:-1677:615:18:0:262:0:*:1:0:1:vehicles/bmwbike_d"
append _ham_mapfix_1 "1:obj/obj_team4:-1677:615:18:0:262:0:*:1:0:1:vehicles/bmwbike_d"
set _ham_mapfix_2 "1:obj/obj_team3:-1880:-300:200:0:272:0:*:1:0:1:vehicles/panzer_tank_europe"
////////////////////////////////////////////////////////////
set _ham_mapfix_7 "" // Hammer's Stalingrad triggers ///////////////////////
///// Ladder trigger (anti-landsharking/team switch)
append _ham_mapfix_7 "trig_use:dm/mohdm6:0:die:10:390:-10:30:445:30:200"
append _ham_mapfix_7 "trig_mg:dm/mohdm6:0:none:20:270:-260:224:360:-170:300"
[/code:1]
The mod provides a mechanism for spawning objects/models to correct map glitches or otherwise improve gameplay. Fixes from several mods are included in the default config file (Dogmeat, F_K, Druid). More can be added by creating _ham_mapfix_# entries and updating the count in _ham_fixmaps. As of version 2.1, you can also spawn triggerable brushes (objects) that will perform a specific action when a player either touches/enters it or uses the FIRE or USE game buttons. The triggers are useful for creating regions under map glitches (to kill players when they go under maps), adding objectives to maps (requires additional map script coding), anti-landsharking, and more. There's even a special trigger trig_mg that will reduce the chances of players shooting MGs while crouching (forces -attackprimary) and swap teams (will kill them). Several examples are included in the configuration files.
[code:1]//
///////////////////////////////////////////////////////////////////////////////
// Honesty Settings
///////////////////////////////////////////////////////////////////////////////
// Honesty control - do we apply honesty settings?
// 0= disable, #= enable (how often, in seconds, to perform honesty control)
set _ham_honesty 10
[/code:1]
Honesty control is enabled by setting the above parameter to a value greater than zero. When enabled, it indicates the number of seconds in which the honesty settings (see below) will be enforced unto clients (players). Honesty settings include controlling forcing of skins, rotating skins, and/or enforcing some basic anti-cheat parameters (see below). (NOTE: some of these settings may conflict with other MoH_AdminMod add-ons, like MAM_Security. You should throughly understand what each mod provides and then choose which features you want to implement.)
<SOAP>
A topic of great controversy, the cheating virus is rampant amongst the MoH:AA community and continuously growing in strength. No one solution will help remedy the tremendous problem faced by server administrators. However many things can be done to prevent non-hardcore cheaters from abusing the many glitches found in the game.
</SOAP>
[code:1]///////////////////////////////////////
// Force Skin Models - controls client's cg_forcemodel
// 0= force off, 1= force on, other= don't enforce
set _ham_forcemodel 1
[/code:1]
Set this to determine how you wish the server to control client's Force Model (cg_forcemodel) setting.
[code:1]///////////////////////////////////////
// Force Skins - controls client's skins
// 0= disable, #= enable (indicates number of _ham_(sh_)skin_# entries to check)
set _ham_skins 1
[/code:1]
You can force the server to provide clients with your own skin selection. The server will force the skins at every _ham_honesty seconds. This setting informs the server that you wish to force skins and the number of _ham_skin_# and, additionally for Spearhead, _ham_sh_skin_# entries to check.
[code:1]///////////////////////////////////////
// Skins control - controls skin order given to clients
// 0= use same order as defined below, 1= randomize skin list
set _ham_random_skins 1
[/code:1]
The server will force skins in the order as they are defined (see below). This option tells the server to randomize the skin list before sending to clients.
[code:1]// Force Skin Switch Interval - how often (in seconds) do we switch skins
// -- Should be in multiples of _ham_honesty
// 0= don't rotate (best used with randomize above), #= enable
set _ham_skin_interval 60
[/code:1]
Skins on the defined list will be rotated at the interval specified by this setting. The forceskin interval is dependent on the honesty interval (_ham_honesty) and will be rounded up in case the latter is larger, e.g. if _ham_honesty is 10 and _ham_skin_interval 25, skin forcing will be enforced at 30 seconds. Set this to zero to disable skin rotating, in this case the server will select a single skin at map start, and force that until the next map.
[code:1]///////////////////////////////////////
// Force Skins - controls client's skins
// 0= disable, other="custom rotation"
// Entry Format (fields):
// dm_playermodel - name of allie skin
// dm_playergermanmodel - name of axis skin
//
// Fields are separated by a colon (:). Entries are separated by a single
// space.
set _ham_skin_1 ""
append _ham_skin_1 "american_ranger:german_wehrmacht_soldier"
append _ham_skin_1 "allied_airborne:german_kradshutzen"
append _ham_skin_1 "allied_manon:german_panzer_grenadier"
append _ham_skin_1 "allied_pilot:german_afrika_private"
set _ham_skin_2 ""
............. lines deleted for brevity .............
[/code:1]
You can control which skins clients use by changing the above settings. You can configure the skin pairs using the _ham_skin_# parameter(s), and use _ham_forceskin_interval to determine how often the server should force new skins. You can determine which skin is currently being used by querying the _ham_dm_playermodel and _ham_dm_playergermanmodel variables from the server's console.
[code:1]// Additional Spearhead-only skins
set _ham_sh_skin_1 ""
append _ham_sh_skin_1 "allied_russian_seaman:german_elite_sentry"
append _ham_sh_skin_1 "allied_russian_corporal:german_kradshutzen"
append _ham_sh_skin_1 "allied_russian_Crazy_Boris:german_scientist"
set _ham_sh_skin_2 ""
............. lines deleted for brevity .............
[/code:1]
On a Spearhead server, the above skins will be used in addition to the ones defined in _ham_skin_# entries.
[code:1]///////////////////////////////////////
// Honesty tidbits
// 0= ignore, other= custom honesty parameters
// NOTE: End all custom honesty lines with a semicolon
set _ham_forcehonesty "setu cheats CHEAT;"
append _ham_forcehonesty "setu r_farplane CHEAT;"
append _ham_forcehonesty "setu r_farplane_nocull CHEAT;"
append _ham_forcehonesty "setu r_farplane_nofog CHEAT;"
append _ham_forcehonesty "setu r_fastsky 0;"
append _ham_forcehonesty "setu r_fullbright 0;" // requires vid_restart
............. lines deleted for brevity .............
[/code:1]
While not 100% foolproof, forcing the above settings on clients will help curtail some basic cheating. You can add more settings, but again you'll be limited to 1024 character in cvars. It is important to note that all commands MUST terminate in semicolon (;). It's a good idea to use setu when settings these values, MoH:AA will display their current value on the client when using dumpuser from the server. NOTE: There's no checking to verify the validity of the commands passed down to clients, so be extremely careful in what you code in the above setting! There are certain settings that cannot be modified if the server is running with cheats disabled (set to zero); for those, the word CHEAT is sent as value. Clients that have hacked their game binaries will show this value when you use dumpuser on them. If cheats is enabled on the server, then set the value to zero. (NOTE: if you are running an external admin tool such as MOHAACI, you MUST disable this setting by setting _ham_forcehonesty to "". Failure to do this will cause undesired results.)
__________________________________________________ __________
Hammer's Goodies Add-on Commands:
The mod provides several MAM add-on commands that admins may find useful (please see the MAM forum for syntax information). Please note that most of these commands requires certain knowledge of MoH:AA scripting.
______________________ ham_mapfix: (can take one of two forms)
1) Spawn a trigger
command "[<statnum> ]ham_mapfix <type> <wait> <action> <x1> <y1> <z1> <x2> <y2> <z2> [<delay>]
or
2) Spawn an object
command "[<statnum> ]ham_mapfix <type> <x> <y> <z> <pitch> <yaw> <roll> <scale> <show?> <damage?> <solid?> <tiki_name>"
This command lets you create a one-time map fix (spawn object or trigger). It takes on the same fields as the _ham_mapfix_# entries above, except the mapname does not need to be provided. This feature can be used to test spawn models or triggers before adding to the actual config file. For example:
- Add a destroyed stuka model @ coords ( -2600 1430 340 ) angle ( 0 90 0 ) in the current map. NOTE: the models/ prefix and .tik suffix are added by the mod.
command "ham_mapfix 1 -2600 1430 340 0 90 0 * 1 0 1 vehicles/stuka_d"
- Add a kill trigger to correct under-map glitch in Destroyed Village
command "ham_mapfix trig_touch 0 die -9999 -2000 -200 9999 9999 -95 0""
______________________ ham_coord:
command "[<statnum> ]ham_coord <player>"
Toggles continuous printing of player's game coordinates on the game screen. Useful to indentify position for spawning objects.
______________________ ham_player:
command "[<statnum> ]ham_player [\q]<action>[ <arg>\q] all|allies|axis|spectator|<playerid>[ <playerid>[ …]]"
Allows for some in-game player control. <playerid> is the player's status number, while <action> can be one of the following: modheight <stand|duck>, hurt <num>, respawn, kill, health[only] <num>, [take]damage, nodamage. For additional information, see the game's g_allclasses.html file.
--[MC] Hammer
__________________________________________________ _________
:evil: :x
The latest version: 2.2 hothothot
Get it here: http://www.filefront.com/?filepath=/mohaacrew/hammer/Hammer_Goodies_2.2.zip
(see README.txt in the ZIP archive for release history)
eggface IMPORTANT: starting with version 2.0, I've integrated this mod with the MoH_AdminMod (MAM) framework. For the mod to work, you must download and install MoH_AdminMod -- see the MAM section at:
http://www.mohadmin.com/nuke/modules.php?name=Forums&file=viewforum&f=16. Make sure that the Goodies' config file (con_Hammers_Goodies.cfg) is started AFTER the one from MoH_AdminMod (MoH_AdminMod.cfg).
Note: As of 0.3 Beta, I've incorporated another file to correct certain maps that do not contain a map script, hence do not execute DMprecache.scr. As more maps are identified, I will be updating this file. Should you come across maps that do not work with my mod, please let me know its name.
Here's a highlight of what it can do:[list]* Play OBJ maps as FFA, TDM or RBM
* Create areas in maps and perform actions when players use or touch them (great for anti-under map, anti-landsharking). Includes fixes to prevent MG "problems" (soft cheats).
* Integrates with MoH_AdminMod
* Guarantees map rotation established in sv_maplist is processed correctly (fixes bug in MoH:AA and Spearhead)
* Dynamically configure bomb settings in OBJ/TOW maps
* Add simple custom messages (periodic)
* Integrate other mods (scalable) [removed: handled by MoH_AdminMod]
* Dynamic custom map rotation with individual pre-sets for each map (works just as "well" as other map rotation mods :rolleyes:, but you don't need to hack individual map scripts)
* Implement custom maps changes, like map fixes from the config file
* Ability to customize round limits in OBJ/RBM/TOW maps (yes, now Omaha can last longer ... eeek)
* Dynamically configure respawning in OBJ/TOW maps
* Force models OFF or ON (on is useful with the feature below)
* Force skins with timed, round-robin rotation of skins
* Customizable honesty settings
* Send custom commands to all clients [removed: handled by MoH_AdminMod]
* Banning (as soon as I figure out how to obtain player's IP from within a mod)[/list:u]Everything but banning is working!!!!
--[MC] Hammer
__________________________________________________ ____________________
My intention from the beginning was to have as many configurable options as possible in an effort to avoid having to hack the actual mod scripts and also be able to make changes on a running server. The resulting config file used by this mod while extensive, does provide for a lot of flexibility. However, it requires some explaining. :rolleyes: Here's a tutorial on how to configure things:
[code:1]//
///////////////////////////////////////////////////////////////////////////////
// Mod Control -- register the mod with MoH_AdminMod
///////////////////////////////////////////////////////////////////////////////
append mam_register_mod "global/Hammer_Goodies.scr"
[/code:1]
The above line MUST be present for this mod to be properly registered with MoH_AdminMod. Do not remove or edit it.
[code:1]set _ham_showmsg 120 // Display Goodies' info: 0=no, > 0 interval
[/code:1]
If you want the mod to operate quietly (stealth mode), disable the above option (set to zero), otherwise players will see an info message every number of seconds interval chosen (min. = 60 secs.)
[code:1]///////////////////////////////////////
// GaSplat requested additions -- 1/9/2003
// Additional messages to display after Goodies' info
// 0= disable, #= number of _ham_xtramsg_# entries to show
set _ham_xtramsgs 0
set _ham_xtramsg_1 ""
set _ham_xtramsg_2 "<< Mohaa Crew Clan Server #1 >>"
set _ham_xtramsg_3 ""
set _ham_xtramsg_4 "<< by [MC] Hammer >>"
set _ham_xtramsg_5 ""
[/code:1]
Use the above to add extras messages to the Goodies' info output.
[code:1]//
///////////////////////////////////////////////////////////////////////////////
// Map Preset settings
///////////////////////////////////////////////////////////////////////////////
// Map Presets control - do we manage map settings?
// 0= disable, 1= enable
set _ham_presets 1
[/code:1]
The above setting determines whether the mod will attempt to manage game parameters automatically based on map names. Parameters for game type, time/frag/round limit, friendly fire, realism (in Spearhead) and respawning (for round-based maps) can be controlled using the following config statements. Map presets are useful when you want to run a mixed-map rotation, i.e. TDM and OBJ. Note that MoH:AA has problems starting round-based maps from a death match one; the mod attempts a crude work around this problem as you will no doubtedly soon discover.
[code:1]///////////////////////////////////////
// For non-OBJ/TOW matches, what is the default game type
// 1= FFA, 2= TDM, 3= RBM, other= use g_gametype
set _ham_gametype "*"
// For OBJ/TOW maps, force game type to one of the following ...
// 1= FFA, 2= TDM, 3= RBM, other= use g_gametype
set _ham_gametype_obj "*"
[/code:1]
By default, g_gametype will be used to determine what match will be run for a map (normal game behavior). Death match maps (those with names prefixed by dm/) can be forced to be of a specific game type by setting this config. For example, if you want to prevent FFA or RBM matches, set this to 2 to force all DM maps as TDM. As of version 2.1, OBJ maps can be forced to play as either FFA, TDM, RBM by setting _ham_gametype_obj accordingly. Most maps will play well, although some have spawn points that can easily lead to spawn killing. Some maps will even enable objectives, although they will not complete a map in a non-objective match. To be most effective, you should start out playing a regular DM map. Please note, as with everything MOHAA, this feature will work most of the times, and sometimes will probably not (there's really no way to test every map out there).
[code:1]///////////////////////////////////////
// For Spearhead, do we force obj/tow maps to their proper type or let
// them use whatever g_gametype is set to?
// 0= use g_gametype, 1= force type
set _ham_sh_force_obj 1
[/code:1]
On Spearhead, OBJ/TOW maps can be played in FFA, TDM or RBM modes depending on the value set for g_gametype. In mixed map rotations, it may be desireable to force said maps to their respective game types, i.e. 4 & 5. The above entry instructs the mod to handle such cases.
[code:1]///////////////////////////////////////
// Match-type defaults ...
// Entry Format (fields):
// timelimit - Overall map duration in seconds (0= infinite)
// fraglimit - Number of kills before map ends (0= no limit)
// roundlimit - Round duration in seconds RBM/OBJ/TOW
// respawn - Force respawn: 0= disable, 1= enable
// g_teamdamage - Friendly Fire: 0= disable, 1= enable
// g_realismmode - Realism: 0= disable, 1= enable (Spearhead)
// ======== ONLY FOR OBJ/TOW types ========
// bomb_defuse_time - Time needed to defuse a bomb (in seconds)
// bomb_set_time - Time needed to set a bomb (in seconds)
// bomb_tick_time - How long before bomb blows (in seconds)
//
// Fields are separated by a colon (:). Entries are separated by a single
// space. A field value of asterisk (*) indicates to use the settings from
// game variables (cvars). Errors will occur is this format is not followed!!
// NOTE: ENTRIES MUST BE LISTED IN GAME-TYPE ORDER (FFA=1, TDM=2, RBM=3,
// OBJ=4, TOW=5) AND THERE MUST BE EXACTLY ONE FOR EACH GAME TYPE.
set _ham_defaults ""
append _ham_defaults "15:0:0:1:*:*" // FFA
append _ham_defaults "25:200:0:1:*:*" // TDM
append _ham_defaults "20:5:*:*:*:*" // RBM
append _ham_defaults "20:5:*:*:*:*:6:5:45" // OBJ
append _ham_defaults "20:5:*:*:*:*:6:5:15" // TOW
[/code:1]
The above lets you configure global defaults for all game types. An asterisk (*) in any of the fields tells the mod to use the normal game settings, e.g. timelimit, otherwise the values will be forced. NOTE: the order of the append statements above must be maintained!
[code:1]///////////////////////////////////////
// Same format as above, this can be used to force an override on any map preset
// Useful when you want to enable/disable certain options, e.g. respawning
// NOTE: this will apply to all maps started after the parameter is set.
set _ham_force_presets "*:*:*:*:*:*:*:*:*"
[/code:1]
If you ever need to force map presets for all maps (ignoring all other map preset settings in this config), use the above option. It uses the same format as the _ham_defaults option above.
[code:1]///////////////////////////////////////
// Map-specific presets ...
// Entry Format (fields):
// g_gametype - Force match type FFA=1, TDM=2, RBM=3, OBJ=4, TOW=5
// timelimit - Overall map duration in seconds (0= infinite)
// fraglimit - Number of kills before map ends (0= no limit)
// roundlimit - Round duration in seconds RBM/OBJ/TOW
// respawn - Allow respawn in OBJ & TOW (see above)
// g_teamdamage - Friendly Fire: 0= off, 1=on
// g_realismmode - Realism Mode: 0= disable, 1=enable
// mapname - Map name, e.g. dm/mohdm1
// ======== ONLY FOR OBJ/TOW types ========
// bomb_defuse_time - Time needed to defuse a bomb (in seconds)
// bomb_set_time - Time needed to set a bomb (in seconds)
// bomb_tick_time - How long before bomb blows (in seconds)
//
// Fields are separated by a colon (:). Entries are separated by a single
// space. A field value of asterisk (*) indicates to use the settings from
// game variables (cvars). Errors will occur is this format is not followed!!
set _ham_maplist ""
append _ham_maplist "*:*:*:*:*:*:*:dm/mohdm1"
append _ham_maplist "*:*:*:*:1:*:*:obj/obj_team2:*:*:*"
append _ham_maplist "*:*:*:8:*:*:*:obj/obj_team3:*:*:*"
[/code:1]
The mod provides the opportunity to configure map-specific presets. Individual map parameters are configured in the section shown above. You also have the option of hard-coding the game-type for a map, should it be required. NOTE: You can add as many entries to _ham_maplist as necessary as long as you don't overrun the MoH:AA cvar limit of 1024 characters. Should it ever become necessary to have such a long map list, please contact me and I'll look into making the needed changes. There's also a limit on the total cvars allowed during server run of 1024.
[code:1]//
///////////////////////////////////////////////////////////////////////////////
// Map fixes
///////////////////////////////////////////////////////////////////////////////
// Map fix control - do we perform map fixes?
// 0= disable, #= enable (indicates number of _ham_mapfix_# entries to check)
set _ham_fixmaps 4
///////////////////////////////////////
// Map fixes/additions ...
// Entry Format (fields) can take one of two different formats:
// -- Spawning in-game objects
// type - Model class type: 1= ScriptModel, 2= ScripSlave, other= regular
// mapname - Map name, e.g. dm/mohdm1, to spawn this object
// x_origin -
// y_origin -
// z_origin -
// p_angle - Pitch angle
// y_angle - Yaw angle
// r_angle - Roll angle
// scale - Scale factor (*= use TIKI default)
// visibility - 0= hide, 1=show (default)
// damage - 0= no (default), 1= yes
// solid - 0= no, 1= yes (default)
// TIKI filename - Model name (leave out models/ and .tik)
//
// -- Spawning special triggers (areas in maps that perform an action when
// players touch or use them)
// type - Trigger types -- can be one of:
// trig_touch : activates when players enter trigger
// trig_use : activates when USE key pressed
// trig_fire : activates when FIRE key pressed
// trig_mg: : special trigger for MGs
// mapname - Map name, e.g. dm/mohdm1, this trigger is for
// wtime - Time to wait before trigger acts (in seconds)
// action - What should happen when the trigger activates.
// Currently can be one of:
// none : no action (can also be *)
// hurt1 : cause 1 health drop
// hurt5 : cause 5 health drop
// hurt10 : cause 10 health drop
// hurt25 : cause 25 health drop
// hurt50 : cause 50 health drop
// die : cause full health drop
// kill : cause suicide
// respawn : cause player to respawn
// <others> : sent directly to client
// switchDelay - Period in which team switch is banned (in seconds)
// x1, y1, z1,
// x2, y2, z2 - The trigger's bounding box coordinates
//
// Fields are separated by a colon (:). Entries (rows) are separated by a
// single space. Errors will occur is this format is not followed!!
set _ham_mapfix_1 ""
append _ham_mapfix_1 "1:dm/mohdm2:-2600:1430:340:0:90:0:*:1:0:1:vehicles/stuka_d"
append _ham_mapfix_1 "1:dm/mohdm4:-1677:615:18:0:262:0:*:1:0:1:vehicles/bmwbike_d"
append _ham_mapfix_1 "1:obj/obj_team4:-1677:615:18:0:262:0:*:1:0:1:vehicles/bmwbike_d"
set _ham_mapfix_2 "1:obj/obj_team3:-1880:-300:200:0:272:0:*:1:0:1:vehicles/panzer_tank_europe"
////////////////////////////////////////////////////////////
set _ham_mapfix_7 "" // Hammer's Stalingrad triggers ///////////////////////
///// Ladder trigger (anti-landsharking/team switch)
append _ham_mapfix_7 "trig_use:dm/mohdm6:0:die:10:390:-10:30:445:30:200"
append _ham_mapfix_7 "trig_mg:dm/mohdm6:0:none:20:270:-260:224:360:-170:300"
[/code:1]
The mod provides a mechanism for spawning objects/models to correct map glitches or otherwise improve gameplay. Fixes from several mods are included in the default config file (Dogmeat, F_K, Druid). More can be added by creating _ham_mapfix_# entries and updating the count in _ham_fixmaps. As of version 2.1, you can also spawn triggerable brushes (objects) that will perform a specific action when a player either touches/enters it or uses the FIRE or USE game buttons. The triggers are useful for creating regions under map glitches (to kill players when they go under maps), adding objectives to maps (requires additional map script coding), anti-landsharking, and more. There's even a special trigger trig_mg that will reduce the chances of players shooting MGs while crouching (forces -attackprimary) and swap teams (will kill them). Several examples are included in the configuration files.
[code:1]//
///////////////////////////////////////////////////////////////////////////////
// Honesty Settings
///////////////////////////////////////////////////////////////////////////////
// Honesty control - do we apply honesty settings?
// 0= disable, #= enable (how often, in seconds, to perform honesty control)
set _ham_honesty 10
[/code:1]
Honesty control is enabled by setting the above parameter to a value greater than zero. When enabled, it indicates the number of seconds in which the honesty settings (see below) will be enforced unto clients (players). Honesty settings include controlling forcing of skins, rotating skins, and/or enforcing some basic anti-cheat parameters (see below). (NOTE: some of these settings may conflict with other MoH_AdminMod add-ons, like MAM_Security. You should throughly understand what each mod provides and then choose which features you want to implement.)
<SOAP>
A topic of great controversy, the cheating virus is rampant amongst the MoH:AA community and continuously growing in strength. No one solution will help remedy the tremendous problem faced by server administrators. However many things can be done to prevent non-hardcore cheaters from abusing the many glitches found in the game.
</SOAP>
[code:1]///////////////////////////////////////
// Force Skin Models - controls client's cg_forcemodel
// 0= force off, 1= force on, other= don't enforce
set _ham_forcemodel 1
[/code:1]
Set this to determine how you wish the server to control client's Force Model (cg_forcemodel) setting.
[code:1]///////////////////////////////////////
// Force Skins - controls client's skins
// 0= disable, #= enable (indicates number of _ham_(sh_)skin_# entries to check)
set _ham_skins 1
[/code:1]
You can force the server to provide clients with your own skin selection. The server will force the skins at every _ham_honesty seconds. This setting informs the server that you wish to force skins and the number of _ham_skin_# and, additionally for Spearhead, _ham_sh_skin_# entries to check.
[code:1]///////////////////////////////////////
// Skins control - controls skin order given to clients
// 0= use same order as defined below, 1= randomize skin list
set _ham_random_skins 1
[/code:1]
The server will force skins in the order as they are defined (see below). This option tells the server to randomize the skin list before sending to clients.
[code:1]// Force Skin Switch Interval - how often (in seconds) do we switch skins
// -- Should be in multiples of _ham_honesty
// 0= don't rotate (best used with randomize above), #= enable
set _ham_skin_interval 60
[/code:1]
Skins on the defined list will be rotated at the interval specified by this setting. The forceskin interval is dependent on the honesty interval (_ham_honesty) and will be rounded up in case the latter is larger, e.g. if _ham_honesty is 10 and _ham_skin_interval 25, skin forcing will be enforced at 30 seconds. Set this to zero to disable skin rotating, in this case the server will select a single skin at map start, and force that until the next map.
[code:1]///////////////////////////////////////
// Force Skins - controls client's skins
// 0= disable, other="custom rotation"
// Entry Format (fields):
// dm_playermodel - name of allie skin
// dm_playergermanmodel - name of axis skin
//
// Fields are separated by a colon (:). Entries are separated by a single
// space.
set _ham_skin_1 ""
append _ham_skin_1 "american_ranger:german_wehrmacht_soldier"
append _ham_skin_1 "allied_airborne:german_kradshutzen"
append _ham_skin_1 "allied_manon:german_panzer_grenadier"
append _ham_skin_1 "allied_pilot:german_afrika_private"
set _ham_skin_2 ""
............. lines deleted for brevity .............
[/code:1]
You can control which skins clients use by changing the above settings. You can configure the skin pairs using the _ham_skin_# parameter(s), and use _ham_forceskin_interval to determine how often the server should force new skins. You can determine which skin is currently being used by querying the _ham_dm_playermodel and _ham_dm_playergermanmodel variables from the server's console.
[code:1]// Additional Spearhead-only skins
set _ham_sh_skin_1 ""
append _ham_sh_skin_1 "allied_russian_seaman:german_elite_sentry"
append _ham_sh_skin_1 "allied_russian_corporal:german_kradshutzen"
append _ham_sh_skin_1 "allied_russian_Crazy_Boris:german_scientist"
set _ham_sh_skin_2 ""
............. lines deleted for brevity .............
[/code:1]
On a Spearhead server, the above skins will be used in addition to the ones defined in _ham_skin_# entries.
[code:1]///////////////////////////////////////
// Honesty tidbits
// 0= ignore, other= custom honesty parameters
// NOTE: End all custom honesty lines with a semicolon
set _ham_forcehonesty "setu cheats CHEAT;"
append _ham_forcehonesty "setu r_farplane CHEAT;"
append _ham_forcehonesty "setu r_farplane_nocull CHEAT;"
append _ham_forcehonesty "setu r_farplane_nofog CHEAT;"
append _ham_forcehonesty "setu r_fastsky 0;"
append _ham_forcehonesty "setu r_fullbright 0;" // requires vid_restart
............. lines deleted for brevity .............
[/code:1]
While not 100% foolproof, forcing the above settings on clients will help curtail some basic cheating. You can add more settings, but again you'll be limited to 1024 character in cvars. It is important to note that all commands MUST terminate in semicolon (;). It's a good idea to use setu when settings these values, MoH:AA will display their current value on the client when using dumpuser from the server. NOTE: There's no checking to verify the validity of the commands passed down to clients, so be extremely careful in what you code in the above setting! There are certain settings that cannot be modified if the server is running with cheats disabled (set to zero); for those, the word CHEAT is sent as value. Clients that have hacked their game binaries will show this value when you use dumpuser on them. If cheats is enabled on the server, then set the value to zero. (NOTE: if you are running an external admin tool such as MOHAACI, you MUST disable this setting by setting _ham_forcehonesty to "". Failure to do this will cause undesired results.)
__________________________________________________ __________
Hammer's Goodies Add-on Commands:
The mod provides several MAM add-on commands that admins may find useful (please see the MAM forum for syntax information). Please note that most of these commands requires certain knowledge of MoH:AA scripting.
______________________ ham_mapfix: (can take one of two forms)
1) Spawn a trigger
command "[<statnum> ]ham_mapfix <type> <wait> <action> <x1> <y1> <z1> <x2> <y2> <z2> [<delay>]
or
2) Spawn an object
command "[<statnum> ]ham_mapfix <type> <x> <y> <z> <pitch> <yaw> <roll> <scale> <show?> <damage?> <solid?> <tiki_name>"
This command lets you create a one-time map fix (spawn object or trigger). It takes on the same fields as the _ham_mapfix_# entries above, except the mapname does not need to be provided. This feature can be used to test spawn models or triggers before adding to the actual config file. For example:
- Add a destroyed stuka model @ coords ( -2600 1430 340 ) angle ( 0 90 0 ) in the current map. NOTE: the models/ prefix and .tik suffix are added by the mod.
command "ham_mapfix 1 -2600 1430 340 0 90 0 * 1 0 1 vehicles/stuka_d"
- Add a kill trigger to correct under-map glitch in Destroyed Village
command "ham_mapfix trig_touch 0 die -9999 -2000 -200 9999 9999 -95 0""
______________________ ham_coord:
command "[<statnum> ]ham_coord <player>"
Toggles continuous printing of player's game coordinates on the game screen. Useful to indentify position for spawning objects.
______________________ ham_player:
command "[<statnum> ]ham_player [\q]<action>[ <arg>\q] all|allies|axis|spectator|<playerid>[ <playerid>[ …]]"
Allows for some in-game player control. <playerid> is the player's status number, while <action> can be one of the following: modheight <stand|duck>, hurt <num>, respawn, kill, health[only] <num>, [take]damage, nodamage. For additional information, see the game's g_allclasses.html file.
--[MC] Hammer
__________________________________________________ _________
:evil: :x