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!
Test Subject
Original Poster
#1 Old 19th Dec 2021 at 5:15 PM
Default How EXACTLY does deleting Sims from the family bin cause corruption?
Hi! I know that from the title it looks like I'm about to ask a question that has been asked a million times on this forum, but I'm interested particularly in a technical aspect of Sim deletion, so please hear me out.

I think it's relevant to this post that I am a software developer; as in, that's what I do for a living and have been doing professionally for the last few years. So you can go very technical with me when answering my questions My profession is also what pushed me to investigate the topic of Sims 2 corruption further. I am a long time Sims fan and it was very fascinating to me that there might be ways of corrupting your save file during normal gameplay. So I did a technical deep dive and conducted a series of experiments in my game, I also dug deep in SimPE and I definitely learned a lot about how the game works in the process.

So... onto the main topic. I have serious doubts whether deleting Sims from a family bin (and deleting gravestones, since it leads to the same result) actually causes corruption. I have read the famous article on Sims Wiki many times, as well as the guide to deleting Sims "properly", and the most commonly given reason seems to be that the game doesn't clean out all references to that Sim, and all memories, family ties and other stuff are now pointing to non-existent data. Deletion guide also mentions that "their character file is unlinked but leftover bits of data is still left to drift around the neighborhood files, attaching themselves to other Sims and eventually throwing a monkey wrench into the works". I've noticed that this is very commonly given as an explanation as to why deleting Sims is bad, and it has always been a bit confusing to me, because this is not how computer data works As in, data doesn't just float around trying to attach itself to some other entity. The only way a Sim can inherit references of a deleted Sim is when they generate with the exact same NID. Which can happen! But not in the case of Sims deleted from the bin.

In my opinion, The Sims 2 devs made the most reasonable choice when it comes to deleting entities from such a complex game. When you have a data structure like The Sims does, meaning that you have lots of entities connected to other entities and having plenty of relationships between each other, you have three different options:
1. You can fully delete the parent entity (in this case: a Sim), but leave all the relationships intact. This is pretty bad, fellow programmers will probably agree with me that having lots of references pointing to null is bad news. Also, in this case the Sim ID is no longer considered "taken", so there is a chance that a new Sim will generate with that exact NID, acquiring all the missing Sim's references in the process. This is what happens when you manually delete a character file from the Characters folder (a missing character file is what is causing all the $Subject memories, for example), as well as when you use deleteAllCharacters cheat, but NOT when you delete a sim from the bin.
2. You can fully delete the parent entity AND all the relationships as well. A bit better than the previous option, but still not ideal in my opinion. First of all, in a game like The Sims 2 you might end up with some unexpected data loss. For example: say you have a family consisting of a grandparent, a parent and a child. You delete the parent and all their references, so now the grandparent and the child are no longer related. Also, deleting references would mean deleting memories. Some players might not want the playable Sim to lose memories that relate to the deleted Sim. Also-also, cascade delete is pretty damn slow. Performance is important in video games!
3. In programming there is something called "soft delete" or "logical delete". It means that instead of deleting the entry completely, you just hide it from the application. All the references are still intact and they are pointing to valid data. It seems to me that that's exactly what The Sims 2 is doing.

When you delete the Sim using the bin icon, two things happen. First of all, the Sim becomes "unlinked". I'm not 100% sure what it means, but from what I've observed, this is the game's "IsDeleted" equivalent, meaning that "unlinked" tells the game to ignore that particular Sim and treat them as deleted. Second of all, their character file does become significantly smaller. Not the 1kb as the Sims Wiki guide suggests, more like 30kb-ish, but still. I believe the game removes the data that is no longer necessary to keep for a deleted Sim. Maxis probably assumed that when the user deletes a Sim, they want them gone, so they don't need their data to occupy hard drive space. The only data that is left is what's necessary for the references to work, e.g.: a thumbnail and a name is needed for memories to display correctly. But the character file is still there, so the references are not pointing to non-existent data. Also, since the character file exists, the NID is considered as taken, so newly generated Sims will not have a chance of recycling that NID. I have tested this in my game.

So... from my point of view everything seems to be in order and nothing is corrupted. But something must have caused the modders to assume that deleting Sims from the bin is bad, so I kept digging. I have seen explanations that memories pointing to an unlinked Sim or a Sim with incomplete character data are corrupted in of itself. Even Pescado's Batbox considers them as corrupted (see the 'Wiped Corrupt' option). But why? From the programming point of view, I can't see why these references would be invalid, as the data required for them to display in the game correctly is still there. Am I missing something?

