# custom effects

With cr-effects you have the ability to use "custom" visual effects with something called timecycle.\
With timecycle there is a ton of already built in visual effects in fivem, but you can also make your own visual effects with the timecycle editor.\
\
On this page you will learn how to use these effects and create your own.

## The built in effects from fivem

You can find all the diferent effects on this page: <https://github.com/DurtyFree/gta-v-data-dumps/blob/master/timecycleModifiers.json>\
\
Below is an example of how the list works. The name is what we are gonna focus on.

```json
    "Name": "polluted",
    "DlcName": "basegame",
    "ModificationsCount": 14
```

To use the effect you will need to add the name of the effect in to the config under the custom section as the effectName as you can see below.

```lua
Custom = {
                enabled = true,
                effectName = "polluted",
                transition = 1000,
                strength = 100,
                time = 5000
            }
```

After that you need to set all the other variables to what you want.

And thats it, you can now use that effect with your chosen item.

## Creating your own effects

To create your own visual effect you need to use something called the **FxDK mode** which comes with fivem as you install it.\
To find it you need to navigate to where you installed fivem. and open up **FiveM - Cfx.re Development Kit (FxDK)** as shown below.

<figure><img src="https://3166413625-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5XfNDO9Oz9yJyIeJ52ee%2Fuploads%2FEiEDVY8kS0euArwJ32L1%2Fbild_2023-09-19_192751187.png?alt=media&#x26;token=726d9d64-cc33-434e-8dd8-21d30544d18c" alt=""><figcaption></figcaption></figure>

Once opened you need to press the start button at the top left as shown below.

<figure><img src="https://3166413625-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5XfNDO9Oz9yJyIeJ52ee%2Fuploads%2FJMdIggsIeAMdcHkIZ9dE%2Fbild_2023-09-19_192937660.png?alt=media&#x26;token=0129b31d-c3a9-484f-ace8-985034eb546d" alt=""><figcaption></figcaption></figure>

When you have done that you will start a "self hosted server", in this server you need to press F8 to open up the console, and in here you need to type **timecycleeditor 1** to open up the tymecycle editor where you will create your effects.

<figure><img src="https://3166413625-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5XfNDO9Oz9yJyIeJ52ee%2Fuploads%2FTJM8E1BpNTgnFxJt5IiR%2Fbild_2023-09-19_193303400.png?alt=media&#x26;token=fdb240b5-ef48-4be4-853f-4f41f63df703" alt=""><figcaption></figcaption></figure>

When you have that opened you can start by giving your effect a name in the Name section at the top then click create (this is the name you will use to call it in cr-effects config/exports).&#x20;

Once created you need to add your effects/variables.&#x20;

{% hint style="info" %}
To see your changes you need to click **Apply as primary.**
{% endhint %}

<figure><img src="https://3166413625-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5XfNDO9Oz9yJyIeJ52ee%2Fuploads%2FCDs0UQD6nBXD4l11Qijg%2Fbild_2023-09-19_193710333.png?alt=media&#x26;token=2d7adc71-cd68-43c4-be78-d2a489ed08c4" alt=""><figcaption></figcaption></figure>

Search for a variable/effect and then click add. it will then popup as a variable in your effect, now you just need to play around with the values to get the effect that you want. You can add multiple effects/variables to get the effect that you want.

<figure><img src="https://3166413625-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5XfNDO9Oz9yJyIeJ52ee%2Fuploads%2FlbopI19ABKafbQNN8y9w%2Fbild_2023-09-19_193924485.png?alt=media&#x26;token=392139d6-ed2c-4b6b-9e38-afa444e54d61" alt=""><figcaption></figcaption></figure>

When you are happy with the effect you created you then click **Generate XML**.

<figure><img src="https://3166413625-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5XfNDO9Oz9yJyIeJ52ee%2Fuploads%2Fkxkc18IEbnvOLMQX9XKu%2Fbild_2023-09-19_194158637.png?alt=media&#x26;token=fef05bdc-b735-438f-952f-9bbe86e67633" alt=""><figcaption></figcaption></figure>

Copy the content and head over to your cr-effects resource and navigate to the data folder and make a new XML file and name it what ever you like. Paste what you copied from the timecycle editor in to that file and save it.&#x20;

<figure><img src="https://3166413625-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5XfNDO9Oz9yJyIeJ52ee%2Fuploads%2FKZc8pBcjIxRzk9nrgVq3%2Fbild_2023-09-19_194602208.png?alt=media&#x26;token=7b1b1997-c189-4e59-bbbe-49b8f9cc313b" alt=""><figcaption></figcaption></figure>

And The effect is done.\
\
To use the effect see [#the-built-in-effects-from-fivem](#the-built-in-effects-from-fivem "mention") It is the same principle.
