Welcome to TPE

> The English Version of the TwitchPlays\_Everything tutorial has been written by TPE, lucasortizny, and Kimimaru4000.
>
>

*For German, click here.*

Information on this page is confirmed to be correct.

## Welcome to the TwitchPlaysEverything Tutorial!

If you're here, that's because you found this channel and had nothing else to do! So welcome! Below is a tutorial written out originally on the channel description, but with some proper formatting, this makes the channel free to flow!

Core sections will be accompanied by a clip demonstrating the inputs.

#### ***Valid Inputs***

***Note: The valid inputs change based on the console the current game is on.***

Examples of console inputs:

* a, b, l, r, start
* up, down, left, right
* *Console-specific inputs*

Valid inputs that are always available include "#" and ".", which are used for delaying inputs (more below).

#### ***Input Duration***

* By default, buttons will be pressed for 200ms if no duration is supplied.

* Duration is supplied by putting "s" or "ms" at the end of the button for seconds and milliseconds, respectively.

* For example: "a b300ms right1s" will press 'a' for the default of 200ms, b for 300ms and right for 1 second.

* Another example: "b #500ms right100ms" will press 'b' for the default of 200ms, wait 500ms, then press right for 100ms.

#### ***Input Sequences***

**Demonstration**

You can press as many buttons as you want in a
message. It's recommended that you put spaces between inputs, but it is
not required.

* For example: "rightableft" is the same as "right a b left".

* The maximum duration of an input sequence is either 30 or 60 seconds depending on the game. The bot will tell you if you go over it.

#### ***Simultaneous Inputs***

**Demonstration**

* You can press multiple inputs simultaneously by placing a '+' character between them.

* For example: "a200ms+right1s" will start pressing 'a' and 'right' at the same time, but their durations will still apply.

* Another example: "b400ms+right500ms a300ms+up300ms" will start pressing 'b' and 'right' at the same time, and after their durations are complete, 'a' and 'up' will be pressed at the same time for their durations.

#### ***Holding and Releasing Inputs***

**Demonstration**

* You can hold an input indefinitely by putting a "\_" character before the input. **All held inputs will automatically be released at the end of the command string.**

* For example: "\_b right up a" will hold 'b' while pressing 'right' and 'up' and 'a'. When they're done, it will be released.

* You can release an input early by putting a "-" character before the input.

* For example: "\_b right up -b a" will hold 'b' while pressing 'right' and 'up', but release it before pressing 'a'
* **The default 200ms duration is applied for holding and releasing inputs as well.**

#### ***Delaying Inputs***

**Demonstration**

* You can delay an input for a specified duration using '#' followed by the duration

* For example: "a #500ms b" will press 'a' then wait 500 milliseconds before pressing 'b'

* This also works with held inputs. For example: "\_right #1s a #1s" will hold right, wait 1 second while still holding right, press 'a' while still holding right, then finally wait 1 second while still holding right.

* The period, '.' is shorthand for "#200ms" (Ex. "right . a" is equivalent to "right #200ms a")

#### ***Macros***

**Demonstration**

Macros are simply sequences of inputs the community have made that are useful. Macros start with a '#' character and can be very useful.

* Access a list of macros by typing "!macros" in chat

* Macros can be called within input sequences, and can even call each other

* For example: "#square" is a macro with the contents "up left down right" and "#jump" is a macro with the contents "a a a"

* If you type "#square #jump" into chat, what is read by the parser will be "up left down right a a a"

* While macros can be combined with other macros using the '+' character, their contents will be chained as if the sequences were separated from the macros. For example, the result of "#square+#jump" will be "up left down right+a a a"
* You can see a macro's contents with the !show command. Ex. "!show #square"
* You can get the duration of a macro with the !length command. Ex. "!length #square"

* Mods can add new macros. If you've got one you think is neat or helpful, ask them nicely to add it!

#### ***Dynamic Macros***

**Demonstration**

Dynamic macros were added in the Yoshi's Island run. They come in the form of #macroname(...). The input arguments are represented as asterisks (\*) in anything that references them (Ex. the macro list).

* Dynamic macros have a set number of arguments and are designed to work with any button inputs or numbers in those arguments.
* For example, a simple dynamic macro is "#mash(\*)" which can be used with any input. "#mash(a)", "#mash(b)", and "#mash(start)" are all valid uses of this particular macro.
* Another example is a dynamic macro with two arguments, #mashalternate(\*,\*). "#mashalternate(a,b)" is valid in this instance.
* A more advanced example involves arguments for wait durations as well.
	+ For example, take a look at the following macro: #presswait(\*,\*) = <0> #<1>ms <0> #<1>ms.
	+ This makes it press a given input for 200ms then wait a specified amount of time before doing so again. "#presswait(a, 500)" equates to "a #500ms a #500ms".