There is also a question of the Sim Creation Index, which is only mildly related, but I think this question still fits in this thread. The way SCID works is that it "remembers" what was the ID of the last generated Sim, so even if you nuke your entire neighborhood with deleteAllCharacters, the next generated Sim will take the NID, say, 800-something, rather than 1. If you reset that index manually, then yes, you get all kinds of madness like toddlers with LTWs and dogs in the family tree. However, I imagine that most players do not mess about in SimPe, and we do have evidence of new Sims acquiring deleted Sims' data in the form of many, many screenshots. So my question is, is there a bug in the game that causes SCID to reset spontaneously? Maybe some mods cause this?

As a side note, I am confused as to why the deletion guide on Sims Wiki instructs to reset the SCID. That seems like a really bad idea to me, as this index is the game's safety mechanism to prevent new Sims from acquiring missing Sims references. If you accidentally miss something during deletion process, you are actually risking corrupting your game. In other words, it's there for a reason, why reset it?

I know that there are a lot of very talented modders on this forum, so I hope someone will be able to answer my question. Also, whilst I do have general technical knowledge, I have no Sims modding experience, so I do appreciate that you guys know much more than me about the game's quirks and behaviours. So if you think I'm talking rubbish or if I'm misunderstanding something, please feel free to educate me
Advertisement
Forum Resident
#2 Old 19th Dec 2021 at 5:41 PM
I'm hoping that @Chris Hatch will see and respond to this. He is one of the most knowledgeable I know of about TS2. I'd love to see a good technical discussion of this as I have wondered about some of the same issues you brought up.

All of my Conversions, Creations and Stories may be found here:
HobbesED's Conversions and Creations

My most recently shared items (with pictures) may also be found here:
HobbesED's Dreamwidth

e3 d3 Ne2 Nd2 Nb3 Ng3
retired moderator
#3 Old 19th Dec 2021 at 6:27 PM
We already know what Chris Hatch thinks- he agrees:
http://www.modthesims.info/showthre...388#post5516388
https://modthesims.info/showthread....908#post5485908

No you're not misunderstanding, there is a lot of panic inducing information around about game corruption. Many modders have been saying for years that this is intended game behaviour:
http://www.moreawesomethanyou.com/s....html#msg321392

It's not necessarily desirable to have stub characters though- in the basegame there was a character limit of around 800-1000 sims so this was when completely removing sims would have been most needed. Pescado devised Deleted II to cleanly delete a sim, but nowdays filesizes and hard drive space are not such a problem. I would use Mootilda's method to cleanly clone a neighbourhood.
Test Subject
Original Poster
#5 Old 19th Dec 2021 at 8:42 PM
@simsample Thank you, it's reassuring to see that I wasn't the only one questioning the panic surrounding the hood corruption I am aware of the problems with character file limit & littering your hood with unnecessary stub files, and I also have my personal theory (unsupported by evidence) that a lot of the corruption that we were seeing from back in the day was due to overpopulation. Even after they increased the character file limit, because artificial limit is one thing, but how many Sims your game and your computer can handle is another. The fact that home computers have evolved since 2004 is probably a factor. Anectodally, 10+ years ago I remember seeing Sims disappearing when my hood was nearing 1000 character files. On my current machine - a powerful new gaming computer - I have one neighborhood that is almost 2000 characters and still going strong. I am also on a few Polish Sims forums and every time someone mentions corruption symptoms, I ask them to check the number of files in the Characters folder. Every time the number is somewhere around a thousand.
I think people underestimate how easy it is to bloat up your neighborhood in a vanilla game. The game generates so many useless Sims, it's insane! Especially if you're moving Sims between the neighborhoods, and especially if those Sims have big family trees, because a stub character file is generated for each member of the family.

@Aspersim I think since you were playing a vanilla game, the squiggly lines might have been caused by a corrupted death memory. There is a bug in the game that causes the gossip memory that generates when the Sim witnesses another Sim's death to not have a proper event owner (an equivalent of the $Subject memory, but in the gossip form). There is a mod that fixes this, see this link from MATY: http://www.moreawesomethanyou.com/s...hp?topic=2368.0
This is actually bad to your hood, as it's an example of a reference pointing to nothing, and you don't have to do anything "bad" for this to occur - sadly it just happens during normal gameplay (unless you have a mod)
Mad Poster
#7 Old 19th Dec 2021 at 9:30 PM
Eh, sqiggly lines do not necessarily mean anything, they frequently occur when sims experience route failure or look out the window. I think it is just the game failing to come up with a proper icon for the thought bubble for whatever reason, and is probably just a regular garden-variety bug and not necessarily an indication of a corrupted memory.

