50455253

From SimsWiki
Jump to: navigation, search
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/50455253
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/PERS
50455253
Short name: PERS
Long name: none

This is a work in progress - at the moment it isn't much more than just a structure map.

I have exported a series of PERS files from a lot - they are the ones I am using for comparisons - you can download them from http:''www.watto.org/xzistenz/PERS.zip http:''www.watto.org/xzistenz/PERS.zip . These files were created in a blank neighbourhood with 1 new person, and have had minimal changes to help detect specific field functions - see the text file in the zip for more information.

+------+
| PERS |
+------+

'' There is only 1 file for each sim that has been initialized (been on a lot)
'' uninitialized sims used do not have this file.

'' This somehow relates to the current state of the sim, so that when you load the house
'' again, the sim can be put in the right place, and have the same wants, fears, and actions
'' in the action queue. It also stores motives, and details about how a sim died

'' Some fields probably have a default value of 0, and any other value to indicate that it has
'' not yet been set. This is gathered because the non-null values have only appeared in the template 
'' PERS file, and are null in all normal instances. These fields are incidated by the following text:
'' [# = person not yet used in this lot, 0 = person has been used]

'' Things that are probably stored and recorded in this file
'' - Time/Day (including seconds?)
'' - X/Y/Z Current cell co-ordinates (Z=story of house)
'' - Direction that the sim is looking in, OR the X/Y(/Z) cell that they are looking at
'' - Death and ghost status


64 - Filename (null)
16 - reserved? (null)

'' This first section (until about offset 280) probably stores the sim location/position data

  '' 4 Bytes - X Co-ordinate Bracket ?
  1 - X Cell Number
  1 - X Inner-Cell Position (0-255)
  1 - Y Inner-Cell Position (0-255)
  1 - Z Inner-Cell Position (0-255)

  '' 4 Bytes - Y Co-ordinate Bracket ?
  1 - Y Cell Number
  1 - X Inner-Cell Position (0-255)
  1 - Y Inner-Cell Position (0-255)
  1 - Z Inner-Cell Position (0-255)

4 - (0/1)
4 - (0/1)
4 - (0/-65536)
4 - (0/65535)
4 - (61)
4 - (0/4/4096/4100/12304) [4=default?]
2 - null
4 - (0/4/5/7) [0=default?]
2 - null
114 - null

'' Offset 234
2 - (0/44) [44 = person not yet used in this lot, 0 = person has been used]
2 - (0/4)
22 - null
4 - (0/6)
16 - null


'' This second section (until about offset 318) probably stores the current date and time

'' Offset 280
4 - (0/137)
4 - null

  '' 6 Bytes - Current Time Bracket?
  1 - Time Flags 1a
  1 - Time Flags 1b (hour?)
  1 - Time Flags 2a
  1 - Time Flags 2b (hour?)
  2 - Seconds? [range 0-9]
  
2 - (0/48/67/96/137)
2 - (0/1/7/12/154)
2 - (0/3/5)
2 - (0/1) [1 = person not yet used in this lot, 0 = person has been used]

'' If this first field has a non-null value, the following 3 fields also have non-null values
  2 - (0/139)
  1 - (0/211)
  1 - (0/7)
  2 - (0/85)
  2 - null
  8 - null

'' Offset 318
2 - (97)
4 - null
2 - (100)
1 - Flags - Action Queue In Use [default = 8, +64 = queue has (at least?) 1 action] (8/72)
1 - (128)
28 - null

'' Offset 356
2 - Enable/Disable Boolean (0/1)
2 - Flags (0/8)
4 - null
2 - (150)
2 - (200)
22 - null
2 - (160)
2 - null
1 - (0/3)
1 - (0/9) [9 = has smell/is doing a different idle action/something like this, 0 = default]
4 - null

'' Offset 400
4 - (395213)
82 - null
2 - (0/3) [3 = person not yet used in this lot, 0 = person has been used]
4 - null

'' Offset 492
2 - (5)
22 - null
for each item in the action queue{
  2 - (20)
  }
42 - null


'' Because of the for each loop above, the files are no longer in sync by offsets!

2 - (20)
48 - null
4 - (0/14)
4 - null
3 - null
1 - (0/16)
16 - null
4 - (335872/335873)
6 - null
2 - (0/4/243) [243 = person not yet used in this lot]
10 - null
1 - (91)
1 - Flag (0/32)
2 - (2/7/15) '''1''' [15 is probably a special case - it has some different fields following - see file position2.pers]
1 - Enable/Disable Boolean (0/1)
1 - (3)
4 - null
2 - (0/241)
14 - null

for n=0 to n=(7 - '''1'''){
  2 - (#)
  2 - null
  }
  
2 - (281)
2 - the number that resulted from the calculation in the for loop above (ie 7 - '''1''') (0/5)
2 - (0/512)
4 - null
2 - (0/10)
12 - null

'' for this loop, read 2 bytes ('''2''') and if null, skip the loop
'' otherwise, go through the loop once (ie starting from 16-null)
'' then read the next 2 bytes ('''2''') and repeat while the '''2'''
'' does not equal null
while ('''2''' != 0){
  2 - (3/4) '''2'''
  16 - null
  2 - (79)
  2 - null
  2 - (0/4118)
  }

2 - null
4 - (90)
4 - (65435)
4 - null
4 - (135)
28 - null
2 - (90)


  '' VISUAL ACTIVITY GROUP
  
  '' For this indented group, there must be some identifier for the number of these items,
  '' as none of these fields appear when they are not applicable to the sims current state
  '' ie if the sim is not thinking of anything, has no graphic effect and just has the default
  '' idle action, then none of these indented fields exist.
  
  8 - null

  1 - Thought/Speech Bubble Name Length
  X - Thought/Speech Bubble Name Length

  8 - null

  1 - Graphic Effect Name Length
  X - Graphic Effect Name (eg. BoStink)

  1 - Current Action Name Length
  X - Current Action Name (eg. neck_grip)
  

14 - null
4 - Class ID code (0xDEADBEEF)


'' MOTIVE DATA (all values read as float)

4 - Unknown (always 0x00000002)
4 - Unused (always null)
4 - Unused (always null)
4 - Unused (always null)
4 - Mood
4 - Mood+Mem
4 - Energy
4 - Comfort
4 - Hunger
4 - Hygiene
4 - Bladder
4 - unused (always null)
4 - Sleep state
4 - Unused (always null)
4 - Environment
4 - Social
4 - Fun

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox