Home Artists Posts Import Register

Content

Since I'm not working on any serious mod at the moment, nor I'm playing the game, I figured out I can post some tutorial since it's been a while. 

I have some interactions exported in Sims 4 Studio, I picked them randomly for no particular reason, and we're going to break down the tuning for them.

Remember that the goal of my tutorial is not walking you through a mod creation step by step, but giving you the tools to read the tuning and make the game do what you want. Once you know what you're looking at, understanding what you need to edit to alter the sims behaviour will be easier. 

This tutorial is not meant to guide you into making a specific mod, but helping you to identify what you want to change to achieve a specific result.

So, the interaction I have here is the watch magic duel one. Now I actually picked this one because it has a constraint:

It also has a staging content, and mixer interactions attached to it. I wrote about these thing in a previous tutorial but we're going to look at them again here. 

The constraint is the very first thing we find:

You can read it quite easily since it's English, what does this do? This is used by the animation in this interaction to determine the position a sim must have in order to run the animation properly. In this one, we can see that the sim must assume a position around the object of the interaction (in this case, the other two sims running the magic duel interaction, which is the one calling this interaction we're looking at) inside a circle with a radius of 5, they must be facing the sims, and they must be on line of sight, able to see what's going on. 

You can find the constraint in a number of interactions and altering this setting can cause all sort of funny issues, from sims running the animation away from the object (try to clone a mailbox interaction, and try to run it, you'll see the sims running the post mail animation away from the mailbox, and the cause it the constraint not specified in the cloned interaction) to the interaction not running at all, depending on what interaction we're talking about. 

This setting sometimes don't work even on maxis interaction, we all have had the hug bug:

and the cause of this is the constraint (and the social group, posture in general work in a very weird way in game, but it's what allows more flexibility in running animation than in the Sims 3 and 2), it often happens with cloned interactions or custom social interaction if the constraint is not specified, so if you made an interaction and the animation is weird in game, altering or adding a constraint  is worth a try. Usually, but not always, this can be fixed by adding a constraint referencing the animation played in the interaction, this way:

this is a cloned mailbox interaction where the animation was playing away from the mailbox as I mentioned above, and telling the game to put the sim in a position compatible with the mailbox_mailLetter animation was enough to fix the issue. 

Next, in this interaction we have:

these are two pretty standard setting you can find in almost all the interaction. 

n="_saveable" t="enabled"

This can be either enabled or disabled, and you usually don't need to touch it. Can the interaction be saved or not? Meaning, if I close the game while this interaction is running, will it resume on loading the game again or will it be cancelled? Obviously, when set to enabled the interaction is saveable, if you quit the game and load again, the sims who were running this interaction will resume it, otherwise, the interaction will be cancelled. 

n="attention_cost"

this is usually set to 0.5, 1 or 0, there are interaction where this is set to 0.25, this setting is used by multitasking to determine how much the sims are focused on this interaction running and if they're allowed to run some other interaction along with it, like eating and watching TV. Usually, there is no need to change this setting either, but this is another setting that can cause weirdness so in case your sims are drinking while running the vacuum animations, setting this closer to 0 is worth a try.

n="basic_content" t="flexible_length"

Is what actually happens while this interaction is running. I covered the various kind of basic contents in another tutorial, they can be one_shot, flexible_length etc, but it's always what happens inside this interaction. Flexible length means that this interaction can go on until something that stops it happens, this something is:

1. You, the player, cancelling the interaction from the queue

2. The conditions in the n="conditional_actions", a setting inside the basic_content itself, and that's the next thing we'll be looking at:

Let's read this setting and see what it tells us. The conditional action is buff_based, the buff it's based on is buff_Suppress_Emotion_Idle, the participant is the target sim, so NOT the sim running this interaction, but the one running the magic duel one in this case, the timing of this condition is NOT_HAS_BUFF, what happens as a consequence of meeting this condition is EXIT_NATURALLY.

Let's translate this setting in something more compressible: when the sims the sim running the si_MagicDuel_Watch interaction is looking at stop having the buff_Suppress_Emotion_Idle, the si_MagicDuel_Watch should stop naturally. So the other sims stop the magic duel, and the sim watching the magic duel stop looking at them as a consequence. Unless this happens or you cancel it, this interaction can go on forever. 

Next we have another setting inside the basic_content

n="content" t="staging_content"

Oh, this is an interaction that runs other interactions inside it in no particular order, so the interaction running is this one, but the ones you see in game are actually the ones referenced in the affordance_links of this one, that are mixers! We'll see later what we can do with this information. 

Net up we have the 

n="basic_liabilities"

These are other conditions of this interaction, in this case a timeout, so that once this interaction runs, it must wait two minutes before running again.

These are some settings we can ignore, as you'll very likely never will need to edit anything else than the display name, which is self explanatory. Sometimes you will also need to edit the n="interaction_category_tags but this is mostly for autonomy and other things related to buffs (some buffs use these tags to determine if a sim is allowed to autonomously run an interaction, and this is better addressed in another tutorial. There are some things that also use these tags to give specific buffs to sim so in some cases you might want to edit the category tags to work inside some custom or maxis logic)

Next important thing here is the outcome, this is what happens as a result of this interaction, this interaction here runs two animations randomly after stopping, that are two social responses one excited and one horrified. As you see nothing determines which one is ran in here, we'll see later what we could do with this. 

We can ignore also the 

n="scoring_priority"

n="subaction_selection_weight"

n="target_type" (a notice about this, it's always better to use as a basis an interaction that is the closest you can get to what you're trying to achieve when making a custom one, but in case you modified it and the interaction suddenly stop running, changing this setting to something else like ACTOR can make the interaction run again, because it could be that you modified it in a way that the target type is different that the one of the base interaction you used. Looking at the target type of other interactions similar to the one you're making can help)

n="test_disallow_while_running" t="enabled"

This means that the sim cannot run this interaction while already running it, so they don't queue the same interaction over and over again. It's a self test, so the sim test themselves if they're currently inside this interaction and avoid running it again. 

n="test_globals"

I said it many times, the test global is the most important part of the interaction if it's not doing what you want it to do, and the first thing you need to check. 

Now let's see what we could do with what we know so far.

MOD ONE:

I want to change this interaction so that it cannot be run by children. 

This is an easy one, what you want is the Test Global, and specifically the age test here:

delete the CHILD age:

And children will not be able to run this interaction any more. 

MOD TWO:

I'm annoyed by the social response of the interaction being random, I want everyone to be excited by the magic duel but the elders, they have to be horrified. 

You want to change the outcome of the interaction. We here already have two outcomes, but as we saw they're random. What we want to do is add a test to these outcomes so that they happen with the conditions we want. This is a bit more complicated to do than removing something from the global test but not impossible. 

So we'll change the fallback_outcomes into potential_outcomes with a test:

This way, everyone will react excited but elders. 

We could also test the fallback_outcomes already in maxis tuning with the same kind of test, so this is not the only way to go about it.

MOD THREE:

I think this interaction is too long and I want it to last less.

This interaction is based on the duration of the interaction calling it, the Magic Duel, so changing this changes the behaviour but it can be done. What you want to edit is the conditional_actions so it's not based on the targetSim buff any more, but, let's say, time:

Changing this to time_based so the interaction stops after 5 minutes regardless if the magic duel is still running or not. 

MOD FOUR:

I don't want the sims assisting a Magic Duel to be scared

What you want to change are the mixers:

As you see we have 4 of them. And this is another mod that can be done in multiple ways:

You can open the mixer_MagicDuel_Watch_Scared interaction and edit the global_test of it so that only the sims of the age you want react scared to the duel or you can:

Remove the mixer from inside this interaction completely so it doesn't run any more inside the the list. 

MOD FIVE:

You know what? I'm annoyed by sims watching the duels and I want to get rid of it completely.

This is another mod you can do in multiple ways, one of them is editing the global test of this interaction we have here so that no one can run this interaction (one way to do this would be making a custom trait no one has, and that cannot be given to anyone and whitelist it in the test of this interaction so that only sim is with that trait can run it, but since no one has the trait, no one will be able to) or, and this is what we'll do now, we need to find out where this interaction is coming from. You can find this out easily by exporting the xml with The XML Extractor 

Once you have all the xml in one folder: 

Grab the ID number of the thing you're trying to find 

And run a windows search inside the folder to bring up all the xml referencing this number 

from here you sometimes you need to use logic, because as you can see it found some things that are obviously unrelated to magic duels but reference this number, but that's because there is a fish whose definition is the same number as the ID of this interaction. Obviously what we want here are the magic duels interactions, broadcaster and loot:

Specifically the loot (which is called from the broadcaster, which is called by the magic duel interactions) is what we want to change. And to get rid of the reaction completely, this should be enough:

Comments

MOLLORY

OK, agreed

Anonymous

Hello I like all you tutorial and mods to. I have question can do a mod were we add image file to the game somewere? sorry for bad english