| Search this Thread |
|
|
#26 |
|
Thistleryver
Test Subject
Join Date: Nov 2008 |
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? |
|
|
|
|
|
#27 | |
|
Buzzler
Original Poster
1978 gallons of pancake batter
|
Quote:
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. | |
|
Robot Armed With Down Comforter Levels Apartment Building, Holds Mayor Hostage. |
||
|
|
|
|
|
#28 |
|
JT`
|
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. |
|
|
|
|
|
#29 |
|
Buzzler
Original Poster
1978 gallons of pancake batter
|
@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. |
|
Robot Armed With Down Comforter Levels Apartment Building, Holds Mayor Hostage. |
|
|
|
|
|
|
|
|
Gummipalle
Test Subject
Join Date: Oct 2011 |
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.... |
|
|
|
|
|
|
|
|
Ragoczy
Test Subject
Join Date: Mar 2012 |
Quote:
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. |
|
|
|
|
|
|
|
|
| Absimiliard |
Quote:
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. |
|
|
|
Last edited by Absimiliard : 14th May 2012 at 02:12 AM.
|
|
|
#33 |
| Absimiliard |
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. |
|
|
|
|
|
#34 |
|
xstats
Test Subject
Join Date: May 2012 |
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); } } } |
|
|
Last edited by xstats : 30th May 2012 at 08:04 PM.
Reason: SOLVED
|
![]() |



Twitter
del.icio.us
StumbleUpon
Google