# Adding New Settings

The Settings menu uses **a single generic widget** for all entries: **W\_Settings\_Entry**. This widget has the capability of supporting 4 different settings:

1. Single Button Entry

<figure><img src="/files/PwSRfifDlZ90QLEpe3T0" alt=""><figcaption></figcaption></figure>

2. Double Button Entry (Increase/Decrease)

<figure><img src="/files/9KeuBjiuDfDipcyeyLZm" alt=""><figcaption></figcaption></figure>

3. Drop-down Entry

<figure><img src="/files/1shxkoIUr0boVh1dxnb0" alt=""><figcaption></figcaption></figure>

4. Slider Entry

<figure><img src="/files/Qt8zKQGQAYBJDg1wOU8N" alt=""><figcaption></figcaption></figure>

### Adding a New Setting from Game User Settings

We will use the **Double Button** style to create a new setting entry for **toggling on/off VSync**.

Start by heading into the generic setting entry widget: **W\_Settings\_Entry:**

<figure><img src="/files/yhgkFgklaktWybgln12z" alt=""><figcaption></figcaption></figure>

Go into the Event Graph and head inside the collapsed Initialization graph:

<figure><img src="/files/6Do3sQL16CwUVtv93haK" alt=""><figcaption></figcaption></figure>

Add a new tag for your setting. For this example, I've added **SoulslikeFramework.Settings.VSync**:

<figure><img src="/files/HWlhtTik6OpFKm10fjjt" alt=""><figcaption></figcaption></figure>

Now, we'll set the entry type to **Double Button** and ensure that the new setting is retrieved from the **GameUserSettings**:

<figure><img src="/files/Fr0LiutFLdyBDblAmvmD" alt=""><figcaption></figcaption></figure>

Go back into the Event Graph and go into the **Double Button Settings** node:

<figure><img src="/files/iafJ6yR7yz4PbuCpvVcK" alt=""><figcaption></figcaption></figure>

Add your new setting tag to the Switch node:

<figure><img src="/files/EGu95k947KkNIlxQwLM8" alt=""><figcaption></figcaption></figure>

Then, when the increase button is pressed, we want to basically toggle the setting on/off. We can achieve this like so:

<figure><img src="/files/TzyQ5J1gbagnIAskcMJa" alt=""><figcaption></figcaption></figure>

Do not forget to the same process for the decrease button.

Next, we want to add a new entry to our Settings widget. Head into **W\_Settings.** Add a new **W\_Settings\_Entry** widget to the vertical box:

<figure><img src="/files/6jgHXpb3TlMc8HAbwvSb" alt=""><figcaption></figcaption></figure>

Finally, ensure that you select the correct tag for your setting and customize the display name/description for your new entry:

<figure><img src="/files/pfHu7Lcb0o1M44WdJxA9" alt=""><figcaption></figcaption></figure>

### Adding a New Custom Setting

We will yet again use the **Double Button** style to create a new setting entry for **toggling on/off Blood**.

First of all, lets begin by adding a new flag for Blood in our custom game settings asset. Head inside **PDA\_CustomSettings**, and add a new boolean. Ensure that it's **default value** is set to be **True:**

<figure><img src="/files/iBOu8TFAUtV7L64M9FBk" alt=""><figcaption></figcaption></figure>

The custom game settings asset is stored in the **Game Instance** so it can easily be accessed from any class at any time.

Now, we'll need to adjust logic where blood effects are being applied. Lets start with **AC\_CombatManager.** Adjust all of the methods that spawn blood effects following this logic:

<figure><img src="/files/fM2asbWE5GkGzLkDnfeb" alt=""><figcaption></figcaption></figure>

Similarly, adjust methods in **AC\_AI\_CombatManager** for the effects on enemies.

{% hint style="danger" %}
This approach is quite simple and will disable all "hit" visual effects, even if they're not blood related. To determine if a hit effect is blood, you will need to implement your own custom logic.
{% endhint %}

Now, head inside **W\_Settings\_Entry** and into the collapsed Initialization graph. Add a new tag for your setting (**SoulslikeFramework.Settings.Custom.Blood** in our example):

<figure><img src="/files/C9lhJTsfq7auh7ZHdrcC" alt=""><figcaption></figcaption></figure>

Initialize the setting entry from our **CustomSettings** asset:

<figure><img src="/files/upQuU8AhM3U1YxVPViRf" alt=""><figcaption></figcaption></figure>

Next, head into the **Double Button Settings** collapsed graph. Add the new tag to both of the switches.

Ensure that you toggle our new boolean when increase/decrease buttons have been pressed:

<figure><img src="/files/GGZlkJ3DDUueLSkOMF5z" alt=""><figcaption></figcaption></figure>

Finally, lets add a new entry to our **W\_Settings** widget. You can easily duplicate elements under the **CategorySwitcher** to add/remove categories.&#x20;

<figure><img src="/files/3IzwaihzLwoq2fTRYWEa" alt=""><figcaption></figcaption></figure>

For example, we'll place this new setting in the Gameplay Settings category which is not utilized by default.

<figure><img src="/files/fvUY47u2NbvMrqHc4QxV" alt=""><figcaption></figcaption></figure>

Since we've adjusted the index count of our **CategorySwitcher**, we need to ensure that each category has a correct index assigned:

<figure><img src="/files/xrJxUZ0kPhIx145m4h2O" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/vGnqmrFLPh4Kz2FmVv1A" alt=""><figcaption></figcaption></figure>

That's it! Now we should have our setting on a new category that we've started utilizing:

<figure><img src="/files/ImZBpXMWFc6uJlUiJypH" alt=""><figcaption></figcaption></figure>

Now if we disable blood, you'll notice no effect is played upon dealing/taking damage!

<figure><img src="/files/CRWA8l67nNosEG12WaEY" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://soulslike-framework.isik.vip/extending-functionality/adding-new-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
