Recently I was asked by Leto85 if I could write a tutorial on how to read game files. I said yes. This is a basic guide to reading XML Files.
How to read XML Tuning FilesWhat you needS3PE.
A text editor, preferably Notepad or Notepad++ if you want to edit the files (I don't go into much detail about this in this guide)
A computer running .NET framework 4 (Windows) or MONO (MacOSX or Linux). If you don't know your version, you can find out by a quick Google Search.
Note: The directory that the .package files are stored in is Read Only. Therefore, you will not be able to easily screw up your game. However, as a precaution, I recommend that you back up gameplaydata.package first.
Okay, this is fairly easy to do. There is a guide to installing S3PE written by the creators
here.
Let's open GameplayData.package. This is done by going File > Open (or Ctrl+O). The file is located in C:/Program Files/Electronic Arts/The Sims 3/Game/Bin/Gameplay/GameplayData.package. You will inevitably be given a screen which states something, followed by "Retry as Read Only?". Click Yes. It will take a few seconds to open.
Now you are confronted by hundreds of smaller files. The Second Column in the left hand pane is "Tag". Click this heading once to sort the files by tag.
(In this image, the files are already sorted by tag)
XML Files are the easiest to read and make Mods from.
Click on a file. Some have more information than others.
Most files have descriptive names, and others need research to figure out.
Example:
The Buffs.XML file is, pretty clearly, the master controller for all of the Buffs.
The X-Factor.DMTR file, is, unusually, the icon for the trait "Star Quality".
Let's first go into the file "BuffFitAtmosphere". This controls the Moodlet "Fit Atmosphere" which you get at the Gym.
The file is shown on the right. Here is a complete copy of the contents of my BuffFitAtmosphere file.
EA provides comments in most of their code (Comments are surrounded by these tags: <!-- --> And are not read by the game).
<?xml version="1.0" encoding="utf-8"?>
<base>
<Current_Tuning>
<kFitnessMultiplier value=".5">
<!--Range: Multiplier. Description: Additional body shape multiplier when in the Fit Atmosphere (gym).-->
</kFitnessMultiplier>
<kAthleticSkillMultiplier value=".5">
<!--Range: Multiplier. Description: Additional athletic skill gain multiplier when in the Fit Atmosphere (gym). 2.0f means double the rate.-->
</kAthleticSkillMultiplier>
</Current_Tuning>
</base>
As you can see, the AthleticSkillMultiplier has a value of .5 - and if you've had the moodlet, or read
this thread, you can see where the bug originates.
So, reading this information, you can easily see that your Sim will gain Athletic Skill at half the rate they are supposed to. You can fix this by editing the file, or, you can download a Mod to fix it.
Let's go again. This time, let's take a look at RealEstateManager. (It is followed by an underscore and a bunch of numbers)
<?xml version="1.0" encoding="utf-8"?>
<base>
<Current_Tuning>
<kPercentageOfVacationHomeValueBilled value="0.01">
<!--Range: Float [0,1]. The percentage of a location home's value that is added to a household's bills.-->
</kPercentageOfVacationHomeValueBilled>
<kVisaLevelRequiredToPurchaseVacationHome value="3">
<!--Range: [0,3]. The visa level that unlocks a sim's ability to purchase a location home.-->
</kVisaLevelRequiredToPurchaseVacationHome>
</Current_Tuning>
</base>
Breaking this down, you can see "<kPercentageOfVacationHomeValueBilled value="0.01">". This is, pretty understandably, the Percentage of the Value of any Vacation Homes owned that is added on to bills. Think of it as tax - you own an offshore property, so the bank is charging you for it. This information is in a decimal - and if you remember back to Maths class, you multiply a decimal by 100 to convert it to a percentage. So therefore, the percentage of value is 1%. Or $1 in every $100.
Another example. This one is of the PrivateEye file. This one is large, so I'll choose an interesting section to show.
<?xml version="1.0" encoding="utf-8"?>
<kPrivateEyeTraitObjectsStealPerDay value="3">
<!--Range: Number of objects. Description: Number of objects a Private Eye Sim is allowed to swipe per day.-->
</kPrivateEyeTraitObjectsStealPerDay>
<kBlackmailAllowedDurationInHours value="48">
<!--Range: Time in hours Description: Length of time that the blackmail interaction will be available after a successful garbage search.-->
</kBlackmailAllowedDurationInHours>
Okay, for this one, what can you see?
The first thing, is that the very first set involves the Swiping. This is the trigger to enable Private Eye's to steal objects, and is what you change if you want to make it higher. Pretty simply, it's 3 objects.
The second thing, is that after a Sim digs through a Garbage tin, they will gain the "Blackmail" interaction for this many hours. The keys here are "value="48"" and "Range: Time in hours". I wouldn't change the latter to make a mod, but I'd change the former. So any value stored in here is in hours. So let's take an example:
Say I wanted to raise it to 4 days. I would figure out how many hours in 4 days (96) and alter that. Voila, mod made.
Let's go in one more time. This time, we'll go in to the Babysitter XML file. I won't give a narration, this time, you can take a look yourself.
<kEndTime value="23">
<!--End time for babysitter to leave (in 24 hours)-->
</kEndTime>
<kMinBabysittingTime value="10">
<!--Min time a babysitter will stay (in 24 hours)-->
</kMinBabysittingTime>
<kServiceTuning>
<kMaxNumNPCsInPool value="2">
<!--Max num NPCs at once in service-->
</kMaxNumNPCsInPool>
<kCost value="75">
<!--Cost of service-->
</kCost>
<kIsEmergencyService value="False">
<!--If true this service charges kCost only if falsely called, otherwise free.-->
</kIsEmergencyService>
<kIsRecurrent value="False">
<!--Whether the service is recurrent (true) or one-off (false). Recurrent services are the only type which can be cancelled through the phone dialog.-->
</kIsRecurrent>
<kAlwaysTryToSendSameSim value="True">
<!--Whether or not the service always tries to send the same NPC to a specific household-->
</kAlwaysTryToSendSameSim>
</kServiceTuning>
<kDriveTime value="5">
<!--Length of time (in minutes) that babysitter takes to drive to lot-->
</kDriveTime>
</Current_Tuning>
</base>
Okay, here's some questions.
1. How long does the babysitter take to drive to the lot?
2. What time does the babysitter leave? (12-hour format)
3. How many babysitters are there in service at once?
Okay, once you've answered them (in your head, you don't need to post them or anything), here are the answers.
I can't give you a complete list of tags, due to the sheer volume of them. But, if you read the tag and combine it with the relevant comments, it's easy to read these XML Files.