> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markz3d.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating a new trick

While riding, players hold the left mouse button and draw a shape with the mouse. Every shape is a trick.

A shape is a list of directions, in the order they are drawn: `right`, `upright`, `up`, `upleft`, `left`, `downleft`, `down`, `downright`.

> [!WARNING]
>
> A new trick needs its own animations, for both the player and the skateboard. We do not provide them, they have to be created and streamed by you.\
> \
> This is not a config only change, it requires some actual animating skills.

**1. Open the `config.lua`**

**2. Scroll down to the section labeled `Config.Tricks`.**

**3. Now, you can create a new trick.**

Following this format:

```lua theme={null}
["backside180"] = {
    label = "Backside 180",
    pattern = {"downleft", "left", "upleft"},
    order = 10,
    waitFinish = true,

    playerDict = "clip@my_skate_movement",
    playerName = "backside180",
    propDict = "clip@my_skate_prop",
    propName = "backside180",
},
```

`backside180` *refers to the name of the trick, players never see it.*\
`label` *is the name shown to the player when the trick lands.*\
`pattern` *are the directions to draw, in order.*\
`order` *is the position in the skatepedia list, lowest first* (optional, default: sorted by label)\
`tolerance` *is how precisely each direction has to be drawn, in degrees. Raise it to make a trick easier to land* (optional, default: 35)\
`waitFinish` *blocks any other trick until this one's animation is done* (optional, default: false)\
`jumpMult` *multiplies how high the board pops, 1.2 is 20% higher* (optional, default: 1.0)\
`playerDict`, `playerName` *the animation played on the player, which you have to create and stream yourself.*\
`propDict`, `propName` *the animation played on the skateboard, which you have to create and stream yourself.*

> [!NOTE]
>
> Use `waitFinish` for tricks that end mid spin, like a 180 or a 360. Without it the player can start another trick before the board finished turning, and the animation snaps back.

**4. Add the picture for the skatepedia**

The skatepedia shows a small picture of the shape next to each trick.

Put yours in `utility_skate/web/trickspaths/` named after the trick, so `backside180.png` for the example above.

> [!NOTE]
>
> Without this file the trick still works, its skatepedia entry just has no picture.

***

## Choosing a shape

A short shape contained inside a longer one always loses to it.

An Ollie is `down, up`, and drawing a Hardflip (`down, left, up`) passes through a `down, up` on the way, so the Ollie only lands when the mouse **stops** there.

> [!WARNING]
>
> If your new shape is the start of an existing one, or an existing one is the start of yours, the shorter of the two becomes harder to land on purpose.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.