Create a Mod – Create a Reward Trait teaches you how to create a purchasable reward trait from the Rewards Store (e.g., Night Owl, Creative Visionary). Before you begin, you will need:
Mod Constructor by Zerbu
Also, please make sure that you’ve followed these earlier tutorials:
Create A Mod – Programs for Modding
Create A Mod – Setting Up
Setting Up
- Open Mod Constructor, type in your Creator Name and Mod Name, then click Create Mod:
- Click Settings:
- Next to Experience Level, select Intermediate, then click Close:
Creating the Reward Trait
For this example, I’ll be creating a Healer Trait. Sims that buy this trait will make great doctors and brew excellent potions.
- Click Create Resource:
- Enter a Resource Name, select !!Create Trait, then click Create Resource:
- Make sure to check Create Trait and set Trait Simdata to Gameplay. Then, enter the Trait Name/Description and select an Icon for your Reward Trait:
- Click Misc and check Create Reward Resource:
- Follow the Editing the Trait section of the Custom Traits Part I tutorial to customize your Reward Trait.
- When you’re done editing your trait, click Export Package:
- Enter your mod name into the File name box and Save it to your Desktop for now because there’s more edits to do:
- Close Mod Constructor.
Modding the Trait
Unfortunately, for reward traits we have to do more adjusting in Sims 4 Studio to get them to show up in the game.
Load Custom Reward Trait in S4S
- Open S4S (make sure you have the latest version)
- Click on My Projects:
- Find and select your Reward Trait package, then click Open. Your Reward Trait should now be loaded into S4S.
- Click Tools > Modding > Restore tuning comments:
Then click Ok when it’s done. Doing this step makes it easier to read the tuning resources.
Adding the Whims Tuning File
- Click Tools > Extract Tuning…
- Search for whims_tracker, select module/whims.whims_tracker, then click Add to current package:
Close the Export Tuning box. - Scroll to the bottom of your package and Delete the whims_tracker Sim Data file:
This Sim Data file is not needed. - In the box, make sure the file says Sim Data with Instance CEE9A466EBFC13D1, then click OK.
Editing the Whims Tuning File
- Select the newly added whims_tracker, click to the left of the first <U> to place your cursor, then press Enter:
- Copy & paste this chunk of code into the new empty line:
<U>
<T n="key">xxxxxx<!--xxxxxx--></T>
<U n="value">
<E n="award_type">TRAIT</E>
<T n="cost">xxxxxx</T>
</U>
</U> - Click the arrow next to Local Tunings:
- Highlight the entire line that has _Reward_ in it, then right-click and select Copy:
- Highlight the xxxxxx<!–xxxxxx–> part of the <T n=”key”></T> code that you pasted in Step 2:
- Right-click and select Paste:
- It should now look like this except with your Tuning number and name:
- Inside the <T n=”cost”>xxxxxx</T> code, replace the xxxxxx with the point cost of your Reward Trait:
!NOTE! – Until I add how to do this with a Script mod, this whims_tracker resource needs edited for each custom Reward trait you add, just repeat the steps above. Additionally, the whims_tracker resource needs checked after each patch to see if it needs updated.
Copying Trait Info into Sim Data
Unfortunately, the Sim Data file for the trait doesn’t generate what it needs. If you don’t do this, the trait will not display properly after it’s purchased.
- Select the Trait Tuning in the resource list of the package:
- Open Notepad (or any editing program) and copy & paste the display name, icon (just the last set), and the trait description into Notepad:
- Select the Sim Data with the same Instance number as the Trait Tuning:
- Copy & Paste the display name, icon, and the trait description from Notepad to the Sim Data resource:
- Under Icon replace the first set of 00000000 with 00B2D882
Under trait_origin_description replace 0x00000007 with 0x7ACBD430
Change the trait_type from 0 to 1:
- Click Save:
- Close S4S, then move the mod into your game and test!
And we’re finally done creating our Reward Trait!