Cutstuff Forum

Mega Man 8-bit Deathmatch => Tutorial Collection => Topic started by: King Dumb on August 01, 2013, 06:20:59 AM

Title: [GUIDE] Guide to the Console!
Post by: King Dumb on August 01, 2013, 06:20:59 AM
Table of Contents[/size]

**Throughout this guide, parameters to CVARs and CCMDs will be surrounded by brackets [ ] when they are introduced. These brackets are not included when using the actual CVARs and CCMDs.**

I. Introduction to the Console
        --------A. What is the console?
        --------B. CCMD vs. CVAR
II. Commonly Encountered CCMDs and CVARs
        --------A. CCMDs
        --------B. CVARs
III. Bind, Doublebind, and Rebind
   --------A. Bind
   --------B. Doublebind
   --------C. Rebind
IV. The Configuration File, Autoexec.cfg, and Atexit
--------A. The Configuration File
--------B. Autoexec.cfg
--------C. Atexit
V. Creating CVARs
VI. Wait, Eval, Test, and Exec
   --------A. Wait
   --------B. Eval
   --------C. Test
   --------D. Exec
VII. Alias
   --------A. Introduction
   --------B. Examples
VIII. KEYCONF
IX. Tips and FAQ
--------A. More Helpful Tips
--------B. FAQ

------------------------------------------------------------------------------------------------------

I. Introduction to the Console

A. What is the console?

