+ All Categories
Home > Documents > Simlogical and the Dead End Nightssimlogical.com/.../How_to_Make_an_XML_Tuning_Mod.pdfSimlogical and...

Simlogical and the Dead End Nightssimlogical.com/.../How_to_Make_an_XML_Tuning_Mod.pdfSimlogical and...

Date post: 09-Jun-2020
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
1
Simlogical and the Dead End Nights 4 users are in chat:. Search Simlogical and the Dead End Nights » Forum » The Sims 3 » TS3 Tutorials and Reference » Gameplay Tuts and Refs (YibToilet: Nona Mena) » How to Make an XML Tuning Mod PRINT Pages: [1] How to Make an XML Tuning Mod « on: 20 December 2012, 16:17 » « Last Edit: 26 December 2012, 16:37 by Nona Mena » Nona Mena Moderator Posts: 768 Gender: Ever come across something really annoying in the game that you just wish you could change? Many of the annoying game aspects can be modded and tuned to our liking easily, without needing more than s3pe and a simple text editor. This tutorial will show you how to make a basic XML mod, so you can take control of your own gaming experience. This tutorial is intended for new modders. Tools To complete this tutorial you will need: S3PE Requires Microsoft .NET Framework 4.0 (If you are running Windows 8, you already have .NET 4.0) Also recommended: NotePad++ for easier XML editing. It's small and free and will be a huge help! Finally: Make sure your game has the required Mods framework. Instructions here. Table of Contents Part One: Setting Up S3PE and Locating the Game Data Part Two: Finding the resource you need Part Three: Creating a new package and altering the XML Additional Tips Opening a File as Read-Only Using the Filter in S3PE Selecting Multiple Resources at Once Other options to create a package Tips for Creating Flavors Searching through the resources in a package file Tips for finding what you're looking for Knowing When to Update Your Mod Advanced Searching with NotePad++ Additional References and Credits Logged Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content Part One: Setting Up S3PE and Locating the Game Data « Reply #1 on: 20 December 2012, 17:10 » « Last Edit: 27 December 2012, 12:11 by Nona Mena » Nona Mena Moderator Posts: 768 Gender: Part One: Setting Up S3PE and Locating the Game Data Setting Up S3PE Step One: Download and install S3PE. I always use the latest S3PE test version. The test versions are stable and provide more functionality. You can choose which version you prefer. When you install S3PE, I recommend you select the option to associate .package files with S3PE. Did you download and install Notepad++? If not, go to Step Two. If yes: 1. Open S3PE. 2. In the top menu bar: Go to "Settings" and then choose "External Programs..." 3. In the "External Program Settings" window, tick the box next to "Use an external editor" (click for larger image) 4. Click the "Browse" button next to the empty field and browse to the Notepad++ install directory. On my computer it's C:\Program Files (x86)\Notepad++ 5. Select notepad++.exe and click "Open" 6. At the bottom of the External Programs Settings window, click OK. Step Two: Setting Up S3PE Let's take a moment to set up S3PE so it's a bit easier to work with the XMLs. If you haven't already, open S3PE. Take a look at the bottom panel. 1. Tick the Sort box. 2. Where it say Preview: tick the Value button 3. Where it says Display: tick Names and Tags Now that we've got S3PE, it's time to locate the game data. Locating the Game Data I am going to instruct you how I personally do this, but you are free to do however you like. I do not like open the actual GameplayData.package in the Sims 3 install directory, as I am paranoid that I'll somehow manage to accidentally overwrite EA's game files. So, instead, I make a copy of the GameplayData every time there is a patch, and re-name it GameplayData-Patchlevel.pacakage. For example: GameplayData-142.package. There are four distinct advantages for doing this: 1. I can never accidentally alter the original GameplayData.package. 2. If I do accidentally alter my working copy, I can always make a new copy from the original. 3. I can browse the GameplayData.package while playing, if something in the game starts to annoy me and I want to see if it's easily modded. 4. Whenever I patch, I am already prepared to check for compatibility issues because I've already got a copy of the current GameplayData. (see: How to Check if a Tuning mod needs an update) The main disadvantage to using a copy of the GameplayData.package is that you must remember to make a new copy every time there is a patch. For me, the advantages greatly outweigh the disadvantages. See Additional Tips for instructions on opening a file as read-only. (a very good alternative to making a copy of the GameplayData) Step One: Find the GameplayData.package. This is where all the XML (tuning) and ITUN resources for the game are stored (excepting some premium content-related resources). Where the GameplayData is located will be affected by your OS and how you install your games. All of my games are installed through Origin, so this is what the path looks like for me: C:\Program Files (x86)\Origin Games\The Sims 3\Game\Bin\Gameplay If you installed your base game with a disk, Look for C:\Program Files (x86)\Electronic Arts\The Sims 3\Game\Bin\Gameplay If you have a 32-bit OS, your files will be in C:\Program Files\... etc instead of C:\Program Files (x86)\. Step Two: Make a copy of the GameplayData.package and move it to your desktop, or wherever you prefer. Just make sure you can find it easily. Step Three: Rename the GameplayData.package to include the patch number. For example: GameplayData-142.package. Next: Part Two: Finding the resource you need Logged Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content Part Two: Finding the resource you need « Reply #2 on: 20 December 2012, 17:45 » « Last Edit: 20 December 2012, 21:52 by Nona Mena » Nona Mena Moderator Posts: 768 Gender: Part Two: Finding the resource you need For the purpose of this tutorial we are going to make a mod that increases the energy multiplier for fairies sleeping in the Fairy House. The Fairy House might not be very expensive, but fairies ought to enjoy their special, tiny home! Step One: Open S3PE. Go to File | Open | and browse to the location where you saved your GameplayData-142.package. Tip: If you associated .package files with S3PE, you can double click on the GameplayData-142.package to open it directly. Now we have to find the resource we want to edit. Most XML resources are named after the object, and ITUN resources (interaction tuning XMLs) are named after their interaction. Let's use the filter to find all resources with FairyHouse in the name. Step Two: In the bottom bar, tick the box next to "Filter Active" and wait for S3PE. When S3PE is done activating the filter, tick the box next to the Name field and enter: FairyHouse Now click the set button. See the picture below for details. You can click on it to make it larger. If you want your results to look like mine, click on the Tag button, at the top of the column where you see the _XML and ITUN tags. Looking at the list, we might at first think "oh! FairyHouse+Sleep! That must be where the energy multiplier is." But if you look in the preview pane, you can see that there's nothing about the energy multiplier there. Instead, select the FairyHouse_0xcc34d855fea16a51 resource and take a look in the preview pane. The energy multiplier is staring right at us! This is the resource we need to alter. Tip: You might get a better view of the contents of the resource by right-clicking and choosing Text Editor (if you're using Notepad++)/Notepad. Logged Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content Part Three: Creating a new package and altering the XM « Reply #3 on: 20 December 2012, 20:43 » « Last Edit: 21 December 2012, 22:44 by Nona Mena » Nona Mena Moderator Posts: 768 Gender: Part Three: Creating a new package and altering the XML Before we can edit the energy multiplier, we need to make a new package. We never want to edit game files directly (even though this is a backup). Making a new package is really easy. Step One: Right-click on the resource we want to use (FairyHouse_0xcc34d855fea16a51) and choose Copy. Step Two: Now go to File | New or press Ctrl + N Step Three: Right click in the white area below the top menu and choose Paste. A window will pop up with the details of the resource you are pasting into the new package. Press OK. Step Four: Save your Package (use Ctrl + S or File | Save). Try to be descriptive with your name. Since I've made a lot of mods, I ended up with my own naming convention. UserName_ObjectName_Description. So my package is called: Nona_FairyHouse_BetterEnergyMultiplier.package Step Five: Right click on the FairyHouse_0xcc34d855fea16a51 resource, and choose Text Editor/Notepad. Step Six: Find where it says: Code: [Select] <kEnergyMultiplier value="1"> <!--Energy Multiplier for fairy house bed--> </kEnergyMultiplier> And change the value to something you want. I used 1.4, because the absolute highest multiplier in the game is 1.4. You could make it ashigh or low as you like. Tip: You could add a comment in the XML, to make note of the original EA value. To add an XML comment, make sure you put <!-- --> around the text. For example: Code: [Select] <kEnergyMultiplier value="1.4"><!--EA Default: 1--> <!--Energy Multiplier for fairy house bed--> </kEnergyMultiplier> You must make sure that your comment is properly open and closed with <!-- --> , or the game will not be able to read the XML properly. If you don't feel comfortable doing this, just ignore this tip Step Seven: When you're done editing the XML, close your Text Editor/Notepad. When it asks if you want to save, click Yes. Tip: Do not delete anything from the XML, unless you are absolutely certain it's ok. In most cases (but not all), outright deleting fields from an XML is bad and can even lead to save corruption. The FairyHouse XML is not an XML that you can delete anything from. Step Eight: Next you will see a Commit Changes? window. Click Yes again. Step Nine: Finally, you have to save the changes to the actual package. Hit Ctrl + S to save, or go to File | Save. Step Ten: Ta da! Your package is done. Copy it to your Mods\Packages folder to test it in game. CONGRATULATIONS! You've just made an XML mod. Easy, wasn't it? A Note on Sharing and Possible Conflicts Tuning mods conflicts occur when you have more than one mod that edits the same XML/ITUN. If you share your XML/ITUN mods, I recommend that you let your downloaders know what XML(s)/ITUN(s) your mods edit. This way they will be informed about any possible conflicts they might come across. Also, don't forget, if you want to share your package, make sure you test it first! The _KEY Resource The _KEY resource is generated whenever you import a file into S3PE and tick Use Resource Name in the Details box (this is ticked by Default). This resource is unnecessary, and you can delete if it you want. If you delete it, you will no longer be able to see the Resource Name of each resource in your package, but your package will be a teeny tiny bit smaller. Logged Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content Additional Tips « Reply #4 on: 20 December 2012, 21:25 » « Last Edit: 23 December 2012, 07:59 by Nona Mena » Nona Mena Moderator Posts: 768 Gender: Additional Tips Opening a File as Read-Only Using the Filter in S3PE Selecting Multiple Resources at Once Other options to create a package Tips for Creating Flavors Searching through the resources in a package file Tips for finding what you're looking for Knowing When to Update Your Mod Opening a File as Read-Only Another way to avoid accidentally altering the GameplayData.package is to open the package as Read-Only. To open a package as readonly: 1. Start S3PE. 2. Go to File | Open... (Ctrl + O) 3. Browse to the GameplayData.package in C:\Program Files (x86)\Origin Games\The Sims 3\Game\Bin\Gameplay 4. Under "Files of Type" tick the box next to "Open as read-only" 5. Select the GameplayData.package and press Open. 6. Now go to File | Bookmarked Packages | and click Bookmark Current (or press Ctrl + Shift + B) You can now open the GameplayData through the bookmark in S3PE, and it will always be opened as read-only. Thanks, Inge, for the tip! Using the Filter in S3PE If you're going to open a really large package file (for example, FullBuild0.package in C:\Program Files (x86)\Origin Games\The Sims 3\GameData\Shared\Packages), start S3PE first. Tick the Filter box before you open the package. Then you won't have to wait so long. Thanks, Peter, for the tip! Selecting Multiple Resources at Once If you want to edit more than one XML/ITUN in your mod: Select all the resources you want to copy at once by pressing the Ctrl button whenever you click another resource. Right-click and choose copy. Now use Ctrl+N and Paste all the resources at once. Click Import. You can also: Select all the resources you want to copy, right-click and choose copy. Start a new instance of S3PE (go to your desktop and use the S3PE shorcut). In the new S3PE, hit Ctrl+N, and then right-click and paste. Now you have two S3PE's open, and can continue browsing the GameplayData.package in case you find more resources you want to alter. Other options to create a package When I create a new package, I prefer to use the copy/paste method above, so I can continue looking at the GameplayData. I also prefer to keep the _KEY resource in my packages, so for me, this method is the fastest way to get a new package and generate a _KEY. But there are other ways you can create a new package. 1. Right-click on the Resource(s) you want to edit and choose Export | To package... This will create a new package with only that resource (or resources, if you selected multiple resources). This new package will not have a _KEY resource. You can then open the new package with Ctrl+O (File | Open) or by navigating to the location on the hard drive with the File Explorer and opening it from there. 2. Right-click on the Resource(s) you want to edit and choose Export | To file... This will create a xml file in the directory you choose. When you've found all the resources you're looking for, use Ctrl+N to start a new package (or start a new instance of S3PE by using your desktop shortcut) and then you can either import the resources with: Click on Resource | Import | From file... Right-click on the white area in S3PE and choose Import | From file... Or finally, use File Explorer to find the files you exported on your hard drive. Select them all, and then drag them into the white area in S3PE. You may find that you prefer one way or another, or perhaps one method is more suitable in certain circumstances Tips for Creating Flavors If you publish your mod and decide to honor requests (both are entirely up to you), you may find yourself in the position of needing to create flavors. When I know for certain that I'll be need to make multiple flavors, I create a copy of the new package before I do any edits to it. This copy can then be used as a base for all flavors and you'll always have a reference for EA's original values without having to look in the GameplayData. To make a copy of your unaltered package: Find the package on your hard drive and use Copy/Paste to create a copy of the package file. or, Click File | Save As and choose a new name for the package. Note that you will now have the new package open in s3pe. You may want to re-open the original, or simply use the new package as your working package and keep the original package as backup. Searching through the resources in a package file S3PE has a search function. To use it, go to Tools | Search (Ctrl + E). This search function searches through all the text in the resources. While it is very useful, you might not find everything about a specific search term. For example, searching for "FairyHouse" provides all the XMLs and ITUNs in the GameplayData.package that have the text "FairyHouse" in them. However, it doesn't actually find the FairyHouse XML, which we altered in our tutorial. "FairyHouse" is only in the name of the resource, and not in the text. When you search for text in SPE, place the text in quotes in the search bar, keep the search format as Little Endian. In the image above, you can see the list of resources returned by S3PE. You can select a resource in the list by double clicking on it. Move the search window a bit to the side, so you can see the rest of S3PE and the preview pane better. Now you can click through the resource list in the search box and look at the contents of each resource. Tips for finding what you're looking for If you know how tunables are handled in general, you'll have an easier time finding what you need to mod. In general, each object type has its own tuning. For example, if you want to tune how long a horse will drink at the Water Trough, you will need to find an XML for the WaterTrough (in this case: WaterTrough+DrinkWater_0x1cc7a50554d0bd7c). In general, if you want to change something, think of the object it is associated with, and use the filter and/or search options to help you find the tuning resources for those objects. If you're trying to mod an interaction to disallow autonomy, or to make it available on a community lot, etc, then you'll need to edit the ITUN for that interaction. The ITUN resources are always named after the interaction they are associated with, so they are pretty easy to find. You can learn more about ITUN resources here: ITUN Modding Discussion and Explanation Knowing When to Update Your Mod The general mantra in the Sims 3 community is that all mods must be updated whenever there's a patch. While this is a good way to encourage people to keep their mods updated, it's not actually true. Many mods can go a long time without ever needing an update. A few have never needed an update, ever. So how do you know when a mod needs an update? A tuning mod must be updated whenever EA alters the original XML. So, let's say, hypothetically speaking, that in the next expansion EA adds a "Study" interaction for fairies to the FairyHouse (highly unlikely, by the way). This new hypothetical interaction may add new tunables to the FairyHouse (for example, length of the study interaction, or something), in which case, your old mod would not include these tunables. You'd want to update your mod to use the new XML so that it would include the new tuning. Now maybe you're thinking, jeez, I really don't want to check all my mods every patch. Thankfully, there is a really easy way to compare the old GameplayData with the new GameplayData. You can read more about that here: How to Check if a Tuning mod needs an update Keep in mind that for minor patches (SP patches, and the bug "fixing" patches that happen after a major EP patch), EA usually does not change any XMLs. However, a number of XMLs are almost guaranteed to require updates whenever a Major Patch (EP patch) is released. These include but are not limited to: Careers XML, RecipeMasterList XML, Motives XML, etc. ITUN resources are somewhat unpredictable in whether they will be altered or not. As a final warning, do not play test XML mods after a patch. Use the method linked above to check if your mods need updating. Logged Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content Advanced Searching with NotePad++ « Reply #5 on: 20 December 2012, 21:32 » « Last Edit: 20 December 2012, 21:56 by Nona Mena » Nona Mena Moderator Posts: 768 Gender: Advanced Searching with NotePad++ Sometimes, you need more oversight when searching. You can use NotePad++ to search through an entire folder of documents at once. It will then display a list of all matches that it found, and you can go through the list to try to find what your need. To do this, we'll need to extract all the files in the GameplayData to a folder. 1. Create a folder where you want to store all the files in the GameplayData. It doens't matter where, just put it somewhere you can find easily. I have mine on a separate harddrive, and I named it GameplayData 2. Open the GameplayData.package in S3Pe. 3. Hit Ctrl+A and wait. 4. Wait some more. It's going to take a little while for S3PE to select everything in the package. Be patient. You might see "Not Responding" in the program title. Just let it do its thing. 5. When it's done RIGHT-CLICK on one of the resources and choose Export | To File... 6. Navigate to the folder where you want export resources and click OK. 7. Play the waiting game again. 8. When it's done, open Notepad++ 9. Click on Search | Find in Files 10. Enter your search term. We'll use FairyHouse 11. Next to the Directory field is a buton with [...]. Click that and navigate to the folder where the GameplayData files are stored, the ones you've just exported. Click OK when you've selected the correct folder. 12. Click Find All. 13. Play the waiting game, again. 14. When it's done, use the cursor to make the search results field larger if you need to, but clicking and dragging the bar up. 15. Now you've got an overview of all the XMLs/ITUNs that contain the text FairyHouse. Logged Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content Additional References and Credits « Reply #6 on: 20 December 2012, 21:48 » « Last Edit: 20 December 2012, 21:56 by Nona Mena » Nona Mena Moderator Posts: 768 Gender: Additional References Tutorial:Sims 3 XML Tuning Modding at SimsWiki How to Edit XML Tuning at NRaas Wiki ITUN Modding Discussion at Simlogical How to Check if a Tuning mod needs an update at Simlogical Understanding Mod and CC Conflicts with Delphy's Dashboard Additional Credits I have not provided any new information in this tutorial. I wouldn't be able to make XML tuning mods without the original tutorial at MTS! This tutorial would not have been possible without: Peter & Inge Jones Original XML Tuning Modding tutorial All the other tuning modders out there who share their information and knowledge Logged Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content Re: How to Make an XML Tuning Mod « Reply #7 on: 20 December 2012, 21:56 » « Last Edit: 23 December 2012, 08:03 by Nona Mena » Nona Mena Moderator Posts: 768 Gender: Last Update: 23 December 2012 - Added two new sections to Additional Tips Other options to create a package Tips for Creating Flavors Previous updates include (not limited to): 22 December 2012, 15:29 CET - Added a section on knowing when to update an XML mod Earlier... - Tips for finding XMLs - Explanation of _KEY resource - More information about S3PE search function- - Numerous typo fixes Logged Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content Re: How to Make an XML Tuning Mod « Reply #8 on: 22 December 2012, 12:48 » Caruso Normal Posts: 28 Wow. Thank you so much for this! A very inspiring tutorial. I think I shall try to make myself some little XML Xmas presents Logged Re: How to Make an XML Tuning Mod « Reply #9 on: 22 December 2012, 12:56 » Nona Mena Moderator Posts: 768 Gender: Quote from: Caruso on 22 December 2012, 12:48 Wow. Thank you so much for this! A very inspiring tutorial. I think I shall try to make myself some little XML Xmas presents Glad you like it, and good luck Feel free to post any questions you might have about xml modding. Logged Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content Re: How to Make an XML Tuning Mod « Reply #10 on: 22 December 2012, 18:10 » SimAd Normal Posts: 24 Excellent tutorial, Nona. Logged Re: How to Make an XML Tuning Mod « Reply #11 on: 23 December 2012, 02:33 » Kuree Normal Posts: 201 I usually use export method to get new package Logged Re: How to Make an XML Tuning Mod « Reply #12 on: 23 December 2012, 06:55 » « Last Edit: 23 December 2012, 07:28 by Nona Mena » Nona Mena Moderator Posts: 768 Gender: Quote from: Kuree on 23 December 2012, 02:33 I usually use export method to get new package Of course, you can do that that too There's a few different ways to start a new package. Maybe I'll add a short blurb about that. I prefer my method because I think it's the fastest (don't have to go looking for the new package. I keep my mods on a separate hard drive) and because it generates a _KEY, which I prefer to have. Also, I usually keep the GameplayData open while working on a mod so I can make sure there aren't other XMLs I want to add to the mod. But everyone has their own preferences! Edit: Tip has been added, thanks Kuree! Logged Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content PRINT Pages: [1] Simlogical and the Dead End Nights » Forum » The Sims 3 » TS3 Tutorials and Reference » Gameplay Tuts and Refs (YibToilet: Nona Mena) » How to Make an XML Tuning Mod « previous next » Author Topic: How to Make an XML Tuning Mod (Read 11753 times) 0 Members and 1 Guest are viewing this topic. « previous next » Jump to: ===> Gameplay Tuts and Refs go This site gives you cookies (no, not cooties...) FIND STUFF Click here to look for downloads, tutorials or tools by our easy keyword search. SMF 2.0.5 | SMF © 2013, Simple Machines TinyPortal © 2005-2012 XHTML RSS WAP2 Home Forum Help Search Calendar Login Register
Transcript
Page 1: Simlogical and the Dead End Nightssimlogical.com/.../How_to_Make_an_XML_Tuning_Mod.pdfSimlogical and the Dead End Nights ... You've just made an XML mod. Easy, wasn't it? A Note on

