Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Lab Assistant
Original Poster
#1 Old 23rd Jul 2021 at 10:16 AM
Creating CallTree-Based Plug-Ins For Objects
Thought I might share an idea that's been at the back of my head, hoping to solicit some advice on the practicality of the endeavour.

I was thinking to add Call-Tree-based plug-in implementation to some objects, for example the mailbox. The cleanest way I can think of would be to have a single added TTAB function that seeks out appropriate universal-object-flagged modder-created controllers and executes via Call Tree whatever TEST/Interaction functions are desired. Creating a mailbox mod would then be an issue of having the main override installed and cloning a provided controller template. A framework like this would allow for many mods to be created for items while lowering conflicts (so long as there is sufficient interest for people to create mods/make their mods compatible for the system). There is a Maxis precedent for this - it's analogous to how the fridge builds its menu. I'm fairly confident in my ability to put this together.

Concerns: Is having every mod have its own global controller just to add at minimum one custom interaction to an object a valid idea? Slightly mitigated if creators make several mods of their own inside their controller, but this won't always be the case. Is there a demonstrable performance impact for having many formless, out of world global controllers that Idle all day long, or is it a non-issue? I've considered also creating the controllers on-demand, similar to how social interactions seem to work, but that would make it necessary to pollute the 'core' file with readable controller GUIDs which would impede the flexibility this system is meant to provide in the first place.

Also, does this sound like anything other modders would be interested in? (I know I want it for a set of my own mods, at least.) If so, what other features would you like to see in something like this? I'm not sure if anything like this has been looked into before (if it has, I haven't found it! )
Advertisement
Alchemist
#2 Old 1st Aug 2021 at 6:27 PM
I think it's a great idea.
Lab Assistant
Original Poster
#3 Old 24th Aug 2021 at 12:17 PM
Quote: Originally posted by omglo
I think it's a great idea.

I hope modders including yourself will be able to make some really cool stuff with it!

Here's a small update - the framework works perfectly! Two controllers are shown below, simulating two creators' mods within the framework, each containing two interactions for a total of four separate, discrete interactions.



I'm pleasantly surprised by the flexibility of it. Subqueue interactions are supportable. Will likely release the framework along with the mod I wanted to make with this in the first place!
Space Pony
#4 Old 12th Sep 2021 at 7:35 AM
Looks awesome. I'm curious if such interactions could be autonomous.
Lab Assistant
Original Poster
#5 Old 26th Sep 2021 at 11:48 AM
Quote: Originally posted by Nopke
Looks awesome. I'm curious if such interactions could be autonomous.


Glad you like it!

It's probably best to leave the 'Push Interaction From Controller' interaction non-autonomous. I'm not entirely certain how Sims autonomy handles dynamically built menus - the TEST override of the mailbox runs a tree within found controllers to create the Pie Menu option, and the Stack Object ID of that controller will be passed to the function when that Pie Menu option is selected by the player , but I don't know autonomous interactions handle this correctly (if anyone knows and can chip in, that would be great!)

That said, I think that Sims should be able to to autonomously pick interactions from the controllers themselves if they are flagged appropriately and advertise correctly. Will verify once I have the time
Back to top