There is for sure a lot of superstition about corruption, and it's possible that specifically deleting sims from the bin does not cause it, if you are playing with a recent EP and are not restricted to 1000 character files. It's still desirable to not delete gravestones or to have nounlinkondelete installed if you want to delete those, since you might want to resurrect those sims later, though. I would just personally not test this theory on an actual neighborhood I would like to continue playing long term.
Test Subject
Original Poster
#8 Old 19th Dec 2021 at 9:53 PM
Quote: Originally posted by kestrellyn
Eh, sqiggly lines do not necessarily mean anything, they frequently occur when sims experience route failure or look out the window. I think it is just the game failing to come up with a proper icon for the thought bubble for whatever reason, and is probably just a regular garden-variety bug and not necessarily an indication of a corrupted memory.


You are absolutely correct! However, I do believe that there are different types of squiggly lines. Those caused by the routing issues look a bit different that the dreaded "corruption" ones. For example:
Routing issues look like the ones from this thread: https://modthesims.info/t/536912
Corrupted memory looks like this (from Sims Wiki): https://static.wikia.nocookie.net/s...=20140511104358
Field Researcher
#9 Old 19th Dec 2021 at 10:11 PM
So you're saying deleting sims is harmless? I don't get it.
Test Subject
Original Poster
#10 Old 19th Dec 2021 at 10:16 PM
I'm saying that I haven't found any evidence that deleting Sims from the bin and deleting gravestones causes any harm to your neighborhood. Deleting Sims can mean either deleting from the family bin, or deleting the character file - these are two different things. I am inclined to believe that the family bin route is harmless. People often say how this part was "not coded properly" due to remaining references, but as I explained in my original post, I think it was actually done correctly, considering how the game's data is structured. And most importantly, I believe it's not true that other Sims will acquire data from the Sims deleted that way, as their NID remains taken.
Mad Poster
#11 Old 19th Dec 2021 at 10:20 PM
Quote: Originally posted by simsample
No you're not misunderstanding, there is a lot of panic inducing information around about game corruption. Many modders have been saying for years that this is intended game behaviour:
http://www.moreawesomethanyou.com/s....html#msg321392


Wait... so we've known that deleting (unlinking) sims isn't that big a deal as far back as..... 2008?!

This thread has been so interesting!

~Your friendly neighborhood ginge
Theorist
#12 Old 19th Dec 2021 at 11:05 PM
I have always believed (was made to believe by the posts in the community) that deleting Sims would reduce their data to a stub file, but that there was this error in code happening whenever the data would be accessed after their deletion. For example, that there's a stub file of the deleted character Don Lothario, but whenever Cassandra Goth would randomly think of something (for example a memory that involved Don), it's not that the game would only try to dereference Don's file, but instead also made a new (something) to fill up the holes. Then, the (something) was the icky bloat that spread and attached itself everywhere.

However, judging from Pescado's post in 2008 from the linked thread, I'm starting to doubt the whole "corruption! Deleting is bad!" thing too - all I understood was that he hated the remaining bits of data and wanted any placeholders of the ex Sim gone rather than logically deleted/made inaccessible. Though, I understand his POV as well, as there's absolutely no need to have 3 NPCs of each type readily available at all times, for most neighborhoods anyway - especially running on 90s and 00s machines.

It could be that the squiggly lines are truly not related to Sims deletion. However, what are the other signs of corruption? The first thing that pops into my mind are the corrupted want trees. It's the most unsettling when you see wants on a Sim that are not appropriate for that Sim's age group, for example, toddlers wanting to make out with someone. Could that be a coincidence as well? What else could make want trees corrupted then?
e3 d3 Ne2 Nd2 Nb3 Ng3
retired moderator
#13 Old 19th Dec 2021 at 11:14 PM
Quote: Originally posted by Bigsimsfan12
Wait... so we've known that deleting (unlinking) sims isn't that big a deal as far back as..... 2008?!


Yes! Many of the problems people attribute to corruption from doing a V.B.T (very bad thing) could be caused by game modifications or external (computer) causes, or even attempts to fix the V.B.T.

Most of the information shared here is anecdotal, so people are saying 'when I did this, my neighbourhood became unplayable'. But of course, what we might not know is that the person gave a third party disc cleanup tool admin priveleges to delete files on their hard drive. Or maybe they downloaded a bunch of mods and what's happening is caused by those. Or (common nowadays) they have their userdata synched to cloud storage and the game can't write to it. I'm not saying that people are deliberately misleading others, just that there are so many factors involved in userdata longevity that we can't possibly factor them all or be expected to know exactly what's going on unless we are computer (and game) experts.

