Custom Tuning Tests (Sims 4 Script Modding)

What’s the point?

<V t="shared_language_level">
<U n="shared_language_level">
<V n="language" t="any_language" />
<V n="level" t="specific_level">
<T n="specific_level">10</T>
</V>
</U>
</V>

Overview of making your own test

  1. Create your test class(es)
  2. Create a test set that can parse your tests
  3. Create a test set instance that uses your test set
  1. Create a snippet for your test set instance
  2. Reference your test set snippet in other files

How to create a test class

BusinessOwnershipTest class definition

FACTORY_TUNABLES

BusinessOwnershipTest with FACTORY_TUNABLES added
<E n="subject">Actor</E>
<T n="invert">False</T>
<V n="business" t="specific_business">
<E n="specific_business">RETAIL</E>
</V>
<T n="fail_if_child">True</T>
<E n="subject">TargetSim</E>
<T n="invert">True</T>
<V n="business" t="any"/>
<T n="fail_if_child">False</T>

__slots__

test_events

test_events = (TestEvent.HouseholdChanged, TestEvent.BusinessClosed, TestEvent.AgedUp, TestEvent.LoadingScreenLifted,)

get_expected_args

def get_expected_args(self):
return {'subjects': self.subject}

__call__

BusinessOwnershipTest __call__ method

The completed test class

BusinessOwnershipTest final class

How to create a test set

Your custom test set
<V t="business_ownership">
<U n="business_ownership">
<E n="subject">Actor</E>
<T n="invert">False</T>
<V n="business" t="specific_business">
<E n="specific_business">RETAIL</E>
</V>
<T n="fail_if_child">True</T>
</U>
</V>

How to create a test set instance

How to create a test set snippet

Example test set snippet

How to use a test set snippet

<V t="test_set_reference">
<T n="test_set_reference">0000<!--my_file_name--></T>
</V>

--

--

--

I'm a modder for The Sims 4.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

CQRS & Event Sourcing III: the framework

Learning Golang Web API by Agung Setyawan, until the repository pattern segment

Process Builder in Salesforce

ATG’s black box blocking your e-commerce view? Replatform with microservices

Constructing a personal rails assistant An introduction to FactoryBot!

AWS Serverless: Continuous Build & Deployment

Upgrading PostgreSQL on AWS RDS with minimum or zero downtime

AWS Lambda with Static IP Address

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Frankk

Frankk

I'm a modder for The Sims 4.

More from Medium

Sitecore 10.2 — Exploring GQL — Experience Edge

Dungeons of Washington, D.C.: the contract C-9568

What can you gain by using the bench?

Not Every Restaurant ERP System is a Perfect Fit for You.