The console is the interface via which players (clients) interact with the game engine to alter settings, configurations, etc. By default, the console is opened by pressing the ` key. This opens a blue box that contains messages and console input history and, essentially, a command line. It is from here that the client types and enters all console inputs, which come in the form of Console Commands (CCMDs) and Console Variable (CVARs).

B. CCMD vs. CVAR

Every input that clients make into the console is in the form of a Console Command (CCMD) or a configuration of a Console Variable (CVAR). There is no setting in the console you must toggle to switch between the two; it all depends on what you input into the command line.

The most important difference between CVARs and CCMDs is that CVARs generally control settings while CCMDs will perform actions or functions for you. Things such as display settings, player name, class, and skin, server settings, and renderer options are controlled by CVARs. As such, every CVAR, when input into the console, will have both its name and a parameter. The name determines what setting will be changed, and the parameter, of course, determines what the setting will be changed to. Every parameter falls into one of a few categories:

Boolean - The simplest kind of CVAR. Boolean CVARs operate on a simple true/false, yes/no basis. As such, these CVARs are entered into the console as [name] [true/false] or just [name] [1/0].

Integer - These CVARs deal with settings that can hold any value in a range of integers. They are entered as [name] [integer].

Float - Very similar to integer CVARs, except these operate with numbers with decimals. The input is [name] [number].

String - Some CVARs operate using string parameters. A string is simply a line of text, surrounded by quotes if it is more than one word. For examples, "Hello world!" is a string. Many CCMDs require parameters involving specific strings, such as changemus.

Color - A few CVARs deal with color-based settings, and so their parameter is in the form of a color code, such as ff 00 00. Color-based CVARs can also operate with several shorthand parameters, in the form of simple color names like "blue".

Inputting a CVAR name into the console without a parameter will print the CVAR's current value in the console.

On the other hand, CCMDs can often operate without parameters, because they perform a function or action. Some CCMDs do require or support the use of parameters; these CCMDs often perform a function that slightly varies based on the parameter(s) given. Player movement, for example, is executed via CCMDs.

There is one special kind of CCMD, called action commands. These are most heavily used for player movement. You can tell if a CCMD is an action command if the name of command begins with a +. Commands beginning with a +, such as +jump, have counterpart commands, which are identical in name except for the fact that they begin with a - instead. These commands are special in that whatever the + version does when it is executed, the - command stops. The special property that makes these commands work is that when a key is pressed that activates a + command, the - command is automatically executed when that key is released. In other words, when you press your jump button, the command +jump is executed; this command makes you continually jump. When you release your jump button, the command -jump is executed, which stops the jumping. All movement commands work like this.

II. Commonly Encountered CVARs and CCMDs.[/size]

Please note that the following lists are not complete, but merely serve as a brief introduction to the more commonly used CVARs and CCMDs. For more complete lists, please direct your attention to the ZDoom (http://zdoom.org/wiki/CVARs) Wiki (http://zdoom.org/wiki/CCMDs) or the Zandronum (http://wiki.zandronum.com/Console_Variables) Wiki (http://wiki.zandronum.com/Commands).

A. CVARs

(click to show/hide)

B. CCMDs

(click to show/hide)

III. Bind, Doublebind, and Rebind[/size]

This begins the important parts of this guide. Bind, doublebind, and rebind are all CCMDs involved with one very important task: assigning functions to keys. Every key that does something in-game when pressed has a function bound to it. These are the commands that are assign an action to a key.

A. Bind

(click to show/hide)

B. Doublebind

(click to show/hide)

C. Rebind

(click to show/hide)

IV. The Configuration File; Autoexec.cfg, and Atexit[/size]

Here we will examine a few miscellanious functions that you'll need to know for the more advanced portions of the guide. But before that, I need to introduce to you a very important file.

A. The Configuration File

(click to show/hide)

B. Autoexec.cfg

(click to show/hide)

C. Atexit

(click to show/hide)

V. Creating CVARs

(click to show/hide)

VI. Wait, Eval, Test, and Exec

This is the section where we begin examining the more versatile and powerful abilities of the console, in the form of some very useful CCMDs.

A. Wait

(click to show/hide)

B. Eval

(click to show/hide)

C. Test

(click to show/hide)

D. Exec

(click to show/hide)

VII. Alias[/size]

A. Introduction

(click to show/hide)

B. Examples and Useful Aliases

(click to show/hide)

VIII. KEYCONF[/size]

(click to show/hide)

IX. Tips and FAQ[/size]

This will be added to over time!

A. More Helpful Tips!

(click to show/hide)

B. FAQ

(click to show/hide)

------------------------------------------------------------------------------------------------------

Please post with comments, questions, suggestions, corrections, etc.! I'm sure there is plenty I've missed!
Title: Re: [GUIDE] Guide to the Console!
Post by: Russel on August 01, 2013, 07:02:23 AM
Huh.
I...honestly wasn't aware of the existence of rebinding...interesting.
I will probably need to bookmark this page because it could be useful for hosting servers and stuff.
Title: Re: [GUIDE] Guide to the Console!
Post by: Laggy Blazko on August 01, 2013, 07:55:33 AM
The only thing I couldn't found there is something related to chatmacros (well, most people use binds to say predefined things anyway (I use aliases more, instead =P )), but nice guide.
+1 bookmark.
Title: Re: [GUIDE] Guide to the Console!
Post by: The Killer Nacho on August 01, 2013, 02:12:43 PM
If this doesn't deserve a sticky, I don't know what does. There are some commands missing that can be found here: (Sorry in advance if this link is far too obvious and you only included important client commands.)

http://wiki.zandronum.com/Commands (http://wiki.zandronum.com/Commands)

I would write it out here, but if this link were placed near the top of the guide, new users might be heavily inclined to click it and read the stuff on it (which includes both client and server commands, the latter of which may be useful for new hosts in our community). Heck, I've been playing MM8BDM for  several months and before now I had no idea rebind existed like Lego. Overall, props for such a comprehensive guide. (So comprehensive, in fact, you just completely made the SR50 binding guide by Tesseractal obsolete :lol: )
Title: Re: [GUIDE] Guide to the Console!
Post by: *Alice on August 01, 2013, 02:31:45 PM
One thing to keep in mind: $HEALTH and the likes are not Integers, which means you can't use number operations like + or > on them. I feel like this should be more explicitly added to the part where they are mentioned in order to avoid confusion or at least made as a list and not be on the same level as the CVARs.
Title: Re: [GUIDE] Guide to the Console!
Post by: King Dumb on August 01, 2013, 03:22:47 PM
Thanks everyone!

I opted not to include chatmacros because they didn't seem useful enough, but it's no effort to include so I will.

And yeah, the CCMD and CVAR lists are definitely not complete. I'll clarify that and include links to complete lists.

And thanks for the reminder Alice! I'll include that in the guide as it's bound to trip people up at some point.
Title: Re: [GUIDE] Guide to the Console!
Post by: Ivory on August 01, 2013, 04:26:25 PM
Definitely a worthy topic for a sticky. It's full of rich information that can benefit anyone.
Title: Re: [GUIDE] Guide to the Console!
Post by: ZeStopper on August 01, 2013, 05:59:31 PM
You don't know how long I waited for something like this!
Title: Re: [GUIDE] Guide to the Console!
Post by: King Dumb on August 01, 2013, 07:56:23 PM
Thanks for sticking this thread, Ivory!

Small update with a few new CCMDs/CVARs that I left out.
Title: Re: [GUIDE] Guide to the Console!
Post by: Knux on August 15, 2013, 03:49:24 PM
For the tips, I'd like to add something. Suppose that for some reason, you'd like to restart the game but keep your control settings (and maybe binds, if you have 'em). Go into the console, and type the following:

hud_health_green 0

This will set your campaign progress back to only Cutman's stage being available. In other words, back to the start.

In my case, I wanted to restart because I'd like to see every thing Dr. Light says during the campaign as I don't remember.
Title: Re: [GUIDE] Guide to the Console!
Post by: The Killer Nacho on October 08, 2013, 01:49:29 AM
Alright, I have been bugged me to no end and I cannot find a solution anywhere on the internet. As one of the only remaining players that uses spaces in his or her name, I'm frustrated that I can't use names aliases or binds unless I remove the spaces in my name. Is there any way at all to bind or alias a name with spaces in it?
Title: Re: [GUIDE] Guide to the Console!
Post by: ZeStopper on October 08, 2013, 02:16:53 AM
I've been wanting to know how to do that ever since I wanted to make a bind for player name-"Batman Beyond."

It would really help.
Title: Re: [GUIDE] Guide to the Console!
Post by: King Dumb on October 08, 2013, 02:43:21 AM
You have to use embedded quotes.

bind u "name "ctKing chDumb""

alias changemyname "name "ctKing chDumb""

Both of those lines end in two inputs of ".
Title: Re: [GUIDE] Guide to the Console!
Post by: Flare Blitz on May 16, 2014, 10:30:55 PM
Is there a Way to change the base skin to another skin?
Title: Re: [GUIDE] Guide to the Console!
Post by: Ceridran on May 16, 2014, 10:46:08 PM
Because you are asking how to do it in a thread related to the console, I'l tell you how to do it in the console. Open up the console, (most often the ~ key) and type:

Code: [Select]
skin skinname
Replace skinname with the name of your skin.
For example..

Code: [Select]
skin pharaohman
An easier yet slower way is to open Options>Player Setup, and then you'l notice the part that deals with skins.
Title: Re: [GUIDE] Guide to the Console!
Post by: !o! woohoo on May 17, 2014, 01:48:51 AM
Quote from: "Ceridran"
Because you are asking how to do it in a thread related to the console, I'l tell you how to do it in the console. Open up the console, (most often the ~ key) and type:

Code: [Select]
skin skinname
Replace skinname with the name of your skin.
For example..

Code: [Select]
skin pharaohman
An easier yet slower way is to open Options>Player Setup, and then you'l notice the part that deals with skins.

I don't think you got the right schooling program, sir. You really seem to not understand this question.

To change your base skin, you must get slumped and open mm8bdmv3b.pk3. Go into sprites, then browse until you find megaman's skin sprites; these sprites should be named PLAY and then should have numbers and letters after it. If you want to change the base skin, you have to change these sprites to the ones you wish. You must make sure you use the same sprite name and the same rotation or it wouldn't look the best or would crash the game. Make sure you save it when you are done. Good luck, son.

NOTE: If you change this, then this will also affect megaman's skin since it is the base skin in this current version of mm8bdm. Also make sure you don't edit anything else other than sprites in the file or else you won't be able to enter servers.
Title: Re: [GUIDE] Guide to the Console!
Post by: Flare Blitz on June 23, 2014, 04:19:19 AM
Thanks! I wonder if there is a command to change the music to a certain music for EVERYONE on a server,  not just me.
Title: Re: [GUIDE] Guide to the Console!
Post by: King Dumb on June 23, 2014, 04:27:23 AM
The only way you can do that is if you're the owner of the server, or similarly if you remote console (RCON) to the server.

If you do have RCON, you can simply type into the console 'rcon changemus [your music]' and the music will change for everyone.

Although bear in mind people don't usually like having their music changed a lot by the server, so you use sparingly if at all!
Title: Re: [GUIDE] Guide to the Console!
Post by: LarissaFlash on October 14, 2014, 12:09:14 AM
Prettyprettypretty useful, KEYCONF helped me to mess around with commands!