The Sims 3: Editing motives
This is a guide explaining how to edit the decay of motives. The XML which we will be editing affects a lot of stuff, which is why I won’t put my edits up for download – there’s simply too high of a possibility for conflict with other mods. So far I’ve successfully edited the decay rates for vampires and aliens, so it’s definitely useful!
This turned out to be quite lengthy, so if you’re already familiar with how the Motives XML looks like you can skip directly to step 4.
1. What you'll need
-
The Motives XML resource.
2. Getting the XML
Most of the XMLs and ITUNs that alter minorish game behavior are in the GameplayData.package file. You will find this in your installation folder, under The Sims 3 \ Game \ Bin \ Gameplay. You should never edit game files directly, so if you want to play it extra safe you can copy it somewhere else.
Open the GameplayData.package with S3PE; make sure you have 'Names’ and 'Tags’ checked and click on the ‘Name’ column to sort the resources alphabetically. Navigate to the Motives XML (the one with the simple name, not the one with the instance number next to it), right-click it, select Export \ To File…, and choose a location. Do not rename the file, leave it as-is!
If you want to search more efficiently, write your query in the ‘Name’ field, check it, click the ‘Set’ button, then check ‘Filter Active’. This is what I did below:
3. Reading the XML
Open your XML in a text editing program (for example, Notepad or Wordpad). There are a looot of numbers and words there, seemingly a jumbled mess. But don’t worry, they’ll make sense in a minute.
Motives are contained within <Motive>…</Motive> tags and have pretty intuitive names, so the one you’re looking for should be easy to locate with a simple Ctrl-F. The motive’s name is stated in the header, which looks like this:
<Tuning kind=“Hunger” universal=“True” insatiable=“False” intensity=“10000” ageSpecificity=“All” traitSpecificity=“Unknown” decayType=“VariableDecayByMoodlet” decayValue=“12” initialMin=“0” initialMax=“0” timeRandomness=“0.5” hasDefaultValue=“False”>
</Tuning>
I haven’t worked with all of the variables, but these are the most important:
-
universal: this motive applies to all controllable creatures;
-
insatiable: whether the motive can be satisfied;
-
ageSpecificity: what age the motive applies to;
-
speciesSpecificity (some): what species the motive applies to.
Some motives, like Bladder and Hunger, have multiple instances depending on species and/or age (e.g. Sim babies and horses have different Hunger decay rates); in this case, make sure to check the variables in the header to know which instance you need to edit.
The last section within <Motive> is <MotiveBuffs>, which is the one we’ll mostly be working with. It is divided in intervals, with separate decay rates:
<MotiveBuffs>
<BuffTrigger TriggerValueStart=“-100” TriggerValueEnd=“-81” AddBuff=“Starving” RemoveBuff=“” CustomClass=“” Decay=“0.7916667” />
<BuffTrigger TriggerValueStart=“-80” TriggerValueEnd=“-61” AddBuff=“VeryHungry” RemoveBuff=“Starving” CustomClass=“” Decay=“0.7916667” />
<BuffTrigger TriggerValueStart=“-60” TriggerValueEnd=“-36” AddBuff=“Hungry” RemoveBuff=“VeryHungry” CustomClass=“” Decay=“8” />
<BuffTrigger TriggerValueStart=“-35” TriggerValueEnd=“100” AddBuff=“” RemoveBuff=“Hungry” CustomClass=“” Decay=“11.25” />
</MotiveBuffs>
Again, we have some variables:
-
TriggerValueStart and TriggerValueEnd: the limits of the intervals. Must not overlap!
-
AddBuff and RemoveBuff: add moodlets or remove existing ones.
-
Decay: the rate of decay within a particular interval.
4. Editing the XML
Honestly, the editing itself depends on what you want to do. Most of the time it’s literally changing some numbers. You can make a motive static, change the decay rate, change the moodlets a stage adds/removes, divide the decay intervals even further etc. To explain better, I will use my own edits as examples.
4a. Making vampire thirst decay slower
This is a very simple edit: I created new intervals and modified the rate of decay for them. No modifications to the header. I divided the final interval, previously [-35, 100], into two, [-35, 65] and [66, 100], with a very low decay rate for the second interval.
<BuffTrigger TriggerValueStart=“-35” TriggerValueEnd=“65” AddBuff=“” RemoveBuff=“Thirsty” CustomClass=“” Decay=“11.25” />
<BuffTrigger TriggerValueStart=“66” TriggerValueEnd=“100” AddBuff=“” RemoveBuff=“Thirsty” CustomClass=“” Decay=“0.5” />
This means that a vampire’s Thirst motive will decay much slower when it’s within the 66-100 range, and normally when it goes below 66. I chose this as a workaround for the 'Sated’ moodlet not delaying thirst decay – there was a mod that did this but it stopped working for me, and this edit does work.
4b. Making alien brain power decay
Alien Brain Power is normally static unless the Sim is skilling or summoning meteors, so things are slightly more complex than editing the Vampire Thirst motive. We have to look at the header:
<Tuning kind=“AlienBrainPower” universal=“False” insatiable=“False” intensity=“5000” ageSpecificity=“All” codeVersions=“EP8” traitSpecificity=“Unknown” decayType=“VariableDecayByMoodlet” decayValue=“0” initialMin=“0” initialMax=“0” timeRandomness=“0.5” hasDefaultValue=“False”>
</Tuning>
In this case, decayValue is set to 0, which means the motive will not decay on its own, like others do. In my edit, I simply copied the values from the Energy motive, which are: decayValue=“24″ initialMin=“83” initialMax=“83″.
Now that we’ve ensured the motive will decay, it’s time to edit the intervals. This is the original coding:
<BuffTrigger TriggerValueStart=”-59" TriggerValueEnd=“100” AddBuff=“” RemoveBuff=“ABPMentallyRavenous, ABPRestorationRequired, ABPNeedRestoration” CustomClass=“” Decay=“0” />
And this is my edit:
<BuffTrigger TriggerValueStart=“-59” TriggerValueEnd=“-1” AddBuff=“” RemoveBuff=“ABPMentallyRavenous, ABPRestorationRequired, ABPNeedRestoration” CustomClass=“” Decay=“4” />
<BuffTrigger TriggerValueStart=“0” TriggerValueEnd=“100” AddBuff=“” RemoveBuff=“” CustomClass=“” Decay=“4” />
The rate of decay for the Energy motive is around 6.333, so I chose the middle ground to still make aliens “special” in some way. The initial interval allows a staggering margin for no motive decay, and it’s always been annoying to me how aliens need to refill the motive very rarely compared to a regular Sim.
5. Getting the edit in the game
Open up S3PE and create a new .package (Ctrl-N). Go to Resource \ Import, navigate to your edited XML, select it, click OK, and save the .package. Move it to Mods \ Packages afterwards and voilà – you’re almost done! Now go to your TS3 folder in My Documents and delete the scriptCache.package file (don’t worry, the game will recreate it on the next play session). From personal experience, you won’t need to reset Sims for the changes to show up.
6. Keep in mind
-
These edits apply in normal conditions, without other factors speeding up or blocking the motives in any way. For example, editing an alien’s brain power decay here will not make the motive decay at this rate when it summons a meteor (the motive just plummets). Likewise, the “Too Much Sun” moodlet will make a vampire’s thirst motive decay much faster than usual.
-
Make sure you check for conflicts! A quick way to do this is to copy the instance number of the XML, merge your packages, and search the final .package for this instance like I did above. If it shows up, you should track it down and either remove it, or merge your edits with it. If it doesn’t, you’re good to go!