Forum Discussion
8 years ago
I couldn't change the puddle spawning but I think it's okay the way it is, it doesn't bother me that much.
I tried to make a script based off the one from this thread by replacing the names and interaction hash ids to inject the interactions to object_terrain but how should I add it to the package? Do I save it as .py and put it in the Mods folder or do I need a .pyo file too? If a .pyo is needed, how does that file need to be? This is my first time scripting so I'm not really sure.
Script:
I tried to make a script based off the one from this thread by replacing the names and interaction hash ids to inject the interactions to object_terrain but how should I add it to the package? Do I save it as .py and put it in the Mods folder or do I need a .pyo file too? If a .pyo is needed, how does that file need to be? This is my first time scripting so I'm not really sure.
Script:
import services
import injector
import sims4.resources
from sims4.tuning.instance_manager import InstanceManager
from sims4.resources import Types
TS40_PeeHere_Interactions_ObjectTerrain_sa_instance_ids = (15295192161465113131, 6192637829597138744,)
TS40_PeeHere_Interactions_ObjectTerrain_object_ids = (14982,)
@injector.inject_to(InstanceManager, 'load_data_into_class_instances')
def add_superaffordances(original, self):
original(self)
if self.TYPE == Types.OBJECT:
affordance_manager = services.affordance_manager()
sa_list = []
for sa_id in TS40_PeeHere_Interactions_ObjectTerrain_sa_instance_ids:
key = sims4.resources.get_resource_key(sa_id, Types.INTERACTION)
sa_tuning = affordance_manager.get(key)
if not sa_tuning is None:
sa_list.append(sa_tuning)
sa_tuple = tuple(sa_list)
for obj_id in TS40_PeeHere_Interactions_ObjectTerrain_object_ids:
key = sims4.resources.get_resource_key(obj_id, Types.OBJECT)
obj_tuning = self._tuned_classes.get(key)
if not obj_tuning is None:
obj_tuning._super_affordances = obj_tuning._super_affordances + sa_tuple
About The Sims 4 Mods & Custom Content
Find expert tips, troubleshooting help, tutorials for mods and custom content, and The Sims 4 patch files in our forum.15,847 PostsLatest Activity: 3 seconds ago
Recent Discussions
- 26 seconds ago
- 20 minutes ago
- 2 hours ago