* To see dynamic macros, use the !show command on them. Ex. "!show #mash(\*)" will show the dynamic macro's contents. The numbers between <> signs represent the argument number. For example, "<0>100ms <1>100ms" in "!show #mashalternate(a,b)" equates to "a100ms b100ms"
* Since dynamic macros can have a variable length, you cannot get the duration of them with !length

#### ***Repeated Inputs***

**Demonstration**

Repeated inputs were added after the Super Mario World run. They come in the form of [...]\*number.

* For example: "[a]\*5" will press A for 200ms five times. It's equivalent to "a a a a a".
* You can repeat anything you want: "[b #34ms a500ms #400ms]\*2" is valid!
* You can repeat macros as well: "[#masha #1s]\*3"
* Nesting repeated inputs into each other is also possible. "[a [b400ms]\*2]\*2" is equivalent to "a b400ms b400ms a b400ms b400ms".

## TwitchPlays Tips!

Some general play advice as well as tips for handling common situations.

#### ***General***

* Cooperate with other players - Communication is key!
* Savestate often to prevent losing progress. Savestate into a new available slot each time in case there's a need to revert
* Pay attention to the state of the character(s) you control in the game. Oftentimes, you cannot perform certain actions until other actions are done (Ex. trying to jump while Mario is in the air). Consider the duration of these actions when inputting commands

* Type !macros to see a list of macros that can help with timings and performing some commands. !show macroname will show you what the macro does (Ex. !show #spama)
* If you have an idea for a new macro, feel free to tell a Moderator to add it
* Don't hesitate to ask questions if you don't understand the syntax
* Patience and perserverance: it takes longer to complete games through Twitch Plays, and there are many challenges unique to it, so sometimes there may be dull and difficult moments
* Have fun!

#### ***Delay***

Since Twitch Plays playthroughs are done on Twitch, there is some delay before your commands go through. Your delay can be seen by clicking: Settings > Advanced > Show Video Stats and looking at the "Latency to Broadcaster"

The delay makes it tough to deal with anything requiring quick reactions or timing, such as combat in many games. One safe way to go about this is to utilize Pause Buffering with savestates.

#### ***Pause Buffering***

A common way to get through tough challenges is to pause buffer.

Pause buffering can be achieved with the following steps:

1. Perform your commands, adding a pause at the end
2. If the result is satisfactory, save a state in a slot.
3. If the result isn't desired, load a state and go back to step 1
4. Repeat steps 1 through 3 until done

Examples:

https://clips.twitch.tv/ShakingWimpyFoxOhMyDog

https://clips.twitch.tv/UnsightlyTenderHawkDerp

Pros:

* Desired results most of the time
* Easier to handle RNG situations

Cons:

* Can't be used if the game doesn't allow pausing during certain challenges
* Sometimes very slow

#### ***Long Macros***

Another way to handle some situations is to build a long macro through trial and error.

1. Save a state at the start of the challenge
2. Repeat any previous commands that worked (skip if first attempting)
3. Add new commands at the end of the previous commands to progress
4. Repeat steps 2 and 3 until done

Examples:

https://clips.twitch.tv/CourteousRichGarbageRaccAttack

https://clips.twitch.tv/ShakingRudeAlpacaMoreCowbell

https://clips.twitch.tv/SilkyPrettiestInternWow

Pros:

* Can be used when pausing isn't available
* Looks nicer when it comes together

Cons:

* Can take longer than pause buffering for precise challenges due to bot mistimings and repeatedly waiting for long commands to finish to see results
* Won't work if the full command needs to be longer than the input limit (varies by game)
* Generally won't work well for RNG situations (varies by game)

#### ***Advanced***

There are rare situations that are either RNG-dependent or involve a time limit and simultaneously don't allow pausing. Combined with the stream delay, this makes these tasks seem daunting.

Examples we've encountered include:

* The Adult Archery Range in Ocarina of Time
* Combat and timed challenges for Grunty's Furnace Fun in Banjo-Kazooie
* Jarvis' Whac-A-Mole game in Luigi's Mansion

Here's an approach to dealing with them:

1. Save a state at the start of the challenge. Don't save over this state until the challenge is completed (important)
2. Start the challenge, ideally inputting your commands as well
3. Time a savestate so that it will save as soon as your command is finished
4. If successful, immediately load the previous state saved and input new commands to progress
5. Repeat steps 3 and 4 until the challenge is completed

#### ***Potential Issues and Workarounds***

If you're not a channel Moderator, it may be difficult to save/load a state and immediately input a command due to spam protection in Twitch chat. If the challenge's timing is strict, it may be preferable to have one player handle saving and loading states while another inputs the commands.

If savestates are not available in situations like this, the best option may be to create a macro that covers a certain set of inputs for the situation and hope it works out eventually.

* One example of this can be found here: https://clips.twitch.tv/ArbitraryWisePastaOptimizePrime