Talk:DatabasePackedFile

From SimsWiki
Revision as of 00:41, 1 January 2007 by Delphy (Talk | contribs)

Jump to: navigation, search

It's a Sims 2 wiki yes, but it also has Simcity 4 modding information on it thats linked from Simtropolis, so try not to remove all the Sim City 4 stuff. :) Delphy 17:10, 1 August 2006 (EDT)

I didn't, I just changed the focus to Sims2. Jaxad0127 17:21, 1 August 2006 (EDT)

I could get it until the File part. Then there's a header that may be there or may not be there, with no hint as to a method to know! Albmont 17:24, 28 December 2006 (EST)

How does it look now? I added links to the DIR resource and the DBPF Compression page. Delphy 12:08, 29 December 2006 (EST)

I still don't get it. I could read the header, but then I got struck at the index. I tried to "seek" to the position indicated by "Location of first index entry", and read the index table. Some of the entries seemed ok (instante ID = 1, second instance ID = 0, size = 133), but some looked weird (type ID = 206966585, etc). Then I continued reading the next entries, with similar numbers (FWIW: I am writing the read_package routine in the R programming language). I could continue, but those weird numbers might mean that I am missing something. Albmont 09:57, 30 December 2006 (EST)

Remember to check the indexMajor and indexMinor version and to read the Instance2 if applicable (for 7.1). I have code in PHP I can show you if you are still stuck. Delphy 14:33, 30 December 2006 (EST)
I did read the "second instance" in version 7.2. I don't know PHP, but I may get something. Is there a wiki for source codes related to The Sims 2 and Sin :-) City 4 ? Albmont 15:55, 30 December 2006 (EST)
Yes, this one. :D I actually found the same problem as you lately - there is very little actual code out there for reading package files, hence why I redid the DBPF and DBPF compression pages. I'll add a PHP DBPF class to the main DBPF page. Delphy 04:02, 31 December 2006 (EST)
I saw the code, I guess I could understand it (even though I know nothing of PHP and I could not run it), but I think there's something missing there. The code reads some of the files, but not all of them. I am specially interested in the "Property Set", the one with $value['typeID'] == 'EBCF3E27', because this is where Pets Bodyshop introduced a bug, and I would like to list all the packages that were infected with this Pets virus (there is no outfit in the Property Set). Albmont 14:05, 31 December 2006 (EST)
No it doesn't read everything, becuase it's basic code on how to get the .package/DBPF open. What you then do with your individual files is totally up to you, and you should follow the format for the specific filetype in question. Delphy 18:41, 31 December 2006 (EST)

Compressed or Uncompressed

The text says " To check if a file is compressed you first need to read the DIR resource, if it exists", but there's no hint to how we can know if the file is compressed or not, neither here nor in the DIR entry. Albmont 14:18, 31 December 2006 (EST)

Basic programming. The DIR resource has a list of compressed files based on the various TGI stuff (Type, Group, Instance ID, Instance ID 2). Each file in the index *also* has TGI info. So, what you do is basically check if a file from the index exists in the DIR array then it must be compressed. What I did with my PHP code was to basically add a field to the index array called compressed, then if a file exists in the DIR resource it tags the index entry as being for a compressed file, then when I come across a file later on, I just check in my index array and if compressed == true, then I know it contains compressed data. Fairly simple, really. Delphy 18:41, 31 December 2006 (EST)
Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox