Difference between revisions of "Sims 3:Catalog Resource"
HugeLunatic (Talk | contribs) (→Material List) |
(→Typecodes) |
||
(43 intermediate revisions by 4 users not shown) | |||
Line 3: | Line 3: | ||
==Overview== | ==Overview== | ||
The following resource types are used for catalog entries. | The following resource types are used for catalog entries. | ||
− | {| class="wikitable" border="1" | + | {| class="wikitable sortable" border="1" |
|- | |- | ||
! Type ID!!Tag!!Name | ! Type ID!!Tag!!Name | ||
Line 22: | Line 22: | ||
|- | |- | ||
| [[Sims_3:0x060B390C|0x060B390C]]||CWAT||Catalog Terrain Water Brush | | [[Sims_3:0x060B390C|0x060B390C]]||CWAT||Catalog Terrain Water Brush | ||
+ | |- | ||
+ | | [[Sims_3:0x0A36F07A|0x0A36F07A]]||CCFP||Catalog Fountains and Pools | ||
|- | |- | ||
| [[Sims_3:0x316C78F2|0x316C78F2]]||CFND||Catalog Foundation | | [[Sims_3:0x316C78F2|0x316C78F2]]||CFND||Catalog Foundation | ||
Line 39: | Line 41: | ||
===Common=== | ===Common=== | ||
This block appears in all Catalog Resources. The name and description GUIDs can be looked up in the [[Sims_3:0x220557DA|STBL]]. | This block appears in all Catalog Resources. The name and description GUIDs can be looked up in the [[Sims_3:0x220557DA|STBL]]. | ||
− | DWORD Version // | + | DWORD Version // Earliest seen is 0x0000000C |
− | QWORD Name GUID // | + | QWORD Name GUID // Key into [[Sims 3:0x220557DA|STBL]] for localised value to display |
− | QWORD Desc GUID // | + | QWORD Desc GUID // Key into [[Sims 3:0x220557DA|STBL]] for localised value to display |
− | 7BITSTR // Catalog Name | + | 7BITSTR // "Internal" Catalog Name |
− | 7BITSTR // Catalog | + | 7BITSTR // "Internal" Catalog Description |
FLOAT price | FLOAT price | ||
− | FLOAT //always 1.0 | + | FLOAT NicenessMultiplier // always 1.0 |
− | + | FLOAT CrapScore // binary zeros | |
− | BYTE | + | BYTE [[Sims_3:Catalog_Resource#Common_Flags|(BuildBuyProductStatusFlags)]] |
− | QWORD | + | QWORD IID of PNG icon // When not zero, this is the catalogue thumbnail; |
+ | // otherwise image is found by IID matching (see [[Sims_3:Catalog_Resource#Thumbnail|below]]) | ||
+ | BYTE //0x00 | ||
+ | FLOAT EnvironmentScore | ||
+ | DWORD FireType //0=DoesNotBurn,1=Chars,2=AshPile | ||
+ | BYTE IsStealable //boolean | ||
+ | BYTE IsReposessable //boolean | ||
+ | DWORD UISortIndex | ||
--if Version >= 0x0000000D | --if Version >= 0x0000000D | ||
− | BYTE | + | BYTE isPlaceableOnRoof //boolean |
+ | --if Version >= 0x0000000E | ||
+ | BYTE isVisibleInWorldbuilder //boolean | ||
+ | --if Version >= 0x0000000F | ||
+ | DWORD ProductName //hashed | ||
+ | ====Common Flags==== | ||
+ | {| class="wikitable" border="1" | ||
+ | ! colspan="3" | BuildBuyProductStatusFlags | ||
+ | |- | ||
+ | ! Flag | ||
+ | ! Description | ||
+ | |- | ||
+ | |0x00000001|| ShowInCatalog | ||
+ | |- | ||
+ | |0x00000002|| ProductForTesting | ||
+ | |- | ||
+ | |0x00000004|| ProductInDevelopment | ||
+ | |- | ||
+ | |0x00000008|| ShippingProduct | ||
+ | |- | ||
+ | |0x00000010|| DebugProduct | ||
+ | |- | ||
+ | |0x00000020|| ObjProductMadeUsingNewEntryScheme | ||
+ | |} | ||
+ | ====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 | ||
+ | :{| class="wikitable" border="1" | ||
+ | !Thumbnail Types | ||
+ | |- | ||
+ | | | ||
+ | [[Sims 3:0x2E75C764|0x2E75C764]], | ||
+ | [[Sims 3:0x2E75C765|0x2E75C765]], | ||
+ | [[Sims 3:0x2E75C766|0x2E75C766]] | ||
+ | |} | ||
+ | The IID of the thumbnail is ''IID of PNG icon''. | ||
+ | ;When zero | ||
+ | :The thumbnail resource type type depends on the catalogue resource type: | ||
+ | :{| class="wikitable" border="1" | ||
+ | !Catalogue Type{{ref|4}}!!Thumbnail Types | ||
+ | |- | ||
+ | | | ||
+ | [[Sims 3:0x319E4F1D|Object]] | ||
+ | <br/>[[Sims 3:0x04AC5D93|Proxy Product]] | ||
+ | <br/>[[Sims 3:0x04B30669|Terrain Geometry Brush]] | ||
+ | <br/>[[Sims 3:0x060B390C|Terrain Water Brush]] | ||
+ | <br/>[[Sims 3:0x316C78F2|Foundation]]{{ref|1}} | ||
+ | <br/>[[Sims 3:0x91EDBD3E|Roof Style]] | ||
+ | <br/>[[Sims 3:0xF1EDBD86|Roof Pattern]] | ||
+ | | | ||
+ | [[Sims 3:0x2E75C764|0x0580A2B4]], | ||
+ | [[Sims 3:0x2E75C765|0x0580A2B5]], | ||
+ | [[Sims 3:0x2E75C766|0x0580A2B6]] | ||
+ | |- | ||
+ | | | ||
+ | [[Sims 3:0x0418FE2A|Fence]] | ||
+ | | | ||
+ | [[Sims 3:0x2653E3C8|0x2653E3C8]], | ||
+ | [[Sims 3:0x2653E3C9|0x2653E3C9]], | ||
+ | [[Sims 3:0x2653E3CA|0x2653E3CA]] | ||
+ | |- | ||
+ | | | ||
+ | [[Sims 3:0x049CA4CD|Stairs]] | ||
+ | | | ||
+ | [[Sims 3:0x5DE9DBA0|0x5DE9DBA0]], | ||
+ | [[Sims 3:0x5DE9DBA1|0x5DE9DBA1]], | ||
+ | [[Sims 3:0x5DE9DBA2|0x5DE9DBA2]] | ||
+ | |- | ||
+ | | | ||
+ | [[Sims 3:0x04C58103|Railing]] | ||
+ | | | ||
+ | [[Sims 3:0x2D4284F0|0x2D4284F0]], | ||
+ | [[Sims 3:0x2D4284F1|0x2D4284F1]], | ||
+ | [[Sims 3:0x2D4284F2|0x2D4284F2]] | ||
+ | |- | ||
+ | | | ||
+ | [[Sims 3:0x04ED4BB2|Terrain Paint Brush]] | ||
+ | | | ||
+ | [[Sims 3:0x05B1B524|0x05B1B524]], | ||
+ | [[Sims 3:0x05B1B525|0x05B1B525]], | ||
+ | [[Sims 3:0x05B1B526|0x05B1B526]] | ||
+ | |- | ||
+ | | | ||
+ | [[Sims 3:0x04F3CC01|Fireplace]]{{ref|2}} | ||
+ | | | ||
+ | [[Sims 3:0x05B17698|0x05B17698]], | ||
+ | [[Sims 3:0x05B17699|0x05B17699]], | ||
+ | [[Sims 3:0x05B1769A|0x05B1769A]] | ||
+ | |- | ||
+ | | | ||
+ | [[Sims 3:0x515CA4CD|Wall/Floor Pattern]]{{ref|3}} | ||
+ | | | ||
+ | [[Sims 3:0x0589DC44|0x0589DC44]], | ||
+ | [[Sims 3:0x0589DC45|0x0589DC45]], | ||
+ | [[Sims 3:0x0589DC46|0x0589DC46]] | ||
+ | |} | ||
+ | :The IID of the thumbnail is the IID of the catalog resource. | ||
+ | |||
+ | :;Notes | ||
+ | ::{{note|1}}<s>I'm not sure this has been verified.</s> (PLJ: seems to work...) | ||
+ | ::{{note|2}}[[Tutorials:TS3_ModdingTools#s3oc: Sims 3 Object Cloner|s3oc]] shows the thumbnail for the first OBJD rather than this. | ||
+ | ::{{note|3}}For all catalogue resources apart from [[Sims 3:0x515CA4CD|Wall/Floor Pattern]], a thumb with a Resource Group of zero is acceptable; for [[Sims 3:0x515CA4CD|Wall/Floor Pattern]]s, however, a non-zero Resource Group is needed. | ||
+ | ::{{note|4}}[[Sims 3:0x9151E6BC|Wall]]s do not have thumbnails. | ||
===Material List=== | ===Material List=== | ||
Line 57: | Line 168: | ||
====Purpose==== | ====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 [[Tutorials:TS3_ModdingTools#S3PE_Demo_Package_Editor_by_Peter_Jones|s3pe]].) | 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 [[Tutorials:TS3_ModdingTools#S3PE_Demo_Package_Editor_by_Peter_Jones|s3pe]].) | ||
− | |||
====Format==== | ====Format==== | ||
Line 70: | Line 180: | ||
--insert [[#Material Block|Material Block]] | --insert [[#Material Block|Material Block]] | ||
--insert TGI Block List // see [[Sims 3:Key table]] | --insert TGI Block List // see [[Sims 3:Key table]] | ||
− | DWORD | + | DWORD ID |
--if Wall/Floor Style: | --if Wall/Floor Style: | ||
− | DWORD | + | DWORD [[Sims_3:0x515CA4CD#Sort_Flags|Category]] //varies on type(wall or floor) |
− | DWORD | + | DWORD GroupName // hashed |
− | DWORD | + | DWORD GroupSort |
+ | =====Common Values===== | ||
+ | Not all values are present in all catalog resources. | ||
+ | |||
+ | {| class="wikitable" border="1" | ||
+ | ! Name | ||
+ | ! Value | ||
+ | |- | ||
+ | | Material Type | ||
+ | | 0x01 <sup>[[Sims_3:Catalog_Resource#Notes|1]]</sup> | ||
+ | |- | ||
+ | | Unknown 1 | ||
+ | | | ||
+ | |- | ||
+ | | Unknown 2 | ||
+ | | | ||
+ | |- | ||
+ | | Unknown 3 | ||
+ | | Order thumbs are shown in catalog <sup>[[Sims_3:Catalog_Resource#Notes|3]]</sup> | ||
+ | |- | ||
+ | | Unknown 4<sup>[[Sims_3:Catalog_Resource#Notes|2]]</sup> | ||
+ | | [[Sims_3:0x515CA4CD#Category_Flags|Category Flag]] | ||
+ | |- | ||
+ | | Unknown 5<sup>[[Sims_3:Catalog_Resource#Notes|2]]</sup> | ||
+ | | | ||
+ | |- | ||
+ | | Unknown 6<sup>[[Sims_3:Catalog_Resource#Notes|2]]</sup> | ||
+ | | | ||
+ | |} | ||
+ | |||
+ | ======Notes====== | ||
+ | # Walls - Changing to 0x00 - Entire wall disappears from catalog with all presets | ||
+ | # Present for Walls/Floors | ||
+ | # 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. | ||
+ | |||
+ | <br clear="all"> | ||
+ | |||
====Material Block==== | ====Material Block==== | ||
− | This block holds the variables used in the complate to render a texture | + | This block holds the variables used in the complate to render a texture. |
− | BYTE index | + | [[Sims 3:Key table|TGI Block List]] indexes refer to the TGI Block List following this Material Block. |
− | + | BYTE index // [[Sims 3:Key table|TGI Block List]] entry for [[Sims 3:0x044AE110|Complate XML]] to which these variables should be applied | |
− | + | [[Sims_3:Catalog_Resource#Complate Variables|Complate String]] Name | |
+ | [[Sims_3:Catalog_Resource#Complate Variables|Complate String]] Pattern | ||
DWORD count1 | DWORD count1 | ||
− | --repetition count1 | + | --repetition count1 [[Sims_3:Catalog_Resource#Complate Variables|Complate Variable]] List: |
− | + | [[Sims_3:Catalog_Resource#Complate Variables|Complate String]] variableName | |
− | + | BYTE typecode | |
− | + | --insert data for typecode // see [[#Typecodes|below]] | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
DWORD count2 | DWORD count2 | ||
--repeat(count2) | --repeat(count2) | ||
Line 96: | Line 237: | ||
=====Complate Variables===== | =====Complate Variables===== | ||
− | Complate variables are referenced by the same strings as they are in the [[Sims 3:0x044AE110| | + | Complate variables are referenced by the same strings as they are in the [[Sims 3:0x044AE110|Complate XML]]. All the standard complate elements are indexed via the [[/StringTable|string table]] so are not typically included as a literal string. |
+ | |||
+ | To read the string | ||
+ | #First read a byte(A). | ||
+ | #If A & 0x80 != 0, it is a literal string, otherwise it is an index into the [[/StringTable|string table]]. | ||
+ | #If A & 0x40 == 0, The index will be (A), or the length will be (B&0x7F). | ||
+ | #If A & 0x40 != 0, read a second byte(B). The index will be (A+B), or the length will be (B). | ||
+ | |||
+ | ex. in C# | ||
+ | static string ReadString(BinaryReader br) | ||
+ | { | ||
+ | int a = br.ReadByte(); | ||
+ | if (a == 0) return string.Empty; | ||
+ | if ((a & 0x80) != 0) | ||
+ | { | ||
+ | return Encoding.ASCII.GetString(br.ReadBytes((a & 0x40) != 0 ? br.ReadByte() : a & 0x3F)); | ||
+ | } | ||
+ | if ((a & 0x40) != 0) a = (a & 0x3F) + br.ReadByte(); | ||
+ | return StringDb[a]; | ||
+ | } | ||
+ | |||
=====Typecodes===== | =====Typecodes===== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 105: | Line 266: | ||
|- | |- | ||
| 0x01 | | 0x01 | ||
− | | | + | | ([[Sims_3:Catalog_Resource#Complate Variables|Complate String]]) |
− | + | | Complate Variable name | |
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
| 0x02 | | 0x02 | ||
| (BYTE)(BYTE)(BYTE)(BYTE) | | (BYTE)(BYTE)(BYTE)(BYTE) | ||
− | | | + | | ARGB color |
|- | |- | ||
| 0x03 | | 0x03 | ||
Line 121: | Line 279: | ||
| 0x04 | | 0x04 | ||
| (FLOAT) | | (FLOAT) | ||
− | | | + | | float |
|- | |- | ||
| 0x05 | | 0x05 | ||
| (FLOAT)(FLOAT) | | (FLOAT)(FLOAT) | ||
− | | | + | | Vector2 |
|- | |- | ||
| 0x06 | | 0x06 | ||
| (FLOAT)(FLOAT)(FLOAT) | | (FLOAT)(FLOAT)(FLOAT) | ||
− | | | + | | Vector3 |
|- | |- | ||
| 0x07 | | 0x07 | ||
Line 135: | Line 293: | ||
| Boolean | | Boolean | ||
|- | |- | ||
+ | |} | ||
+ | |||
+ | ===Brush Common=== | ||
+ | The basis for the brush type catalog resources | ||
+ | ====Format==== | ||
+ | DWORD Version | ||
+ | --Insert [[Sims_3:Catalog_Resource#Common|CommonBlock]] | ||
+ | DWORD [[Sims_3:Catalog_Resource#Brush_Operations|NormalOperation]] | ||
+ | DWORD [[Sims_3:Catalog_Resource#Brush_Operations|OppositeOperation]] | ||
+ | |||
+ | //ProfileTexture PNG TGI | ||
+ | DWORD Type | ||
+ | DWORD Group | ||
+ | QWORD Instance | ||
+ | |||
+ | DWORD [[Sims_3:Catalog_Resource#Brush_Orientations|Orientation]] | ||
+ | FLOAT BrushWidth | ||
+ | FLOAT BrushStrength | ||
+ | BYTE BaseTextureValue | ||
+ | FLOAT WiggleAmount | ||
+ | ====Brush Operations==== | ||
+ | {| class="wikitable" border="1" | ||
+ | ! Id | ||
+ | ! Description | ||
+ | |- | ||
+ | |0x00000000|| None | ||
+ | |- | ||
+ | |0x00000001|| Raise | ||
+ | |- | ||
+ | |0x00000002|| Lower | ||
+ | |- | ||
+ | |0x00000003|| Smoothen | ||
+ | |- | ||
+ | |0x00000004|| Level | ||
+ | |- | ||
+ | |0x00000005|| AddPaint | ||
+ | |- | ||
+ | |0x00000006|| ErasePaint | ||
+ | |- | ||
+ | |0x00000007|| AddWater | ||
+ | |} | ||
+ | |||
+ | ====Brush Orientations==== | ||
+ | {| class="wikitable" border="1" | ||
+ | ! Id | ||
+ | ! Description | ||
+ | |- | ||
+ | |0x00000000|| Fixed | ||
+ | |- | ||
+ | |0x00000001|| AlignWithMouseMoveDirection | ||
+ | |- | ||
+ | |0x00000002|| RandomWiggle | ||
|} | |} | ||
{{TS3AdvancedModdingHeader}} | {{TS3AdvancedModdingHeader}} |
Latest revision as of 05:32, 30 March 2012
Modding Reference by Category | |
---|---|
Sims 3 :DBPF | File Types | RCOL(Scene) | Catalog Resource | String Table | Key Table | TS3 Programmer's Reference |
Contents |
[edit] 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 |
0x0A36F07A | CCFP | Catalog Fountains and Pools |
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 |
[edit] Format
[edit] 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 NicenessMultiplier // always 1.0 FLOAT CrapScore // binary zeros BYTE (BuildBuyProductStatusFlags) QWORD IID of PNG icon // When not zero, this is the catalogue thumbnail; // otherwise image is found by IID matching (see below) BYTE //0x00 FLOAT EnvironmentScore DWORD FireType //0=DoesNotBurn,1=Chars,2=AshPile BYTE IsStealable //boolean BYTE IsReposessable //boolean DWORD UISortIndex --if Version >= 0x0000000D BYTE isPlaceableOnRoof //boolean --if Version >= 0x0000000E BYTE isVisibleInWorldbuilder //boolean --if Version >= 0x0000000F DWORD ProductName //hashed
[edit] Common Flags
BuildBuyProductStatusFlags | ||
---|---|---|
Flag | Description | |
0x00000001 | ShowInCatalog | |
0x00000002 | ProductForTesting | |
0x00000004 | ProductInDevelopment | |
0x00000008 | ShippingProduct | |
0x00000010 | DebugProduct | |
0x00000020 | ObjProductMadeUsingNewEntryScheme |
[edit] 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.(PLJ: seems to work...) - [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.
[edit] 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.
[edit] 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.)
[edit] 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 ID --if Wall/Floor Style: DWORD Category //varies on type(wall or floor) DWORD GroupName // hashed DWORD GroupSort
[edit] 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 42 | Category Flag |
Unknown 52 | |
Unknown 62 |
[edit] Notes
- Walls - Changing to 0x00 - Entire wall disappears from catalog with all presets
- Present for Walls/Floors
- 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.
[edit] Material Block
This block holds the variables used in the complate to render a texture. 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 Complate String Name Complate String Pattern DWORD count1 --repetition count1 Complate Variable List: Complate String variableName BYTE typecode --insert data for typecode // see below DWORD count2 --repeat(count2) Material Block // sub-blocks used for pattern definitions
[edit] 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.
To read the string
- First read a byte(A).
- If A & 0x80 != 0, it is a literal string, otherwise it is an index into the string table.
- If A & 0x40 == 0, The index will be (A), or the length will be (B&0x7F).
- If A & 0x40 != 0, read a second byte(B). The index will be (A+B), or the length will be (B).
ex. in C#
static string ReadString(BinaryReader br) { int a = br.ReadByte(); if (a == 0) return string.Empty; if ((a & 0x80) != 0) { return Encoding.ASCII.GetString(br.ReadBytes((a & 0x40) != 0 ? br.ReadByte() : a & 0x3F)); } if ((a & 0x40) != 0) a = (a & 0x3F) + br.ReadByte(); return StringDb[a]; }
[edit] Typecodes
Typecode | Data | Comments |
---|---|---|
0x01 | (Complate String) | Complate Variable name |
0x02 | (BYTE)(BYTE)(BYTE)(BYTE) | ARGB color |
0x03 | (BYTE) | TGI Block List entry |
0x04 | (FLOAT) | float |
0x05 | (FLOAT)(FLOAT) | Vector2 |
0x06 | (FLOAT)(FLOAT)(FLOAT) | Vector3 |
0x07 | (BYTE) | Boolean |
[edit] Brush Common
The basis for the brush type catalog resources
[edit] Format
DWORD Version --Insert CommonBlock DWORD NormalOperation DWORD OppositeOperation //ProfileTexture PNG TGI DWORD Type DWORD Group QWORD Instance DWORD Orientation FLOAT BrushWidth FLOAT BrushStrength BYTE BaseTextureValue FLOAT WiggleAmount
[edit] Brush Operations
Id | Description |
---|---|
0x00000000 | None |
0x00000001 | Raise |
0x00000002 | Lower |
0x00000003 | Smoothen |
0x00000004 | Level |
0x00000005 | AddPaint |
0x00000006 | ErasePaint |
0x00000007 | AddWater |
[edit] Brush Orientations
Id | Description |
---|---|
0x00000000 | Fixed |
0x00000001 | AlignWithMouseMoveDirection |
0x00000002 | RandomWiggle |
Modding Reference by Category | |
---|---|
Sims 3 :DBPF | File Types | RCOL(Scene) | Catalog Resource | String Table | Key Table | TS3 Programmer's Reference |