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
#26 Old 11th Aug 2011 at 10:52 AM
Thanks for the tutorial. It was really useful for me because I had only ever made core mods. I am just curious about one thing because I want to understand how all this stuff works:

When the XML resource is added you said that the instance number is important. Why is that number important but the one for the .dll file is not?
Advertisement
1978 gallons of pancake batter
Original Poster
#27 Old 11th Aug 2011 at 12:12 PM
Quote: Originally posted by Thistleryver
When the XML resource is added you said that the instance number is important. Why is that number important but the one for the .dll file is not?
The assemblies always get loaded, not matter what their instance is. It's just important that the instance is unique.

Now my idea of what happens during startup: The game parses all fields in all assemblies to find classes with Tunable fields. When it does, it takes the namespace of the class, hashes it and tries to load an XML which has that hash as instance. If it does, it assigns the content of the XML to the fields. That last part accesses static fields of the class and thus the static constructor will be called. The rest is in the tutorial.

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Field Researcher
#28 Old 18th Oct 2011 at 2:59 PM
http://simswiki.info/wiki.php?title..._Studio_project makes reference of an Automation.dll which I don't see as part of the standard gameplay packages. I guess it's in FullBuild... any features that we would need from that one? The tutorial for basic scripting doesn't list it.
1978 gallons of pancake batter
Original Poster
#29 Old 18th Oct 2011 at 5:42 PM
@JT`: Automation.dll was part of earlier game versions, but hasn't been in the core packages for some time now. Just ignore it. You don't need it anyway.

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Test Subject
#30 Old 23rd Oct 2011 at 10:09 AM
Default Still valid tutorial?
I just completed this tut... The game loads and finds the mod, i click ok, and proceed to play the game, but it never pauses... ?


Could it have something to do with the Pets EP I just installed?


I did this tut before and it worked fine....
Test Subject
#31 Old 12th Mar 2012 at 9:06 PM
Default Same problem
Quote: Originally posted by Gummipalle
I just completed this tut... The game loads and finds the mod, i click ok, and proceed to play the game, but it never pauses... ?


Could it have something to do with the Pets EP I just installed?


I did this tut before and it worked fine....


So I'm encountering the same problem. Project builds fine, game loads, package shows up in the list of mods, but it doesn't pause. Did you find a resolution?

I don't have Pets, but do have Generations.
Test Subject
#32 Old 13th May 2012 at 8:12 PM Last edited by Absimiliard : 14th May 2012 at 2:12 AM.
Default I am also having the same problem
Quote: Originally posted by Gummipalle
I just completed this tut... The game loads and finds the mod, i click ok, and proceed to play the game, but it never pauses... ?


Could it have something to do with the Pets EP I just installed?


I did this tut before and it worked fine....


I have made mods that add onto MasterController and they've worked. But I cannot create a stand-alone project with this code function.

To add some info...

I wanted to make a mod that randomized sims as they were created, like awesomemod does but seperate and modular. I was making a core mod when I decided it could probably be done via scripting. I made a mod that extended twallan's Master Controller much along the lines of Master Controller Cheats. The MC mod I made didn't require any xml (instantiator calls) and were just using the framework he established to add menu items for selection and function.

Everything was looking good, the functionality was in the game and I was quite proud of myself. I decided that the functionality I was using should be called automatically (when a sim was instantiated) and should probably be removed from MC for portability so I went to move it into its own mod, but it didn't work.

First, I thought I'd just made some mistake so I followed this guide with my code in it and still got no result (showed up in installed mods screen, but provided no functionality). So then I replaced my code with the code in the tutorial, and got the same result. I thought the problem might be VS 2010 related so I downloaded VS 2008, followed the tutorial again and still got the same result. I have changed AssemblyInfo.cs to include the changes and de/rereferenced everything as the tutorial indicates and still no go. I've even added a notification to the code just to be sure that a message should pop up if the mod works.

I've heard some people mention namespace issues, I don't know if there's some other step that has to be included but something's not right here.

ETA: I've been beating my head against a wall, but I may have something... The dlls I build import into S3PE with an extra "Type:" line at the bottom of the description panel under the reference (Ref) lines (don't know what it's called, the right panel info that displays when you select a S3SA - starts with Version:...) I've looke at other working mods and none of them have a "Type:" line. It seems to me that me build settings are somehow not what they should be, but I cannot find how to remove that line.
Test Subject
#33 Old 14th May 2012 at 11:44 PM
I have got my mod working, but not with the pause working.

I had a problem with not giving my xml the correct hash for my class (read it like 50 times but somehow didn't do it right). That may be what's holding some people up.

I'm not sure if that implementation of pausing doesn't work or what the problem is there.
Test Subject
#34 Old 30th May 2012 at 7:09 PM Last edited by xstats : 30th May 2012 at 8:04 PM. Reason: SOLVED
I ditto the above user. I'm running TS3 BaseGame only, latest patches.
I was able to get most of it to work, however as I have no EPs, I can't test the vacation world stuff... but hopefully this gets you on the right track:

namespace TwoBTech
{
public class Pausinator
{
[Tunable]
protected static bool kInstantiator = false;

static Pausinator()
{
World.OnWorldLoadFinishedEventHandler += new EventHandler(OnWorldLoadFinished);
}

private static void OnWorldLoadFinished(object sender, EventArgs e)
{
AlarmManager.Global.AddAlarm(1f, TimeUnit.Seconds, new AlarmTimerCallback(delegate()
{
StyledNotification.Show(new StyledNotification.Format("TwoBTech.Pausinator loaded", StyledNotification.NotificationStyle.kSystemMessage));
Sims3.Gameplay.Gameflow.SetGameSpeed(Gameflow.GameSpeed.Pause, false);
}), "TwoBTech.Pausinator Alarm", AlarmType.NeverPersisted, null);
}

}
}
Guest
#35 Old 5th Oct 2014 at 4:42 PM
Quote: Originally posted by Vondure
How do I set a project's framework version to .NET Framework 2.0?
I can't seem to find that option anywhere in the New Project window.

I thought having Reflector integrated with C# will solve that issue, but I can't seem to get that working either.


In Visual C# Express 2010, click Project -> Properties
Then go to the Applications tab.
There you find a dropdown box where you can select Framework 2.0
Screenshots
Lab Assistant
#36 Old 22nd Feb 2015 at 9:41 PM
I can't get the .dll given by Visual Studio. I suppose it's because there is something wrong in the script but I don't know what it is. Can anybody help please. Thank you.
Inventor
#37 Old 22nd Feb 2015 at 10:07 PM
It's hard to help you if you don't explain your problem better. Did you successfully compiled the code?
If yes, the .dll should be in <DirectoryWhereYouSavedYourProject>/<ProjectName>/<ProjectName>/bin/Release/
Test Subject
#38 Old 23rd May 2015 at 9:19 PM
Default Error
How do I get rid of this error
Screenshots
Inventor
#39 Old 24th May 2015 at 10:28 AM
Remove line 3 and make sure you are using as reference the System.dll library extracted from the game.
Test Subject
#40 Old 25th Jul 2015 at 11:10 PM
Excelent tutorial, I'm trying to do something a little different, I want the game to never change the speed automatically (for example when the sim wakes up, or goes to bed).
So far I reached the conclusion that "SetAutoGameSpeed" method is the one that changes the pace of the game accordingly to game situations...

I tried to overwrite it using this http://puu.sh/jcpc8/01d04f18df.png , however the class that i created doesn't recognize the public method SetAutoGameSpeed.. Any hints on how can I fix it?
Top Secret Researcher
#41 Old 23rd Jan 2017 at 8:21 PM
Default Where is World.OnWorldLoadFinishedEventHandler ?
I know this works because I made the pausinator before, but now I'm brushing up on this.

I can't find the World.OnWorldLoadFinshedEventHandler where I think it should be.


I think it should be right after World.OnWorldLoadFinishedEventArgs but it doesn't show up in ILSpy. (see big pic)

It works, Visual C# 2010 knows it's there... but it doesn't give me a clue how it found it.
Page 2 of 2
Back to top