Replies: 0 (Who?), Viewed: 140 times.
Test Subject
Original Poster
#1 Old 18th May 2022 at 5:46 PM Last edited by Kitty Lue : 20th May 2022 at 6:42 PM. Reason: situation update
Default Decompiling problems?
So I'm trying again to pick up script modding, seeing as more tools have become available since the last time I tried, but once again, I'm stuck. I haven't had a chance to really get a feel for how exactly TS3 scripts work, I need to see more examples than can reasonably be expected from online tutorials, and as I've been searching and trying to wrap my head around this, I keep seeing posts talking about reading the scripts for previous mods and that you can do so with decompilers like ILSpy and Reflector.
The problem is, when I try to open any Sims 3 related .dll in ILSpy, I just get a message saying "This file does not contain a managed assembly."
I know ILSpy works with some .dll files, as I've tested it with others, and its use has been suggested on MTS for script modders, there's even a download link for it included in Battery's Script Mod Template Creator, but I just can't get it to read any actually useful files because every TS3 .dll I've tried to give it just gives me this same error message. How are people using ILSpy to decompile anything related to TS3?
Also, I suppose I should check if my guesses are even correct in the process leading up to this. I'm under the impression that you can export S3SA files from packages as .dll files using the name shown as the "ManifestModule," since there's a tutorial detailing this process for exporting the Sims 3 core libraries. Does the same process apply to S3SA files found in CC/mod packages? Either way, I haven't been able to get ILSpy to decompile the core library .dll files either, but if I'm doing something wrong with exporting custom scripts from .packages, I might as well find out sooner rather than later.

EDIT 05/20/2022:
While all the other .dll files I've tried looking at in ILSpy still give me the same error, I've found that an unprotected version of the Sims3GameplaySystems.dll found here does decompile in ILSpy.
So that then leads me to wonder: is the problem with the other .dll files I've been trying to decompile in ILSpy that they're possibly protected? It would make sense for the actual EA game files to be protected, but I'm getting this with .dll files from S3SAs exported from game mod packages, ie: granthesOMSP.dll. Have these been known to be "protected" as well? And if so, what can I do? On another thread I was asking about making a CC object with vertical shifting (functionally similar to OMSP; something that won't force me to snap to a wall slot) but without live mode invisibility. I was told it would be a good idea to reference the OMSP script and make my own script based off the vertical shifting portion of that script. But that requires me to be able to read said script, which I can't without decompiling it. So that's a little clarification on where I'm stuck.

EDIT 05/20/2022 #2:
I may actually have resolved the issue myself, as far as game mod .dll file go at least, so I'm gonna write down the explanation here in case anyone else encounters the same issue in the future.
How I got the .dll file the first time (I think): in S3PE, I right-clicked on the S3SA item in a package and selected "Export" > "To File..." and named the .dll what was listed as the "ManifestModule" in the S3SA in S3PE. This method of exporting produced files that ILSpy could not decompile.
How I got the .dll file the second time: I right-clicked on the S3SA item in a package and selected "Export DLL". In the box that popped up asking me where to save/what to name the .dll, the .dll name from "ManifestModule" was already in the file name field, so I just clicked "Save". This method of exporting produced files that ILSpy could decompile.
Back to top