Difference between revisions of "Sims 3:Catalog Resource"
(→Material Block: Remove special case for Control Code 2F) |
(→Material Block) |
||
Line 206: | Line 206: | ||
BYTE[] // padding with 0x40 bytes, does not count as a list entry | BYTE[] // padding with 0x40 bytes, does not count as a list entry | ||
--else | --else | ||
− | |||
BYTE typecode | BYTE typecode | ||
--insert data for typecode // see [[#Typecodes|below]] | --insert data for typecode // see [[#Typecodes|below]] |
Revision as of 21:13, 6 October 2010
Modding Reference by Category | |
---|---|
Sims 3 :DBPF | File Types | RCOL(Scene) | Catalog Resource | String Table | Key Table | TS3 Programmer's Reference |
Contents |
Overview
The following resource types are used for catalog entries.
Type ID | Tag | Name |
---|---|---|
0x0418FE2A | CFEN | Catalog Fence |
0x049CA4CD | CSTR | Catalog Stairs |
0x04AC5D93 | CPRX | Catalog Proxy Product |
0x04B30669 | CTTL | Catalog Terrain Geometry Brush |
0x04C58103 | CRAL | Catalog Railing |
0x04ED4BB2 | CTPT | Catalog Terrain Paint Brush |
0x04F3CC01 | CFIR | Catalog Fireplace |
0x060B390C | CWAT | Catalog Terrain Water Brush |
0x316C78F2 | CFND | Catalog Foundation |
0x319E4F1D | OBJD | Catalog Object |
0x515CA4CD | CWAL | Catalog Wall/Floor Pattern |
0x9151E6BC | CWST | Catalog Wall Style |
0x91EDBD3E | CRST | Catalog Roof Style |
0xF1EDBD86 | CRMT | Catalog Roof Pattern |
Format
Common
This block appears in all Catalog Resources. The name and description GUIDs can be looked up in the STBL.
DWORD Version // Earliest seen is 0x0000000C QWORD Name GUID // Key into STBL for localised value to display QWORD Desc GUID // Key into STBL for localised value to display 7BITSTR // "Internal" Catalog Name 7BITSTR // "Internal" Catalog Description FLOAT price FLOAT // always 1.0 4BYTE // binary zeros BYTE QWORD IID of PNG icon // When not zero, this is the catalogue thumbnail; // otherwise image is found by IID matching (see below) --if Version >= 0x0000000D BYTE --if Version >= 0x0000000E BYTE --if Version >= 0x0000000F DWORD
Thumbnail
There are two ways of finding the thumbnails for a catalogue resource, depending on if IID of PNG icon is zero or not. The Resource Type is always one of three values (representing small, medium or large). Medium is the type of small plus 1; large is the type of small plus 2. There can be multiple thumbnails, differing only in their group, representing the different default appearances for the catalogue resource.
- When non-zero
Thumbnail Types
The IID of the thumbnail is IID of PNG icon.
- When zero
- The thumbnail resource type type depends on the catalogue resource type:
Catalogue Type[4] Thumbnail Types Object
Proxy Product
Terrain Geometry Brush
Terrain Water Brush
Foundation[1]
Roof Style
Roof Pattern
- The IID of the thumbnail is the IID of the catalog resource.
- Notes
- [1] I'm not sure this has been verified.
- [2] s3oc shows the thumbnail for the first OBJD rather than this.
- [3] For all catalogue resources apart from Wall/Floor Pattern, a thumb with a Resource Group of zero is acceptable; for Wall/Floor Patterns, however, a non-zero Resource Group is needed.
- [4] Walls do not have thumbnails.
Material List
This section is only present in Objects, Fences (EP1+), Railings (EP1+) and Wall/Floor Patterns; it differs slightly for Wall/Floor Patterns, as annotated below.
Purpose
This is a list of all preset color options that a Catalog Resource has. Each preset has different settings for patterns used and colors applied. They are listed in the order that they appear in game. You can safely delete them. (The screen shot shows how they are presented in s3pe.)
Format
DWORD Count1 --repetition Count1 Material: BYTE type if (type != 1) DWORD DWORD offset // from here to after TGI Block List WORD DWORD tgi offset // see Sims 3:Key table DWORD tgi size // see Sims 3:Key table --insert Material Block --insert TGI Block List // see Sims 3:Key table DWORD --if Wall/Floor Style: DWORD DWORD DWORD
Common Values
Not all values are present in all catalog resources.
Name | Value |
---|---|
Material Type | 0x01 1 |
Unknown 1 | |
Unknown 2 | |
Unknown 3 | Order thumbs are shown in catalog 3 |
Unknown 4 | Category Flag2 |
Unknown 5 | |
Unknown 6 |
Notes
- [1] Walls - Changing to 0x00 - Entire wall disappears from catalog with all presets
- [2] Present for Walls/Floors
- [3] Values must be non-zero and unique. Changing the value does not re-order them in catalog but walls will show the thumb/catalog in new order but does not move the actual wall preset order.
Material Block
This block holds the variables used in the complate to render a texture, equivalent to the preset XML used for CAS parts. TGI Block List indexes refer to the TGI Block List following this Material Block.
BYTE index // TGI Block List entry for Complate XML to which these variables should be applied --insert data for typecode 0x01 // see below --insert data for typecode 0x01 // see below DWORD count1 --repetition count1 Type Code List: BYTE controlCode --if controlCode is 0x40: BYTE[] // padding with 0x40 bytes, does not count as a list entry --else BYTE typecode --insert data for typecode // see below DWORD count2 --repeat(count2) Material Block // sub-blocks used for pattern definitions
Complate Variables
Complate variables are referenced by the same strings as they are in the complate XML. All the standard complate elements are indexed via the string table so are not typically included as a literal string.
Typecodes
Typecode | Data | Comments |
---|---|---|
0x01 | BYTE flags |
If (flags & 0x40 set) - read a byte; else use (flags & 0x3F); call this "index" If (flags & 0x80 set) - a string, length is "index" If (flags & 0x80 clear) - a string from the string table, identified by "index" |
0x02 | (BYTE)(BYTE)(BYTE)(BYTE) | ARGB color |
0x03 | (BYTE) | TGI Block List entry |
0x04 | (FLOAT) | |
0x05 | (FLOAT)(FLOAT) | XY? |
0x06 | (FLOAT)(FLOAT)(FLOAT) | XYZ? |
0x07 | (BYTE) | Boolean |
Modding Reference by Category | |
---|---|
Sims 3 :DBPF | File Types | RCOL(Scene) | Catalog Resource | String Table | Key Table | TS3 Programmer's Reference |