Jedi Academy: Reloaded (1.2 Win)

By cHoSeN oNe
Date: 12-13-2003

Download

Readme



Jedi Academy Reloaded


Version 1.2
Author Michael 'cHoSeN oNe' Nohai
Email chosenone@nyc.com
Type Jedi Knight: Jedi Academy
Server Modification





Index
Overview
1.2
1.1
Installation
Modifications
Rcon, Admin, and Knight commands
Client & Admin commands
Message CVars
Other CVars
Known Issues
FAQ
Disclaimer




Overview
This mod is the official mod for the Jedi Academy. A server-side only modification designed to keep the peace and order on the servers. With that in mind, I set out and improved this mod with the way I wanted it to in the past. It's loaded with Admin Commands, Client Commands, Options, and cVars; Extremely modified to meet any clans expectations. This is truly the only mod you will ever need to get that doesn't alter the normal gameplay of Jedi Knight: Jedi Academy® Please visit us at http://www.thejediacademy.net, http://jamod.jk3files.com or on IRC at #jedi-academy, #ja-reloaded @ irc.quakenet.org.



1.2
Fixed memory leak which caused random crashes using the kick command.



1.1
AdminGun enabled
Major code tweaks
g_mSTFU - If enabled, will silence chat on Duel and PowerDuel gamemodes.
All gamemodes enabled from jk2.
Empowered vs. Terminator enhanced gameplay.
Server Admins can now pick and choose what commands they wish to allow their "am" and "jk" level admins to use.
g_mAdminCommands - cVar bit value to determine which "am" commands are allowed for their admins.
g_mKnightCommands - cVar bit value to determine which "jk" commands are allowed for their knights.
rcon admin can always execute the commands even if they are disabled to other admins.
aminfo - now prints commands that are accessable to admin, instead of just commands in the mod.
amhelp - now prints commands help to the admins pending if they are accessable to them.
New IP Range Banning Admin Command ( mbanrange)
g_mDebugEmpower - Will enforce the "No Force" rule and will not allow empowered clients to have force.
Spectator Followers can now be kicked, banned, etc. without affecting others.
mvstr - command that allows you to choose which map you want in the rotation, without disrupting the order.
mnextmap - executes next map available in rotation.
Most default settings that were in reloaded.cfg are now hardcoded into mod for faster and easier configuration.
mnpcaccess does not give client access to cheats.
You can now use clients names for assigning mnpcaccess/mnpcnoaccess.
g_mAdminGun - Enables/Disables AdminGun system. (includes script)
g_mAllowTeleFlag - default is enabled, if set to 0, clients cannot teleport during CTF and CTY gameplay.
New BanIP.dat file stores banned ip's. Full use of 2048 saved ips activated!
Tweaked the whois command a little again to make it more stable.
g_mGiveAdmin - if set to 1, you can grant an admin access level to anyone on the server.
madminaccess, mdenyadminaccess - commands for granting/denying admin access to clients.
Enable/Disable use of black color names.
New logout function - to logout as an admin or knight.
Ignore - ignore certain clients from chatting so you dont have to listen to them.
Sleeping clients can no longer use the \kill command.


Installation
Windows:
Create a directory like this:
X:\...\Star Wars Jedi Knight Jedi Academy\GameData\reloaded
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 reloaded' argument.

Example:
jampDed.exe +set fs_game reloaded +exec server.cfg +exec academy.cfg

IMPORTANT:
For the Ban code, you will need to authorize FULL Admin access to the academy folder.
Windows: Make sure you have an administrator account.


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 Trainer 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 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.
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.
g_banIPs cvar removed because it is no longer needed.
g_mMOTDShowTime - converted to seconds



Rcon, Admin, and Knight 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.

reason => This sends a message to both the server and the client consoles when a player is kicked or kick-banned. For example you can type: "\amkick pada please follow the rules next time." This will send the message "please follow the rules next time" to the server. Also message will be sent to the person's console. (They can scroll up in their console when they are disconnected)

