{Script}

{CSS}

Resource.cfg Overview

Recently I've came across many people who had some questions regarding Resource.cfg, so I decided to write a little "overview" about it.
Hopefully if one search around one may find this.

What is Resource.cfg and what does it do?
- Resource.cfg is an plain-text file used by the game's engine to read resources (hacks, meshes, textures, etc.);

A default Resource.cfg is based on the following:
Priority 500
PackedFile Packages/*.package
PackedFile Packages/*/*.package
PackedFile Packages/*/*/*.package
PackedFile Packages/*/*/*/*.package
PackedFile Packages/*/*/*/*/*.package

The first line, we see the instruction Priority; Which goes from to , basically.
This will set the priority of the following resources the engine will load.
For example, a higher priority will replace in the cache, whatever resource was loaded with a lower priority. IF there is any.

The second line, is where the wildcard/filename will be handled.
The command PackedFile will instruct the file(s) to be loaded into the resource cache.
In the example we see the wildcard * which represents every valid character possible in a file name.
So in that case it will try to load every file at the folder Packages where the filename ends with .package ;
The wildcard serves as well to directory names, which will also apply to whatever directories you specify.
:
You can add one last parameter to the PackedFile command, which is "... autoupdate" (Without quotes);
It's functionality is to instruct that the file(s) that will be read as you specified in the line it is written will be always reload into the resource cache.

This means, that the engine will "watch" the file(s) for any changes, and update it into the resource cache memory.
This is a MUST for every creator, because if they need to check their content ingame and still need to do some retouches in something, they don't need to close the game and open again, just because you changed a package content.
An example:
PackedFile Packages/AlwaysReloadThese/*.package ... autoupdate

Every package that is inside Packages/AlwaysReloadThese/ will be observed by the game's engine.
Though, the changes are not dynamical in case of CAS-Related packages.
To make it reload the changes of a CAS-Related package you will need to open CAS and make any change, like change a subtle range of a color and apply.
By doing that, it will updated the resource cache and show you the content updated.

Through my observations I saw that this statement only applies when you are in-game already.
If you are in CAS, the changes are made, sometimes, in real-time.

Building a custom Resource.cfg
If you are like me, downloads everything in sight, and keep your folder all cluttered,
It's your salvation to organize everything, as in, keep CC cars in a folder specifically to cars, Hacks in a folder named Hacks, and so on...
In the example used of the default Resoure.cfg, it will attempt to read every .package in an extent of 5 subfolders;

So you better create some subfolders to keep track of what-is-what!

In May 28, 2010 EA released a new patch within the release of the expansion Ambitions, which gave us a new path to put our packages.
Located at your Documents folder:
Windows XP: <Drive>:\Documments and Settings\<User Name>\Documents\Electronic Arts\The Sims 3\Mods
Windows Vista/7: <Drive>:\Users\<User Name>\Documents\Electronic Arts\The Sims 3\Mods

In which the Resource.cfg file need to be INSIDE the Mods folder.
If you need more help, check out this great and extent article at Mod The Sims.

If you want to ask anything, just post a comment or send me an email and I will reply as soon as possible.


0 comments :