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!
Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 31st Jan 2024 at 6:49 AM
Default How to link custom interactions to traits?
So I just installed this mod right here...

https://simlogical.com/ContentUploa...e/uploads/1743/

And I was wondering if there was any way I could link the interactions to a certain trait myself?
Screenshots
Advertisement
Instructor
#2 Old 1st Feb 2024 at 12:57 AM
This mod doesn't have ITUN resources, which are where you can define required traits, but it is possible to add your own.
Documentation by NonaMena: https://simlogical.com/ContentUploa...e/uploads/1600/

Scribe of tutorials. Oracle of questions at NRaas. Blog staller at thecardinalsims. Feel free to @ me for input on any TS3/TS4 modding questions.
Test Subject
Original Poster
#3 Old 1st Feb 2024 at 7:00 AM
The links inside the documentation don't seem to be working…
Instructor
#4 Old 1st Feb 2024 at 7:40 AM
Simlogical went down quite a while ago, so much of it is archived.
First link: https://simlogical.com/ContentUploa...Explanation.pdf
Second link: https://simlogical.com/ContentUploa...e/uploads/1587/

Doesn't seem to be one for the third and final link, but the main steps cover most of the basics and the RequiredTrait field is mentioned and given examples in the ITUN Discussion. Hope that helps
Test Subject
Original Poster
#5 Old 1st Feb 2024 at 9:33 AM Last edited by DaOnlyLonely : 1st Feb 2024 at 1:20 PM.
Probably best if I give up on this, I have zero experience in modding and therefore have little to no idea what I'm doing even with the guide
Instructor
#6 Old 1st Feb 2024 at 11:15 PM
If you'd like to give me an example of what you are wanting to add, I can take some screenshots of the steps for you
Test Subject
Original Poster
#7 Old 2nd Feb 2024 at 9:43 AM
Sure that would help me out a lot
Instructor
#8 Old 3rd Feb 2024 at 10:03 AM
So, I may have the advantage of already being familiar with S3PE, but this was actually my first custom ITUN. We're both learning this from scratch, so no worries if it takes a few tries to get it just right.

I started with exporting one of EA's ITUN from the GameplayData (found in the game's install location, Game > Bin > Gameplay folder), the example NonaMena gave for one that uses RequiredTrait, but you can technically use anything similar to what you want and remove/add the snippets as needed.


Then- in the package that created- double-clicked the ITUN, gave it a new unique name, and clicked FNV64 to generate a new ID using that name. Then clicked OK.


In S3PE's Settings > External Programs, I have Notepad++ set as the text editor because it formats XML a bit more readable. That way I could right click the ITUN, select Text Editor, and it opened in Notepad++ for editing.
These are the changes I made, to make it refer to one of Kuree's interactions. I decided to make the Steal interaction exclusive for Kleptomaniacs.


A rundown of the changes:
- Interaction name required a bit of trial and error and looking at the S3SA file (the script) from Kuree's mod with the program ILSPY to find the correct class. The correct format was Kuree.ScriptName.Instantiator+InteractionName+Definition - the parts in italic are the unique parts.
- Also seen in ILSPY, I could see that the interaction is added to GameObject so the script name for that goes in Object name.
- Disabled for autonomous.
- Set the ages to Teen, Young Adult, Adult, and Elder.

- Added Kleptomaniac as the RequiredTrait
- Changed the Tradeoff name to match the interaction name.
- Replaced the original output, which was to add to the fun motive, with a basic trait advertisement that I grabbed from the existing Swipe interaction.

Changes in italics were optional, the others are necessary to connect to the right interaction.

After a few incorrect attempts at the interaction name, I got to the version seen in the example.
Tested ingame with Ma Bagley and Rhoda Bagley:


Hope that helps you achieve what you have in mind!
Screenshots

Scribe of tutorials. Oracle of questions at NRaas. Blog staller at thecardinalsims. Feel free to @ me for input on any TS3/TS4 modding questions.
Test Subject
Original Poster
#9 Old 3rd Feb 2024 at 2:54 PM Last edited by DaOnlyLonely : 3rd Feb 2024 at 3:45 PM.
Does it work with hidden traits? I tried looking for the Burn Something Nearby interaction in GameplayData but I can't seem to find it. Sorry for being this inquisitive, this is all practically rocket science to me lol
Instructor
#10 Old 3rd Feb 2024 at 11:31 PM
Quote: Originally posted by DaOnlyLonely
Does it work with hidden traits? I tried looking for the Burn Something Nearby interaction in GameplayData but I can't seem to find it. Sorry for being this inquisitive, this is all practically rocket science to me lol

That's nothing to be sorry for, trying to figure out new things is what this forum is all about

I would assume hidden traits can work too as long as you know what name it's under, which you can check from the Traits XML. In this case, it's just Pyromaniac.

The ITUN for their interaction is called PyromaniacBurnSomethingNearby_Sim. The S3PE search can be a little confusing at first- paste that in the Name text box of the bottom panel, check the checkbox beside it, click 'Set', then check 'Filter active'.
EA seems to distribute it in a scripted way rather than with RequiredTrait, but you can absolutely use that as the base and add the RequiredTrait line.

The interaction name for Kuree's interaction should be Kuree.SetFire.Instantiator+SetFire+Definition and the object name should be Sims3.Gameplay.Interfaces.IGameObject (if I'm looking at the script correctly).
Then add <RequiredTrait type="Pyromaniac" /> anywhere within the <BaseAvailability> tags.
If it doesn't work as intended, feel free to attach the package or a screenshot of the ITUN.

Scribe of tutorials. Oracle of questions at NRaas. Blog staller at thecardinalsims. Feel free to @ me for input on any TS3/TS4 modding questions.
Test Subject
Original Poster
#11 Old 4th Feb 2024 at 8:52 AM
Quote: Originally posted by CardinalSims
That's nothing to be sorry for, trying to figure out new things is what this forum is all about

I would assume hidden traits can work too as long as you know what name it's under, which you can check from the Traits XML. In this case, it's just Pyromaniac.

The ITUN for their interaction is called PyromaniacBurnSomethingNearby_Sim. The S3PE search can be a little confusing at first- paste that in the Name text box of the bottom panel, check the checkbox beside it, click 'Set', then check 'Filter active'.
EA seems to distribute it in a scripted way rather than with RequiredTrait, but you can absolutely use that as the base and add the RequiredTrait line.

The interaction name for Kuree's interaction should be Kuree.SetFire.Instantiator+SetFire+Definition and the object name should be Sims3.Gameplay.Interfaces.IGameObject (if I'm looking at the script correctly).
Then add <RequiredTrait type="Pyromaniac" /> anywhere within the <BaseAvailability> tags.
If it doesn't work as intended, feel free to attach the package or a screenshot of the ITUN.


[IMG][/IMG]

So I tried doing that and tested it out using Jessica Talon and Rafael Striker but it doesn't seem to work so I might be doing something wrong. I'm also under the impression that there might be two different set fire interactions; one for objects and one for terrain, or maybe they're the same and I'm just being dumb again, I'm not sure.

In case it's necessary, how do I make any of these interactions disabled on home lot cuz I really don't wanna misclick
Screenshots
Back to top