Sims 2 Tools Project
#1 12-12-2020 
Took a break from BHAV mangling to write some C# code ...

Sims2Tools Project
The Sims2Tools Project consists of two libraries and three applications
  • DBFF Library
  • Utils Library
  • DBPF Viewer Application
  • BHAV Finder Application
  • HCDU Plus Application
DBPF Library
The DBPF Library is a set of classes for reading "The Sims 2" DBPF (.package) files. It can extract both uncompressed and compressed resources of types BCON, BHAV, CTSS, GLOB, OBJD, OBJf, STR#, TPRP, TRCN, TTAB, TTAs and VERS - ie all the ones of use to coding modders.

Utils Library
The Utils Library is a set of classes to support development of applications that use the DBPF Library providing classes for registry persistence, MRU lists and common dialogs (about, configuration and progress)

DBPF Viewer Application
The DBPF Viewer is a simple application to display the contents of a DBPF (.package) file. It was written primarily as a testing application for the DBPF Library, but also supports exporting resources as XML (either to the clipboard or to a file)

[Image: DbpfViewer01.jpg]

BHAV Finder Application
The Simantics Resource Finder in SimPE (Tools -> PJSE -> Simantics Resource Finder...) is very good at what it does, but doesn't quite measure up if you want to dig into the Maxis game code, for example, when searching for code snippets that use primitives in a certain way, or link to specific strings (eg animations).

The BHAV Finder application is my attempt to make spelunking in the game code more productive. Recently, I have wanted to be able to answer questions such as, which BHAVs ...
  • use the old version of the relationship primitive
  • use TNS Style 0x05 (see here)
  • create the "Token - Poison Ivy" object
  • access the Lot Inventory
  • call "Want Satisfy - Kiss" in the SofaSocialGlobals
  • use the firefly jar animations
BHAV Finder was written to provide the answers.

[Image: Answer3_1.jpg]

HCDU Plus Application
The Hack Conflict Detection Utility (HCDU) is an essential tool when using mods, but it does have some shortcomings
  1. it doesn't consider STR#, OBJD, OBJf or other resources
  2. it can't be told which folder to start in
  3. it can't be told to ignore known conflicts (eg all the InTeenimater flavor paks)
  4. it reports conflicts at the resource (BHAV, BCON and STR#) level and not at the package level (it's usually enough to know that "InTeenimater_FlavorPak_BackToSchool.package" conflicts with "InTeenimater_B.package" without giving the eleven resources that conflict)

The HCDU Plus application is my attempt to remedy these.

[Image: HcduPlus01.jpg]

Full source code is available on GitHub

3
#2 12-12-2020 
(12-12-2020 03:36 PM)whoward69 Wrote:  (it's usually enough to know that "InTeenimater_FlavorPak_BackToSchool.package" conflicts with "InTeenimater_B.package" without giving the eleven resources that conflict)

Incorrect! Maybe it's enough for the user who wants to avoid using conflicting mods. But for the modder trying to get his mod working with as many already existing mods as possible, it may be most illuminating to know exactly WHERE the conflict occurs in the package. If the existing mod A and our new mod B both contain multiple BHAVs, multiple BCONs and a lot of other stuff, it just isn't enough to know that they conflict. We want to know where exactly the problem crops up, because how else can we integrate features of the other mod into our own so they can both work together?

When a user found a conflict with one of my mods, I've always found it useful if they could show me the full details of the conflict, so I could simply dive into the conflicting resource without first having to go figure out which resource was the problem, just because the conflict finder didn't supply that information.

So maybe you could add a parameter that allows a choice: with details, or without!

0
#3 12-12-2020 
That's just the summary of the app. The hint is in the word "usually". If you look at the mouse-hover tool-tip in the screen shot, it's showing the exact three resources that conflict. If you look at the linked web-page, you will find that there are several ways to get the full details - from the tool-tip, from the "By Resources" tab, and from saving the report to the clipboard or file.

1
#4 13-12-2020 
About that tool-tip... Yeah, I was not paying attention to that... Sorry. Maybe if I had payed more attention to the pictures and less to the summary... Then I wouldn't be the person that I obviously am Smile

Anyway, I just thought I'd throw my thoughts on the subject out there, because when I was active as a modder, *usually* the details were more important than your summary implied.

Whatever the case, it's a pity that your tools weren't available a decade ago. Maybe not necessarily to replace SimPE and HCDU, but at the very least to complement them.

1
#5 26-12-2020 
  • Registered
  • 6
  • 8
I just saw this thread-thanks for the update on the HCDU! I'm glad you're still doing mods and programs, Whohoward!

0
#6 28-12-2020 
I've updated HCDU Plus to take two paths, one to the Downloads folder and one to a Mods Under Test folder, if both are specified HCDU Plus will only report conflicts between mods in the test folder and between mods in the test folder and the downloads folder. That is, it won't keep reporting on accepted conflicts between mods in the main downloads folder - see http://www.picknmixmods.com/Sims2/Notes/...uPlus.html

1
#7 28-12-2020 
Many, many thanks, whoward69! Smile I am a user of the first Hack Conflict app, (along with the Downloads Organiser app), and your updated tool allowed me to spot two additional conflicts which didn't show up with the former one! Smile And we don't have to rename the folder from "The Sims™ 2 Ultimate Collection", into "The Sims 2", to use Hack Conflict, and then back to "The Sims™ 2 Ultimate Collection", to play the game.

I'll still keep both of the former app and your updated one, just in case, anyway.

Thanks again and have a good 2021! Smile <3

Now, we all deserve a good 2021! :o

0
#8 29-12-2020 
You don't need to do the rename for HCDU, just create a symbolic link - see https://modthesims.info/showthread.php?p...ost5139386

1
#9 29-12-2020 
"mklink /D" -- I don't think many people ever heard of that command. "mkdir" is one I've heard of, in the good old days of MSDOS/PCDOS/NDOS/4DOS. But "mklink"??? Never before today.

0
#10 29-12-2020 
mkdir is make directory while mklink is make link. Symbolic link is much like a shortcut, difference is a shortcut is an actual tiny file (I think) where a symbolic link isn't.

1


Sorry, that is a members only option