Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 12th Apr 2024 at 5:04 PM Last edited by Olcia.rex : 12th Apr 2024 at 8:18 PM. Reason: adding important part
Default I have to extract data from sim packages
Hello fellow simmers!

I try to do an app, a simple C++ calculator using sims' personality and interests as my thesis, just like Pleasant Sims and others' excel sheet. My supervisor said regular input's too simple and wants me to use game's files but I have no idea how to get into them. If I don't, he won't let defend my thesis, so I'm desperate as deadline's in two weeks. So I found SimPE fork on github, but it's huge and my C# sucks

So I just wanted to ask if you, sims 2 geniuses beyond compare, could give me some tips how to do that and save my ass from failing the uni.
All the info I want is a numerical value of personality and interests, you know "politics: 10, money: 5, clumsiness: 2", no need for grandma's eye color cause I know it's also there. But the point is, I need to get this data out of the binary package character file, not SimPE or any other way, just to choose that file in my app and then it extracts data from it!

Also, yes, when I'm finished I'll post my app here, I promise

Thank for any help
Advertisement
e3 d3 Ne2 Nd2 Nb3 Ng3
retired moderator
#2 Old 12th Apr 2024 at 6:00 PM
In SimPE, tools> neighborhood> Export Neighborhood. It will ask you where to save the output.

Or, you can run SimPE with the command line switch -rufio or start it from a shortcut with the -rufio switch. Output will be in Documents\EA Games\The Sims 2\Rufio.

Fields are as follows:
Code:
hood,HoodName,NID,FirstName,LastName,SimDescription,FamilyInstance,HouseholdName,HouseNumber,AvailableCharacterData,Unlinked,ParentA,ParentB,Spouse,BodyType,NPCType,SchoolType,Grade,CareerPerformance,Career,CareerLevel,ZodiacSign,Aspiration,Gender,LifeSection,AgeDaysLeft,PrevAgeDays,AgeDuration,BlizLifelinePoints,LifelinePoints,LifelineScore,GenActive,GenNeat,GenNice,GenOutgoing,GenPlayful,Active,Neat,Nice,Outgoing,Playful,Animals,Crime,Culture,Entertainment,Environment,Fashion,FemalePreference,Food,Health,MalePreference,Money,Paranormal,Politics,School,Scifi,Sports,Toys,Travel,Weather,Work,Body,Charisma,Cleaning,Cooking,Creativity,Fatness,Logic,Mechanical,Romance,IsAtUniversity,UniEffort,UniGrade,UniTime,UniSemester,UniInfluence,UniMajor,Species,Salary,PrimaryAspiration,SecondaryAspiration,HobbyPredestined,LifetimeWant


Export is as a comma seperated text file.
Test Subject
Original Poster
#3 Old 12th Apr 2024 at 8:21 PM
Quote: Originally posted by simsample
In SimPE, tools> neighborhood> Export Neighborhood. It will ask you where to save the output.

Or, you can run SimPE with the command line switch -rufio or start it from a shortcut with the -rufio switch. Output will be in Documents\EA Games\The Sims 2\Rufio.

Fields are as follows:
Code:
hood,HoodName,NID,FirstName,LastName,SimDescription,FamilyInstance,HouseholdName,HouseNumber,AvailableCharacterData,Unlinked,ParentA,ParentB,Spouse,BodyType,NPCType,SchoolType,Grade,CareerPerformance,Career,CareerLevel,ZodiacSign,Aspiration,Gender,LifeSection,AgeDaysLeft,PrevAgeDays,AgeDuration,BlizLifelinePoints,LifelinePoints,LifelineScore,GenActive,GenNeat,GenNice,GenOutgoing,GenPlayful,Active,Neat,Nice,Outgoing,Playful,Animals,Crime,Culture,Entertainment,Environment,Fashion,FemalePreference,Food,Health,MalePreference,Money,Paranormal,Politics,School,Scifi,Sports,Toys,Travel,Weather,Work,Body,Charisma,Cleaning,Cooking,Creativity,Fatness,Logic,Mechanical,Romance,IsAtUniversity,UniEffort,UniGrade,UniTime,UniSemester,UniInfluence,UniMajor,Species,Salary,PrimaryAspiration,SecondaryAspiration,HobbyPredestined,LifetimeWant


Export is as a comma seperated text file.


