Tremfusion.net

Player's Guide for Tremulous players

From TremFusion

This guide is designed for players who are very familiar with Tremulous already. If you don't already know all the different weapons/classes by name, how much damage all the different weapons do, what a stage is, etc, you should be looking at the Player's Guide for new players.

Contents

New Binds

The first thing you should pay attention to here is the the new binding commands. Have you ever gotten tired of your binds spamming lots of information? Did you know that with TremFusion, they don't have to? Let's take a look at some of the new commands that allow us to produce spam-free binds.

New Commands

Several new and important commands have been added that you should master before understanding how these binds will work. First is the conditional command. From another part of the manual

Delay

Use delay for wait before execute command

Conditional

/if <value1> <operator> <value2> <cmdthen> (<cmdelse>)

Compares the first two values and executes <cmdthen> if true, <cmdelse> if false.

Valid operators are = != < > >= <=

What does this get you? Well, some examples

/if 1 < 2 "echo that is true" "echo that is false"
that is true

Okay, so what did I do here? Well, I gave it a simple statement, '1 < 2', which is true. Therefore, it executed the <cmdthen> command, which echoed the statement 'that is true'. If I switch it around so the statement is false, the <cmdelse> will execute, like so

/if 2 < 1 "echo that is true" "echo that is false"
that is false

Now, some things that are important to note. First, you MUST use double quotes. Single quotes won't parse properly. Second, if you don't use quotes at all, it'll be really screwed up.

Cvar Substitution

Cvar substitution is extremely powerful. Again, from the manual

Cvar contents can be insterted into a command (server/client commands and scripts).

The syntax for substitution is \$cvar_name\ including the quotes.

For example:

exec setvar.cfg 1 0
setvar.cfg:
set g_allowVote \$arg_1\
set g_allowShare \$arg_2\

This function can be used to pass arguments from an admin command to a script:

exec = exec test.cfg \$arg_all\

Note 1: cvar substitution is done before the command line is split into args so argument count could be affected if the cvar contains a space.

Note 2: cvar substitution is done from the begining of the command to the end. So \$g_unlagged\$g_allowVote\ will become 1$g_allowVote\.

Note 3: if a cvar doesn't exist it won't be substituted and will be left as it is. So \$dd\ will stay \$dd\ in the command.

What does this mean for us? Well, it means we can start doing some more interesting logic using information about the game. For instance, try this:

/echo \$sensitivity\

It should show your current sensitivity setting. Well, what happens if we combine this with our conditional statement above?

/if \$sensitivity\ > 20 "echo Wow, that's hi!" "echo What a reasonable setting"

So, now TremFusion can comment on your sensitivity setting. How interesting. But, how does this help us with our binds? Well...let's say you're on stage 3 and you want to only buy advanced ckits rather than wasting time with those wimpy normal ckits. You could do this:

/set humanStage 2
/if \$humanStage\ > 1 "buy ackit" "buy ckit"

How does this work? Well, we set a cvar that tells the game what stage we are on the first line. Then, on the next line we use that cvar to pick which of the two ckits we buy. If our stage is above stage 1 (stage 2 is when the ackit is first available) we buy an advanced ckit. Otherwise, we just buy a normal one.

Now, you may say to yourself "Well, that's lame. I have to set a cvar before I use the cvar in the if statement. That means I have to waste time and make even longer, more annoying binds. TremFusion sucks!" Well, first off, you suck, don't blame us for your shortsightedness and ugly face. Second off, think a little broader. If you set the humanStage cvar when you stage up, it can automagically change all of your binds. What if you have a single bind for armouring up?

/set humanStage 2
/if \$humanStage
....

And that's when Ender realized that the conditionals doesn't have syntax that allows for nested conditional statements. Bah. Grrrr. Guess I'll have to wait for client-side scripting.