Vulcanus Admin Mod


Version2.1
AuthorMarcel 'MarS' Strik
Emailmars@vulcanus.its.tudelft.nl
TypeJedi Knight II Server modification
Download it


Index

Overview
Changelog version 2.0 to 2.1
Instalation
Modifications
Amdin commands
Client commands
Message CVars
Other CVars
Known Bugs
Disclaimer




Overview

This mod is a server only modification designed to aid in the job of controlling a server. To this end it has a number of commands to enforce the server rules. In my experience just kicking or even banning players who don't behave does not have such a good effect. Especially in JKII since there is no unique player id banning is not that effective. With this mod you have a better chance of stopping abusive players.

Besides that the mod also has some party features, one of these for example is the ability to turn double bladed sabers on for everyone. And there is also the choise to let the player choose if he wants double or single bladed sabers.



Changelog version 2.0 to 2.1

  • Client IP logging on client connect.
  • Logging of Admin commands.
  • Sub admin login is now persistent (no need to log in every level).
  • am-Commands now get executed on own player if no argument for them is given (not all of them though).
  • Added (a)mkickban command.
  • Added amstatus command (Although it was listed in the previous version, it couldn't actually be used).




  • Installation

    Linux:
    Create a directory like this:
    /home/.../jk2/adminmod
    where '/home/.../jk2/' is the path where you installed Jedi Knight II. Then copy the adminmod.pk3 to the adminmod dir. Now you can start the server with the '+set fs_game adminmod' argument.

    Example:
    ./jk2ded +set fs_game adminmod +exec server.cfg

    Windows:
    Create a directory like this:
    X:\...\Star Wars JK II Jedi Outcast\GameData\adminmod
    where 'X:\...\Star Wars JK II Jedi Outcast\' is the path where you installed Jedi Knight II. Then copy the adminmod.pk3 to the adminmod dir. Now you can start the server with the '+set fs_game adminmod' argument.

    Example:
    jk2mp.exe +set fs_game adminmod +exec server.cfg



    Modifications

  • Logging of player IP when player connects to the server. Logging happens in the following format:
    mlog_ClientConnect: <player client id> '<player name>' -> '<player ip>'
  • Logging of admin commands. Every command will be logged in the following format:
    mlog_command <playername>
  • Removed the 2 player at a time duel limit.
  • Sabers don't automatically ignite at the start of a duel.
  • When player wins a duel he now gets up to 25 shield points as well as the full 100% health.
  • Typing motd or rules when saying something shows the motd to the player who said it.




  • Admin commands

    NOTE: [..] are optional

    <..> are required

    playerid => Can be a client id, full player name or partial player name. For example if there's a player named 'Padawan' and you want to kick him you can use this: mkick pad; mkick pada; mkick wan; etc. (Just watch out if there are more players with the same sequence in their name. At this point only the first encountered player is taken for the command. Also note that the keyword 'all' has special meaning. Most commands take the 'all' keyword to execute the command on all players on the server.
    Rcon command Subadmin command Description
    minfo aminfo Show all the availble commands. The aminfo version also works for normal clients, but only admins get to see the admin info.
      amlogin <password> Subadmins use this to login.
    mstatus [playerid] amstatus [playerid] Altered version of status. This version sends less info to get passed the bug in the regular status where not all lines are send to the console. If a playerid is given the selected player will get a fullscreen display of the status. This is primarily for binding admin commands:
    bind m rcon mstatus <Your player name here>
    mkick <playerid> amkick <playerid> Same as kick but enhanced to also take a clientid or a partial player name.
    mslap <playerid> amslap <playerid> Slaps the selected player. Knocks player in a random direction and knocks him down for several seconds.
    mempower <playerid> amempower <playerid> Empowers the selected player. The selected player gets duel saber, force grip and force lightning. The player also enters 'Jedi Master Mode' which allows him to do double damage. Empowered players also can't be pushed/pulled. This mode is primarily for admins having to deal with misbehaving
    munempower <playerid> amunempower <playerid> Undo the effects of mempower.
    msilence <playerid> amsilence <playerid> Silence players so they can't talk.
    munsilence <playerid> amunsilence <playerid> Use on a silenced player to let him talk again.
    msleep <playerid> amsleep <playerid> If there's someone on the server behaving badly this can be used to put them 'to sleep'. When asleep the player lies on the ground and can't move, jump, attack, etc. Player can still talk however. This can work wonders on those players that keep coming back after you keep kicking them.
    mwake <playerid> amwake <playerid> Wake the player if he's asleep (undo the effects of msleep).
    mrename <playerid> <new name> amrename <playerid> <new name> Renames a player. If a player comes into the server with an offensive name this can be used to rename the player to something more appropriate. Note that at this time the player can still rename himself after this command.
    mshowmotd <playerid> amshowmotd <playerid> By default the motd is shown whenever a player enters the game. This can be used to remind someone of the motd/rules by showing it to them again.
    mbunny <playerid> ambunny <playerid> Turns player into a 'bunny'. In this mode the players saber is removed and replaced by something less deadly, the forcepowers are also removed. The player also starts jumping around randomly.
    munbunny <playerid> amunbunny <playerid> Undo the effects of mbunny.
    mexplode <playerid> amexplode <playerid> Blows of someones head.
    mpsay <playerid> ampsay <playerid> Send a message to a specific player.
    mtimescale <timescale> amtimescale <timescale> Sets the timescale for the whole server. 1.0 is normal speed 2.0 is twice as fast. 0.5 is half speed (This might cause some lag on slow connections).
    mkickban <playerid> amkickban <playerid> Ban and kick the player at the same time. No need to enter an ip.
    [NOTE1: this command doesn't ban ranges so if the player who gets banned has a dynamic ip he can probably get back by reconnecting to his ISP. However with this you can ban them faster then they can connect >:) ]
    [NOTE2: Be carefull with the keyword 'all' since typing 'kickban all' will also work and everyone connected will get banned!]
    [NOTE3: This function isn't 100% tested because I have limited testing abilities here for testing stuff like this.]




    Client commands

    Commands that can be used by all clients.
    Rcon command Description
    amkiss Kisses another player if you are close enough. This only works if this option has been enabled on the server.
    amsay <message> Sends a message to all logged in admins.




    Message CVars

    These CVars are custom messages that can be set for certain commands. This is what players see when a command is executed. Note that some commands allow the use of %s to be replaced with the affected player's name. Also note that in most CVars a \n can be used to insert an enter.
    Everyone
    [Get's shown when using a command with the all keyword]
    Broadcast
    [Get's broadcast to everyone but the target of a command]
    Target
    [Get's broadcast to the target of a command]
    g_mMessageUnEmpowerEveryone g_mMessageUnEmpowerBroadcast g_mMessageUnEmpowerTarget
    g_mMessageEmpowerEveryone g_mMessageEmpowerBroadcast g_mMessageEmpowerTarget
    g_mMessageUnSilenceEveryone g_mMessageUnSilenceBroadcast g_mMessageUnSilenceTarget
    g_mMessageSilenceEveryone g_mMessageSilenceBroadcast g_mMessageSilenceTarget
    g_mMessageWakeEveryone g_mMessageWakeBroadcast g_mMessageWakeTarget
    g_mMessageSleepEveryone g_mMessageSleepBroadcast g_mMessageSleepTarget
    g_mMessageSlapEveryone g_mMessageSlapBroadcast g_mMessageSlapTarget
    g_mMessageUnBunnyEveryone g_mMessageUnBunnyBroadcast g_mMessageUnBunnyTarget
    g_mMessageBunnyEveryone g_mMessageBunnyBroadcast g_mMessageBunnyTarget
    g_mMessageExplodeTarget g_mMessageExplodeBroadcast g_mMessageExplodeEveryone




    Other CVars

    CVar Description
    g_mAdminPassword The password for the subadmins.
    g_mMOTDContents The contents of the message of the day.
    g_mMOTDShowTime The time to show the message of the day in miliseconds. So if you set this to 5000 the motd will get shown for 5 seconds (plus about 3 seconds of fading time).
    g_mBunnyJumpPowerXY Sidewards power of bunny jump.
    g_mBunnyJumpPowerZ Upwards power of bunny jump.
    g_mBunnyJumpChance Chance that someone who is a bunny will jump.
    g_mSlapKnockDownTime Time someone who is slapped will lay on the ground.
    g_mSlapPowerXY Sidewards power of slap.
    g_mSlapPowerZ Upwards power of slap.
    g_mEmpowerShake If this is set to 1 then there will be an 'earthquake' whenever someone uses the mempower command.
    g_mDoubleSabersForAll values
    0: No double sabers except for empowered users.
    1: Double sabers for all users.
    2: Switch to single saber from off. Switch to double saber from single saber. Switch to off from double saber.
    g_mAllowKiss If set to one players are allowd to kiss eachoter with the amkiss command.

    Please see the enclosed adminmod.cfg file for an example.



    Known bugs

  • During Duel games the MOTD gets shown every time a duel starts.
  • When changing some message CVars you can use '%s' to add the player name to the message. When changing the message in the console however, the '%' becomes a '.' so the name won't be displayed. A workaround for this is to only change the values in the config and rerun it.
  • The am... commands need a '/' or '\' (without quotes) in front of them when executing. Else the command will be shown as a talk command to all players. This is because the code for checking commands is client side and adding support for this would force the client to download about 1 MB of data.


  • Please report any bugs you find to me on the email listed above.



    Disclaimer

    Use this mod on your own risc. I take no responsibility what so ever for anything that might happen when using it. The mod has been primaryilly tested with some forces disabled and sabers only, in both Duel mode and FFA mode. It hasn't been tested on any other mode but it will probably run in any other mode without much problems. The mod has been tested on both Linux and Windows servers. This mod may not be distributed without including an unaltered copy of this readme.