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!
e3 d3 Ne2 Nd2 Nb3 Ng3
retired moderator
#51 Old 19th Sep 2008 at 12:50 AM
Quote: Originally posted by Delphy
.NET 2.0 framework is needed for SimPE.

.NET 1.1 framework is needed for the DDO and S2PCI.

Seriously, what PC doesn't have it these days?


A PC that is actually a Mac!
Advertisement
Mad Poster
Original Poster
#52 Old 19th Sep 2008 at 2:14 AM Last edited by GeneralOperationsDirector : 19th Sep 2008 at 3:35 AM.
Well, it isn`t lack of .net that`s giving me the problems. See attached image.

Edit: It turns out that the package that gave me the unexpected results earlier does have an E86B1EEF record. I`m not going to try to grok it tonight, though, as I`m too tired from spending too much time here last night.
Screenshots
Mad Poster
Original Poster
#53 Old 20th Sep 2008 at 9:44 PM
Default New feature added; is this useful?
I just added a new feature to my program. Not only will it list all the record format IDs used in a file, it can now recurse down a directory tree and collect a list of ALL record IDs it encounters. Here is the output when scanning my entire downloads directory:

194951294: '\x0b\x9e\xb8~', '\x0b\x9e\xb8~': 194951294, # 0xb9eb87e
203416134: '\x0c\x1f\xe2F', '\x0c\x1f\xe2F': 203416134, # 0xc1fe246
206966585: '\x0cV\x0f9', '\x0cV\x0f9': 206966585, # 0xc560f39
474621804: "\x1cJ'l", "\x1cJ'l": 474621804, # 0x1c4a276c
539399691: ' &\x96\x0b', ' &\x96\x0b': 539399691, # 0x2026960b
740284577: ',\x1f\xd8\xa1', ',\x1f\xd8\xa1': 740284577, # 0x2c1fd8a1
1111707470: 'BCON', 'BCON': 1111707470, # 0x42434f4e
1112031574: 'BHAV', 'BHAV': 1112031574, # 0x42484156
1129599827: 'CTSS', 'CTSS': 1129599827, # 0x43545353
1180123478: 'FWAV', 'FWAV': 1180123478, # 0x46574156
1196183362: 'GLOB', 'GLOB': 1196183362, # 0x474c4f42
1230596472: 'IYix', 'IYix': 1230596472, # 0x49596978
1281982042: 'Li~Z', 'Li~Z': 1281982042, # 0x4c697e5a
1314014534: 'NREF', 'NREF': 1314014534, # 0x4e524546
1315791184: 'NmaP', 'NmaP': 1315791184, # 0x4e6d6150
1329744452: 'OBJD', 'OBJD': 1329744452, # 0x4f424a44
1329744486: 'OBJf', 'OBJf': 1329744486, # 0x4f424a66
1397509972: 'SLOT', 'SLOT': 1397509972, # 0x534c4f54
1398034979: 'STR#', 'STR#': 1398034979, # 0x53545223
1414550096: 'TPRP', 'TPRP': 1414550096, # 0x54505250
1414677326: 'TRCN', 'TRCN': 1414677326, # 0x5452434e
1414677829: 'TREE', 'TREE': 1414677829, # 0x54524545
1414807874: 'TTAB', 'TTAB': 1414807874, # 0x54544142
1414807923: 'TTAs', 'TTAs': 1414807923, # 0x54544173
1835111288: 'ma\x93x', 'ma\x93x': 1835111288, # 0x6d619378
2065354701: '{\x1a\xcf\xcd', '{\x1a\xcf\xcd': 2065354701, # 0x7b1acfcd
2074313612: '{\xa3\x83\x8c', '{\xa3\x83\x8c': 2074313612, # 0x7ba3838c
2238569388: '\x85m\xdb\xac', '\x85m\xdb\xac': 2238569388, # 0x856ddbacL
2350219445: '\x8c\x15\x80\xb5', '\x8c\x15\x80\xb5': 2350219445, # 0x8c1580b5L
2890892935: '\xacO\x86\x87', '\xacO\x86\x87': 2890892935, # 0xac4f8687L
2890950500: '\xacPgd', '\xacPgd': 2890950500, # 0xac506764L
2918092164: '\xad\xee\x8d\x84', '\xad\xee\x8d\x84': 2918092164, # 0xadee8d84L
3385334697: '\xc9\xc8\x1b\xa9', '\xc9\xc8\x1b\xa9': 3385334697, # 0xc9c81ba9L
3385334701: '\xc9\xc8\x1b\xad', '\xc9\xc8\x1b\xad': 3385334701, # 0xc9c81badL
3433621797: '\xcc\xa8\xe9%', '\xcc\xa8\xe9%': 3433621797, # 0xcca8e925L
3451152312: '\xcd\xb4g\xb8', '\xcd\xb4g\xb8': 3451152312, # 0xcdb467b8L
3843672371: '\xe5\x19\xc93', '\xe5\x19\xc93': 3843672371, # 0xe519c933L
3899334383: '\xe8k\x1e\xef', '\xe8k\x1e\xef': 3899334383, # 0xe86b1eefL
3931183280: '\xeaQ\x18\xb0', '\xeaQ\x18\xb0': 3931183280, # 0xea5118b0L
3956227623: "\xeb\xcf>'", "\xeb\xcf>'": 3956227623, # 0xebcf3e27L
4211112222: '\xfb\x00y\x1e', '\xfb\x00y\x1e': 4211112222, # 0xfb00791eL
4235112951: '\xfcn\xb1\xf7', '\xfcn\xb1\xf7': 4235112951, # 0xfc6eb1f7L

