Difference between revisions of "NGBH"

From SimsWiki
Jump to: navigation, search
m (Added categories, etc)
(Document Data array for Memories)
Line 11: Line 11:
 
<pre>
 
<pre>
 
DWORD : TypeID ("NGBH")
 
DWORD : TypeID ("NGBH")
DWORD : Version (0xbe=Nightlife, 0xc2=Open for Business)
+
DWORD : Version (0x6F=Base Game, 0x70=EP1:University, 0xBE=EP2:Nightlife, 0xC2=EP3:Open for Business, 0xCB=EP5:Seasons)
 
DWORD : Reserved (unused - deprecated)
 
DWORD : Reserved (unused - deprecated)
DWORD : Main Menu Image Height (deprecated)
+
DWORD : Neighborhood Height (128)
DWORD : Main Menu Image Width (deprecated)
+
DWORD : Neighborhood Width (128)
 
DWORD : Textlength n
 
DWORD : Textlength n
n    : TerrainType
+
n    : TerrainType ("concrete", "desert", "dirt", "temperate")
  
 
28byte : Reserved Header Space (unused)
 
28byte : Reserved Header Space (unused)
Line 59: Line 59:
 
<pre>
 
<pre>
 
DWORD : InstanceID (of Lot/Family/Sim)
 
DWORD : InstanceID (of Lot/Family/Sim)
DWORD : Version (EP2 only)
+
 
 +
if Version >= 0xBE (EP2:Nightlife)
 +
--> DWORD : NgbhSlot Version (apparently never used; same values as Version above)
 +
 
 
DWORD : ItemCount n (Special Simulator tokens)
 
DWORD : ItemCount n (Special Simulator tokens)
 
Repeat n
 
Repeat n
Line 74: Line 77:
 
<pre>
 
<pre>
 
DWORD : GUID
 
DWORD : GUID
WORD  : Flags (bit0 = IsVisible, bit1 = IsMemory)
+
WORD  : Flags 1 (bit0 = IsVisible, bit1 = IsMemory)
WORD  : Flags (EP3 only)
+
 
DWORD : Inventory Number (EP2 only)
+
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
 
DWORD : DataCount n
 
Repeat n
 
Repeat n
WORD : dataword
+
WORD : DataWord
 
End Repeat
 
End Repeat
 
</pre>
 
</pre>
  
 
===Data Decoding for Memory Items===
 
===Data Decoding for Memory Items===
Memory items have a typical count of 0x0c (if no Subject is needed for the Memory) or 0x0d DataWords. Teh Following list shows the Structure of the Data:
+
Memory items have a typical count of 0x0C (if the Memory is about an object) or 0x0D (for memories about a sim, including the owner) DataWords. The following list shows the structure of the Data:
0x0: Token Value (ie. the level of a hidden Skill, or an OpenForBusiness Badge)
+
<pre>
0x1: 0x07CD
+
0x0: Quality (0 = Positive (Green), 4 = Negative (Red))
0x2: 0x0006 (0x0007 if new or changed)
+
0x1: Year (usually 1997, or 0 for no date)
0x3: 0x000F
+
0x2: Month (1 to 12, or 0 for no date)
0x4: Event Owner InstanceID
+
0x3: Day (1 to 31, or 0 for no date)
0x5: $Subject GUID (low-order 16 bits)
+
0x4: Memory Owner Instance ID
0x6: $Subject GUID (high-order 16 bits)
+
0x5: Subject GUID (low-order 16 bits)
0x7: Unknown
+
0x6: Subject GUID (high-order 16 bits)
0x8: 0x000A
+
0x7: Initial Value (values seen: -100, -75, -50, 0, 50, 75, 100)
0x9: 0x0019
+
0x8: Minimum Value (values seen: 0, 5, A)
0xA: Unknown (seems to always be the same as 0x7)
+
0x9: Daily Decay Amount (values seen: 25, 42, 96)
0xB: Event Owner InstanceID
+
0xA: Current Value (should be between Minimum Value and Initial Value)
(0xC: $Subject Instance)
+
0xB: Unknown
 
+
0xC: Subject Instance ID (Optional. Subject Instance ID will be present when the Subject GUID is a person.)
 +
</pre>
 +
The 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 value of a memory decays towards zero over time. The minimum value is the closest to zero a memory can decay to.  Initial Value, Minimum Value and Current Value should either all be negative or all be positive; otherwise, a negative memory can have lasting positive effects.
 
[[Category:Modding]]
 
[[Category:Modding]]
 
[[Category:InternalFormats]]
 
[[Category:InternalFormats]]
 
[[Category:FormatsByName]]
 
[[Category:FormatsByName]]

Revision as of 18:05, 22 September 2011

This article is imported from the old MTS2 wiki. You can help Sims2Wiki by cleaning it up. It's original page with comments can be found at http://old_wiki.modthesims2.com/NGBH

See also: 4E474248

Contents

Neighborhood Data

File Overview

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)

Global Tokens

Associations (associates large structures to the neighbourhood such as a university)
--------
NgbhSlot : universal (hood-wide) tokens

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)

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

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

Data Decoding for Memory Items

Memory items have a typical count of 0x0C (if the Memory is 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 (usually 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: Memory Owner Instance ID
0x5: Subject GUID (low-order 16 bits)
0x6: Subject GUID (high-order 16 bits)
0x7: Initial Value (values seen: -100, -75, -50, 0, 50, 75, 100)
0x8: Minimum Value (values seen: 0, 5, A)
0x9: Daily Decay Amount (values seen: 25, 42, 96)
0xA: Current Value (should be between Minimum Value and Initial Value)
0xB: Unknown
0xC: Subject Instance ID (Optional. Subject Instance ID will be present when the Subject GUID is a person.)

The 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 value of a memory decays towards zero over time. The minimum value is the closest to zero a memory can decay to. Initial Value, Minimum Value and Current Value should either all be negative or all be positive; otherwise, a negative memory can have lasting positive effects.

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox