Quick Reply
Search this Thread
Site Helper
Original Poster
#1 Old 13th Jan 2011 at 8:48 PM Last edited by Mootilda : 29th Sep 2011 at 7:49 AM. Reason: Upload intermediate source code.
Default HoodChecker - Neighborhood Corruption Detector
[Update:]
HoodChecker has been released:
http://www.modthesims.info/d/456523
[end update]

A suggestion from Quatchi:

A program which checks a neighborhood, looking for signs of corruption:

- Family ties with invalid sims
- Relationships with invalid sims
- Memories with invalid subjects or targets

This program can't possibly "guarantee" that your neighborhood is OK, but it could at least show you possible problems.

Family Ties:

There is no way to remove a corrupted Family Tie at this time. Looks like my neighborhood checker needs to become a neighborhood fixer... I might implement a "Fix" button which will just remove all references to non-existent sims.

Sim Relations:

You can remove a Sim Relation using SimPE. Combine the two sim instances and look for the Sim Relation with that instance. For example, the Sim Relation from sim 002A to sim 0136 has an instance of 002A0136; the Sim Relation from sim 0136 to sim 002A has an instance of 0136002A.

Memories:

Memories have the same problem as Family Ties. Specifically, if a memory belongs to a non-existent sim (or to the lot or neighborhood instead of a sim), then SimPE will not show it to you; therefore, you cannot remove these corrupted memories.

EP checks: Should ensure that memories are not from non-existent EPs.

Wants and Fears:

I haven't looked into this structure yet, but I expect it to be about the level of difficulty of finding and fixing Memories.

Pregnancies:

Since we have a list of valid sims, it should be fairly straightforward to ensure that pregnancies have valid second parents.

Sim Scores:

When a sim is deleted from a neighborhood, are the business ratings from that sim removed? If packaged lots retain their business rating information, then these lots could end up with scores from invalid sims when the lot is added to a new neighborhood:
http://www.modthesims.info/showthread.php?t=456186

Input:

Need basic checks to ensure that this program is only run on neighborhoods, not lots. Especially important if the program attempts to fix problems. At the very least, the program should refuse to run if your neighborhood does not have a list of valid sims, since it uses that list in the rest of the logic.

Output:

Might make sense to sort by Sim ID... ie, for a particular missing sim, list all of the family ties and sim relations which are corrupt.

-----------------------------------------------------------------------

An initial attempt at this program; very rough. You'll need .NET 2.0 installed. Extract everything from the zip file into a folder on your hard drive and run the program from there.

So far, this only checks Family Ties and Sim Relations; I still have to add the Memory checks, which are far more complicated.

Note that the sim name lookup is not yet implemented, so you'll be seeing the instance number of the Sim Description instead. You can use SimPE to look up the Sim Description associated with the hex instance number to find the actual sim.

WARNING:

This is a very very early attempt. It should not change anything in your files, but it would still be a good idea to backup your save game before using.

Here is an example of the output that you'll see:

Family Ties:
0032: Sim does not exist
0055 has 2 first parents

Sim Relations:
0031 to 0029: First sim does not exist
002A to 0136: Second sim does not exist
001D to 00CB: Neither sim exists
Mad Poster
#2 Old 14th Jan 2011 at 4:02 AM
Great idea. I'll be a tester if you need it, seeing as I still am holding onto that corrupted 'hood/game of mine I was complaining about. Plus I have a few bad ones in storage in case something like this came along.


Angie/DS | Baby Sterling - 24/2/2014
This account is mostly used by my sons to download CC now, if you see me active, it's probably just them!
Site Helper
Original Poster
#3 Old 17th Jan 2011 at 5:30 PM
Thanks for the offer. It's always nice to have someone else test things before I ship them.
Lab Assistant
#4 Old 17th Jan 2011 at 9:23 PM
I am also willing to be a tester. I'm no modder, but what about unknown tokens? Like if youinadvertently deleted global mods that use tokens eg ACR, etc?

in Soviet Russia, the sims mod YOU.
Oh, I went there.
Site Helper
Original Poster
#5 Old 17th Jan 2011 at 9:59 PM
I'm not familiar with tokens. Where are they stored?
#6 Old 17th Jan 2011 at 10:15 PM
If I'm not mistaken, custom tokens are typically non-visible objects stored in a Sim's inventory. They have their own GUID and attributes with which values can be stored.

I don't mind if you call me "MSD" or something for short.
Tumblr
Perhaps someday I'll have leisure time back...
Site Helper
Original Poster
#7 Old 19th Jan 2011 at 5:29 PM
Thanks, msd. I wasn't planning on examining CC, at least in the first version. Just trying to figure out which memories require valid sim guids is going to be a lot of work, unless someone knows of a list that I haven't seen yet. At least with relationships and family ties, it's obvious that the target is a sim.
Blenderized to Pieces
retired moderator
#8 Old 19th Jan 2011 at 7:44 PM
I'll test for you Mootilda :0) I have several TS2 backup games that need to be looked at.
Site Helper
Original Poster
#9 Old 20th Jan 2011 at 12:24 AM
Sounds like there's a lot of interest in this. I appreciate the offers of help.
Mad Poster
#10 Old 20th Jan 2011 at 5:02 AM
No problemo. For all you've helped me, I'm willing to do this.


Angie/DS | Baby Sterling - 24/2/2014
This account is mostly used by my sons to download CC now, if you see me active, it's probably just them!
Site Helper
Original Poster
#11 Old 20th Jan 2011 at 10:36 PM Last edited by Mootilda : 9th Feb 2011 at 11:50 PM.
Default HoodChecker V0.1
An initial attempt at this program; very rough.

Update: Version removed. New versions will be attached to first post.
Blenderized to Pieces
retired moderator
#12 Old 26th Jan 2011 at 2:23 AM
Well, First attempts are interesting. I ran this on my current game. I usually play Strangetown but the checker returned this errora;
The lot compression was aborted! An error occurred during modification of your lot. The current version of the LotCompressor is unable to continue.

Please report this error in the download thread and attach a copy of your lot to the posting.

When I ran it on one of my backedup games on me E drive, it returend results such as the one in the image capture.

I have Sims 2 holiday (base game) and all EPs and SPs,
Screenshots
Blenderized to Pieces
retired moderator
#13 Old 26th Jan 2011 at 3:10 AM
Wow! It saved the pic upload! I'm surprised at that. My computer started rebooting as soon as I tried using it but it could be IE. Who knows. I'm using Chrome and it's working now.... We'll see if it stabilizes.

Anyway, when I ran it in my E drive backed up neighborhood, it told me my sims didn't exist. It was when I also opened SimPE to see which sims didn't exist, that my computer went blue screen and died.
Blenderized to Pieces
retired moderator
#14 Old 26th Jan 2011 at 3:27 AM Last edited by porkypine : 26th Jan 2011 at 3:44 AM.
Ok. Everything is stable again. Does your neighborhood checker need to run with SImpe? Or does it run as a stand alone? (clueless here lol) Do I put the DLL's into SimPE? the neighborhood checker inside SimPE is working. I'll save this and run your checker to see what happens.

No reboots so IE musta went whacko again. I am not sure how to find the instances of the sims inside SimPE. I can look them up by name but your utility only shows things like 0009 to 0051 Second sim does not exist.

The HoodChecker does not show any relationships for my strangetown backuped up game (located on E) - my most populated and played hood. It says the first or second or neither sim exists. and when I use it in my live game it errors and says Index was out of range Must be a non-negative a* and only the top of the rest of the letters are visible says maybe Parameter **** Index the box contents say, "The lot compression was aborted! An error occurred during modification of your lot. The current version of the LotCompressor is unable to continue.

Please report this error in the download thread and attach a copy of your lot to the posting."
Site Helper
Original Poster
#15 Old 26th Jan 2011 at 3:35 AM
Quote: Originally posted by porkypine
Well, First attempts are interesting. I ran this on my current game. I usually play Strangetown but the checker returned this error
Could you attach your neighborhood package (just the one file, not the folder), so that I can try to determine where the problem lies?

Quote: Originally posted by porkypine
It was when I also opened SimPE to see which sims didn't exist, that my computer went blue screen and died.
Did you have the hood checker running at the same time as SimPE? Probably best to run only one at a time. You can use the "Save" button to save the list of problems to a text file, so that you can look at the errors with SimPE open.
Blenderized to Pieces
retired moderator
#16 Old 26th Jan 2011 at 3:56 AM Last edited by porkypine : 26th Jan 2011 at 4:59 AM.
At first, I only ran the Hood Checker and it errored out, I opened SimPE while I was trying to post and that's when my computed spazed out and did the reboots. After I stabilized my system and kept IE closed, I was able to run the hood checker and SimPE at the same time - the Hood checker still showed the errors. Here's the neighborhood package from Strangetown (running game) which has several families that I've created.

Blinkie and Herb Bunkettes was the first sim family I created. They got the kids and furniture repossessed! until I discovered cheats and how to play the darn game. Now they live in a nice house.

hmmm. 3rd time - I'ts not posting my package....

4th time - reinstalled shockwave player...

5th time, out of Chrome and back to IE... (hasn't crashed yet. )

6th atempt. lol. Well My system didn't reboot, just IE locked up when trying to save this neighborhood rar.

Let me try a different rar 7th attempt - one of Alex Stanton's coconut palms

ok. It posted the coconuts I'll repack the neighborhood.

Hmm. It doesn't like to post this neighborhood here. It's a 7.22MB file compressed to 1.2 MB. I'll upload it to mediafire and post the link here. http://www.mediafire.com/?sea5b6dnfs1djwz
Mad Poster
#17 Old 26th Jan 2011 at 7:31 AM
I would test it but I'm waiting for my main computer to be shipped here. Sorry.


Angie/DS | Baby Sterling - 24/2/2014
This account is mostly used by my sons to download CC now, if you see me active, it's probably just them!
Site Helper
Original Poster
#18 Old 29th Jan 2011 at 2:00 AM
Quote: Originally posted by porkypine
At first, I only ran the Hood Checker and it errored out, I opened SimPE while I was trying to post and that's when my computed spazed out and did the reboots. After I stabilized my system and kept IE closed, I was able to run the hood checker and SimPE at the same time - the Hood checker still showed the errors. Here's the neighborhood package from Strangetown (running game) which has several families that I've created.
I can't see anything wrong with the way that the Hood Checker is handling your neighborhood package and it wouldn't crash for me or give me any run-time errors.

As far as I can tell, all of the sims flagged are actually missing from your neighborhood.

Have you got .NET 2.0 installed on your system? Did you extract everything from the zip file into a folder on your hard drive and run the program from there?

I hope that you are aware that running two programs at the same time, which both change the same file, is a very bad idea and can lead to corruption. For example, you shouldn't be running SimPE while you are running the game. Although the Hood Checker doesn't actually change the files, it can still run into file locking issues when the file is already open in SimPE or the game.
Blenderized to Pieces
retired moderator
#19 Old 30th Jan 2011 at 12:43 AM
I have .NET 4.0 on Windows 7 32 bit. I don't run SimPE and the game at the same time. I know they lock the same files. I just ran your hoodchecker by itself and when it bombed, I tried it with SimPE... then again without Simpe. Everything is in it's own folder.
Site Helper
Original Poster
#20 Old 9th Feb 2011 at 11:50 PM
I may have found the bug which was causing your problems. New version 0.2 available in first thread. Please let me know if you have further problems.
Lab Assistant
#21 Old 17th Feb 2011 at 5:53 PM
Thanks, this is really useful.

I'm currently using your tutorial to make subhoods from my clean premade templates. At the same time I'm going through them to fix up minor things, and as I found this useful tool, I decided to run it on the templates.

It showed me one broken relationship of EAxis' doing in Belladonna Cove (this one I already knew about), and I'm finding a couple of others which may or may not be my fault. Thing is, as you pointed out, there is no way to fix broken Family Ties. I would love it if you did add that feature to this program.

Do you know whether a broken family tie can have any catastrophic effects on a 'hood down the road?
Site Helper
Original Poster
#22 Old 17th Feb 2011 at 8:15 PM
By "fix", I meant that the program would just delete any family ties with non-existent sims. Is that an acceptable solution for you? Once the bad family ties are gone, you can add back any missing ties using SimPE, etc.
Lab Assistant
#23 Old 17th Feb 2011 at 10:01 PM Last edited by Tarlia : 26th Feb 2011 at 9:34 AM.
That would be fine. The ties seem to be leftover garbage that should just be deleted anyway, not something I need to keep. The one in Belladonna Cove is from Chastity Gere's father to a parent that was deleted by EAxis. In Riverblossom Hills I found a sibling tie from a non-existent sim to Daisy Greenman (who HAS no siblings). I expect I might find more in the other 'hoods.

Edit:

Ugh, Veronaville is full of corrupted family ties. Not sure if they're my fault or Maxis'.
Site Helper
Original Poster
#24 Old 27th Feb 2011 at 6:52 PM
You could always run the hood checker on the neighborhood templates... that would tell you whether EA caused the problems.

I've always heard that the maxis-made neighborhoods had problems, especially Strangetown.
Lab Assistant
#25 Old 27th Feb 2011 at 10:35 PM
Had to dig through my files to find the originals. EAxis Veronaville does indeed have the broken family ties (a whole 14 of them), so it was nothing I did (I did make very sure to remove all ties before deleting any dead ancestors).

Strangetown and Pleasantview were both, surprisingly, clean - of broken family ties anyway. However, every single one of the premade hoods were originally FULL of broken relationship ties. I deleted all of these. Strangetown (and Veronaville) also had broken genetics and some fun mess in the Curious/Smith family tree.

Anyway, all that remains now is to get rid of these family ties (hopefully?), and my new clean templates will be ready to go.
 
Page 1 of 5
Back to top