Difference between revisions of "Game Help:TS4 CC Basics"

From SimsWiki
Jump to: navigation, search
(Installing Custom Content)
(Testing for problem CC just takes time and effort.)
 
(7 intermediate revisions by one user not shown)
Line 22: Line 22:
 
Custom Content should be installed in the user documents directory, as follows:
 
Custom Content should be installed in the user documents directory, as follows:
  
====The Sims 4 Create A Sim Demo===
+
====The Sims 4 Create A Sim Demo====
 
* '''Windows XP:'''
 
* '''Windows XP:'''
 
**C:\Documents and Settings\<user>\My Documents\Electronic Arts\The Sims 4 Create A Sim Demo\Mods
 
**C:\Documents and Settings\<user>\My Documents\Electronic Arts\The Sims 4 Create A Sim Demo\Mods
Line 171: Line 171:
 
* '''[[Game_Help:Installing_TS4_Lots|Installing Sims 4 Lots]]'''
 
* '''[[Game_Help:Installing_TS4_Lots|Installing Sims 4 Lots]]'''
  
==Removing Custom Content==
+
===Data Formats===
 +
A number of .bt files have been provided along with the document. These files describe some of our key
 +
data formats and can be loaded by “010 Editor” by SweetScape software (http://www.sweetscape.com/),
 +
which is a binary data viewer that is well suited to reverse engineering data formats. We encourage you
 +
to support this software. However the supplied .bt files are easily readable in a text file editor as well.
  
 +
===Package Files===
 +
The application uses .package files to bundle its data. Package files are conceptually similar to a zip file, it
 +
is a file that contain a collection of other files. Please see the supplied file '''PackageTemplate.bt''' which
 +
describes the format of package files. Custom Content should be distributed as .package files, which users
 +
can then drop into their '''Mods''' directory to install.
 +
Unlike a zip file, which uses a human readable text name for the records it contains, the records within a
 +
.package file are identified by '''resource key'''.
  
So you've gotten content and you don't want it anymore - or your game is having problems and you need to take it out.  Don't panic!   
+
===Resource Keys===
 +
Resource keys are a fundamental concept in how the application loads data, they are what is used to
 +
identify data within package files.
 +
 
 +
'''Resource keys are 64 bits and are constructed as follows:'''
 +
32 Bits: Type
 +
32 Bits: Group
 +
64 Bits: Instance
 +
 
 +
'''Where:'''
 +
'''Type:''' Is the file type. You can think of this as mapping to a file extension. Examples of resource
 +
types would be: textures, geometry, etc.
 +
'''Group:''' Each resource type may choose to use the group however it likes.
 +
'''Instance:''' The instance is generally a hash of the source resource name. We rely on the hashing
 +
algorithm to generate unique instances to avoid conflicts between resources.
 +
 
 +
All three of these fields when combined uniquely identify a resource. If a piece of Custom Content or Mod
 +
is meant to override Maxis created content, then the resource key should be the same as the content it is
 +
overriding. However a more common case will be the addition of new content, in which case it is
 +
important resource keys are unique.
 +
 
 +
There are a number of best practices we recommend for resource key generation to ensure that content
 +
does not collide with Maxis authored content, or collide with content generated by other Custom Content
 +
creators.
 +
 
 +
===Resource Key Best Practices===
 +
In order to avoid conflicts with Maxis created content and other user created content, the following best
 +
practices for resource key generation are strongly recommended:
 +
 
 +
====Group:====
 +
*'''Set the top bit of the group to 1 for all resources.'''
 +
*Note that it is possible that some resource may not support this (there are many different
 +
types of resources in the game, and not all have been tested). If you find a resource that
 +
does not appear to allow setting the top bit of the group to 1 please post it in the Maxis
 +
modding forums at http://forums.thesims.com/ .
 +
 
 +
====Instance:====
 +
*'''ALWAYS''' use a hash for the instance of Custom Content or Mod records. You will notice
 +
that some records authored by Maxis use an incrementing number for the instance (for
 +
example, see resource type 0x034aeecb) -''' Custom Content should not do this as it will
 +
lead to collisions'''. See '''Catalog Instances''' section below for more information.
 +
*When generating the hash, it is recommended that it is constructed from a string that
 +
includes as much data as possible that is unique to the user generating the content. For
 +
example, including the author’s name and the name of the Mod. This reduces the
 +
probability of collisions between content generated by different users.
 +
*FNV-1 hash algorithm is recommended.
 +
*Furthermore, '''the top bit of the instance should be set to 1 to flag the content as Custom
 +
Content.''' Just generate the 64 bit hash and then force the top bit to 1.
 +
 
 +
==Removing/Testing Problem Custom Content==
 +
 
 +
 
 +
So you've gotten content and you don't want it anymore - or your game is having problems and you need to find the problem CC.  Don't panic!  Just us a logical process of elimination.
 +
 
 +
Go go to your Mods directory and move the content out of your game to a different folder outside of the game folders. Perhaps '''Desktop/TS4 CC'''. (Don't toss it, you may want it again.)
 +
 
 +
====Testing for problem CC just takes time and effort.==== 
 +
 
 +
*Make a holding folder on your desktop called '''TS4 CC''' and copy ALL the mod folder contents to that folder.
 +
*Make a folder on your desktop called '''Problem CC'''
 +
*Make a subfolder under the game's Mods folder called '''Good''' or whatever you want to call it.
 +
*Also make a subfolder under the game's Mods folder called '''TEST'''.
 +
*Now the tedious part. Take half the content from the '''Desktop/TS4 CC''' folder and stuff it in the '''MODS/TEST''' folder. Start the game.
 +
**Did the game work ?
 +
***Yes? - '''GREAT!'''  Move all the test folder contents to '''MODS/GOOD'''
 +
***No? - Temporarily stash it in the '''Desktop/Problem CC''' folder.
 +
**Move the remaining content from the '''Desktop/TS4 CC''' folder to the '''MODS/TEST''' folder.  Start the game.
 +
**Did the game work ?
 +
***Yes? - '''GREAT!'''  Move all the test folder contents to '''MODS/GOOD'''.
 +
***No? - Temporarily stash it in the '''Desktop/Problem CC''' folder.
 +
 
 +
Now you have to sort the stuff in the '''Desktop/Problem CC''' folder the same way. 
 +
 
 +
*Move it all to the '''Desktop/TS4 CC''' folder.
 +
**Move 1/2 of it to the '''MODS/TEST''' folder and start the game.
 +
Repeat the steps above as needed until you find the CC that is causing the problem.
  
<!--need more info
 
We have a full guide on removing custom content... click here: '''[[Game Help:Remove Sims4 Custom CC Wizard|Remove Sims 4 CC Wizard]]'''.  -->
 
  
  

Latest revision as of 21:34, 9 February 2019

Sims 4 Game Help Categories:

Custom Content  | Installation  | Gameplay Guides  | Technical & Graphics Issues  | Miscellaneous Issues

MTS Help Q&A Forums

Contents

[edit] The Sims 4 Custom Content Basics

This guide explains the basics of downloading and installing custom content for The Sims 4. It is not a full guide to every little detail, but a general overview to help you get started. It will also link you to other pages with more information, where needed.

[edit] Summary

This is a basic summary of the steps detailed below...

1. Information: Read about the content before you download it.
2. Download: Click on the download link to save the archive file (zip, rar, or 7z) to your computer. Put it somewhere easy to find, like a folder on your Desktop.
3. Extract: Use 7-Zip or Keka to extract the custom content file(s) from inside the archive file.
4. File Type? Identify which type of file(s) you've extracted - are they .package, .sims4pack, or .sim?
5. Install: Install the file(s) in the correct way, according to which type of file they are.
6. Play! Your custom content should be working!

More information on these steps is detailed in the rest of this article:

[edit] Installing Custom Content

Custom Content should be installed in the user documents directory, as follows:

[edit] The Sims 4 Create A Sim Demo

  • Windows XP:
    • C:\Documents and Settings\<user>\My Documents\Electronic Arts\The Sims 4 Create A Sim Demo\Mods
  • Windows Vista, Windows 7, Windows 8 or Windows 10:
    • C:\Users\<user>\Documents\Electronic Arts\The Sims 4 Create A Sim Demo\Mods

[edit] The Sims 4

  • Windows XP:
    • C:\Documents and Settings\<user>\My Documents\Electronic Arts\The Sims 4\Mods
  • Windows Vista, Windows 7, Windows 8 or Windows 10:
    • C:\Users\<user>\Documents\Electronic Arts\The Sims 4\Mods

Note: This directory location will vary depending on your installed language so non-English installation locations will differ.

When the application starts it will create this directory if it does not already exits.

You can disable all Mods and Custom Content by running the game with the command line -ignoremods. Command line options can be set in Origin by right clicking on The Sims 4 tile and selecting Game Properties.

[edit] The Resource.cfg File

Inside of the “Mods” directory, the game will create a file called Resource.cfg. This file describes the locations and file types that will be loaded by the application out of this directory. The Sims 4 uses .package files (described in more detail below) for its content. The default contents of the Resource.cfg file are:

Priority 500
PackedFile *.package
PackedFile *\*.package

This tells the application to load .package files out of the Mods directory, or any subdirectory. The priority 500 line tells the application to treat the content as high priority - which effectively means that it overrides any Maxis authored content in cases where the Mods directory contains records with the same resource key as Maxis authored content. More information on resource keys below.

This Resource.cfg file can be modified by the user and it will not be replaced by the application. However it is recommended that Custom Content or Mods do not require users to change this file in order to simplify the setup process for users.

Important Note about the Install Directory It is strongly recommended that Custom Content and Mods do not require the user to modify any files under the Windows Program Files directory, which is where the application is installed. This is because modifying these files may interfere with game updates, and make it difficult for users to diagnose problems introduced by such changes.

Note that if the game files under the Program Files directory are believed to be corrupted or modified, you can run Repair Game in Origin which will re-download the files. (Warning: this process can be time consuming.)

[edit] Read About the Content

It may be tempting to just go and download a whole bunch of stuff, but it really is important to read the info about each item before you choose to download it. There's some specific things you should look for:


[edit] Game Version/Patch

Certain content may only work with specific expansion or stuff packs, and may only work with certain patch versions. This is especially important with hacks/mods (things that modify game behavior - for example, allowing kleptomaniac sims to steal stuff whenever instead of only after 7 PM) as the game's code may have changed.

A mod that worked with a previous version of the game may have unwanted behavior in later versions (for example, outdated mods might prevent your sims from doing anything but mean interactions with each other).


[edit] Compatibility

Make sure the thing you're downloading is compatible with the rest of the content you have. Read carefully about what you're downloading, so you know if there are any known conflicts with other items, or if you can only have one of that type of thing.

Some content overrides (temporarily replaces) game content. For these types of things, you can only have one replacement - one set of default replacement eyes, one set of default replacement skintones (though often creators split them so you can choose only the female skins or only the face skins or whatever), etc.

Mods and hacks can also conflict. Things like core mods (such as Awesomemod) can often conflict with other core mods, and possibly other mods. Most creators of content of this type will list things that are known to conflict with their creation.

[edit] Where to Look In-Game

Most content will show up in a particular place in-game. Read the creator's description to see where - for example, a custom pattern might say that it shows up under the "fabric" category. A decorative object might say it shows up in "decorative - misc." Knowing where to look in-game means you'll know whether the item is showing up once you put it in your game, as you're looking in the right place for it.


[edit] Special Instructions

Some content may be non-standard in the way you have to install it. Sometimes you'll need to delete cache files, start a new save, or otherwise do something a bit different than usual.


[edit] Not Enough Info?

If the creator of the item you're looking to download hasn't given enough of the above information, don't risk it and try it anyway - you might cause problems in your game, or break it entirely! Instead, ask questions - post on the download thread if it's on a forum site, or find a contact link to email the creator if it's on a regular website.


[edit] Download

When you're sure you want that content and you know all about it, click on the download link to save it to your computer. We recommend you make a folder somewhere easy to find, like on your computer's Desktop or in My Documents. Name it something descriptive, like "TS4 Content" so you know what it is. Then you can save all your files to there and you don't have to hunt for them.

NOTE: It is important to name your backup folders correctly for the game you are using. All the sims versions have .package files but they DO NOT work in the other games. Using the package files from another game can crash your game.


[edit] Zip, Rar, and 7z Files

A zip, rar, or 7z file is what is known as an "archive" file. An archive is sort of like a folder on your computer. It has its own name and location, and it can contain other files and folders inside of it. An archive is a bit better than a folder, though, as the files inside it are compressed, so the space taken up on your computer is smaller. This also makes it faster to download, as there's less data being sent.


Opening an archive file and uncompressing the contents to use elsewhere is known as extracting. You will usually need a special program on your computer to extract from most archive files (though your computer may already know how to do this with zip files). There are many programs that can extract from archives, some better than others.


Before you get started with Sims 4 custom content, you should download and install one of these programs to extract from archives. These recommended programs are completely free and totally safe! Just save the program to your computer and double-click it to run it and install it like any program.


Once you've extracted the files from an archive, you can delete the original archive you downloaded - the extracted files are all you need.


  • Mac OSX: We recommend the use of Keka. For more information on installing Keka and extracting from archives using it, see the official Help pages.


[edit] Identifying File Types

Before you can use a particular file in your game, you need to know which type of file it is - its type will tell you what to do with it.

You can tell what type of file you have by looking at its file extension. Any other method - like seeing what type of icon it has - isn't really that accurate and can be misleading.

In Windows, you'll need to change an option so that you can view file extensions all the time. To do this:

1. Open Any Folder: First open any folder on your computer - it doesn't matter which one. Start > Documents will bring up the Documents folder, and you can do it there.
2. Folder Options:
Windows XP: Click on the Tools menu, then Folder Options.
Windows Vista: Click on the Layout button at the top left (to the left of the Views button) and choose Folder Options
Windows 7: Click on Organize at the top left, and then choose "Folder and search options".
You'll get a window that says "Folder Options" at the top.
3. Show Extensions: Click on the View tab, and then look in the list for "Hide extensions for known file types" - make sure this option is not ticked (so the box is empty, with no checkmark) and then click OK.


You should now be seeing file extensions on all files on your computer. If you look at custom content files you download, it should be obvious what type they are - they'll end with .package, .sims4pack, or .sim


[edit] Types of Sims 4 Files

How a Sims 4 custom content file files gets installed depends on what kind of file it is - a .sim is installed differently than a .sims4pack. So before you can do anything, you need to know how to identify which is which! Make sure you've read the above section on Identifying File Types!

The three main types of custom content are .package, sims, and lots:

[edit] Data Formats

A number of .bt files have been provided along with the document. These files describe some of our key data formats and can be loaded by “010 Editor” by SweetScape software (http://www.sweetscape.com/), which is a binary data viewer that is well suited to reverse engineering data formats. We encourage you to support this software. However the supplied .bt files are easily readable in a text file editor as well.

[edit] Package Files

The application uses .package files to bundle its data. Package files are conceptually similar to a zip file, it is a file that contain a collection of other files. Please see the supplied file PackageTemplate.bt which describes the format of package files. Custom Content should be distributed as .package files, which users can then drop into their Mods directory to install. Unlike a zip file, which uses a human readable text name for the records it contains, the records within a .package file are identified by resource key.

[edit] Resource Keys

Resource keys are a fundamental concept in how the application loads data, they are what is used to identify data within package files.

Resource keys are 64 bits and are constructed as follows:

32 Bits: Type
32 Bits: Group
64 Bits: Instance

Where:

Type: Is the file type. You can think of this as mapping to a file extension. Examples of resource 
types would be: textures, geometry, etc.
Group: Each resource type may choose to use the group however it likes.
Instance: The instance is generally a hash of the source resource name. We rely on the hashing
algorithm to generate unique instances to avoid conflicts between resources.

All three of these fields when combined uniquely identify a resource. If a piece of Custom Content or Mod is meant to override Maxis created content, then the resource key should be the same as the content it is overriding. However a more common case will be the addition of new content, in which case it is important resource keys are unique.

There are a number of best practices we recommend for resource key generation to ensure that content does not collide with Maxis authored content, or collide with content generated by other Custom Content creators.

[edit] Resource Key Best Practices

In order to avoid conflicts with Maxis created content and other user created content, the following best practices for resource key generation are strongly recommended:

[edit] Group:

  • Set the top bit of the group to 1 for all resources.
  • Note that it is possible that some resource may not support this (there are many different

types of resources in the game, and not all have been tested). If you find a resource that does not appear to allow setting the top bit of the group to 1 please post it in the Maxis modding forums at http://forums.thesims.com/ .

[edit] Instance:

  • ALWAYS use a hash for the instance of Custom Content or Mod records. You will notice

that some records authored by Maxis use an incrementing number for the instance (for example, see resource type 0x034aeecb) - Custom Content should not do this as it will lead to collisions. See Catalog Instances section below for more information.

  • When generating the hash, it is recommended that it is constructed from a string that

includes as much data as possible that is unique to the user generating the content. For example, including the author’s name and the name of the Mod. This reduces the probability of collisions between content generated by different users.

  • FNV-1 hash algorithm is recommended.
  • Furthermore, the top bit of the instance should be set to 1 to flag the content as Custom

Content. Just generate the 64 bit hash and then force the top bit to 1.

[edit] Removing/Testing Problem Custom Content

So you've gotten content and you don't want it anymore - or your game is having problems and you need to find the problem CC. Don't panic! Just us a logical process of elimination.

Go go to your Mods directory and move the content out of your game to a different folder outside of the game folders. Perhaps Desktop/TS4 CC. (Don't toss it, you may want it again.)

[edit] Testing for problem CC just takes time and effort.

  • Make a holding folder on your desktop called TS4 CC and copy ALL the mod folder contents to that folder.
  • Make a folder on your desktop called Problem CC
  • Make a subfolder under the game's Mods folder called Good or whatever you want to call it.
  • Also make a subfolder under the game's Mods folder called TEST.
  • Now the tedious part. Take half the content from the Desktop/TS4 CC folder and stuff it in the MODS/TEST folder. Start the game.
    • Did the game work ?
      • Yes? - GREAT! Move all the test folder contents to MODS/GOOD
      • No? - Temporarily stash it in the Desktop/Problem CC folder.
    • Move the remaining content from the Desktop/TS4 CC folder to the MODS/TEST folder. Start the game.
    • Did the game work ?
      • Yes? - GREAT! Move all the test folder contents to MODS/GOOD.
      • No? - Temporarily stash it in the Desktop/Problem CC folder.

Now you have to sort the stuff in the Desktop/Problem CC folder the same way.

  • Move it all to the Desktop/TS4 CC folder.
    • Move 1/2 of it to the MODS/TEST folder and start the game.

Repeat the steps above as needed until you find the CC that is causing the problem.


Sims 4 Game Help Categories:

Custom Content  | Installation  | Gameplay Guides  | Technical & Graphics Issues  | Miscellaneous Issues

MTS Help Q&A Forums
Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox