Tutorial:Tiptorial:Resources and Reskeys

From SimsWiki
Jump to: navigation, search

Contents

Resources and Reskeys

Resources and reskeys are really very simple concepts, and easy to understand. Unfortunately, this means that tutorial writers (guilty!) often skip over them, and assume that newbies will figure it out themselves. Most newbies do figure it out - but sometimes in a slightly weird, or incomplete, way. This tiptorial will briefly explain what resources and reskeys are, and how they work; modding really is much easier if you have a complete grasp of the basics.

Resources

What are they, and how do they work?

Resources are, if you like, the basic building blocks that Sims 3 is made of. Every element of the game is made up of one or several resources. Most resources are very small, containing just one small element of one single thing.

Resources come in many different types, some of which we understand very well, some of which we know almost nothing about. Some types of resources you probably already know about, even if you don't realise it: meshes are GEOM resources for CAS meshes, or MLOD and MODL resources for objects, and textures are _IMG resources. Then there are some more types of resources which are less common and obvious, but which make sense if you think about them: for example, CASP and OBJD resources link up other resources, making sure that the right object or hair gets the right mesh and the texture to go with it.

If you're really interested, there is a full list of resource types on the wiki. But beware - it's technical, and you won't understand all (or much) of it. I certainly don't! Link: Sims 3:PackedFileTypes.

Resources aren't files, but they are a sort of mini-file. They are contained in .package files - a .package file can contain thousands of resources, or it can contain just one, or any number inbetween.

As a creator, when you make new content or change existing parts of the game, you will do so by extracting the resources out of the game's .package files, changing them, and then putting them back into a new .package file, which is what downloaders get. Some programs, like CTU, S3OC, and TSRW hide this process, but that's still what's going on, even if you can't see it happening.

How do I find them?

Resources for CC are found in the .package files for download. The resources for EA things, and for the game itself, are found in a series of .package files in Program Files. There are too many to list here, but they include FullBuildx.package files, found in the Game/GameData/Shared/Packages folder for the basegame and each EP, which contain all the objects and CAS content; and the GameplayData.package, found in the Game/Bin/GameplayData folder for the basegame only (the EP folders also have this file, but it shouldn't be used in modding), which contain all the XML resources used in making tuning mods, as well as things like lighting and camera settings.

Opening any .package file in S3PE (or another package editor, such as Postal) will list all the resources in that .package file. You can extract them by right-clicking, and going Extract -> To file. However, often you'll have no idea which resource you need, and when you do know, you could spend weeks looking for it - that's where reskeys come in!


Reskeys

What are they?

Reskeys, or Resource Keys, are unique ID numbers which the game uses to tell which resource is which. If you have 6 different textures for 6 different objects, you need to know which one is which - so you give them all a unique reskey to identify them by. Reskeys are also sometimes called TGIs.

Reskeys are in the format of 8 numbers or letters, followed by a : or _, then another 8 numbers or letter, another : or _, and finally 16 more numbers and letters. Some examples of reskeys could be:

  • 319E4F1D:18000000:0000000000989ED8
  • 00B2D882:00000000:73C5661B702C3FEF
  • 03334063:00000000:00000000F77AA18D
  • 626F60CE:00000003:F3DFDCAB5EC964B7

There is method to the madness! The three parts of the reskey each serve a different purpose, and provide different information.

Type

This is the first part of the reskey - the first 8 characters, before the :. It tells us what type of resource we're dealing with. So, looking at our example reskeys:

  • 319E4F1D:18000000:0000000000989ED8 - the bold type section is the code for OBJD resources, so this reskey is for an OBJD resource.
  • 00B2D882:00000000:73C5661B702C3FEF - the type section is the code for _IMG resources - textures - so this reskey is for a texture resource.
  • 03334063:00000000:00000000F77AA18D - the type section is the code for _XML resources, so this is the reskey for an XML resource.
  • 626F60CE:00000003:F3DFDCAB5EC964B7 - the type section is the code for a THUM resource, so this key is for a thumbnail.

Group

The second part usually tells us which EP the item is from. There's no nice, simple pattern here - sadly, we don't just get 1, 2, 3 and so on. The groups for the different EPs are thus:

  • Basegame: 0x00000000
  • World Adventures:
  • High End Loft Stuff:
  • Ambitions: 0x18000000
  • Fast Lane Stuff:
  • Late Night:
  • Somethingorother:
  • Generations:

So, looking at our example reskeys:

  • 319E4F1D:18000000:0000000000989ED8 - This reskey is for a resource from Ambitions EP.
  • 00B2D882:00000000:73C5661B702C3FEF - This reskey is for a basegame resource.
  • 03334063:00000000:00000000F77AA18D - This is another basegame resource.
  • 626F60CE:00000003:F3DFDCAB5EC964B7 - This one doesn't fit the pattern! When you find a Group ID which begins with zeroes, but ends in a number, it's a special case - there are only a few times when this happens, and you don't really need to worry about them. In this case, it's because this reskey is for the thumbnail for the 3rd design of a clothing item. It's also possible to see end numbers and EP numbers combined, for example 18000003.

Instance

The Instance is a unique ID number, and is usually nonsense - just a random number. Sometimes, the Instance may be the name of the resource, turned into a "hash" number using a converter.

For example, this resource:

067CAA11:00000000:DFEB1DEDFBD70C2E

Has this name:

whiteriderMTS_NeckThicknessSliderLeft

And putting whiteriderMTS_NeckThicknessSliderLeft through a hash converter, generates this: 0xdfeb1dedfbd70c2e - the Instance ID from the reskey.

Using Reskeys

Creating New Reskeys

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox