PDA

View Full Version : JJ2 Console Commands


Cpp
Sep 30, 2005, 12:58 PM
Heya. I will need your opinion on this one.

Over some time ago, I had an idea of an experimental jj2 server-side program that would not only take direct commands by the host, but also by clients, allowing them to partially control the game flow. Such utilities could be specially useful to form an idle server. These programs would run server-side to help control the gameplay while allowing players to communicate with them by issuing simple commands over jj2 chat. This would partially turn jj2 into a console-like application. The big question, however, is how to initialize a console command. How to make a program recognise it as a command and differ it from normal chat? Let me give you some examples.


Suppose a player enters the following text into jj2 chat and presses enter.
vote kick 3
vote to kick now so that the cheater gets kickedHow would the program recognise this command, in this case, the first line and differ it from the second line which, in this case, is normal chat?

Now consider the following example. I have seen some people use this as a joke and so I will be using it here as an example.
!vote kick 3
vote to kick now so that the cheater gets kickedThe text in these two lines is the same as above, however there is a slight modification to the command. Notice that an exclamation mark has been added in front of the command (first line)? In this case, the program will have no trouble differing commands from normal text. This is an excellent way of keeping normal text from interfering with the console commands.

The reason for this conversation is the fact that I would like to hear some of your opinions on this topic (big finger pointed at you, who play jj2), specially if you have other ideas on how to differ commands from text eg. what character would be most suitable to stand in front of a console command (for the above example) or perhaps even another way of differing commands from normal text. Least confusing/most easy way to send a console command? Anything.
If you have any other ideas such as features such programs could offer, new console commands, functionality, etc, post them and we'll discuss it.

~Over

Darobi
Sep 30, 2005, 01:17 PM
Perhaps you could make the text coloured and have the word CONSOLE come before it.

For example, I type in a command and the other players see this:

CONSOLE : blahblah blah

Well... Not blah blah blah. but you get the point.

It also doesn't have to come up near where all the chat text goes. Maybe it can go somewhere else where it doesn't block up everything?

DoubleGJ
Sep 30, 2005, 02:15 PM
I think a good character to be put in the beginning is ">". Like this:
>vote kick3

I don't see this one used too often in JJ2.

FoxBlitzz
Sep 30, 2005, 02:45 PM
Maybe change it to ";kick vote 3". That way you don't have to hold Shift and press the key. It would be more convenient. Also, swapping the "kick" and "vote" words so that "kick" is first would have more consistancy. Unless the way JJ2 reads the "kick" text blocks it. Just a thought.

DoubleGJ
Sep 30, 2005, 02:48 PM
Yeah, but ; is used in smileys.

n00b
Sep 30, 2005, 03:05 PM
;) doesn't have to be a command.

FQuist
Sep 30, 2005, 03:28 PM
If that works I take would depend on how the console language would handle non-existing commands. There's more smileys than just the ;<!---->) smiley starting with ;. I take it wouldn't be a problem if someone posted a smiley and it'd just recognise it wasn't a comment. It would be more troublesome if the console utility would send out an "Invalid command" error anytime anyone used an (unfiltered-out) smiley starting with ; (you can't filter out all possible smiley variations I take)

EvilMike
Sep 30, 2005, 04:20 PM
Preceeding it with an exclimation point would work best because that character is almost never used to start lines (unless the line is something like "!!!!!!!!!!!") and is commonly found in similar uses, such as in mIRC scripts. "!vote kick #" seems to be the best, and most simple possible format for such a feature.

I would also assume the !vote command would have other applications, such as "!vote map x". Because of this, AkuKitsune's suggestion of having the command be "kick vote #" isn't really consistant at all.

If you wanted to try something different, you could have the | character (or multiple | characters) be used in place of the !. That would make "commands" be shown in colour.

Have commands delivered through normal chat though. If for some reason a player tries to give a nonexistant command or makes a typo, don't make the program say "Invalid command" or something; the lack of a result would tell the player the command didn't work just as well as any error message could.

I assume that this feature would be integrated into that program of yours nimrod was showing off last AB. If this is the case, perhaps add an "!info" command or something which returns the server settings, such as time limit, cheat protection, idle kicking, the next map (or whether map voting is enabled), server admins (if that feature is in) and whatever else can be set with that program. Since that would probably take multiple lines, limiting !info to being used every 30 seconds or so would be a good idea to prevent spam.

If this program supports server admins, obviously have commands for kicking and banning, as well as commands to restart the level, go to the next level, set the next level, and a few other basic things.

Monolith
Sep 30, 2005, 08:40 PM
I think the exclamation mark (!) would work best as the trigger as that's a commonly known and used trigger.

As for other commands, maybe voting on the next level, to change number of roasts/flags/gems, or to skip to the next level.

Sonyk
Sep 30, 2005, 09:01 PM
As for other commands, maybe voting on the next level, to change number of roasts/flags/gems, or to skip to the next level.
If the program would register certain people as game "moderators," that would be somewhat useful for JDC, and events similar, I'm sure.

R3ptile
Sep 30, 2005, 10:44 PM
Choose your favorite:

!vote
@vote
.vote
`vote

And I just thought about some useful commands:

!vote kick #
!vote mute # (possible?)
!vote instagib 0\1 (off\on)
!vote map [filename]
!vote timelimit 0-60 (0 for no timelimit)

Cpp
Oct 1, 2005, 12:02 AM
Preceeding it with an exclimation point would work best because that character is almost never used to start lines (unless the line is something like "!!!!!!!!!!!") and is commonly found in similar uses, such as in mIRC scripts. "!vote kick #" seems to be the best, and most simple possible format for such a feature.Yes. An exclamation mark seems perfect to me. Just wanted to make sure it's the right character. Let me state how I plan to have the program read commands. A command initialization begins when a user starts the line with an exclamation mark:(spaces/colors are ignored)!vote (parameters [optional parameters])When a line starts with "!", the program will read the text that follows it (until a space is found or the text ends) and compare it with stored commands. If the text happens to match one of the commands, it will initialize the command and the program will continue to read the parameters (if any), passing them to the function. Then comes some error checking, but let us leave this part out for now. This way, the program will never accept a line such as "!!!!!!!!!!!!!!".

I would also assume the !vote command would have other applications, such as "!vote map x". Because of this, AkuKitsune's suggestion of having the command be "kick vote #" isn't really consistant at all.Yes, it has a lot of parameters planned. Let's just say that everything that has been said in this thread is already planned (except for the !info thing). Here are some parameters that follow the !vote command: kick (#), kick (IP), ban (#), ban (IP), skip, next (level filename), open (level filename), etc.
But that is only the !vote command. There are other commands as well.

Have commands delivered through normal chat though. If for some reason a player tries to give a nonexistant command or makes a typo, don't make the program say "Invalid command" or something; the lack of a result would tell the player the command didn't work just as well as any error message could.The thing is that if a player enters a non-existing command, no error will be displayed. However, if a player enters an existing command and makes a typo in the parameters, it will have to inform the player that he made a typo and by doing so, it'll also inform him that the command is active. Unlike where there'd be no response, he'd know that the admin has disabled that command.

I assume that this feature would be integrated into that program of yours nimrod was showing off last AB. If this is the case, perhaps add an "!info" command or something which returns the server settings, such as time limit, cheat protection, idle kicking, the next map (or whether map voting is enabled), server admins (if that feature is in) and whatever else can be set with that program. Since that would probably take multiple lines, limiting !info to being used every 30 seconds or so would be a good idea to prevent spam.

If this program supports server admins, obviously have commands for kicking and banning, as well as commands to restart the level, go to the next level, set the next level, and a few other basic things.I am always looking for new ideas. I think there will be some sort of admining over jj2 chat. An !adminlogin (password) plus !adminlogout would do. I know you're probably thinking that this isn't a good way as everybody will be able to read the password, but hey ;-) I already have a solution to that.

Ðx
Oct 1, 2005, 12:57 AM
hmm how about bots * smiles *

DoubleGJ
Oct 1, 2005, 01:33 AM
Jazz2 bots already exist. But they're buggy.

Nitro
Oct 1, 2005, 01:44 AM
!self destruct (;
this seems like a cool idea (the console, not the self destruct).

White Rabbit
Oct 1, 2005, 02:01 AM
t |kick 5 enter

For JDC officials who are not hosting. ;)
But... Non-officials are technically not supposed to use any sort of colours, except they do it anyway, which is a problem.

Stijn
Oct 1, 2005, 02:21 AM
!vote map [filename]
It's called a "level" in jj2. This is not ET.

ThunderPX
Oct 1, 2005, 04:22 AM
I vote for !.

Useful commands would be:
!vote kick #
!vote ban #
!vote level [filename]
!spec (Makes you a spectator)

And the server and/or moderators can use other commands, such as:
!mod # (Make a player moderator)
!level [filename] (Change level)

cooba
Oct 1, 2005, 10:39 AM
*sees no point in kick/ban votes*

If the server wants someone to be kicked/banned he can just do it by plain doing so without going through voting crap.

White Rabbit
Oct 1, 2005, 10:54 AM
Idle servers? ;P It also gives 'server status' to people (if the program only accepts commands from one IP), which is really useful for JDC events.

Ae
Oct 1, 2005, 06:04 PM
Turn on and off triggers at will, for the host:
"!trig 4 0" to turn trigger ID 4 off,
"!trig 4 1" to turn trigger ID 4 on.
Not that I think nobody has thought of it already ;O


ROCK FUN:
"!trigrock 1"


You could set starting weapons for whenever somebody joins/dies
"!startgun2 50"
"!startgun2 50 PU"
For 50 powered or nonpowered bouncers, if codeable. You could make it ammo, but that is longer.

"!startgun5 red 50"
"!startgun7 blue 25 PU"

Each team gets different starting guns, you could even make levels with no weapons in them be GOOD.
Saying it without a "red" or "blue" would mean for everybody.

Sonyk
Oct 1, 2005, 06:42 PM
Idle servers? ;P It also gives 'server status' to people (if the program only accepts commands from one IP), which is really useful for JDC events.
Idea tief.

UNKNOWNFILE
Oct 1, 2005, 07:43 PM
*sees no point in kick/ban votes*

If the server wants someone to be kicked/banned he can just do it by plain doing so without going through voting crap.

OK, what if the host was idle?

n00b
Oct 1, 2005, 07:49 PM
OK, what if the host was idle?
Or if the server wanted people's opinion on the subject since it would be slightly controversial.

Black Ninja
Oct 1, 2005, 10:14 PM
++Democracy.

NeonPSY
Oct 2, 2005, 11:06 AM
jjvotekick

:P

EvilMike
Oct 2, 2005, 12:12 PM
I'm not exactly sure if this suggestion is feasable, but I think it can be done.

As far as I know, chat in jj2 is always sent to the server and then to clients. Because all chat goes through the server, would it be possible to regulate or selectively filter chat? I'm thinking of an !ignore [player number] command here.

If player 5 was bugging me, I could type !ignore 5 and not have to put up with their chat. The server would recieve my ignore command and stop sending me the packets for player 5's messages. Again, I'm not entirely sure this can be done but it would be cool if it was possible.

There's already a way to ignore players in jj2, but it's completely client side and is more of a bug. Not to mention the fact that you can't unignore them, and it messes up their sprite.

Cpp
Oct 2, 2005, 01:02 PM
There's already a way to ignore players in jj2, but it's completely client side and is more of a bug. Not to mention the fact that you can't unignore them, and it messes up their sprite. I think I know what you're talking about. Don't worry, I am already working on a fix for that. Shhhhh..... ;)

EDIT: Hmm... There doesn't seem to be much interest for such programs as this thread isn't getting much attention/replies.

EDIT2: Ah! I knew adding the upper line would bring some more attention to this thread ;-)

cooba
Oct 7, 2005, 07:12 AM
'Is not getting much attention'? 28 replies is a lot nowadays.

EvilMike
Oct 7, 2005, 03:55 PM
EDIT: Hmm... There doesn't seem to be much interest for such programs as this thread isn't getting much attention/replies.Perhaps it's not getting much attention because at this moment, there's not really much to show for the program you're working on. I know it already can do a lot of stuff and does exsist, but at the moment very few people have access to it, and it is rarely shown off.

I bet people would be more interested in this project if they could actually see more of it.

FQuist
Oct 7, 2005, 04:00 PM
I would love there to be a open beta release of console.. so what if it doesn't contain all the features possible yet.

If it's the same program as this.. otherwise nevermind, but do release console sometime, since it'd be so terribly useful for people.

Cpp
Oct 8, 2005, 06:56 AM
I primarily made this thread to clear up some things and get a list of useful commands that a console program for jj2 could use. Nothing has yet been done on this jj2 console application which is why I'd like to get my hands on a few more ideas, before I start throwing things into it. If the current amount of commands is sufficient, it's fine with me. Hence I can always upgrade it at a later date.

EvilMike
Oct 9, 2005, 12:15 AM
By the looks of it no one has any more ideas to give. I know I don't. It seems as if all of the obvious console command suggestions have been given.

White Rabbit
Oct 9, 2005, 12:28 AM
8 Ball in JJ2 plz. :(

!8ball {question}

The program sees the !8ball and comes up with a random Delphian answer. ;p

Monolith
Oct 9, 2005, 12:27 PM
Just incorporate a scripting engine, and it'll be all good. ;P

Grytolle
Oct 12, 2005, 10:53 PM
culd u maek so when some1 type "gry' dat a alert cum up saeying 'Grytolle rox >:)'? thx dat wuld rly imporve th gaem :lori: *hypno* :fm:

cooba
Oct 13, 2005, 04:08 AM
Game Initing? Could be quite useful for tourneys and such, where people aren't supposed to kill themselves before the game starts.

It would work like this: A coop server is set up. Players join in, prepare to fight, and a server admin logs in and inits the countdown - using !count## timelimit ## command, where the #'s in count are seconds to go, and minutes in timelimit (0 for no timelimit). After the countdown finishes, the timelimit would start and the gamemode would change to CTF (or Battle). If it's CTF, players would get their fur and name color changed respectively to the players' team ashipment.

blurredd
Oct 13, 2005, 04:48 AM
I like your countdown idea, but I think changing the gametype would just complicate things. Usually when such a change occurs, players would have to rejoin the server or use PC4 so that there aren't problems. However, if there is a better solution to this that works automatically and doesn't require clients each running a seperate program, then I'm all for it. I personally think having infinite hearts at the start is enough.

cooba
Oct 13, 2005, 04:55 AM
I personally think having infinite hearts at the start is enough.Oh right, I forgot all about heart control. In that case, clients' infinite health would just be set to 5 (or 3) after the countdown ends, which wouldn't be as messy and would be indeed easier to handle clientwise.

Cpp
Oct 13, 2005, 05:59 AM
I think I know how to allow admins to handle multiple commands at the same time making their job a little easier. Suppose an admin has to enter a bunch of commands to initialize the game play. To do so he would need to lower the protection so that players can roast each other, set the time limit, set the max score limit and make an announcement that a mach has begun. He'd have to issue the following commands over jj2 chat:

!admin set healthcontrol 3
!admin set timelimit 20
!admin set maxscore 10
!admin announce ||Match has begun! Fight now!

Now suppose these lines were located in a txt file named startmatch.txt on the server and all the admin has to do now is type in:

!admin exec startmatch.txt

Pertty useful, huh?

EDIT (to Cooba's post below):
Mostly everything that PC4 can do plus more. I still do not have a full feature list.

cooba
Oct 13, 2005, 06:09 AM
That indeed is very useful... from what I can see, everything which Controller could do is now possible via admin-only commands... is there anything else admins can do?

piet
Oct 18, 2005, 07:15 AM
I think I know how to allow admins to handle multiple commands at the same time making their job a little easier. Suppose an admin has to enter a bunch of commands to initialize the game play. To do so he would need to lower the protection so that players can roast each other, set the time limit, set the max score limit and make an announcement that a mach has begun. He'd have to issue the following commands over jj2 chat:

!admin set healthcontrol 3
!admin set timelimit 20
!admin set maxscore 10
!admin announce ||Match has begun! Fight now!

Now suppose these lines were located in a txt file named startmatch.txt on the server and all the admin has to do now is type in:

!admin exec startmatch.txt

Pertty useful, huh?

EDIT (to Cooba's post below):
Mostly everything that PC4 can do plus more. I still do not have a full feature list.

EDIT: pageclaim in the name of cool console commands :P

thats cool!
maybe an autoexec.txt that will execute when the server starts or restarts.
or special scripts for maps like battle2.txt capture1.txt

but it would save time without !admin and shorter commands like just !exec, !settime.

i dont know if this can be done but maybe this is a neat idea:

when a player logs in the servers searches his ip in a text file.
this way we are able to make a admin level system like Shrubbot in Wolfenstein.

something like this:



[level]
level = 0
name = Player
flags = iahC

[level]
level = 1
name = Advanced Player
flags = a

[level]
level = 2
name = Player Moderator
flags = iahCp

[level]
level = 3
name = Administrator
flags =*

[admin]
name = *[avropet]*
ip = 192.168.0.7
level = 3
flags =



here there are 3 levels and one admin.
the flags configure the commands availible for the level or admin.

like:

flags = kbr

* = all commands
k = !kick
b = !ban
r = !restart
a = !admintest

(if a players types !admintest the server chats there level on the screen)

is this something?

blurredd
Oct 18, 2005, 04:31 PM
What about making admin access similar to how JJ2 Admin Kit Server (http://www.jazz2online.com/J2Ov2/downloads/info.php?levelID=828) works?

UNKNOWNFILE
Oct 18, 2005, 05:01 PM
What about making admin access similar to how JJ2 Admin Kit Server (http://www.jazz2online.com/J2Ov2/downloads/info.php?levelID=828) works?

that thing is hopeless, once it crashes once, it crashes each time you run it after that.