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

Performing different tasks using Facial Recognition

I was both the first and last to convey this message to him. I leaned in both times and said

AWS Automation using Terraform

NIUPOT

Week#1 : Python history

mysql command on mac using xampp

Learn Node.js and JavaScript Because It’s Just Plain Fun

Network Fundamentals — Protocols

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

Running Tensorflow on AMD GPU

Reporting the large amount blockchain transcations for you.

TensorFlow GPU 2.7.0 on Windows 10

Back To Algo Basics