Forum Discussion
7 years ago
Thanks so much for sharing this, Turbodriver. :)
I tried it with a custom simreward trait and it wasn't showing up in game, and then I realized it needed to be loaded somehow, so I used a standard injector and added the lines:
And added to:
with:
Now it's showing up in-game. Yay. :)
Also, for anyone else wanting to make use of it, it looks like the forums censored parts with the first four letters of dictionary into "plum". I changed that part in my code as well to account for it.
I tried it with a custom simreward trait and it wasn't showing up in game, and then I realized it needed to be loaded somehow, so I used a standard injector and added the lines:
from sims4.tuning.instance_manager import InstanceManager
import injector
And added to:
# Example of injecting a new reward trait
register_satisfaction_store_reward(1234567890, 100, WhimsTracker.WhimAwardTypes.TRAIT)
with:
@injector.inject_to(InstanceManager, 'load_data_into_class_instances')
def _load_satisfaction_store_rewards(original, self):
original(self)
register_satisfaction_store_reward(1234567890, 100, WhimsTracker.WhimAwardTypes.TRAIT)
Now it's showing up in-game. Yay. :)
Also, for anyone else wanting to make use of it, it looks like the forums censored parts with the first four letters of dictionary into "plum". I changed that part in my code as well to account for it.