Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

MTS Speed-Building Challenge - posted on 17th Oct 2018 at 6:25 PM
Replies: 8 (Who?), Viewed: 1371 times.
Lab Assistant
Original Poster
#1 Old 7th Aug 2018 at 1:46 AM
Alternatives to .NET Reflector?
Hello all, aspiring modder here! So I'm following along some of the scripting tutorials on here and see that one of the modding tools required is .NET Reflector. But .NET Reflector isn't free, and if possible I'd rather not spend money on a program that I'm only going to use for making free Sims 3 mods. Besides that, I'm an unemployed college student so money doesn't exactly come easily for me. I checked this thread about tools for decompiling: http://modthesims.info/t/436481 and it mentions ILSpy as an alternative to .NET Reflector but apparently "you can't limit it to .NET 2.0, so you'll find code that won't compile when you limit Visual Studio to .NET 2.0". If the code won't compile when limiting Visual Studio to .NET 2.0, then how am I supposed create Sims 3 mods? I realize this thread was created a few years ago though when ILSpy was in its infancy so maybe things have changed and it now can support .NET 2.0? Besides that, I'm not entirely certain how to even go about downloading and installing ILSpy. So I would be SUPER grateful if anybody could confirm for me whether or not ILSpy is capable of being limited to .NET 2.0 in its current state and maybe provide a little advice as to how to install it. Or, failing that, I'd also be really grateful if anybody could suggest free alternatives to .NET Reflector, preferably ones that they use to make mods for the Sims 3, so that I know it'll work. Thanks so much, and have a nice day!
Advertisement
Test Subject
#2 Old 7th Aug 2018 at 4:11 AM
It hasn't really been a problem for me, since you're only looking at the decompiled code to get a sense of how the code is written and the function names to use. At least that's what I use it for. Writing code is just a matter of writing C# code that can compile. When you create the project in visual studio, you can just set the project properties to target the .NET 2.0 framework.

As for how to install ILSpy, firstly install visual studio as your IDE, then its just an extension you can download from https://marketplace.visualstudio.co...velopTeam.ILSpy, download and click and it installs. ILSpy will appear on the tool menu, and you just click dll file and it'll show you code. There are probably alternative ways to install it, but that's whats worked for me.

Alternatively you can look at http://nraas.wikispaces.com/Creating+an+NRaas+project, which has some suggestions of what else you use for IDE/ decompilation. I'm happy with Visual Studio 2015 + ILSpy plugin, as for references/ dependecy dlls I just use the ones that are in https://github.com/Chain-Reaction/N.../Sims3/Compiler, since they contain unprotected dlls that allow me to make function calls on protected functions
Lab Assistant
Original Poster
#3 Old 8th Aug 2018 at 5:39 AM
Quote:
Originally Posted by Rgnrk198
It hasn't really been a problem for me, since you're only looking at the decompiled code to get a sense of how the code is written and the function names to use. At least that's what I use it for. Writing code is just a matter of writing C# code that can compile. When you create the project in visual studio, you can just set the project properties to target the .NET 2.0 framework.

As for how to install ILSpy, firstly install visual studio as your IDE, then its just an extension you can download from https://marketplace.visualstudio.co...velopTeam.ILSpy, download and click and it installs. ILSpy will appear on the tool menu, and you just click dll file and it'll show you code. There are probably alternative ways to install it, but that's whats worked for me.

Alternatively you can look at http://nraas.wikispaces.com/Creating+an+NRaas+project, which has some suggestions of what else you use for IDE/ decompilation. I'm happy with Visual Studio 2015 + ILSpy plugin, as for references/ dependecy dlls I just use the ones that are in https://github.com/Chain-Reaction/N.../Sims3/Compiler, since they contain unprotected dlls that allow me to make function calls on protected functions


Alright, thank you, this helps! One question though, when I type up the code/alter it (in notepad, google docs, wherever) I just paste it into visual studio? And how will I know if it compiles correctly? Thanks again!
Test Subject
#4 Old 8th Aug 2018 at 7:47 AM
Quote:
Originally Posted by PikachuMaiden
Alright, thank you, this helps! One question though, when I type up the code/alter it (in notepad, google docs, wherever) I just paste it into visual studio? And how will I know if it compiles correctly? Thanks again!

Once you have visual studio installed, and have set up a visual studio project as outlined in the modding tutorials such as http://modthesims.info/wiki.php?tit..._Studio_project, you can just directly write your code in visual studio, its like a text edit with syntax checking and neat stuff for C# (and other programming languages). As long as you can build the project, and you don't see any squigly red lines or syntax errors that means your code can compile.

If you're not familiar with coding and object oriented programming, I'd suggest also either taking a free online class or looking at youtube videos
Lab Assistant
Original Poster
#5 Old 9th Aug 2018 at 6:25 AM
Quote:
Originally Posted by Rgnrk198
Once you have visual studio installed, and have set up a visual studio project as outlined in the modding tutorials such as http://modthesims.info/wiki.php?tit..._Studio_project, you can just directly write your code in visual studio, its like a text edit with syntax checking and neat stuff for C# (and other programming languages). As long as you can build the project, and you don't see any squigly red lines or syntax errors that means your code can compile.

If you're not familiar with coding and object oriented programming, I'd suggest also either taking a free online class or looking at youtube videos


Alright, thanks again! I do know a bit of coding from back in high school when I took a robotics course, but we learned C+ (or was it C++?) not C#. It's also been quite a few years since then as I am in college now so my coding skills are a bit rusty, haha. I do have a book though and I will try following tutorials that I find online and on here and just generally play around with it to figure things out. Thanks!
Forum Resident
#6 Old 9th Aug 2018 at 7:58 AM
Quote:
Originally Posted by PikachuMaiden
Alright, thanks again! I do know a bit of coding from back in high school when I took a robotics course, but we learned C+ (or was it C++?) not C#. It's also been quite a few years since then as I am in college now so my coding skills are a bit rusty, haha. I do have a book though and I will try following tutorials that I find online and on here and just generally play around with it to figure things out. Thanks!

I'm just wondering what kind of book do you have and how much did it cost you?
Instructor
#7 Old 9th Aug 2018 at 9:46 AM
Quote:
Originally Posted by Squidconqueror
I'm just wondering what kind of book do you have and how much did it cost you?


I found a good tutorial if you're interested in learning. https://www.youtube.com/watch?v=lisiwUZJXqQ
Puffin McMuffin
staff: administrator
#8 Old 11th Aug 2018 at 12:03 PM
I also came across this playlist tutorial not too long ago... pretty interesting stuff! https://www.youtube.com/watch?v=2NW...r6nhGJ9Vlcjyymq
Not that all of it is necessary to learn when it comes to scripting for the sims, but at least it teaches you the language.

Another small note when it comes to different coding languages. While there are slight differences on calling functions and doing variables and such, most of the time if you learn one coding language, you get the other one much easier due to the similarities
Lab Assistant
Original Poster
#9 Old 14th Aug 2018 at 1:42 AM
Quote:
Originally Posted by Squidconqueror
I'm just wondering what kind of book do you have and how much did it cost you?


The book is called C Programming: Absolute Beginner's Guide and it's written by Greg Perry and Dean Miller. I'm afraid I don't know how much it costs because I received it as a gift. Good luck btw!
Back to top