Rcon command Trainer command Knight command Description
minfo aminfo aminfo Show all the available commands. The aminfo version also works for normal clients, but only Trainers and Knights get to see the admin info. The number value next to the command is what needs to be added to your cvar total in order to enable that command.
mhelp amhelp amhelp Quick Help for commands available in mod.
mwhois amwhois jkwhois Shows you which client is logged in as a Jedi Trainer and/or Jedi Knight.(512)
amlogin <password> jklogin <password> Trainers and Knights use this to login as an admin.
logout logout Trainers and Knights use this to logout as an admin.
mstatus [playerid] amstatus [playerid] jkstatus [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 full screen display of the status. This is primarily for binding admin commands:
bind m rcon mstatus <Your player name here>(131072)
mkick <playerid><reason> amkick <playerid><reason> jkkick <playerid><reason> Same as kick but enhanced to also take a clientid or a partial player name and a reason from the admin for being kicked.
kickgun (AdminGun command)(2048)
msilence <playerid><mode> amsilence <playerid><mode> jksilence <playerid><mode> Silence players so they can't talk. Mode passed could be 'global' for all chat disabled and 'private' for just public chat disabled.(2)
munsilence <playerid><mode> amunsilence <playerid><mode> jkunsilence <playerid><mode> Unsilence players so they can talk again. Mode passed could be 'global' or 'gm' for all chat disabled and 'private' or 'pm' for just public chat disabled.
msleep <playerid> amsleep <playerid> jksleep <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.
sleepgun (AdminGun command)(1)
mwake <playerid> amwake <playerid> jkwake <playerid> Wake the player if he's asleep (undo the effects of msleep).
wakegun (AdminGun command)
mrename <playerid> <new name> amrename <playerid> <new name> jkrename <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.(64)
mshowmotd <playerid> amshowmotd <playerid> jkshowmotd <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.
showmotdgun (AdminGun command)(32)
mpsay <playerid> ampsay <playerid> jkpsay <playerid> Send a message to a specific player.(128)
mkickban <playerid><reason> amkickban <playerid><reason> jkkickban <playerid><reason> Bans and kicks the player at the same time with a reason why they were kicked. No need to enter an ip.
[NOTE: All banned ips are stored in a BanIP.dat file located in the mod folder. To UnBan someone, you can use notepad to delete the IP address or the rcon command "removeip".]
kickbangun (AdminGun command)(4096)
mbanrange <playerid><level><reason> ambanrange <playerid><level><reason> jkbanrange <playerid><level><reason> Kicks and Bans client's ip range Medium = ( xxx.xxx.0.0 ), Light = ( xxx.xxx.xxx.0 ), Heavy = ( xxx.0.0.0 ) "Not recommended"
banrangegun (AdminGun command)(8192)
mtele <playerid><x><y><z><yaw> amtele <playerid><x><y><z><yaw> jktele <playerid><x><y><z><yaw> This can teleport any client to any desired location.
[NOTE: The clients destination is read with using the amorigin command. This will get you the X, Y, and Z coordinates on the map. The YAW is the angle the user is facing, any number from 0 to 360 degrees will work just fine.]
(256)
morigin <playerid> amorigin <playerid> jkorigin <playerid> This gets client's X, Y, and Z coordinates on the map and prints them to the console.
origingun (AdminGun command) (1024)
mforceteam <playerid><team> amforceteam <playerid><team> jkforceteam <playerid><team> Transfers a client to a specified team in CTF gameplay. (Red, Blue, Spectator) (65536)
mdenyvote <playerid> amdenyvote <playerid> jkdenyvote <playerid> Disables use of voting to a specific client.
denyvotegun (AdminGun command)
mallowvote <playerid> amallowvote <playerid> jkallowvote <playerid> Allows client to use the voting feature again.
allowvotegun (AdminGun command) (16)
mlockteam <team> amlockteam <team> jklockteam <team> Locks a specific team in CTF mode so no one can join. (Red, Blue, Spectator) (4)
munlockteam <team> amunlockteam <team> jkunlockteam <team> Unlocks a specific team in CTF mode so people are allowed to join. (Red, Blue, Spectator)
mrandteams amrandteams jkrandteams Randomizes Teams in CTF Gameplay (8)
mnpcaccess <playerid> amnpcaccess <playerid> jknpcaccess <playerid> Gives the client ability to spawn NPC's
allownpcgun (AdminGun command)(524288)
mnpcnoaccess <playerid> amnpcnoaccess <playerid> jknpcnoaccess <playerid> Denies the client access to spawn NPC's
denynpcgun (AdminGun command)
madminaccess <playerid><level> Gives the client admin access level
Type am or admin for level 1; Type jk or knight for level 2.
mdenyadminaccess <playerid><level> Denies the client admin access
Type am or admin for level 1; Type jk or knight for level 2.
mgametype <gametype> <map> amgametype <gametype> <map> jkgametype <gametype> <map> Allows the admin to change Map and Gameplay.(262144)
[NOTE: The Gametypes are as follows:
0 = "Free For All"
3 = "Duel"
4 = "Power Duel"
6 = "Team Deathmatch"
7 = "Siege"
8 = "Capture the Flag"]
mvstr <vstr/name> amvstr <vstr/name> jkvstr <vstr/name> Executes and selects the map desired available in the rotation.(16384)
mnextmap amnextmap jknextmap Executes and selects the next map available in the rotation.(32768)

Included is a jar_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 jar_admin.cfg in game console when in game.




Client, & Admin 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. Rcon command Bit Value Description
amsay <message> Sends a message to all logged in Trainers and Knights.
ignore <playerid> Ignores chat from a certain player. (repeat to disable)
amlogin g_mAllowAdminLogin Allows Secondary Admins to use the Admin Commands
jklogin g_mAllowKnightLogin Allows Knights to use the Admin Commands





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_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



Other CVars
CVar Description
g_mAdminPassword The password for the Jedi Academy Trainers.
g_mKnightPassword The password for the Jedi Academy Knights.
g_mAdminCommands This value determines which commands are available to the "am" level admin. Its value is the sum of all the desired command's bit value. Default is 1048575 (all enabled)
g_mKnightCommands This value determines which commands are available to the "jk" level admin. Its value is the sum of all the desired command's bit value. Default is 133795 (JA Reloaded default)
g_mAllowTeamSuicide If this is set to 0, Clients cannot use the \kill command during team gameplay. (Default is 1)
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_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.
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_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 enabled, clients are silenced in Duel and Powerduel gamemodes.
g_mAdminGun If this is set to 1, All Admins can use the crosshair to aim and execute admin commands on the target.
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_mNotLoggedInKnight This displays custom message to client when they fail to log in as an knight and attempt to use a command.
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 reloaded.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 and rerun it.
The am/jk 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.



FAQ
Installation instructions confuse me, is there a more detailed way to install?

-Yes, An reloaded folder in the gamedata directory. Also, make sure inside the academy folder are these files.
1) A jampgamex86.dll
2) reloaded.cfg
3) dummy.pk3
4) description.txt
5) BanIP.dat
6) Readme.htm
When all of these files are in, the mod should load with no problems. Open up the academy.cfg file in notepad and edit the cvars that control the passwords. After this, save the file and close it. When you get in game, Click the setup menu and click the mods menu. Highlight the JA Reloaded and click Load. The screen should flash a couple times, then create your server and enter the game. Open up the console and type \exec academy.cfg That will load all of your cVars and passwords you declared in the academy.cfg file. Then, to login use \amlogin pass (where pass is the password) If you wish to load the mod via shortcut, you can right click on the EXE file in windows and create shortcut. Then, add the arguments
+set fs_game reloaded +exec reloaded.cfg +exec server.cfg
Save the shortcut, and double click it to launch. This will launch jk2mp or jampDed and load the mod and cfg at same time...skips extra steps thats all...