Simlogical and the Dead End Nights

4 users are in chat:. Search

Simlogical and the Dead End Nights » Forum » The Sims 3 » TS3 Tutorials and Reference » Gameplay Tuts and Refs (YibToilet: Nona Mena) »How to Make an XML Tuning Mod

PRINTPages: [1]

How to Make an XML Tuning Mod« on: 20 December 2012, 16:17 »

« Last Edit: 26 December 2012, 16:37 by Nona Mena »

Nona MenaModerator

Posts: 768Gender:

Ever come across something really annoying in the game that you just wish you couldchange? Many of the annoying game aspects can be modded and tuned to our likingeasily, without needing more than s3pe and a simple text editor. This tutorial willshow you how to make a basic XML mod, so you can take control of your own gamingexperience.

This tutorial is intended for new modders.

ToolsTo complete this tutorial you will need:

S3PERequires Microsoft .NET Framework 4.0 (If you are running Windows 8,you already have .NET 4.0)

Also recommended: NotePad++ for easier XML editing. It's small and free and will be a huge help!

Finally:Make sure your game has the required Mods framework. Instructions here.

Table of Contents

Part One: Setting Up S3PE and Locating the Game DataPart Two: Finding the resource you needPart Three: Creating a new package and altering the XMLAdditional Tips

