Create a Mod – Create a Reward Trait

13
7238
- Advertisement -

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

  1. Open Mod Constructor, type in your Creator Name and Mod Name, then click Create Mod:
  2. Click Settings:
  3. 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.

  1. Click Create Resource:
  2. Enter a Resource Name, select !!Create Trait, then click Create Resource:
  3. 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:
  4. Click Misc and check Create Reward Resource:
  5. Follow the Editing the Trait section of the Custom Traits Part I tutorial to customize your Reward Trait.
  6. When you’re done editing your trait, click Export Package:
  7. Enter your mod name into the File name box and Save it to your Desktop for now because there’s more edits to do:

  8. 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

  1. Open S4S (make sure you have the latest version)
  2. Click on My Projects:
  3. Find and select your Reward Trait package, then click Open. Your Reward Trait should now be loaded into S4S.
  4. 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 

  1. Click Tools > Extract Tuning…
  2. Search for whims_tracker, select module/whims.whims_tracker, then click Add to current package:

    Close the Export Tuning box.
  3. Scroll to the bottom of your package and Delete the whims_tracker Sim Data file:

    This Sim Data file is not needed.
  4. In the box, make sure the file says Sim Data with Instance CEE9A466EBFC13D1, then click OK.

Editing the Whims Tuning File

  1. Select the newly added whims_tracker, click to the left of the first <U> to place your cursor, then press Enter:

  2. 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>

  3. Click the arrow next to Local Tunings:
  4. Highlight the entire line that has _Reward_ in it, then right-click and select Copy:

  5. Highlight the xxxxxx<!–xxxxxx–> part of the <T n=”key”></T> code that you pasted in Step 2:
  6. Right-click and select Paste:
  7. It should now look like this except with your Tuning number and name:
  8. 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.

  1. Select the Trait Tuning in the resource list of the package:
  2. Open Notepad (or any editing program) and copy & paste the display name, icon (just the last set), and the trait description into Notepad:
  3. Select the Sim Data with the same Instance number as the Trait Tuning:
  4. Copy & Paste the display name, icon, and the trait description from Notepad to the Sim Data resource:
  5. 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:
  6. Click Save:
  7. Close S4S, then move the mod into your game and test!

And we’re finally done creating our Reward Trait!