Why is the new config so short?

-Every default setting for JA Reloaded has been hardcoded in the mod to
1) Shorten the size of the config file
2) Be much easier to set up, even if you do not run config files.
The Readme.htm lists all cVars that are in the mod. Just type those that you wish to change in the config file. An example for Admin Password, it would be:
seta g_mAdminPassword "mypass"
You will need to place a ( seta ) in front of all cVars you change. Once you have edited all that you want in the config (reloaded.cfg or server.cfg ) When you launch your server be sure to use the \exec command to execute your script.
example: \exec reloaded.cfg


What is this Bit Value Thingy?

-You have to add the numbers together to get a value which you place in the g_mAdminCommands cvar or g_mKnightCommands cvar. example: If you just want amkickban, amsleep, and amstatus commands for "am" admin. You would first look up their bit value.
kickban = 4096
sleep = 1
status = 131072
Now add those together 4096+1+131072 = 135169
You will now set g_mAdminCommands to 135169 in your reloaded.cfg file. (seta g_mAdminCommands "135169")
This same pattern goes for both of the new bit value cvars (g_mAdminCommands, g_mKnightCommands)





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 Windows servers. You do not have permission to decompile or modify this mod in any form or you will be immediatly reported to Raven and brought to justice. The source code will NOT be released for download so please don't ask. This mod may not be re-distributed. Accept no cheap admin mod imitations.