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

Latest Site News

2018 MTS Calendar Contest - posted on 12th Nov 2017 at 7:48 PM
Replies: 9 (Who?), Viewed: 22840 times.
Lab Assistant
Original Poster
#1 Old 8th Apr 2013 at 12:30 AM
Default The Scripting Thread
I feel we need a general scripting thread that isn't outdated and that'll contain the most relevant information about scripting for TSM. A place where programmers can discuss things with each other and a place for beginners to learn.
I've started it out by adding a scripting mod tutorial.

Please keep it on-topic. Thanks.
Advertisement
Lab Assistant
Original Poster
#2 Old 8th Apr 2013 at 12:31 AM Last edited by DeeDawg : 16th Jun 2016 at 12:27 PM. Reason: Uploaded a new version of the project template
Default Scripting Mod Tutorial
Moved to the SimsWiki .
Download - please read all instructions before downloading any files!
File Type: zip TheSimsMedieval-Profile.zip (3.17 MB, 180 downloads) - View custom content
Description: .NET Profile
File Type: zip TSMClassLibrary.zip (8.3 KB, 38 downloads) - View custom content
Description: VS Project Template
Instructor
#3 Old 8th Apr 2013 at 3:44 AM
So far this looks really good DeeDawg. I have a couple of ideas to make it better that I'll send you a PM about when I get some time to fiddle with it (I'd just mention them, but I want to check it out first so I know I'm being accurate).

The main thing I want to add for everyone is Reflector is no longer a free tool. In fact the company that bought Reflector sabotaged the free version to fail by now. I don't use it nor would I recommend it.

I use ILSpy. It's free and open source and will do almost everything Reflector does (I've used Reflector to make minor edits that ILSpy wont do, but it touchy, and doesn't work most of the time). Truly, you don't need an assemnly viewer at all to make this kind of a script mod, but it's helpful to be able to dig through the game code.
Lab Assistant
Original Poster
#4 Old 8th Apr 2013 at 5:50 PM
Quote:
Originally Posted by grimreefer24601
The main thing I want to add for everyone is Reflector is no longer a free tool. In fact the company that bought Reflector sabotaged the free version to fail by now. I don't use it nor would I recommend it.
I didn't mention any of this, as it's already explained in the thread by Buzzler that I link to in the tutorial.
Lab Assistant
Original Poster
#5 Old 16th May 2013 at 1:28 PM
Whenever I take a look at a piece of code, it takes me longer time to understand it than it really should. I know the reason for it though, because all through the code EA prefixed properties with k, m, and s. Now I can see that there is a pattern to this, but I can't see the pattern itself, and that's what confuses the hell out of me.

Could somebody enlighten me, and remove at least that area of my incompetence?
Instructor
#6 Old 17th May 2013 at 12:04 AM
The prefixes are simply coding conventions. The game doesn't use them in anyway it's to help programmers understand something about each variable. k variables are tunable. s variables are static. m seems to mean private.
Lab Assistant
Original Poster
#7 Old 17th May 2013 at 12:16 AM
Thanks, Grim!
I know that it's just names, but whenever I saw them I got distracted trying to figure out what they meant, which I never could lol.
Instructor
#8 Old 17th May 2013 at 2:09 AM
Hey, I'm glad to help someone understand this game a little bit more. Most I choose to recognize is the k. k usually means there's an ITUN associated with it. If you're fiddling with a k variable, you should look for it's ITUN.

A side note. We've got the Medieval Wiki framework up now, have you asked ellacharmed for an account? I know you mentioned on the New Stickies thread you were familiar with wiki editing. Do you think you could help me fill in some pages there? You know like some scripting pages. I can do them, but I've left the script tutorial to you. Perhaps you could remake this tutorial for the wiki?
Lab Assistant
Original Poster
#9 Old 17th May 2013 at 10:44 PM
As you wrote this yesterday, I was actually already on it. I've created the base General Modding page, but I'm currently working on getting the two tutorials up and running already listed there. They're basically this tutorial only broken into two, as they should be.
Test Subject
#10 Old 10th May 2014 at 4:36 PM
Is a mod that unlocks the hidden clothes (like bandages, etc)?
Banned
DELETED POST
19th Sep 2014 at 6:47 PM
This message has been deleted by leefish.
Back to top