# Add a new Status Attributes (Stat Bonus)

Files used: ![](https://lh6.googleusercontent.com/qByxksGMV3XHP9nIwbdGBmgquGgydnkYbvygNmsCJfEUhmwYdUfejx7MUW3HK7FJyjnWdy4rq1uFmYXITJ376ftFThjUgB-r0dC7xMHk2fVIikTf3UsySyPyssaIBQl0CV2EfiduRwimU9VvVLbQRAgrC4pI3dtNy3xYB3Lmpf9dMqrQ_Fd2PI9sjznD)E\_ItemStatBonus, ![](https://lh3.googleusercontent.com/AgOx2OSeTmHBYNVrq1Ae5r-ZiCWYhW5W_loPgSZbi2fw674Ck85OrjBez8cdb5lXsEztE3wmrLpXOHSTGbpKs1g3hDebXQ4YypKD1khi2zfT0KXE20V_cv86cno9WG27pDqWJ8k3otIZVAu3FceyNXfyKtWnjHEcuBCdZFl5BBLHrDpZQnRerDnt1vHW)S\_Stats, ![](https://lh3.googleusercontent.com/LHj6tvc-8JA_wwbwhSDvxD7Airl18KetgBkEtG3ACSyKPamjdA7A7_PL-SeoOyuStWAcDsDepqxHGihqGZXMQ2jMvTDYfsbyRLqiecDMKlP9AH-KHlSdC8IuWxFOdjK4WoKkpHNaqCoLLfCJgQWG5wK8aVpdnil5H3Sr3_4ks-zEIHTR6sw5uiP8wAak)BPC\_RPGSystem<br>

## 1.) Modify the ItemStatBonus data table

Open the **E\_ItemStatBonus** and add a new entry called by your new stat.

<figure><img src="https://lh6.googleusercontent.com/5107afWKG8vibut1zVpbD3BMO2ZJIFqipQF0pSJaTk7QE5MvoJak4N6fOxyHsvXzG-njtpAzsv7pXTUeOR-xlU4Z_zE8e6LinEpqQWoKd2E3NDDD4on-PWVF-wAalNQrRd6yE53YWMJYwVijKxn0-voKxc9HMOX42Nidq_atNm16fXNIds3m5jAQ-WxF" alt=""><figcaption></figcaption></figure>

1. Open the **S\_Stats** and add a new variable

<figure><img src="https://lh5.googleusercontent.com/s1Ti1uAcc6ivV49Npakw4CxI_52t2yj_Ep4o-LreGM2aHq8EWIhB5PyzTMFCbfTYJElXzq2EEUaxBIL7vWeCUzryZT-qZus7uuUtbv86DnDJ8zxINwhTAtTY0OB7V2t_QoCzs6wRxssSbk6rLHyta50Sq57j_526dua4EnQ5k-lwnt5Q4_35qNjDWpYq" alt=""><figcaption></figcaption></figure>

1. Choose the correct Data Type, you can even create a new structure and add more variables if needed, you're not forced to use a float (The Life leech stat bonus is using a structure as an example)
2. Open the **BPC\_RPGSystem** and find the ‘**StatTemplate**’ function.
3. Duplicate it, name it correctly and open it.

<figure><img src="https://lh6.googleusercontent.com/AoMViDak_mRAakDAsNNEWpHLOMPyysWX39sl62crk2HYp7e38-bSE8bzMs3G5gXV_1A3_43Fu00A1Xgo1pNt6MFcQcph6RK-23GNkAHqnYEmvSI9gvSBgLFz8wM-Edl1VJLCsFMHJXqUlUPlerPFDER2RcpQDVh2GGUptaVWNlynlzKK6H3gZw74wfdC" alt=""><figcaption></figcaption></figure>

4. First of all, we need to change the enum of the ‘**GetStatBonus**’ node to our new one and in the ‘**Set Member in S\_Stats**’.
5.

```
<figure><img src="https://lh5.googleusercontent.com/_0umYb1rka6hxAXStzposP1qyvqrsJYHDBevmnjGzs2pQw2CvKVmK5v_tfdKHEcCayiCTWoa6_fra1j1-BQ2CQg_Yvtimh3LPopcydNH1LVtW2hUb_EO5j__J6bFa_qXJB2rVyr9VXBXa9L5UAjEVLTA6ZEm39aIkv8F4_XYjSmey7Rp1AxeF-QsFo4p" alt=""><figcaption></figcaption></figure>
```

6. This will set the **MyNewStat** base on all Stat bonuses of your own stat.
7. Open the ‘**CalcStatusStats**’ function, and go to the switch based on the **E\_ItemStatBonus**.

<figure><img src="https://lh5.googleusercontent.com/Nukh559bWoAb4iEDJHscNyBA-kHxpNEwE48xR25FD_-b9bOHZGJBdGSDT1nadmqLThP56r2C9RuMVBxWF8hJsis4Y7FKcufpTBE93Pyses1x4D7jGzUS_taL5MbHkuTfstOahAmGB6k2_PERFEiA-OJ4pbVFVzAQ3_FDAT3uRbX5yObp391yr7pwJWPf" alt=""><figcaption></figcaption></figure>

8. Depending on how you want to use **MyNewStat** you need to place the function in a different case on the switch. (***Take a look at the Vitality case***)
9. Open the ‘**GetStat**’ function and add a return node for your ‘**MyNewStat**’ Bonus.\
   \
   \&#xNAN;***(In this case, it’s a percent-only value, take a look into the other stats with Integer and Float values)***\ <br>

   <figure><img src="https://lh5.googleusercontent.com/JyPOnYjTOQeELAPRWH6toboLZ-DpGOdVYCFGPxOwOYl8RWaB16p1_jcd2CSVY2fWMisWS4ctLt8A8QzzwSyWfvJP9aUWZEUmxZBpoDU_6TOTbqTSMFPFiLsq-KczXRV1zz54W-77i1PjhLkQkEQSrax7WYqWaWL4v1KK3y6a_KonMt6G_kWPxI_9-P05" alt=""><figcaption></figcaption></figure>
10. **Congratulations**! You added your first own Stat bonus.
11. Now to get your new Stat visible in the Status Info UI you have to open the ‘**BPL\_RPGSystem**’.\
    Go to the ‘**GetSettings**’ function and select the ‘**DefaultSettings**’ local variable.<br>
12. &#x20;Add your stat to the ‘StatBonusCategories’ list to make it visible. You may want to add it also to the other lists.

<figure><img src="https://lh3.googleusercontent.com/YpcUrGUtiB36lzVh5U7432HgNAbHIr-fRfrS2U18fdhsRTh06Xv3SEgKH-ys4PjLqG7klO1UfHNtxd6jq0Jk4sshEUXSh5Bif5EPiIP-Yja0mU1gDD7zNV6nNMRkFAao57sfI053sL9YrXk1rfFUn2omsYUtlZyehVJTDkR0OlhkMqErCSryRUHrhaSh" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh5.googleusercontent.com/5GYQ_B03k8o8_Tqvl4R0KIk1_6XkRIQ_Ry7lopzNwt7YeH0ZkX3msWSW9H9ksZMBDi2v6aJ5NlZmtl_SzfRa9106U1fcV0sVunb8FGC0TdNITWpB6GHy7KXyPa-9PO93j3_-5Wri-wmLCKbTXBKBhfk6sGIugf7lnyvSN7yZz2hCFKFW1H5a2rSrM5_4" alt=""><figcaption></figcaption></figure>

8. **Done**!