Our knowledge and available tools/ mods has also changed drasticly over the years, so a tool or method which might have been good ten years ago might now be known to be harmful or unnecessary. And for every tutorial or guide written on one forum, that information- whether accurate or not- is propogated over many websites over many years, so it's like chinese whispers in that the currently repeated version may bear little resemblance to the original.

Also, some game bugs or issues may not be apparent in an unmodded game. For example, the firstborn effect is less noticeable in an unmodded game. As most of us here have several GB of custom content, plus we edit our game data files, it's difficult to know whether what one player reports is specific to their game, or universal.
Test Subject
Original Poster
#14 Old 19th Dec 2021 at 11:27 PM
Quote: Originally posted by topp
It could be that the squiggly lines are truly not related to Sims deletion. However, what are the other signs of corruption? The first thing that pops into my mind are the corrupted want trees. It's the most unsettling when you see wants on a Sim that are not appropriate for that Sim's age group, for example, toddlers wanting to make out with someone. Could that be a coincidence as well? What else could make want trees corrupted then?


I have managed to replicate the "toddler with adult wants" situation in my game, so I might be able to answer this. Sim Wants and Fears are stored separately to the Sims character file, so they remain after you remove a file from the Characters folder (unless you remove those orphaned SWAFs via HoodChecker or SimPe). That Sim's NID also becomes free real estate, because the character file no longer exists. If a new baby is born in the game and happens to recieve the NID of a deleted Sim with Romance aspiration, then that baby, when it grows up to a toddler, will start getting some very inappropriate wants. It may have a lifetime want as well. This is more likely to happen in the three pre-made hoods, as there is solid evidence that Maxis has deleted some Sims from there. As in, actually deleted, including the character file, but the references can still be found. It's not impossible in the custom hoods though, especially those overpopulated. The character files do start disappearing in the case of overpopulation, and the player might not necessarily notice this (the disappeared Sim could be a townie, for example).

I did this to my Strangetown when I removed the Pollination Tech Smith. However, in order to actually get the toddler with LTW, I had to do the following steps:

