# Macro Scanning Starting in Duelers 1.3 the server can be configured to direct each client connecting to scan the client key bindings for macros that are used to emulate key combinations for special moves. By default, this capability is enabled. However, there is much controversy over whether or not binding keys to special move is "bad" or "good". As a server administrator you will have to be the judge. Many users have macros to change skins or hilts or rotate through taunts or select admin commands. These macros are not targeted. However, there are other macros that use movement and attack commands in special sequences to perform difficult manoeuvres flawlessly and effortlessly. Two examples that are very common are: Kick Macro: bind key "+moveup; wait 3;-moveup;wait 3;+moveup; wait 3; -moveup" this turns 'key' into a single click kicker! (not much use in duelers if m_skK is 1) Blue Stance Lunge Macro: bind key "-forward;wait 2;+forward;wait 2;+movedown;+attack;wait 2;-attack;-movedown;-forward" this turns 'key' into a single click lunger (assuming you are in blue stance). These macros are targeted and disabled. Here is a description of how the scanning behaves to help you make your decision:
| a regular scan of all key bindings is made by the client.
| If during the scan a key is found that is bound to a series of commands then the series of commands is investigated. Most game bindings are from a key to a single command. The presence of the ';' character in a bind, tells the client that there is a sequence of commands.
| The command sequence is scanned for the presence of any movement or attack commands. Specifically: +moveup, +attack, +forward, +back, and +movedown are illegal commands in the sequence
| If these commands are found, the key binding is disabled
| If during the scan a key is found that is bound to a string that uses exec to read commands from a file, that file is inspected. If the file contains illegal commands (as above), the bind is disabled.
| If during the scan a key is found that is bound to a string that uses vstr to evaluate the contents of a cvariable, the cvariable is inspected. If the cvariable contains illegal command (as above), the bind is disabled.
| If the key binding is disabled the bind is rewritten in a way so that the bind sends a message to the client console but also in a way that the new bind string may be easily easily restored when the client wishes to play on a server that allows such binds. Specifically the bind is re-written to: echo illegal macro: the_original_bind_with_;_replaced_with_:
| If the client connects to a server which allows macros or if the server changes the value of m_ms to 0, then the old macros will be restored. This does, however, rely on the client not having edited the bind as re-written by the server.
| the scanning of all keys happens approximately every second, so re-binding a disabled key will not be an effective way to continue to use macros that are illegal.
| Scans are very quick and efficient and should not impact the client performance. A very convoluted attempt to hide macros behind multiple recursions of exec and vstr commands will only result in deeper scans which might eventually impact the performance of the client (and yet will ultimately succeed in disabling the macro).
| Note that the macro scanner is not a full command parser. It makes some quick guesses to see if your binds are OK. If it gets confused because you have a very complicated set up, it will assume the worst and disable the bind. If this happens to you, please send me a note describing the problem and I can try to improve the scanner.
# Enhanced Voting One of the problems with a mod like duelers that provides so many options is that the folks currently playing on a server may have a different set of likes and dislikes from the administrator of the server. Or as often can be the case the folks playing in the afternoon want a different game from the folks who play in the evening. Generally speaking unless someone on the server has rcon access there is very little you can do about it! Until now that is. Starting in duelers 1.3 an enhanced vote system for controlling the behaviour of the mod (or the base game) is available. By default the new votes are:
| Enable All Stances. This vote will allow all stances to be used by all players regardless of their current saber configuration (single, dual, double).
| Restrict Stances. This vote will constrain users of single blades to the original three stances and users of dual or double blades to the new orange and purples stances.
| Allow All Sabers. This vote will allow all clients to have whatever saber configuration they wish (single, two singles, one double, two doubles).
| Restrict Sabers. This vote will constrain users to a single blade, two single blades, or one double blade.
| Single Saber Only. This vote constrains everyone to use a single, single blade saber (like the base JK game).
| Disable use of Macros. This vote will disable any illegal macros that players currently are using.
| Enable use of Macros. This will allow any macros to be used.
| Full Weapons Play (Restart Map). This vote will enable full weapons play to commence on a map. It does, however, require a map restart.
| Saber Only Play (Restart Map). This will restrict the game to saber only. It also requires a map restart.
These defaults are just examples. This voting system is completely configurable by the admin of the server. The votes are created by setting up any number of sixteen cvars on the server (m_v1, ... , m_v16). The format of the cvars is: set m_v1 "Enable All Stances:m_es 1;m_as1" or more generally, set m_v1 "Descriptive_Vote_String:command1; ... ; commandN" Here is how it works: The client user interface has been extended so that the "Call Vote" menu now includes a section called "Mod". When this section is selected, a Mod Control panel is shown which will contain all of the administratively configured votes. Only the descriptive strings show, so they should be, well, descriptive! When a vote is called, the descriptive string is shown to other players and they can elect to vote for or against the called vote. Just like normal! If the vote is passed, the string of commands in the second half of the vote cvar is executed on the server. These commands should "implement" the change described! For the default votes that come with duelers 1.3 the commands are all just setting cvars. I expect most votes will be this simple. For reference and example, here are the default cvar settings: set m_v1 "Enable All Stances:m_es 1;m_as 1" set m_v2 "Restrict Stances:m_es 0;m_as 0" set m_v3 "Allow All Sabers:m_db 2;m_ds 1" set m_v4 "Restrict Sabers:m_db 1;m_ds 1" set m_v5 "Single Sabers Only:m_db 0;m_ds 0" set m_v6 "Disable use of Macros:m_ms 1" set m_v7 "Enable use of Macros:m_ms 0" set m_v8 "Full Weapons Play (Restart Map):g_weaponDisable 0;map_restart" set m_v9 "Saber Only Play (Restart Map):g_weaponDisable 65531;map_restart" # Message of the Day You can set a 16 line MOTD, one line per cvar m_mdX (X=1,...16). This message will be sent to players when they first join battle or when a new map starts. This MOTD will not be displayed until they actually join battle so you don't have to worry about the time they might spend fiddling with their setup. The message disappears after a short time. # Banning Players Duelers has new ban code to support banning players from your server. This code has none of the limitations of the basejk code and relies on a file to record the banned IP addresses rather than a cvar. This means you can have up to 1024 IP address filters! The file only gets read when the game starts written when a new player is banned so there are no "file" hits on the server as a result of this change. The ban code works pretty much the same as before, but this is not well documented so I will describe it here. When you want to ban a player, type the following on the game console: ban player_name (or client_number) The code will do some processing to help find the right playername (so you dont have to worry about colours, etc). None the less, it is probably better to find the client number (from the "status" command) because a player that is going to be annoying is probably going to choose a problematic name too! The game code will automatically read the player's IP address, add it to the banned IP address list, and then kick the player from the server. That is all you have to do! Unless they change their IP address they will not be able to return to the server. For some administrative support the following commands are also available: listip -- will list the current set of IP addresses being banned addip n.n.n.n -- will add the IP address given as an argument to the banned IP list removeip n.n.n.n -- will remove the IP address give as an argument from the banned IP list. # Duelers Recommended Settings The mod is compiled to run the recommended settings as the default. You don’t have to set any mod cvars (except perhaps the MOTD cvars) if you want the recommended settings. I strongly recommend sticking with the default settings. I have played JK2, Jedimod, and Jediplus a lot and spent a lot of that time working with other players to determine the most balanced settings for saber play. Note, I did not say the most fun settings, but the most balanced. That is, these settings provide for a number of different gameplay styles, each requiring skill, but none having a significant advantage over the other. If you use the defaults, you should not have to insist on battling players with exactly the same saber configuration that you want to use in order to have a fair fight. I wont give a detailed, blow-by-blow analysis of each of the settings, but let me illustrate with a few cases. ## Multiple Saber Blades. It is very much fun to play with dual sabers or dual bladed sabers. However, each saber blade does damage. A player with two double bladed sabers has a heck of an advantage over a player with a single blade. The default settings for Duelers mod provide a balance for this situation in the following way:
| With only a single blade you have access to the blue, yellow and red stances. These stances have the most powerful attacks.
| With multiple blades you can have a single dual bladed saber or two single bladed sabers. Your blade advantage is thus limited to two-to-one rather than a possible four-to-one advantage!
| With multiple blades you can only use the orange and purple styles. These are styles have weaker attacks.
As a result of these restrictions, the most effective single blade saber style and the most effective multi-blade styles neatly divide into what I can the Obi-Wan style (traditional jedi) and the Darth Maul style (spinning, leaping attacks). Single bladed players using the Obi-Wan style and multi-bladed players using the Darth Maul style are quite well balanced and you can have a very interesting match testing the two styles against each other. On the other hand, if you allow all blade combinations to use all saber styles (and you can do this if you want with Duelers mod), then everyone will play with dual dual-bladed sabers (or be dead quickly) and madly cycle through all five styles. ## Saber Blocking Saber blocking occurs when you throw your saber at a player who's saber is defending (i.e. they are not attacking). When this happens, your saber will be blocked and knocked to the ground. The saber will remain on the ground for a random amount of time and then return to you. During the time the saber is knocked down: the saber remains off, you cannot use force, and you are defenceless save to run lick heck to avoid attack. Saber blocking is a counter to players who do nothing but stand away and throw their saber. With saber blocking, saber throwing should only be done when you know that your opponent is exposed to an attack. This makes saber throwing more balanced with other types of saber attack. ## Jetpack The jetpack is normally configured to consume 5 units of fuel for every second that it is thrusting and 2 units of fuel for every second that it is on but idle. This added "realism" is intended to limit the abuse of the jetpack. While the jetpack is on, you cannot ignite your saber nor use force powers (by default).