I expect to see different IDs when I scan my Neighborhoods directory, and I expect a much LONGER list when I scan my program directory. The numbers, incidentally, are decimal. Incidentaly, the output is suitable for copy-and-paste into Python source code. It defines a bidirectional translation dictionary between the numeric ID and the text ID.
Warrior Gryphon
site owner
#54 Old 21st Sep 2008 at 12:16 AM
We already have a bi-directional directionary for this... on the wiki.

Story books are full of fairy tales, of Kings and Queens, and the bluest skies.
Mad Poster
Original Poster
#55 Old 21st Sep 2008 at 7:38 AM
I didn`t say that you didn`t have one; I said that that was what the output represented as Python source-code. It would theoreticaly be used within a Python program to translate the IDs for display purposes. The Wiki can hardly help with that.
One horse disagreer of the Apocalypse
#56 Old 21st Sep 2008 at 9:08 AM
If I were you I would make a series of small tools that do specialised tasks. The greatest complaint about SimPE is a) how large and slow a process it is, and b) how complicated it is to learn and easy to do something that messes everything else up.

So if you have a filetype/identity converter, release it and make your next small tool.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Mad Poster
Original Poster
#57 Old 21st Sep 2008 at 9:08 PM
Please, Inge, explain what you mean by "a filetype/identity converter". All this function does is scan a directory [recursively], find all the *.package files [unfortunately, it is currently case-sensitive on the extension, but that`s easy to fix], scan them, collect all TypeID values it finds, and list them. It doesn`t even count them. It formats the display suitable for copy-and-paste into Python source-code to define a quick translation between the numeric ID and the equivalent four-character text string, including the hex version as a comment. Right now, the directory it scans is hard-coded to where my Downloads directory is.

Is this useful? Is it worth uploading? What would you want added or changed? Of course, the directory to scan would have to be changed [to automaticaly be wherever the user`s Downloads directory happens to be], or be changable by the user, but what else?
Warrior Gryphon
site owner
#58 Old 22nd Sep 2008 at 9:25 AM
Honestly, I don't see that as useful at all for the general populace and would probably be rejected if you where to upload it here.

I tihnk Inge perhaps meant that it would be useful for you to learn more.

Story books are full of fairy tales, of Kings and Queens, and the bluest skies.
Mad Poster
Original Poster
#59 Old 24th Oct 2008 at 4:30 AM
Quote: Originally posted by Delphy
Honestly, I don't see that as useful at all for the general populace and would probably be rejected if you where to upload it here.
As it stands, Delphy, I agree 100%! I have done some aditional work on the program in the month since you wrote that, but not much. I wouldn`t even consider trying to upload it in its current state.
Quote: Originally posted by Delphy
I tihnk Inge perhaps meant that it would be useful for you to learn more.
You`re probably correct about that, too. I am learning, but slowly.

This Space Intentionally Left Blank
Fat Obstreperous Jerk
#60 Old 24th Oct 2008 at 7:50 AM
If at first you don't succeed, skydiving is not for you.

Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
e3 d3 Ne2 Nd2 Nb3 Ng3
retired moderator
#61 Old 24th Oct 2008 at 5:31 PM
So, do you have a clear idea of what you'd like this tool to do? The tools I'd really like are:
A tool to backup and restore neighbourhoods.
A tool to easily change the genetics and appearance of a sim.
Mad Poster
Original Poster
#62 Old 25th Oct 2008 at 5:25 AM
Wow! A post in my thread by the Official Resident Grouch of Mod the Sims 2! Thank you!

The neighborhood backup-and-restore function would be simple. I already use a batch file to back up my game after playing every day. Creating or adding a graphic front end for the function is possible, too. I`d have to do the back-up differently than my batch file does it, though, because it is an incrimental backup using xcopy /M.

The plastic surgery and genetic therapy would me more difficult, but should be doable.

Thank you. I`ll keep them in mind for when I have sufficient framework in place to make them doable.

Right now, the biggest priority is getting decompression of compressed records to work. I have no intention of coding compression in this language for reasons discussed above, but I have become convinced that it must be able to read compressed data.

Of course, I`m spending so much time here that I barely have time to play the Sims 2, much less try to mod it!

This Space Intentionally Left Blank
Mad Poster
Original Poster
#63 Old 14th Dec 2008 at 8:50 PM Last edited by GeneralOperationsDirector : 19th Dec 2008 at 6:58 PM. Reason: Removed attachments.
Tester Wanted
I`ve done some work on my tool.

I need a tester to see if it works on a system other than mine, before I proceed.

Testing instructions:

Python 2.5.2 is required. I cannot guarantee that the supplied file will work with any other version, as this is not a source file.

1. Download the attached file.
2. Extract into a directory on your Python 2.5.2 module search path.
3. Load the Python I.D.L.E.
4. import Sims2MultiTool into your interactive session.
5. enter the following line into your interactive session:
Sims2MultiTool.scanDirs(r"full path to a directory with a few test files", name="value")
6. Capture the output, and post it here.

Notes:
* Replace the content of the string r"full path to a directory with a few test files" with the actual text of the full path to a directory with a few test files. For example, r"C:\temp\testdir". Please note leading r, the quotes, and the lack of a trailing slash! The directory should have a modest number of actual files in it; the names and content of the file are irrelavent, but I would like a list of them included in the capture.
* Several directories may be listed as seperate quoted strings with commas between them.
* name and value may be replaced by [nearly] arbitrary tags, and may also be repeated with different assignments, but I need to know what tags you used.
* Step 5 may be repeated on another directory or with different tags, or both. I need all of the directories and tags used, but I only need the output from the last execution of the step.

The output represents a "catalog" or "index" of the files encountered, tagged by the name="value" pairs for easy retrieval.

This Space Intentionally Left Blank
e3 d3 Ne2 Nd2 Nb3 Ng3
retired moderator
#64 Old 18th Dec 2008 at 12:36 PM
Hope I've done these right!
The first, MultitoolOutput1, gives the output for a scan of a folder containing some hacks. Dump of folder content included too. The second, MultitoolOutput2, gives the output for a scan of a folder containing some 'Maxis Lost' items- clothes, hair, objects and CANh objects. There are subfolders in this one too. Again, a dump of folder contents included. For both I used name=Value.
Attached files:
File Type: rar  MultiToolOutput1.rar (1.6 KB, 2 downloads) - View custom content
Attachments Pending Approval
File Type: rar MultiToolOutput2.rar
Mad Poster
Original Poster
#65 Old 18th Dec 2008 at 5:12 PM Last edited by GeneralOperationsDirector : 24th Dec 2008 at 12:58 AM. Reason: Removed attachments.
Thank you, simsample. The test appears to be successfull.

However, I percieve that you ran the test in two seperate sessions.

Would you be willing to repeat the test in a single session, with different paths and tags in the multiple Step Fives, and fewer files over-all? Also, it is not only acceptable but requested to scan the same directory multiple times with different tags on different Step Five calls. Meanwhile, I will be working on making the output a tad more readable; if you are ready to re-test before I get the next version up, feel free, but if I get it up before you are ready, please use the new version.

Edit: New version available.

The instructions are the same as the previous version, except instead of capturing the output of the last execution of Step 5, I need the captured output of a new final step, Sims2MultiTool.show().

This Space Intentionally Left Blank
e3 d3 Ne2 Nd2 Nb3 Ng3
retired moderator
#66 Old 22nd Dec 2008 at 6:16 PM
Okay, new outputs attached here. As you can see, I had four folders in C:\Code this time, each with maximum four files in. They were FFS, Tata, Theo and Inge. I ran two scans- the first of FFS and Inge with tags 'Fred="simsample"'; the second of Theo and Tata with tags 'Black="White"'. Hope I did them right!
Attachments Pending Approval
File Type: rar DumpOfCode.rar
File Type: rar OutputV2.rar
Mad Poster
Original Poster
#67 Old 22nd Dec 2008 at 7:01 PM
Looking good! It seems to be working fine.

How do you like the output of the show() function? Nearly readable? What changes might you like in the output? Should I have seperate displays for lists of files and details for single files? Did you note that the output in the Path section is sorted by full path [case sensitive]? Did you notice that the other sections were sorted by tag-and-value [case sensitive], and by full path [case sensitive] within each group?

Did you scan any given directory more than once, with different tags? If so, there is an error in the program, as none of the entries shows evidence of having been processed more than once.

I forsee the need to be able to autoremove items that were physicaly deleted since the last saved scan [the program does not currently autosave, but can be manually instructed to save, and will autoload if it finds the save file]. This would be more efficiently done before the scan for new items, but if done after the scan for new items, could possibly be configured to attempt to identify moved or renamed items. Checking for moved items is a computationaly difficult task, however. Checking for items that have been renamed is even more difficult. Perish the thought of needing to check for items that have been both moved and renamed! The program will, however, contain functions for moving and renaming files that will also update the database, so this isn`t much of an issue, as long as people use them, instead of the OS-native functions. Opinions?

Also, what do you think should be worked on next, a better user interface, which will likely require pyGame, or more functionality? If the latter, what functionality would you suggest be added next?

Amongst the possibilities with the current code:

* Author=
* GamesRequired=
* GamesCompatible=
* Site=

Future possibilities, not currently supported, because they require package references instead of strings [unless I reference packages by full path]:

* ConflictsWith=
* Contains= [for archives and/or sims2pack files?]
* Requires=

Comments, questions, suggestions, requests?

This Space Intentionally Left Blank
e3 d3 Ne2 Nd2 Nb3 Ng3
retired moderator
#68 Old 24th Dec 2008 at 12:35 AM
The output is good- a filesize would be good too, if possible. Are you planning on being able to identify types of packages with this? For example, detect meshes from recolours, or even link recolours to their meshes? Something that a lot of people ask for is an orphaned mesh scanner, or some way of identifying left over recolours for deleted meshes. I can think of uses that I would have for being able to detect moved files but I wouldn't think that would be high priority for most users. More functionality is definitely the next thing to go for, I think. Detecting which EPs are needed for a file would be a good tool to have.
Mad Poster
Original Poster
#69 Old 24th Dec 2008 at 12:55 AM Last edited by GeneralOperationsDirector : 10th Jan 2009 at 7:53 PM. Reason: Removed attachments.
New version available.

The showDirs() function no longer returns the Index, thus no longer cluttering up the display when called manually. As the Index is available internally, and no code calls this function yet, there is no need for function to return it.
The showDirs() function now also correctly handles re-processing filesystem objects that already appear in the Index. Previously, it would replace the internal representation of the file with a new token in the Path table, whilst leaving untouched any tokens already present in other tables. Now, it keeps the existing token in the Path table, while deleting the token from other lists when, and only when, the Key="Value" parameter specifies an existing key but a different value.
Support has been added for my private Alias extension to I.D.L.E..

Also please note that the Path values in both the previous and current version are sorted case-insensitively. This behavior was mis-documented. The other tables are case-sensitive.

Edit: I didn`t see your post when I started writing mine.
Quote: Originally posted by simsample
The output is good- a filesize would be good too, if possible.
Easily enough done.
Quote: Originally posted by simsample
Are you planning on being able to identify types of packages with this? For example, detect meshes from recolours, or even link recolours to their meshes?
Eventually.
Quote: Originally posted by simsample
Something that a lot of people ask for is an orphaned mesh scanner, or some way of identifying left over recolours for deleted meshes.
DDO is supposed to do this already. Mine might, later.
Quote: Originally posted by simsample
I can think of uses that I would have for being able to detect moved files but I wouldn't think that would be high priority for most users.
Agreed, especially as it would be "difficult" to achieve, anyway.
Quote: Originally posted by simsample
More functionality is definitely the next thing to go for, I think.
Thank you.
Quote: Originally posted by simsample
Detecting which EPs are needed for a file would be a good tool to have.

Ooo, I`d like that, too! I`d need more information for both of your ideas, however. I still haven`t made any progress on decompression, however, ::blush::, so it won`t work on Compressorized files, even if you do figure out how to access the "hidden" functionality discussed previously, which would need to be grown more to do these.

This Space Intentionally Left Blank
Warrior Gryphon
site owner
#70 Old 24th Dec 2008 at 3:09 AM
Dealing with compressed chunks within packages is easy - there is decompression code on the wiki along with the code to the older DBPF class for my DDO which contains info on how to detect compressed chunks (usually indicated by an FB10 at the chunk start).

Then you just decompress the entire chunk through the decompress routine, assing the resulting string to a MemoryStream, then access it using BinaryReader (if using C#) and voila, instant decompressed files.

In order to figure out which EP/SP a file works with is harder. You have to realise that:

- A mesh on it's own will have no markers to indicate compatibility
- A recolour will link back to the mesh but if it's an object recolour then you can link through the objects GUID to the original game file (see the DDO 1.2) to check wihch game this is from.
- A bodyshop file can be done in a similar way not through the GUID, but using the TGII
- However, if it's a custom bodyshop mesh then you'd need to figure out if it has a 4th bone assignment (could have issues in basegame but is usually ok) or what the type is (obviously different types like Outerwear are only introduced in certain EPs)
- A hack or game mod would have to have a list of all the BHAV functions introduced in each EPs and determine the "last" one that works.

It's actually technically possible to identify many files (or at least the major categories) - but if you dont have the compressed stuff down... well, you have a long way to go.

Some of the things simsample mentioned - the orphan scanning, type of file, etc - are really things that you *dont* need to do. Why? Becuase there is another tool out there that already works fine for those things (ie the DDO). Why re-invent the wheel unless you absolutely *must*?

I'm still totally confused as to what your tool actually *does*. You seem to still be approaching this from a point of view of "I want to write a tool but I have no idea how to do it but hey lets get people to give me ideas". If you approached it more from a *specific* point of view (for example, okay I want to do THIS... how do I go about it?) and actually break it down and then code it... then I think you'll get a lot further a lot faster.

Right now you still have quite a nebulous goal - make a tool that does something *small*, something *specific* and work towards that. Then you'll get much more response.

Story books are full of fairy tales, of Kings and Queens, and the bluest skies.
Mad Poster
Original Poster
#71 Old 24th Dec 2008 at 5:57 AM
Thank you, Delphy. I already have that decompression code from the wiki. I just haven`t gotten around to translating it into Python yet. The "harder" stuff you mention looks far more interesting; it might motivate me to work on the decompression code.

As for what the tool actualy *does*, it has several fragments of functionality that currently add up to --pardon my British-- Not Bloody Much. However, I have been tweaking it, and adding to it, and trying to build up a framework in which that "harder" "more interesting" stuff will be easier to accomplish.

Hmm, how should I put this?

This tool is several things:
* It is -first and foremost- a learning experience for me.
* It is secondarily intended to be a framework in which building practical Sims 2 support tools is relatively easy.
* It is tertiarily hoped to eventually become a library of such tools, fully integrated with one another.

Your post gives me some goals to push for.

Can you tell me --or point me to on-site information that tells me-- specifics such as:
* How to recognize a mesh.
* How to recognize a recolor.
* How to tell a social interaction from a cloned object.
* How to tell a Bodyshop file from a saved lot.
* Anything else like this.
...from within a program?

My problem right now is that I don`t know what to ask, and --worse!-- don`t know how to ask it.
Quote: Originally posted by Johnny 5
Input! Need input!
^^Movie reference^^

This Space Intentionally Left Blank
Warrior Gryphon
site owner
#72 Old 24th Dec 2008 at 8:56 PM
With regards to detecting the *type* of package file it is - I'm possibly one of the few (or only) people who have actually done that in depth.

Look at the DBPF Source in my DDO thread, download it, and check the detectType() function. When going through it, have the language file open too (from the DDO) so you know which package type refers to which actual type (pkgTypeInt => Package Type).

I can't compress it down too much since the actual routine (not counting the one that actually adds the various counters) is 400 lines long. It basically uses a combination of counters of types of chunk, and specific chunk reading to determine the type.

One question though: Why Python? I realise that it might be free and easier, but so far the vast majority of Sims 2 tools (S2PCI, DDO, SimPE) are written in C# .NET - it would be *much* quicker for you to use existing code (with permission of course) than for you to write it yourself although I do see how it can take time to understand how it works.

I still think you need to choose a specific *goal* and work towards that. You'd get much further much faster.

Story books are full of fairy tales, of Kings and Queens, and the bluest skies.
Mad Poster
Original Poster
#73 Old 26th Dec 2008 at 1:49 AM
Thanks, Delphy; I`ll have to take a look at your source sometime. As for "Why Python"? I thought I answered that one early on: Messages 34 & 35. I already have and know Python. I neither have nor am proficient with C#.

This Space Intentionally Left Blank
Warrior Gryphon
site owner
#74 Old 26th Dec 2008 at 1:41 PM
C# isn't that difficult to learn though You can also download Visual Studio Express for free.

Story books are full of fairy tales, of Kings and Queens, and the bluest skies.
e3 d3 Ne2 Nd2 Nb3 Ng3
retired moderator
#75 Old 26th Dec 2008 at 2:21 PM
Quote: Originally posted by Delphy
Some of the things simsample mentioned - the orphan scanning, type of file, etc - are really things that you *dont* need to do. Why? Becuase there is another tool out there that already works fine for those things (ie the DDO). Why re-invent the wheel unless you absolutely *must*?

Well, SimPE also does those things- but I was meaning something which I would like a stand alone program to do. I cannot think of anything to do with package files in The Sims 2 which cannot already be done by some tool or other- be it your DDO, SimPE, CI, Sim Wardrobe tools, Dizzy's tools or JFade's tools. The only things really missing are tools for the Mac version of the game.
Page 3 of 5
Back to top