Opening a File as Read-OnlyUsing the Filter in S3PESelecting Multiple Resources at OnceOther options to create a packageTips for Creating FlavorsSearching through the resources in a package fileTips for finding what you're looking forKnowing When to Update Your Mod

Advanced Searching with NotePad++Additional References and Credits

Logged

Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content

Part One: Setting Up S3PE and Locating the Game Data« Reply #1 on: 20 December 2012, 17:10 »

« Last Edit: 27 December 2012, 12:11 by Nona Mena »

Nona MenaModerator

Posts: 768Gender:

Part One: Setting Up S3PE and Locating the Game Data

Setting Up S3PE

Step One: Download and install S3PE.

I always use the latest S3PE test version. The test versions are stable and providemore functionality. You can choose which version you prefer. When you install S3PE, Irecommend you select the option to associate .package files with S3PE.

Did you download and install Notepad++? If not, go to Step Two.If yes:

1. Open S3PE.2. In the top menu bar: Go to "Settings" and then choose "External Programs..."

3. In the "External Program Settings" window, tick the box next to "Use anexternal editor" (click for larger image)

4. Click the "Browse" button next to the empty field and browse to theNotepad++ install directory. On my computer it's C:\Program Files(x86)\Notepad++

5. Select notepad++.exe and click "Open"6. At the bottom of the External Programs Settings window, click OK.