1. Delete Pollination Tech's character file from Character's folder
2. Reset the Sim Creation Index to 1
3. Generate like a 100 toddlers, since Strangetown has a lot of unused NIDs between 1 and 100 (Pollination Tech's NID is 100, I believe)

Here are the screenshots if you are interested - the results are pretty mental https://imgur.com/a/P9eHCmU

However, again with the Sim Creation Index I had to reset it manually for this to happen. I still haven't found a situation when it would reset automatically, but it could be possible, since many people have experienced this phenomenon.
Theorist
#15 Old 19th Dec 2021 at 11:38 PM
Ok this is getting very interesting now!!!!!!!!
Mad Poster
#16 Old 19th Dec 2021 at 11:41 PM
Quote: Originally posted by April Black
You are absolutely correct! However, I do believe that there are different types of squiggly lines. Those caused by the routing issues look a bit different that the dreaded "corruption" ones. For example:
Routing issues look like the ones from this thread: https://modthesims.info/t/536912
Corrupted memory looks like this (from Sims Wiki): https://static.wikia.nocookie.net/s...=20140511104358


Your picture didn't work, but I know what you mean. However, I wouldn't describe that thought bubble as "squiggly lines" and I don't think anyone else really does either. When people talk about "squiggly lines" they're almost always talking about the first picture. Anyway, corrupted memories are not really a big problem like toddlers with wants to date people are - you can just remove the memory with one of a number of different tools, and clear all gossip, and the problem is gone. A lot of people refer to memories that don't even refer to missing data but just have the wrong subject or something as "corruption", but this stuff is easily fixable and not permanent in any case. I guess you could probably fix the toddlers with the bad SWAFs by deleting the SWAF, but there might also be other inappropriate data floating around and if the sim creation index has reset for whatever reason you're also going to get more sims with this problem in the future.
Test Subject
Original Poster
#17 Old 19th Dec 2021 at 11:48 PM
@kestrellyn Oh yes, I do agree with you that "corrupted" memories are not actually that big of a deal if it's caught and removed early HoodChecker is actually really good at picking up references to the Sims that are truly gone (character file and all). I also don't agree with the notion that hood corruption is 100% permanent and unfixable (I mean, come on, we have clean templates of premade hoods!). It does get trickier when you're starting to get age-inappropriate wants though, because this won't be picked up by HoodChecker (as it's pointing to "valid" data) and it would actually require a lot of fiddling with SimPe.
Mad Poster
#18 Old 19th Dec 2021 at 11:53 PM
Theoretically, any problem is fixable, except maybe data loss. It's just a matter of how practically possible it is that a human could go through and manually fix the problem, without causing other problems in the process.
Mad Poster
#19 Old 19th Dec 2021 at 11:59 PM Last edited by AndrewGloria : 20th Dec 2021 at 12:13 AM.
I've got toddlers with LTWs, but I'm pretty sure it's just a glitch or bug, and not corruption. The culprit in my case is Squinge's Any LTW for Any Aspiration. It does exactly what its name implies: it allocates any LTW to any Aspiration. Unfortunately that includes the "Grow Up" aspiration. I suppose Squinge "should" have excluded "Grow Up", but he didn't think of that. I don't think it makes any real difference at all. These children and toddlers never attempt to act on their LTWs. I've had some for years.

I also deleted two Sims nearly nine years ago when I was still quite a newbie Simmer. I forgot to make them sisters in CAS, and realised my mistake as soon as I clicked on Save to Game, so I deleted them and made them again, this time remembering to make them sisters. I'm still playing the 'hood (my beloved Veronaville) today. I can still see their 12 KB stub Character Files bearing the date and time I deleted them (07:29 on 28th February 2013). I wouldn't do it again, but I'm almost sure it hasn't harmed my game.

All Sims are beautiful -- even the ugly ones.
My Simblr ~~ My LJ
Sims' lives matter!
The Veronaville kids are alright.
Mad Poster
#20 Old 20th Dec 2021 at 12:05 AM
You shouldn't have to exclude the Grow Up aspiration, the vanilla game functions for determining LTWs don't do that either.
Mad Poster
#22 Old 20th Dec 2021 at 12:26 AM
Quote: Originally posted by kestrellyn
You shouldn't have to exclude the Grow Up aspiration, the vanilla game functions for determining LTWs don't do that either.
It only affects children and toddlers made in CAS. And then only ones that I make by creating them as an adult and then (still in CAS) aging them down to children or toddlers. If I make them by using the "pacifier" button, as genetic children of two CAS adults, they don't get an LTW. I suspect Squinge's mod replaces the Maxis code for assigning LTWs, which would normally assign them by matching LTWs to Aspirations, with the Grow Up aspiration not getting any LTW. Squinge's mod just assigns them randomly instead, so Sims get an LTW regardless of aspiration.

All Sims are beautiful -- even the ugly ones.
My Simblr ~~ My LJ
Sims' lives matter!
The Veronaville kids are alright.
Top Secret Researcher
#23 Old 20th Dec 2021 at 12:29 AM
wait, so deleting sims, and gravestones for that matter, doesn't cause corruption? So ... that would mean we DON'T need "nounlinkondelete" mod after all? Am I understanding this?

My Simblr
He/They
Test Subject
Original Poster
#24 Old 20th Dec 2021 at 12:49 AM
Well... It very well might be the case I'm not 100% on this, there is still a debate whether or not memories pointing to unlinked Sims & Sims with incomplete character data are corrupt - I think they're not, but I know there are people who claim otherwise. Perhaps I am missing some key piece of information.

But it is possible that it was the case of "chinese whispers", as simsample says. I Imagine it could go like this: long time ago someone pointed out a real problem in the game (neighborhoods not loading and going missing), someone else suggested that it might be due to the fact that the game ships with references to deleted character files, and over the years it has been discussed so many times by so many people that it somehow morphed into "if you delete one gravestone, your neighborhood is 100% and irreversably corrupt" :D
Mad Poster
#25 Old 20th Dec 2021 at 12:56 AM
Quote: Originally posted by AndrewGloria
It only affects children and toddlers made in CAS. And then only ones that I make by creating them as an adult and then (still in CAS) aging them down to children or toddlers. If I make them by using the "pacifier" button, as genetic children of two CAS adults, they don't get an LTW. I suspect Squinge's mod replaces the Maxis code for assigning LTWs, which would normally assign them by matching LTWs to Aspirations, with the Grow Up aspiration not getting any LTW. Squinge's mod just assigns them randomly instead, so Sims get an LTW regardless of aspiration.


No, it doesn't change any code that assigns LTWs, it just changes the checks that determine whether a particular LTW can be granted. At least in AL/M&G, sims that come out of CAS as toddlers or children do not have LTWs in the vanilla game, and they would also not have LTWs if you installed Squinge's mod. If you age adults or teens to toddlers or children outside of CAS they obviously would retain those wants, but merely changing their age in CAS does not do that. So either you have some other mod that is causing this problem, or there was a bug in an earlier version of the game. Squinge's mod cannot be causing this.
Page 1 of 2
Back to top