# 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="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FzzDpvyAseMArvM9MUzpO%2Fimage.png?alt=media&#x26;token=51ba27a5-04cd-4e7f-a3bc-8cbfca1f49cc" alt=""><figcaption></figcaption></figure>

2. Double Button Entry (Increase/Decrease)

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FHSVxMdSMptgBZ7f1Zni2%2Fimage.png?alt=media&#x26;token=9a7954d5-ce57-4c67-b89a-cd7a8c198e8e" alt=""><figcaption></figcaption></figure>

3. Drop-down Entry

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FRbk18agUlmomgHLFd3Wh%2Fimage.png?alt=media&#x26;token=32c039d7-75e3-41a8-8816-36008cc4f027" alt=""><figcaption></figcaption></figure>

4. Slider Entry

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2Fx5tsrXSnUCK6YWd5jS1e%2Fimage.png?alt=media&#x26;token=08b5d4e6-5d7e-49de-a955-bf906d95ad26" 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="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FMT1MAdJzobKv2C4mvqni%2Fimage.png?alt=media&#x26;token=6866f25e-3b4a-4659-8e82-026356c9d947" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FSztvxbsTlnPxc7wVc40n%2Fimage.png?alt=media&#x26;token=aa7b5482-8748-47be-b3c8-9ea4b5be8dd1" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FiOth1i8vFEw49Gf1xwGJ%2Fimage.png?alt=media&#x26;token=975c1133-371a-4c1c-9357-fa608ee337a4" 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="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FCmmyzYz5UXFEVCmTrnPV%2Fimage.png?alt=media&#x26;token=7cf81368-3793-4f44-b69f-e0cb2e27fe69" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FDDpHs5yedE1iUwDDYdDB%2Fimage.png?alt=media&#x26;token=383ca3b6-f081-4d64-8dc2-4ee2890ebe8a" alt=""><figcaption></figcaption></figure>

Add your new setting tag to the Switch node:

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FiRaZROWZUNLkSksEKV4F%2Fimage.png?alt=media&#x26;token=adf7a97d-f414-4957-9bb9-9a7e4bc6f445" 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="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FfGun1Iq58WhAOEpHzjyu%2Fimage.png?alt=media&#x26;token=ccbd4147-03e1-4f83-ba94-dbb4f0afe57a" 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="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2Fjz9yaaeeeB4EqS37MQ2c%2Fimage.png?alt=media&#x26;token=d14db9cc-41ea-4bd2-bafd-40b6a936dc82" 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="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FYlzSFFvT3qQrwrDDqtnE%2Fimage.png?alt=media&#x26;token=11daf1cb-7866-4521-9465-69dabe058270" 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="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FZLVtxfIEsGXWpSYwh64U%2Fimage.png?alt=media&#x26;token=661703a9-b98a-4406-b798-2919516a834a" 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="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2Fl6lKRlbQ7g4Ftxwb0WTk%2Fimage.png?alt=media&#x26;token=2eaf2e4a-3f2a-4152-8df3-2caf8324995d" 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="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FgF85x3bZeB6nOMyEV3TD%2Fimage.png?alt=media&#x26;token=e2bd6cb8-00da-4e57-9539-73645888e2c7" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2Fv1IoJ3v311vxltig9iRD%2Fimage.png?alt=media&#x26;token=1aa91b86-1af8-474e-96e2-d53606b27bf3" 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="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FRQRRWStnLfnFI8vPrUoC%2Fimage.png?alt=media&#x26;token=72c5409c-1354-47f4-8479-428de306fcaf" 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="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2F6KeYzvYCQDJSI1RcZcgy%2Fimage.png?alt=media&#x26;token=f91fd125-ff2a-4c79-af3a-e6108c02c52c" 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="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FpwYf2kzZHF4ttskq8xLu%2Fimage.png?alt=media&#x26;token=d997d00a-2f26-499b-94d3-27803b4b1d68" 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="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FLZKtVIDWclh8NTOiiehL%2Fimage.png?alt=media&#x26;token=3f237952-cf9d-4211-a794-1eae23280d68" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FX49jJnBdcOkFr2x4IDub%2Fimage.png?alt=media&#x26;token=f2370a2c-2969-4090-b222-17597d5580bc" 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="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FoHAnLdS99SUAdk0Bi0hJ%2Fimage.png?alt=media&#x26;token=2cf16dc9-8c7c-4f5a-8336-d02f216d0397" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3303637552-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOAGs3il6rJbkejwPOlEP%2Fuploads%2FiTInMcbPDWmtev8TEto5%2F2025-02-16%2023-46-02.gif?alt=media&#x26;token=315780a2-8b56-451f-8555-b20ee619f7b9" alt=""><figcaption></figcaption></figure>