Step Two: Setting Up S3PELet's take a moment to set up S3PE so it's a bit easier to work with the XMLs.

If you haven't already, open S3PE. Take a look at the bottom panel.

1. Tick the Sort box.2. Where it say Preview: tick the Value button3. Where it says Display: tick Names and Tags

Now that we've got S3PE, it's time to locate the game data.

Locating the Game DataI am going to instruct you how I personally do this, but you are free to do howeveryou like. I do not like open the actual GameplayData.package in the Sims 3 installdirectory, as I am paranoid that I'll somehow manage to accidentally overwrite EA'sgame files. So, instead, I make a copy of the GameplayData every time there is apatch, and re-name it GameplayData-Patchlevel.pacakage. For example:GameplayData-142.package.

There are four distinct advantages for doing this:1. I can never accidentally alter the original GameplayData.package.2. If I do accidentally alter my working copy, I can always make a new copy from theoriginal.3. I can browse the GameplayData.package while playing, if something in the gamestarts to annoy me and I want to see if it's easily modded.4. Whenever I patch, I am already prepared to check for compatibility issues becauseI've already got a copy of the current GameplayData. (see: How to Check if a Tuningmod needs an update)

The main disadvantage to using a copy of the GameplayData.package is that youmust remember to make a new copy every time there is a patch. For me, theadvantages greatly outweigh the disadvantages.

See Additional Tips for instructions on opening a file as read-only. (a very goodalternative to making a copy of the GameplayData)

Step One: Find the GameplayData.package. This is where all the XML (tuning) andITUN resources for the game are stored (excepting some premium content-relatedresources). Where the GameplayData is located will be affected by your OS and howyou install your games. All of my games are installed through Origin, so this is whatthe path looks like for me:

C:\Program Files (x86)\Origin Games\The Sims 3\Game\Bin\Gameplay

If you installed your base game with a disk, Look for C:\Program Files (x86)\ElectronicArts\The Sims 3\Game\Bin\Gameplay

If you have a 32-bit OS, your files will be in C:\Program Files\... etc instead ofC:\Program Files (x86)\.

Step Two: Make a copy of the GameplayData.package and move it to your desktop,or wherever you prefer. Just make sure you can find it easily.

Step Three: Rename the GameplayData.package to include the patch number. Forexample: GameplayData-142.package.

Next: Part Two: Finding the resource you need

Logged

Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content

Part Two: Finding the resource you need« Reply #2 on: 20 December 2012, 17:45 »

« Last Edit: 20 December 2012, 21:52 by Nona Mena »

Nona MenaModerator

Posts: 768Gender:

Part Two: Finding the resource you needFor the purpose of this tutorial we are going to make a mod that increases theenergy multiplier for fairies sleeping in the Fairy House. The Fairy House might not bevery expensive, but fairies ought to enjoy their special, tiny home!

Step One: Open S3PE. Go to File | Open | and browse to the location where yousaved your GameplayData-142.package.Tip: If you associated .package files with S3PE, you can double click on theGameplayData-142.package to open it directly.

Now we have to find the resource we want to edit. Most XML resources are namedafter the object, and ITUN resources (interaction tuning XMLs) are named after theirinteraction. Let's use the filter to find all resources with FairyHouse in the name.