Thank you a lot, but that's not what I need, I have to get the data straight from the package sim file, without using SimPE as a step (but I can adapt code into my app so if you know where is that part I'd be grateful)
Mad Poster
#4 Old 12th Apr 2024 at 9:09 PM
There is information on the DBPF file format on the MTS wiki, I can't link it right now because I'm on mobile. But the personality points should be in the SDSCs in the neighborhood package, I believe.
e3 d3 Ne2 Nd2 Nb3 Ng3
retired moderator
#5 Old 12th Apr 2024 at 9:15 PM
Quote: Originally posted by Olcia.rex
Thank you a lot, but that's not what I need, I have to get the data straight from the package sim file, without using SimPE as a step

Do you mean that you want to do this for a Sims2Pack sim, or a CAS sim, such as this one:
https://modthesims.info/d/683971
Or do you mean that you want to do this for a sim which is moved in to a neighbourhood?
For neighbourhood sims, some information is stored in the character file, but parts are stored in the neighbourhood file too.
e3 d3 Ne2 Nd2 Nb3 Ng3
retired moderator
#6 Old 12th Apr 2024 at 9:16 PM
Quote: Originally posted by kestrellyn
There is information on the DBPF file format on the MTS wiki, I can't link it right now because I'm on mobile. But the personality points should be in the SDSCs in the neighborhood package, I believe.

DatabasePackedFilewiki
SDSCwiki
Test Subject
Original Poster
#7 Old 12th Apr 2024 at 9:49 PM
Quote: Originally posted by simsample
Do you mean that you want to do this for a Sims2Pack sim, or a CAS sim, such as this one:
https://modthesims.info/d/683971
Or do you mean that you want to do this for a sim which is moved in to a neighborhood?
For neighborhood sims, some information is stored in the character file, but parts are stored in the neighborliness file too.


Sims2Pack existing living in any neighborhood playable sim just like Don Lothario or Ripp Grunt. Choose their file in my app. App reads just their personality and interests. That's all I need.
I think it's in files like neighborhoods/n001_user00007.package (random numbers just for example), right? Or correct me if I don't even know where to find it?
e3 d3 Ne2 Nd2 Nb3 Ng3
retired moderator
#8 Old 12th Apr 2024 at 9:51 PM
In the SDSC as kestrellyn mentioned.
Test Subject
Original Poster
#9 Old 12th Apr 2024 at 10:01 PM
Quote: Originally posted by simsample
In the SDSC as kestrellyn mentioned.


Thank you both so much! <3

Just by accident, don't you know how to get inside it or implement it in the most efficient way? Without using SimPE or other external tools unfortunately, just notepad, my visual studio and desperation
Instructor
#10 Old 12th Apr 2024 at 10:48 PM
Reading .package files is non-trivial - you need to understand the format of the .package file, how to locate a resource in the file, how to decompress its data if necessary, and how to decode the data into the various data members for that resource. And you also need to know which resource(s) you are looking for - the SDSC for Sims in this case.

C# code is here - https://github.com/whoward69/Sims2T...ain/DbpfLibrary

Start with Package/DBPFFile - its constructor takes a full path to a .package file and opens it.
You can then use GetEntriesByType(Sdsc.TYPE) to iterate all SDSC resource entries (see Package/DBPFEntry) in the .package file, and (Sdsc)GetResourceByEntry(sdscEntry) to get the actual SDSC resource (see Neighbourhood/SDSC)

Just call me William, definitely not Who-Ward
Test Subject
Original Poster
#11 Old 13th Apr 2024 at 12:51 AM
Quote: Originally posted by whoward69
Reading .package files is non-trivial - you need to understand the format of the .package file, how to locate a resource in the file, how to decompress its data if necessary, and how to decode the data into the various data members for that resource. And you also need to know which resource(s) you are looking for - the SDSC for Sims in this case.

C# code is here - https://github.com/whoward69/Sims2T...ain/DbpfLibrary

Start with Package/DBPFFile - its constructor takes a full path to a .package file and opens it.
You can then use GetEntriesByType(Sdsc.TYPE) to iterate all SDSC resource entries (see Package/DBPFEntry) in the .package file, and (Sdsc)GetResourceByEntry(sdscEntry) to get the actual SDSC resource (see Neighbourhood/SDSC)



Holy shit, if this works, you literally saved my thesis (and I'm not exaggerating, the guy literally threatened me to throw it away if I won't do this). Thank you all soooo much
Back to top