Difference between revisions of "NGBH"
m (Slightly different wording about data values.) |
|||
(2 intermediate revisions by one user not shown) | |||
Line 95: | Line 95: | ||
===Data Decoding for Memory Items=== | ===Data Decoding for Memory Items=== | ||
− | Memory items have a typical count of 0x0C ( | + | Memory items have a typical count of 0x0C (for memories about an object) or 0x0D (for memories about a sim, including the owner) DataWords. The following list shows the structure of the Data: |
<pre> | <pre> | ||
0x0: Quality (0 = Positive (Green), 4 = Negative (Red)) | 0x0: Quality (0 = Positive (Green), 4 = Negative (Red)) | ||
Line 101: | Line 101: | ||
0x2: Month (1 to 12, or 0 for no date) | 0x2: Month (1 to 12, or 0 for no date) | ||
0x3: Day (1 to 31, or 0 for no date) | 0x3: Day (1 to 31, or 0 for no date) | ||
− | 0x4: | + | 0x4: Owner Instance |
0x5: Subject GUID (low-order 16 bits) | 0x5: Subject GUID (low-order 16 bits) | ||
0x6: Subject GUID (high-order 16 bits) | 0x6: Subject GUID (high-order 16 bits) | ||
0x7: Initial Value (typical values seen: -100, -75, -50, 0, 50, 75, 100) | 0x7: Initial Value (typical values seen: -100, -75, -50, 0, 50, 75, 100) | ||
0x8: Minimum Value (typical values seen: 0, 5, A) | 0x8: Minimum Value (typical values seen: 0, 5, A) | ||
− | 0x9: Daily Decay | + | 0x9: Daily Decay (some of the values seen: 25, 42, 96) |
− | 0xA: Current Value (should be between Minimum Value and Initial Value) | + | 0xA: Current Value (absolute value should be between Minimum Value and Initial Value) |
0xB: Unknown | 0xB: Unknown | ||
− | 0xC: Subject Instance | + | 0xC: Subject Instance (Optional. Subject Instance should be present when the Subject GUID refers to a sim.) |
</pre> | </pre> | ||
− | The | + | ''Notes'': |
− | [[Category:Modding]] | + | |
+ | Owner Instance and Subject Instance are the Sim Description [[SDSC]] instance number for this sim. | ||
+ | |||
+ | Gossip is a memory where the Owner (in the Memory Data) is not the Sim who owns the NgbhSlot. In this case, the Sim who owns the NgbhSlot has a memory about the Owner. | ||
+ | |||
+ | The Current Value of a memory is a relative score of how the memory affects a sim's mood. Positive values improve mood, negative values make it worse. The Current Value of a memory starts at the Initial Value and decays towards zero over time. The Minimum Value is the closest to zero a memory can decay. Minimum Value and Daily Decay are normally unsigned values; their sign appears to be taken from the Initial Value. | ||
+ | [[Category:Sims 2 Modding]] | ||
[[Category:InternalFormats]] | [[Category:InternalFormats]] | ||
[[Category:FormatsByName]] | [[Category:FormatsByName]] |
Latest revision as of 20:51, 17 September 2012
See also: 4E474248
Contents |
[edit] Neighborhood Data
[edit] File Overview
[edit] Header
DWORD : TypeID ("NGBH") DWORD : Version (0x6F=Base Game, 0x70=EP1:University, 0xBE=EP2:Nightlife, 0xC2=EP3:Open for Business, 0xCB=EP5:Seasons) DWORD : Reserved (unused - deprecated) DWORD : Neighborhood Height (128) DWORD : Neighborhood Width (128) DWORD : Textlength n n : TerrainType ("concrete", "desert", "dirt", "temperate") 28byte : Reserved Header Space (unused)
[edit] Global Tokens
Associations (associates large structures to the neighbourhood such as a university) -------- NgbhSlot : universal (hood-wide) tokens
[edit] Sections
Lots (contains lot tokens such as food info and NPC info) -------- DWORD : SlotCount n Repeat n --> NgbhSlot End Repeat Families (Family tokens such as exports and games) -------- DWORD : SlotCount n Repeat n --> NgbhSlot End Repeat Sims (memories, gossip, sim info tokens and init tokens) -------- DWORD : SlotCount n Repeat n --> NgbhSlot End Repeat BYTE : Custom Hood Marker DWORD : EP Ready Marker (from Uni on. Present in 0x70 versions up)
[edit] NgbhSlot
DWORD : InstanceID (of Lot/Family/Sim) if Version >= 0xBE (EP2:Nightlife) --> DWORD : NgbhSlot Version (apparently never used; same values as Version above) DWORD : ItemCount n (Special Simulator tokens) Repeat n --> NgbhItem End Repeat DWORD : ItemCount n (Standard Tokens - memories, gossip, init, food, npc, skills, etc) Repeat n --> NgbhItem End Repeat
[edit] NgbhItem
DWORD : GUID WORD : Flags 1 (bit0 = IsVisible, bit1 = IsMemory) if Version >= 0xC2 (EP3:Open for Business) --> WORD : Flags 2 if Version >= 0xBE (EP2:Nightlife) --> DWORD : Inventory Number if Version >= 0xCB (EP5:Seasons) --> WORD : Unknown DWORD : DataCount n Repeat n WORD : DataWord End Repeat
[edit] Data Decoding for Memory Items
Memory items have a typical count of 0x0C (for memories about an object) or 0x0D (for memories about a sim, including the owner) DataWords. The following list shows the structure of the Data:
0x0: Quality (0 = Positive (Green), 4 = Negative (Red)) 0x1: Year (seems to start in 1997, or 0 for no date) 0x2: Month (1 to 12, or 0 for no date) 0x3: Day (1 to 31, or 0 for no date) 0x4: Owner Instance 0x5: Subject GUID (low-order 16 bits) 0x6: Subject GUID (high-order 16 bits) 0x7: Initial Value (typical values seen: -100, -75, -50, 0, 50, 75, 100) 0x8: Minimum Value (typical values seen: 0, 5, A) 0x9: Daily Decay (some of the values seen: 25, 42, 96) 0xA: Current Value (absolute value should be between Minimum Value and Initial Value) 0xB: Unknown 0xC: Subject Instance (Optional. Subject Instance should be present when the Subject GUID refers to a sim.)
Notes:
Owner Instance and Subject Instance are the Sim Description SDSC instance number for this sim.
Gossip is a memory where the Owner (in the Memory Data) is not the Sim who owns the NgbhSlot. In this case, the Sim who owns the NgbhSlot has a memory about the Owner.
The Current Value of a memory is a relative score of how the memory affects a sim's mood. Positive values improve mood, negative values make it worse. The Current Value of a memory starts at the Initial Value and decays towards zero over time. The Minimum Value is the closest to zero a memory can decay. Minimum Value and Daily Decay are normally unsigned values; their sign appears to be taken from the Initial Value.