https://www.patreon.com/posts/how-to-start-38023976
Here is a tutorial on how to start a new custom tuning file so you don't override EA's files. I will be covering two methods so you know what to do in any situation, and for this tutorial you need Sims4Studio. Make sure to read the entire tutorial before deciding on a method as some files, like personality and preference (aka Likes/Dislikes) traits, can't use Option 1.
Before we begin, I will explain instances and tuningIDs (to the best of my ability). The instance is the unique name of a file in hexadecimal format, and tuning IDs are the instance converted into decimal. The S= you see at the top right of files is the tuning ID, and you also see the tuning IDs when referring to other files inside your mod, such as this number: <T n="cas_part">151095<!--vampirePerks_PersonaPowers_NocturnalAffinity_Level1--></T>. You don’t really need to understand what a hexadecimal or decimal is, just that tuning IDs are instances converted to a different format and are used to reference files. If you understand that you will be fine.
The first thing you want to do is create a package and find an EA file to clone as the base of your new custom tuning. You can start files from scratch, but it’s not recommended as it’s far more tedious. To start a package open Sims4Studio, go to the top where Tools is located and click on it, then select “Create Empty Package” from the dropdown menu. A popup will open asking to name the file. Name it whatever you want, but if you plan to release it please fill in your creator name, the name of the mod, and use underscores (not spaces or special characters, they slow the game).
When your empty package has loaded, go to Tools again and this time select “Extract Tuning…” and a popup will appear. You can also Batch Import your files into the package if you already have them extracted in a folder.
Once the popup has loaded (it may take a bit), find the files you want to use as a base. If you don’t know what to look for, try to remember an interaction, buff, etc. in-game that you’ve encountered that does something similar. Or, you should instead extract all the files, following this tutorial, and search the files until you find something that sounds like what you want, then Batch Import them like I mentioned before (the blue button at the bottom left). After you’ve found your files, select them (Ctrl + Left Click or Shift+ Left Click if you have a lot) then click “Add to current package”. Close the popup.
To stop a bug from happening that reverts your tuning IDs, at the bottom right of the screen Save your package then hit “Cancel” to close the package. Under My Projects on the right select the file you just closed to re-open it.
Note: This has been fixed recently but in case anyone encounters this bug again, or is using an outdated game and S4S, I am leaving this here as a solution.
Now that you have your files and saved your package to avoid that annoying bug, go to the first one you want to make into a custom file and click the Data tab on the top right.
Option 1
Look for where it says Name. Either delete the text inside that field and write your own, or adjust it, making sure to make it long and unique to avoid conflicts, then go to the beginning of the text and type “YourCreatorName:”. You must add the colon : otherwise this naming method won’t work. Now click outside the box anywhere and the numbers in the Instance and TuningID box will change. The TuningID, aka the S= number, on the XML tab will be changed as well! Don’t forget to save again, but you now have a custom tuning file.
Note: Keep in mind that some files like personality traits, preference (aka Likes/Dislikes) traits, and relationship bits (relbits) can't use this method because they are required to be 32bit instead of 64bit (personality and preference traits and relbits without 32bit break sim profiles and cause LUIE's). 64bit is the default when using the “YourCreatorName:” option, and is just a longer set of numbers. 32bit is a shorter set of numbers. There is no list yet (will publish later) of files that require 32bit, but traits are the only common ones that you'll encounter that do. Use Option 2 that I cover below for traits/relbits, copying the FNV32 option instead.