Jedi Academy Empire
Version | 1.0
Author | Michael 'cHoSeN oNe' Nohai
Email | chosenone@thejediacademy.net
Type | Jedi Knight: Jedi Academy Server Extension
Index Overview 1.0 Installation Modifications Rcon, Admin, and Knight Commands Client Commands Emote Commands Saber Damage CVars Message CVars Other CVars Known Issues Acknowledgments Disclaimer Overview This mod was created initially for the Jedi Academy. (http://www.thejediacademy.net) The JAE Mod is a server-side only modification designed administrate a server with ease. It is loaded with Admin Commands, Client Commands, Server Options and cVars; Extremely modified to meet any clans and admins expectations. This is truly the only mod you will ever need to get that doesn't alter the normal game play of Jedi Knight: Jedi Academy®. Please visit us at http://jamod.jk3files.com, or on IRC at #jae @ irc.quakenet.org. 1.0 ---Features--- Source Code available via Subversion Built off of the Jedi Academy Mod for Jedi Knight: Jedi Outcast. New documentation rewritten and verified in XHTML 1.0 Rank name automatically appended to names for chatting. Admin levels use shared command names. All new emotes Custom chat colors Fixed buffer overflow in amsay. Completely refactored code base to increase speed and overall optimizations. New commands !about, !license to view the terms of the software. Fixed security issue with viewing the rconPassword using the mvstr command. Windows binaries and Linux shared objects are packaged together. Installation Windows: Create a directory like this: X:\...\Star Wars Jedi Knight Jedi Academy\GameData\jae where 'X:\...\Star Wars Jedi Knight Jedi Academy\' is the path where you installed Jedi Academy. Now you can start the server with the '+set fs_game jae' argument followed by your server scripts. Example: jampDed.exe +set dedicated 2 +set fs_game jae +set net_port 29071 +exec jae_server.cfg Important: For the Banning system, you will need to have Administrator privileges for the operating system to the jae folder. Linux/Unix: Create a directory like this: /usr/local/games/ja/jae where '/usr/local/games/ja/' is the path where you installed Jedi Knight: Jedi Academy. Place the jampgamei386.so into the jae folder and grant full admin rights to the jae folder. Now you can start the server with the '+set fs_game jae' argument followed by your server scripts. Example: ./linuxjampded +set dedicated 2 +set fs_game jae +set net_port 29071 +exec jae_server.cfg Perl Server Log Backup Script: Place the script in location of your server's jka root directory. View the cron script by using the crontab -1 command to see the script. Next edit the script using the crontab -e command and map the path to the perl script. If you wish to Back-up at 5 am every week, every month, type the following. 0 5 * * 0 /path/jkaroot/jkalogbackup.pl If you wish to have an email sent to you in case the script fails, type MAILTO="youremail@somewhere.com" Modifications Various Admin and Knight commands 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 and Knight 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, they receive their pre-duel health and shields back. Typing !motd or !rules when saying something shows the motd to the player who said it. Typing !version or !author when saying something shows the version number and author. Typing !home or !web when saying something shows the JA home page link. Rcon command "cvar_restart" now resets all JAE mod cvars back to the defaults, except admin passwords. Clients can now automatically log into the server with admin access if admin password is supplied instead of the server password. Clients can have Admin Only servers if g_password matches any of the passwords defined for g_mAdminPassword or g_mKnightPassword. Applied MAX_VEHICLES fix to be 64 instead of 16. Unable to lame bots in a private duel when bot_honorableduelacceptance is enabled. RCon, Admin, and Knight commands 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 | Admin Command | Admin Gun Command | CVar Bitwise Value | Description
--- | --- | --- | --- | ---
madminaccess <playerid> <level> |  |  |  | Gives the client admin access level Type the value for g_mRankName or "admin" for level 1; Type the value of g_mRankName2 or "knight" for level 2.
mdenyadminaccess <playerid> <level> |  |  |  | Denies the client admin access Type the value for g_mRankName or "admin" for level 1; Type the value of g_mRankName2 or "knight" for level 2.
minfo | aminfo |  |  | Show all the available commands you have access to as well as the version of the binary.
mhelp | amhelp |  |  | Quick Help for commands available in mod.
msleep <playerid> | amsleep <playerid> | sleepgun | 1 | Places client in a sleeping position.
mwake <playerid> | amwake <playerid> | wakegun |  | Wake the player if he's asleep (undo the effects of msleep)
msilence <playerid> <mode> | amsilence <playerid> <mode> |  | 2 | Silence players so they can't talk. Mode passed could be 'global' for all chat disabled and 'private' for just public chat disabled.
munsilence <playerid> <mode> | amunsilence <playerid> <mode> |  |  | Unsilence players so they can talk again. Mode passed could be 'global' or 'gm' for all chat enabled and 'private' or 'pm' for just public chat enabled.
mlockteam <team> | amlockteam <team> |  | 4 | Locks a specific team in CTF mode so no one can join. (Red, Blue, Spectator)
munlockteam <team> | amunlockteam <team> |  |  | Unlocks a specific team in CTF mode so people are allowed to join. (Red, Blue, Spectator)
mrandteams | amrandteams |  | 8 | Randomizes Teams in CTF Gameplay.
mallowvote <playerid> | amallowvote <playerid> | allowvotegun | 16 | Allows client to use the voting feature again.
mdenyvote <playerid> | amdenyvote <playerid> | denyvotegun |  | Disables use of voting to a specific client.
mshowmotd <playerid> | amshowmotd <playerid> | showmotdgun | 32 | 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.
mrename <playerid> <new name> | amrename <playerid> <new name> |  | 64 | Remotely renames a player.
mpsay <playerid> | ampsay <playerid> |  | 128 | Send a message to a specific player. 'All' parameter send the message to everyone.
mtele <playerid> <x> <y> <z> <yaw> | amtele <playerid> <x> <y> <z> <yaw> |  | 256 | This can teleport any client to any desired location on a map.
mnotarget <playerid> | amnotarget <playerid> | notargetgun | 512 | Toggles client to be a target for NPC's.
morigin <playerid> | amorigin <playerid> | origingun | 1024 | This gets client's X, Y, and Z coordinates on the map and prints them to the console.
mkick <playerid> <reason> | amkick <playerid> <reason> | kickgun | 2048 | Same as kick but enhanced to also take a clientid or a partial player name, and a reason from the admin for being kicked.
mkickban <playerid> <reason> | amkickban <playerid> <reason> | kickbangun | 4096 | Bans and kicks the player at the same time with a reason why they were kicked. No need to enter an ip.
mbanrange <playerid> <security> <reason> | ambanrange <playerid> <security> <reason> |  | 8192 | Kicks and Bans client's ip range. The security levels can be l, m, or h. (light, medium, heavy) Warning: Banning IP ranges can cause unfortunate events in masking out an entire ISP. Only use as a last resort.
mvstr <vstr/name> | amvstr <vstr/name> |  | 16384 | Executes and selects the map desired available in the rotation.
mnextmap | amnextmap |  | 32768 | Executes and selects the next map available in the rotation.
mforceteam <playerid> <team> | amforceteam <playerid> <team> |  | 65536 | Transfers a client to a specified team in CTF gameplay. (Red, Blue, Spectator)
status | amstatus <playerid> | statusgun | 131072 | Altered version of status. This displays the clietid, ip address, and name.
mgametype <gametype> <map> | amgametype <gametype> <map> |  | 262144 | Allows the admin to change Map and Gameplay.
mnpcaccess <playerid> | amnpcaccess <playerid> | npcgun | 524288 | Grants / Denies the client ability to spawn NPC's.
mslap <playerid> | amslap <playerid> | slapgun | 1048576 | Slaps some sense into the client.
mempower <playerid> | amempower <playerid> | empowergun | 2097152 | Empowers a client with all Force powers and stronger skills.
munempower <playerid> | amunempower <playerid> | unempowergun |  | The client returns to normal player abilities.
mterminator <playerid> | amterminator <playerid> | terminatorgun | 4194304 | Enables the client to have all weapons and full power. A lethal weapon.
munterminator <playerid> | amunterminator <playerid> | unterminatorgun |  | The client returns to normal player abilities.
mprotect <playerid> | amprotect <playerid> | protectgun | 8388608 | Protects a client from attacks.
munprotect <playerid> | amunprotect <playerid> | unprotectgun |  | The client is no longer protected.
mtimescale <scale> | amtimescale <scale> |  | 16777216 | Alters the speed of the game.
Included is a jae_admin.cfg script which allows the admin user to access the admin gun commands with ease. Place this file in your base folder and type \exec jae_admin.cfg in game console when in game. Client Commands --Client Commands can be used by all clients. Admin Commands only for logged in admins and knights and are controlled via g_mAdminCommands and g_mKnightCommands cVars.
Client command | Cvar | Description
--- | --- | ---
amlogin <password> | g_mAllowAdminLogin | Allows Secondary Admins to use the Admin Commands
amlogout | g_mAllowAdminLogin g_mAllowKnightLogin | Allows Admins and Knights to Logout.
amwhois | g_mWhois | Allows user to see who is logged in as an admin.
amsay <message> |  | Sends a message to all logged in Admins and Knights.
ignore <playerid> |  | Ignores chat from a certain player. (repeat to disable)
Emote Commands --Emote Commands can be used by all clients. These commands allow the user to execute certain animations in game which is ideal for roleplay type servers.
Emote command | CVar Bitwise Value | Description
--- | --- | ---
emsit | 1 | Performs a sitting animation.
emsit2 | 2 | Performs a laidback sitting animation.
emsit3 | 4 | Performs yet another sitting animation.
emwait | 8 | Clamps your hands behind your back. Player is able to move.
emsurrender | 16 | Puts your hands up in the air. Player is able to move.
emsorrow | 32 | Places the character at a sorrowful animation, kneeling on the ground.
emhonor | 64 | Places the character at a honorable animation, kneeling before their master.
emnod | 128 | The client nods their head.
emshake | 256 | The client shakes their head.
empraise | 512 | The client raises the roof.
emattenhut | 1024 | The client stands at attention.
emcrossarms | 2048 | The client leans against an entity with their arms crossed.
emalora | 4096 | The client executes the Alora taunt from SP mode.
emthrow | 8192 | The client randomly throws the saber in two different directions.
emtavion | 16384 | The client executes the Tavion taunt from SP mode.
empoint | 32768 | The client points in a general direction.
emcomeon | 65536 | The client motions the other client to come here.
Saber Damage CVars --Commands that can be used to control the damage certain moves do. Note that certain moves have a min and a max damage. The min damage is in the beginning and ending of the move the max damage is usually the middle of the move. The values are interpolated over the whole range of the move. As a rule of thumb the number of HP that will go off is about equal to half of the damage. Increase the values for higher damage and decrease the values for lower damage. Default values are the normal Jedi Academy values.
CVar | Description
--- | ---
g_mSaberDMGTwirl | Damage for dual/staff saber twirl. (Default is 10)
g_mSaberDMGDualKata | Damage for Dual Saber Kata. (Default is 90)
g_mSaberDMGStaffKataMin | Min Damage for Staff Saber Kata. (Default is 60)
g_mSaberDMGStaffKataMax | Max Damage for Staff Saber Kata. (Default is 70)
g_mSaberDMGSpecialMin | Min Damage for Dual/Staff Saber Specials. (Default is 2)
g_mSaberDMGSpecialMax | Max Damage for Dual/Staff Saber Specials. (Default is 90)
g_mSaberDMGMultiMin | Min Damage for Dual/Staff Saber Normal Attacks. (Default is 2)
g_mSaberDMGMultiMax | Max Damage for Dual/Staff Saber Normal Attacks. (Default is 70)
g_mSaberDMGRedNormal | Normal damage for normal red slashes. (Default is 100)
g_mSaberDMGRedNormalMin | Min damage for normal red slashes. (Default is 2)
g_mSaberDMGRedNormalMax | Max damage for normal red slashes. (Default is 120)
g_mSaberDMGRedDFAMin | Min damage for the red Death From Above move. (Default is 2)
g_mSaberDMGRedDFAMax | Max damage for the red Death From above move. (Default is 180)
g_mSaberDMGRedBackMin | Min damage for the red backslash move. (Default is 2)
g_mSaberDMGRedBackMax | Max damage for the red backslash move. (Default is 30)
g_mSaberDMGYellowNormal | Normal damage for the yellow slash. (Default is 60)
g_mSaberDMGYellowDFAMin | Min damage of the yellow downward slash. (Default is 2)
g_mSaberDMGYellowDFAMax | Max damage of the yellow downward slash. (Default is 80)
g_mSaberDMGYellowBackMin | Min damage for the yellow backslash move. (Default is 2)
g_mSaberDMGYellowBackMax | Max damage for the yellow backslash move. (Default is 25)
g_mSaberDMGBlueNormal | Normal damage for the blue slash. (Default is 35)
g_mSaberDMGBlueLungeMin | Min damage for the blue lunge move. (Default is 2)
g_mSaberDMGBlueLungeMax | Max damage for the blue lunge move. (Default is 30)
g_mSaberDMGBlueBackMin | Min damage for the blue backstab move. (Default is 2)
g_mSaberDMGBlueBackMax | Max damage for the blue backstab move. (Default is 30)
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_mMessageUnSilenceEveryone | g_mMessageUnSilenceBroadcast | g_mMessageUnSilenceTarget
g_mMessageSilenceEveryone | g_mMessageSilenceBroadcast | g_mMessageSilenceTarget
g_mMessageSlapEveryone | g_mMessageSlapBroadcast | g_mMessageSlapTarget
g_mMessageEmpowerEveryone | g_mMessageEmpowerBroadcast | g_mMessageEmpowerTarget
g_mMessageUnEmpowerEveryone | g_mMessageUnEmpowerBroadcast | g_mMessageUnEmpowerTarget
g_mMessageTerminatorEveryone | g_mMessageTerminatorBroadcast | g_mMessageTerminatorTarget
g_mMessageUnTerminatorEveryone | g_mMessageUnTerminatorBroadcast | g_mMessageUnTerminatorTarget
g_mMessageWakeEveryone | g_mMessageWakeBroadcast | g_mMessageWakeTarget
g_mMessageSleepEveryone | g_mMessageSleepBroadcast | g_mMessageSleepTarget
g_mMessageTeleEveryone | g_mMessageTeleBroadcast | g_mMessageTeleTarget
g_mMessageForceTeamEveryone | g_mMessageForceTeamBroadcast | g_mMessageForceTeamTarget
g_mMessageVoteAllowEveryone | g_mMessageVoteAllowBroadcast | g_mMessageVoteAllowTarget
g_mMessageVoteDenyEveryone | g_mMessageVoteDenyBroadcast | g_mMessageVoteDenyTarget
g_mMessageProtectEveryone | g_mMessageProtectBroadcast | g_mMessageProtectTarget
g_mMessageUnProtectEveryone | g_mMessageUnProtectBroadcast | g_mMessageUnProtectTarget
Other CVars --These are some miscellaneous CVars that are primarily used for control switches that enable and disable certain features in Jedi Academy Empire. You will find these very useful.
CVar | Description
--- | ---
g_mAdminPassword | The password for the Jedi Academy Admins.
g_mKnightPassword | The password for the Jedi Academy Knights.
g_mRankName | The rank name for the Jedi Academy Admins.
g_mRankName2 | The rank name for the Jedi Academy Knights.
g_mRankDisplay | Determines if the rank name will be displayed for authed admins. (Default is 1)
g_mAdminCommands | This value determines which commands are available to the "Admin" level admin. Its value is the sum of all the desired command's bitwise value. Default is 1048575 ( All enabled )
g_mKnightCommands | This value determines which commands are available to the "Knight" level admin. Its value is the sum of all the desired command's bitwise value. Default is 8523171 ( JA Empire default )
g_mEmotes | This value determines which emotions are available to the client. Its value is the sum of all the desired command's bitwise value. Default is 511 ( All enabled )
g_mAllowEmotes | Allows user to use emotes in certain situations. 0 = Off / basejk - Emotes only allowed in Duel and Powerduel gamemodes. 1 = Taunts in FFA only, not allowed in Private Duels. 2 = Taunts in Private Duels only. 3 = Taunts in FFA and Private Duels only. 4 = Taunts not allowed in Private duels, but everywhere else. (Default is 4)
g_mAllowTeamSuicide | If this is set to 1, Clients can use the \kill command during team gameplay. (Default is 1)
g_mAllowTeamDuel | If this is set to 1, Clients can enguage in private duels during team gameplay. (Default is 0)
g_mDebugEmpower | If this is set to 1 and if "No Force" rule for servers is active, than it will disable the use of force for empowered clients.
g_mDebugTerminator | If this is set to 1 and if "Saber Only" rule for servers is active, than it will disable the use of weapons for terminator clients.
g_mGiveAdmin | If this is set to 1, Rcon can give clients a level of admin access.
g_mDuelStats | If this is set to 1, Duelers are able to see stats after private duels. If this is set to 2, Everyone can see the Duel Stats. If this is set to 0, it reports basejk style. This feature is also available in the Duel gametype.
g_mNerfBacta | If this is set to 1, you can alter the health regeneration for Large and Normal size Bacta canisters.
g_mBigBactaHP | This CVar alters the health regeneration for Large size Bacta canisters. (Default is 50)
g_mBactaHP | This CVar alters the health regeneration for Normal size Bacta canisters. (Default is 25)
g_mAllowBlack | If this is set to 1, Clients can use the color black for names.
g_mEnforceDuel | If this is set to 0, Clients can use the multiplayer duel option.
g_mAllowDuelRegen | If this is set to 1, Server can change the Force pool regeneration time for Private Duels Only.
g_mDuelForce | The amount of Force pool the winner receives after a Private Duel. (Default is 100)
g_forceRegenTimeDuel | The Force pool regeneration time for Private Duels Only. (Default is 200)
g_mAllowBotLimit | If this is set to 1, Server Admin can set the g_mMaxBots and g_mMinHumans on the server.
g_mMaxBots | Set to any number of max bots you want on your server. When g_mMinHumans is reached or excelled, they will be kicked automatically. (Default is 1)
g_mMinHumans | The number of Humans on the server before a bot is kicked. (Default is 2)
g_mJvsT | If this is set to 1, Clients can play Empowered vs. Terminator game mode. Must set jediVmerc to "1" as well.
g_mSTFU | If this is set to 1, clients are silenced in Duel and Powerduel gamemodes.
g_mScreenSpam | If this is set to 1, clients will see admin command message printing in center screen. If this is set to 2, clients will see the admin command message printing in the console. If this is set to 0, clients will not see admin command messages.
g_mWhois | Allows user to see who is logged in as an admin. 0 = Off 1 = Only Admins can see who is logged in. 2 = Just shows the user who is logged in. 3 = Shows all users who is logged in. (Default is 1)
g_mSayChatColor g_mTeamChatColor g_mTellChatColor g_mASayColor | Allows user to change chat color for messagemode, messagemode2, messagemode3, and admin chat. 0 = Off / White 1 = Red. 2 = Green. 3 = Yellow. 4 = Blue. 5 = Cyan. 6 = Magenta. 7 = White. (Default is 2, 5, 6, 5)
g_mAdminGun | If this is set to 1, All Admins can use the crosshair to aim and execute admin commands on the target.
g_mNoAdminFollow | If this is set to 1, clients are unable to follow admins in spectator mode.
g_mWelcomeMessage | Shows custom welcome message in the console.
g_mHelpInfo | This info aids clients on the server.
g_mLoggedInAdmin | This displays custom message to client when they log in as an admin.
g_mNotLoggedInAdmin | This displays custom message to client when they fail to log in as an admin and attempt to use a command.
g_mLoggedInKnight | This displays custom message to client when they log in as an knight.
g_mMOTDContents | The contents of the message of the day.
g_mMOTDShowTime | The time to show the message of the day in seconds. (Default is 3)
g_mPlayerDuelShield | If this CVar is -1 then nothing changes. If it is between 0 and 200, on a duel start the players stats will be saved and the HP will become 100 and the shield will become g_mPlayerDuelShield units. After the duel the stats of the remaining player is restored. This should make duels a bit more fair. (Default is 50)
Please see the enclosed jae_server.cfg file for an example. Known Issues 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 file 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. Acknowledgments Special Thanks to my friends Darth Mobility and Virtue for being there for me and inspiring me to mod this game again. Thanks to the JA community for their support throughout the years. Thanks to Bad_Hex for helping me with some JA coding issues. Thanks to the OJP team and their open arms approach at making this game and community a better society and supplying fixes for the game. Thanks to Setementor and the rest of the QA team for testing the application. Disclaimer Use this mod on your own risk. I take no responsibility what so ever for anything that might happen when using it. The mod has been primarily tested in all modes and gameplays on Windows and Linux servers. You may not decompile or modify this mod in any shape or form.