Step Two: In the bottom bar, tick the box next to "Filter Active" and wait for S3PE.When S3PE is done activating the filter, tick the box next to the Name field and enter:FairyHouse

Now click the set button. See the picture below for details. You can click on it to makeit larger.

If you want your results to look like mine, click on the Tag button, at the top of thecolumn where you see the _XML and ITUN tags.

Looking at the list, we might at first think "oh! FairyHouse+Sleep! That must bewhere the energy multiplier is." But if you look in the preview pane, you can see thatthere's nothing about the energy multiplier there. Instead, select theFairyHouse_0xcc34d855fea16a51 resource and take a look in the preview pane. Theenergy multiplier is staring right at us! This is the resource we need to alter.

Tip: You might get a better view of the contents of the resource by right-clicking andchoosing Text Editor (if you're using Notepad++)/Notepad.

Logged

Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content

Part Three: Creating a new package and altering the XM« Reply #3 on: 20 December 2012, 20:43 »

« Last Edit: 21 December 2012, 22:44 by Nona Mena »

Nona MenaModerator

Posts: 768Gender:

Part Three: Creating a new package and altering theXMLBefore we can edit the energy multiplier, we need to make a new package. We neverwant to edit game files directly (even though this is a backup). Making a new packageis really easy.

Step One: Right-click on the resource we want to use(FairyHouse_0xcc34d855fea16a51) and choose Copy.

Step Two: Now go to File | New or press Ctrl + N

Step Three: Right click in the white area below the top menu and choose Paste. Awindow will pop up with the details of the resource you are pasting into the newpackage. Press OK.

Step Four: Save your Package (use Ctrl + S or File | Save). Try to be descriptive withyour name. Since I've made a lot of mods, I ended up with my own namingconvention. UserName_ObjectName_Description. So my package is called:Nona_FairyHouse_BetterEnergyMultiplier.package

Step Five: Right click on the FairyHouse_0xcc34d855fea16a51 resource, and chooseText Editor/Notepad.

Step Six: Find where it says:

Code: [Select]

<kEnergyMultiplier value="1">

<!--Energy Multiplier for fairy house bed-->

</kEnergyMultiplier>

And change the value to something you want. I used 1.4, because the absolutehighest multiplier in the game is 1.4. You could make it ashigh or low as you like.

Tip: You could add a comment in the XML, to make note of the original EA value. To add anXML comment, make sure you put <!-- --> around the text. For example:

Code: [Select]

<kEnergyMultiplier value="1.4"><!--EA Default: 1-->

<!--Energy Multiplier for fairy house bed-->

</kEnergyMultiplier>

You must make sure that your comment is properly open and closed with <!-- --> , or thegame will not be able to read the XML properly. If you don't feel comfortable doing this, justignore this tip

Step Seven: When you're done editing the XML, close your Text Editor/Notepad.When it asks if you want to save, click Yes.Tip: Do not delete anything from the XML, unless you are absolutely certain it's ok. Inmost cases (but not all), outright deleting fields from an XML is bad and can even leadto save corruption. The FairyHouse XML is not an XML that you can delete anythingfrom.

Step Eight: Next you will see a Commit Changes? window. Click Yes again.

Step Nine: Finally, you have to save the changes to the actual package. Hit Ctrl + Sto save, or go to File | Save.

Step Ten: Ta da! Your package is done. Copy it to your Mods\Packages folder to testit in game.

CONGRATULATIONS! You've just made an XML mod. Easy, wasn't it?

A Note on Sharing and Possible ConflictsTuning mods conflicts occur when you have more than one mod that edits the sameXML/ITUN. If you share your XML/ITUN mods, I recommend that you let yourdownloaders know what XML(s)/ITUN(s) your mods edit. This way they will beinformed about any possible conflicts they might come across.

Also, don't forget, if you want to share your package, make sure you test it first!

The _KEY ResourceThe _KEY resource is generated whenever you import a file into S3PE and tick UseResource Name in the Details box (this is ticked by Default).

This resource is unnecessary, and you can delete if it you want. If you delete it, youwill no longer be able to see the Resource Name of each resource in your package,but your package will be a teeny tiny bit smaller.

Logged

Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content

Additional Tips« Reply #4 on: 20 December 2012, 21:25 »

« Last Edit: 23 December 2012, 07:59 by Nona Mena »

Nona MenaModerator

Posts: 768Gender:

Additional Tips

Opening a File as Read-OnlyUsing the Filter in S3PESelecting Multiple Resources at OnceOther options to create a packageTips for Creating FlavorsSearching through the resources in a package fileTips for finding what you're looking forKnowing When to Update Your Mod

Opening a File as Read-OnlyAnother way to avoid accidentally altering the GameplayData.package is to open thepackage as Read-Only. To open a package as readonly:

1. Start S3PE.2. Go to File | Open... (Ctrl + O)3. Browse to the GameplayData.package in C:\Program Files (x86)\Origin

Games\The Sims 3\Game\Bin\Gameplay

4. Under "Files of Type" tick the box next to "Open as read-only"5. Select the GameplayData.package and press Open.6. Now go to File | Bookmarked Packages | and click Bookmark Current (or press

Ctrl + Shift + B)

You can now open the GameplayData through the bookmark in S3PE, and it willalways be opened as read-only. Thanks, Inge, for the tip!

Using the Filter in S3PEIf you're going to open a really large package file (for example, FullBuild0.package inC:\Program Files (x86)\Origin Games\The Sims 3\GameData\Shared\Packages), startS3PE first. Tick the Filter box before you open the package. Then you won't have towait so long. Thanks, Peter, for the tip!

Selecting Multiple Resources at OnceIf you want to edit more than one XML/ITUN in your mod: Select all the resources you want to copy at once by pressing the Ctrl buttonwhenever you click another resource. Right-click and choose copy. Now use Ctrl+N and Paste all the resources at once. Click Import.

You can also: Select all the resources you want to copy, right-click and choose copy.Start a new instance of S3PE (go to your desktop and use the S3PE shorcut). In the new S3PE, hit Ctrl+N, and then right-click and paste. Now you have two S3PE's open, and can continue browsing theGameplayData.package in case you find more resources you want to alter.

Other options to create a packageWhen I create a new package, I prefer to use the copy/paste method above, so I cancontinue looking at the GameplayData. I also prefer to keep the _KEY resource in mypackages, so for me, this method is the fastest way to get a new package andgenerate a _KEY. But there are other ways you can create a new package.

1. Right-click on the Resource(s) you want to edit and choose Export | To package...This will create a new package with only that resource (or resources, if you selectedmultiple resources). This new package will not have a _KEY resource. You can thenopen the new package with Ctrl+O (File | Open) or by navigating to the location onthe hard drive with the File Explorer and opening it from there.

2. Right-click on the Resource(s) you want to edit and choose Export | To file... Thiswill create a xml file in the directory you choose. When you've found all the resourcesyou're looking for, use Ctrl+N to start a new package (or start a new instance of S3PEby using your desktop shortcut) and then you can either import the resources with:

Click on Resource | Import | From file...Right-click on the white area in S3PE and choose Import | From file...Or finally, use File Explorer to find the files you exported on your hard drive.Select them all, and then drag them into the white area in S3PE.

You may find that you prefer one way or another, or perhaps one method is moresuitable in certain circumstances

Tips for Creating FlavorsIf you publish your mod and decide to honor requests (both are entirely up to you),you may find yourself in the position of needing to create flavors. When I know forcertain that I'll be need to make multiple flavors, I create a copy of the new packagebefore I do any edits to it. This copy can then be used as a base for all flavors andyou'll always have a reference for EA's original values without having to look in theGameplayData. To make a copy of your unaltered package:

Find the package on your hard drive and use Copy/Paste to create a copy ofthe package file.or, Click File | Save As and choose a new name for the package. Note that youwill now have the new package open in s3pe. You may want to re-open theoriginal, or simply use the new package as your working package and keep theoriginal package as backup.

Searching through the resources in a package fileS3PE has a search function. To use it, go to Tools | Search (Ctrl + E). This searchfunction searches through all the text in the resources. While it is very useful, youmight not find everything about a specific search term. For example, searching for"FairyHouse" provides all the XMLs and ITUNs in the GameplayData.package thathave the text "FairyHouse" in them. However, it doesn't actually find the FairyHouseXML, which we altered in our tutorial. "FairyHouse" is only in the name of theresource, and not in the text.

When you search for text in SPE, place the text in quotes in the search bar, keep thesearch format as Little Endian.

In the image above, you can see the list of resources returned by S3PE. You canselect a resource in the list by double clicking on it. Move the search window a bit tothe side, so you can see the rest of S3PE and the preview pane better. Now you canclick through the resource list in the search box and look at the contents of eachresource.

Tips for finding what you're looking forIf you know how tunables are handled in general, you'll have an easier time findingwhat you need to mod. In general, each object type has its own tuning. For example,if you want to tune how long a horse will drink at the Water Trough, you will need tofind an XML for the WaterTrough (in this case:WaterTrough+DrinkWater_0x1cc7a50554d0bd7c). In general, if you want to changesomething, think of the object it is associated with, and use the filter and/or searchoptions to help you find the tuning resources for those objects.

If you're trying to mod an interaction to disallow autonomy, or to make it available ona community lot, etc, then you'll need to edit the ITUN for that interaction. The ITUNresources are always named after the interaction they are associated with, so theyare pretty easy to find. You can learn more about ITUN resources here: ITUN ModdingDiscussion and Explanation

Knowing When to Update Your ModThe general mantra in the Sims 3 community is that all mods must be updatedwhenever there's a patch. While this is a good way to encourage people to keeptheir mods updated, it's not actually true. Many mods can go a long time without everneeding an update. A few have never needed an update, ever. So how do you knowwhen a mod needs an update?

A tuning mod must be updated whenever EA alters the original XML.

So, let's say, hypothetically speaking, that in the next expansion EA adds a "Study"interaction for fairies to the FairyHouse (highly unlikely, by the way). This new hypothetical interaction may add new tunables to the FairyHouse (for example, lengthof the study interaction, or something), in which case, your old mod would not includethese tunables. You'd want to update your mod to use the new XML so that it wouldinclude the new tuning.

Now maybe you're thinking, jeez, I really don't want to check all my mods everypatch. Thankfully, there is a really easy way to compare the old GameplayData withthe new GameplayData. You can read more about that here: How to Check if a Tuningmod needs an update

Keep in mind that for minor patches (SP patches, and the bug "fixing" patches thathappen after a major EP patch), EA usually does not change any XMLs. However, anumber of XMLs are almost guaranteed to require updates whenever a Major Patch(EP patch) is released. These include but are not limited to: Careers XML,RecipeMasterList XML, Motives XML, etc. ITUN resources are somewhat unpredictablein whether they will be altered or not.

As a final warning, do not play test XML mods after a patch. Use the method linkedabove to check if your mods need updating.

Logged

Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content

Advanced Searching with NotePad++« Reply #5 on: 20 December 2012, 21:32 »

« Last Edit: 20 December 2012, 21:56 by Nona Mena »

Nona MenaModerator

Posts: 768Gender:

Advanced Searching with NotePad++Sometimes, you need more oversight when searching. You can use NotePad++ tosearch through an entire folder of documents at once. It will then display a list of allmatches that it found, and you can go through the list to try to find what your need.To do this, we'll need to extract all the files in the GameplayData to a folder.

1. Create a folder where you want to store all the files in the GameplayData. Itdoens't matter where, just put it somewhere you can find easily. I have mineon a separate harddrive, and I named it GameplayData

2. Open the GameplayData.package in S3Pe.3. Hit Ctrl+A and wait.

4. Wait some more. It's going to take a little while for S3PE to select everything inthe package. Be patient. You might see "Not Responding" in the program title.Just let it do its thing.

5. When it's done RIGHT-CLICK on one of the resources and choose Export | ToFile...

6. Navigate to the folder where you want export resources and click OK.7. Play the waiting game again.8. When it's done, open Notepad++9. Click on Search | Find in Files

10. Enter your search term. We'll use FairyHouse11. Next to the Directory field is a buton with [...]. Click that and navigate to the

folder where the GameplayData files are stored, the ones you've just exported.Click OK when you've selected the correct folder.

12. Click Find All.13. Play the waiting game, again.14. When it's done, use the cursor to make the search results field larger if you

need to, but clicking and dragging the bar up.15. Now you've got an overview of all the XMLs/ITUNs that contain the text

FairyHouse.

Logged

Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content

Additional References and Credits« Reply #6 on: 20 December 2012, 21:48 »

« Last Edit: 20 December 2012, 21:56 by Nona Mena »

Nona MenaModerator

Posts: 768Gender:

Additional ReferencesTutorial:Sims 3 XML Tuning Modding at SimsWikiHow to Edit XML Tuning at NRaas WikiITUN Modding Discussion at SimlogicalHow to Check if a Tuning mod needs an update at SimlogicalUnderstanding Mod and CC Conflicts with Delphy's Dashboard

Additional CreditsI have not provided any new information in this tutorial. I wouldn't be able to makeXML tuning mods without the original tutorial at MTS!

This tutorial would not have been possible without:Peter & Inge JonesOriginal XML Tuning Modding tutorialAll the other tuning modders out there who share their information and knowledge

Logged

Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content

Re: How to Make an XML Tuning Mod« Reply #7 on: 20 December 2012, 21:56 »

« Last Edit: 23 December 2012, 08:03 by Nona Mena »

Nona MenaModerator

Posts: 768Gender:

Last Update: 23 December 2012- Added two new sections to Additional Tips

Other options to create a packageTips for Creating Flavors

Previous updates include (not limited to):22 December 2012, 15:29 CET- Added a section on knowing when to update an XML mod

Earlier...- Tips for finding XMLs- Explanation of _KEY resource- More information about S3PE search function-- Numerous typo fixes

Logged

Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content

Re: How to Make an XML Tuning Mod« Reply #8 on: 22 December 2012, 12:48 »

CarusoNormal

Posts: 28Wow. Thank you so much for this! A very inspiring tutorial. I think I shall try to makemyself some little XML Xmas presents

Logged

Re: How to Make an XML Tuning Mod« Reply #9 on: 22 December 2012, 12:56 »

Nona MenaModerator

Posts: 768Gender:

Quote from: Caruso on 22 December 2012, 12:48

Wow. Thank you so much for this! A very inspiring tutorial. I think I shall try to makemyself some little XML Xmas presents

Glad you like it, and good luck Feel free to post any questions you might haveabout xml modding.

Logged

Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content

Re: How to Make an XML Tuning Mod« Reply #10 on: 22 December 2012, 18:10 »

SimAdNormal

Posts: 24Excellent tutorial, Nona.

Logged

Re: How to Make an XML Tuning Mod« Reply #11 on: 23 December 2012, 02:33 »

KureeNormal

Posts: 201I usually use export method to get new package

Logged

Re: How to Make an XML Tuning Mod« Reply #12 on: 23 December 2012, 06:55 »

« Last Edit: 23 December 2012, 07:28 by Nona Mena »

Nona MenaModerator

Posts: 768Gender:

Quote from: Kuree on 23 December 2012, 02:33

I usually use export method to get new package

Of course, you can do that that too There's a few different ways to start a newpackage. Maybe I'll add a short blurb about that.

I prefer my method because I think it's the fastest (don't have to go looking for thenew package. I keep my mods on a separate hard drive) and because it generates a_KEY, which I prefer to have. Also, I usually keep the GameplayData open whileworking on a mod so I can make sure there aren't other XMLs I want to add to themod. But everyone has their own preferences!

Edit: Tip has been added, thanks Kuree!

Logged

Visit My Blog | My Mod Index | My profile at MTS | Fix Your Premium Content

PRINTPages: [1]

Simlogical and the Dead End Nights » Forum » The Sims 3 » TS3 Tutorials and Reference »Gameplay Tuts and Refs (YibToilet: Nona Mena) » How to Make an XML Tuning Mod

« previous next »

Author Topic: How to Make an XML Tuning Mod (Read 11753 times)

0 Members and 1 Guest are viewing this topic.

« previous next »

Jump to: ===> Gameplay Tuts and Refs go

This site gives youcookies (no, not cooties...)

FIND STUFFClick here to look for

downloads, tutorials ortools by our easykeyword search.

SMF 2.0.5 | SMF © 2013, Simple MachinesTinyPortal © 2005-2012

XHTML RSS WAP2

Home Forum Help Search Calendar Login Register

Recommended