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!
Quick Reply
Search this Thread
Test Subject
Original Poster
#26 Old 27th Jun 2009 at 2:22 PM
I got a reply from inf666, the guy who modded his day to two IRL-hours, but apparently it isn't just about modifying one variable in one file as I was hoping for.

He said it was more like 60-70 different files within the gameplay.package that had to be modified, so I'm guessing that each function in the game has its own time properties or something like that.
Advertisement
Lab Assistant
#27 Old 27th Jun 2009 at 2:47 PM
I haven't actually tried it to see if it works or what it does/doesn't change, but for a script change, there is Sims3.Gameplay.Utilities.SimClock:
Code:
    public const float kHoursInDay = 24f;
    private const float kSimDaysPerSimulatorTick = 1.851852E-05f;
    private const float kSimHoursPerSimulatorTick = 0.0004444444f;
    public const float kSimMinutesInSimDay = 1440f;
    public const float kSimMinutesInSimHour = 60f;
    private const float kSimMinutesPerSimulatorTick = 0.02666667f;
    private const float kSimSecondsPerSimulatorTick = 1.6f;
    private const float kSimulatorTicksPerSimDay = 54000f;
    private const float kSimulatorTicksPerSimHour = 2250f;
    private const float kSimulatorTicksPerSimMinute = 37.5f;
    private const float kSimulatorTicksPerSimSecond = 0.625f;
    private const float kSimulatorTicksPerSimWeek = 378000f;
    private const float kSimulatorTicksPerSimYear = 1.9656E+07f;
    private const float kSimWeeksPerSimulatorTick = 2.645503E-06f;
    private const float kSimYearsPerSimulatorTick = 5.087505E-08f;
Test Subject
Original Poster
#28 Old 27th Jun 2009 at 3:09 PM
wow interesting.

I wonder though what is controlled by simulator ticks and what is controlled by the clock.

For example, if one would triple the simulator ticks per sim minutes, would that make it so sims would only have to sleep for 3 hours to get fully rested?
Lab Assistant
#29 Old 27th Jun 2009 at 4:37 PM
Hmm.. That's look promising. In another thread, I thought this might me impossible to do because I thought it was hardcoded in the game core. But in fact we see that some of the game core itself programmed in C# code in *.package files, this might be possible then.

GiLaNg
After 7 year hiatus, Worldwide lockdown (and regretting the purchase of The Sims 4 last autumn sale) brought me back to The Sims 3.
Lab Assistant
#30 Old 27th Jun 2009 at 5:11 PM
You would be surprised what is scripted in the mono engine. Even things you would think would have to be in the core aspects turn out to be at least partly controlled by the scripted stuff.
Lab Assistant
#31 Old 27th Jun 2009 at 7:17 PM
I'd definitely want to take a look at this, but I have the most noobish question in the world - in an effort to save me some digging, where are the scripts located? I also want to see if there's any possible way to write a program that would compile a bunch of individual script changes into one big package.
One horse disagreer of the Apocalypse
#32 Old 27th Jun 2009 at 7:22 PM
WTH did they have to specify all those settings? If they said how many ticks in a sim second, the rest would be calculable surely?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Lab Assistant
#33 Old 27th Jun 2009 at 7:32 PM
Quote: Originally posted by Inge Jones
WTH did they have to specify all those settings? If they said how many ticks in a sim second, the rest would be calculable surely?


I was wondering that too. I think either EA got lazy and didn't feel like writing out the calculations, or they just wanted to make it more of a PITA for us
Test Subject
#34 Old 27th Jun 2009 at 7:32 PM
ok how would i try that script?
Lab Assistant
#36 Old 27th Jun 2009 at 9:11 PM
Thanks a ton, I'm pretty new to all of this so I appreciate your help
Test Subject
#37 Old 27th Jun 2009 at 9:27 PM
Site Helper
#38 Old 27th Jun 2009 at 9:27 PM
Just be aware that your script mod will conflict with any other script mods, such as Pescado's AwesomeMod and the debug console enabler.

However, if you can get it working well, you could give your changes to Pescado and he might consider incorporating them into the AwesomeMod, for people who don't want to have to choose between the two.

Good luck. I know that a lot of people would like to see this working (for example, me!).
Test Subject
#39 Old 27th Jun 2009 at 9:28 PM
well, this guy said it was blah blah blah, simclock.
I cant find that package file.
Site Helper
#40 Old 27th Jun 2009 at 9:33 PM
It's not in plain text within a package file named simclock.

First, you need to extract and decrypt the DLL from the gameplay.package (see note below). Then, you need to disassemble the code and look for Sims3.Gameplay.Utilities.SimClock in the disassembled source. Take a look at the links that I gave you... they explain how to extract, decrypt, disassemble, edit, compile and create a new package, plus how to workaround the encryption issue.

No one said that it would be easy. However, several people have managed to work out a lot of the difficult technical issues, so this is much simpler than it was a month ago.

Note:
(From the wiki) The three packages which contain scripts are:
- gameplay.package
- scripts.package
- simcore.package

From the previous posts, I'm assuming that you need to look in gameplay.package.
Lab Assistant
#41 Old 27th Jun 2009 at 9:39 PM
Yup, I know about the there-can-only-be-one thing with The Sims 3. As far as getting it working, I'm not a genius, but I'm a stubborn computer geek

Once I figure out where that's located I'll edit my post here and let you know. I'm unclear as to how do disassemble the DLLs (which I'll figure out later) so for now I'm just importing them into Visual Studio and seeing what's there.

EDIT: It's located in gameplay.package, instance 0x03D6C8D903CE868C. The full assembly name is Sims3GameplaySystems.dll.
Site Helper
#42 Old 27th Jun 2009 at 9:42 PM
There seem to be a number of different tools that people are using. Visual Studio seems like a reasonable choice, since that's what EA uses (and I believe that's what Pescado is using).

It sure would be nice if one of you could get something working. It's a shame that it's so complex, but at least we have access to a lot of the source code.
Lab Assistant
#43 Old 27th Jun 2009 at 9:47 PM Last edited by xalwaysvindicatedx : 27th Jun 2009 at 10:32 PM.
I use Visual Studio simply out of familiarity, I didn't know that's what EA actually used

Hopefully as more people delve into this, they'll work out a way to make it more user-friendly (whether it be creating script mods or just allowing people to pick and choose different pieces of several script mods to install).
Site Helper
#44 Old 27th Jun 2009 at 10:31 PM
Quote: Originally posted by xalwaysvindicatedx
I use Visual Studio simply out of familiarity, I didn't know that's what EA actually used
I'm reasonably sure that it is; VS 2008.

If you'd like, I can try to find out.

Quote: Originally posted by xalwaysvindicatedx
If it helps anyone, you download Reflector from http://www.codeplex.com/reflector, then install the File Disassembler add-on from http://www.codeplex.com/reflectoraddins.
I believe that reflector worked well before the patch, but doesn't handle the code well after the patch.
Lab Assistant
#45 Old 27th Jun 2009 at 10:35 PM Last edited by xalwaysvindicatedx : 27th Jun 2009 at 10:55 PM.
You don't have to, I just found it interesting

Quote: Originally posted by Mootilda
I believe that reflector worked well before the patch, but doesn't handle the code well after the patch.


It actually seems to be working fine. I exported SimClock to the C# source and nothing appears to be wrong, so I'm going to try playing around with it a bit to see what happens.

EA's whole approach to the data values, however, is driving me insane. I'm thinking I might just keep the TicksPerSimSecond and have the rest calculate based on that, like this:

Code:
private const float kSimulatorTicksPerSimSecond = 0.625f;
private const float kSimulatorTicksPerSimMinute = kSimulatorTicksPerSimSecond*60;
private const float kSimulatorTicksPerSimHour = kSimulatorTicksPerSimMinute*60;
private const float kSimulatorTicksPerSimDay = kSimulatorTicksPerSimHour*24;

And so on, just for the sake of a little sanity in this code.
Site Helper
#46 Old 27th Jun 2009 at 10:58 PM
Yes, your way is easier to understand and less prone to errors, as well as easier for people to change. No idea why EA wrote it the way that they did.
Lab Assistant
#47 Old 27th Jun 2009 at 11:03 PM Last edited by xalwaysvindicatedx : 27th Jun 2009 at 11:15 PM.
Neither do I. They also decided to declare variables for each of the inverses, I swear they're just trying to piss us off now

For anyone that may be working with SimClock, just take out all of their variable declarations and replace it with this (you'll be glad you did, trust me):

public const float kHoursInDay = 24f;
public const float kSimMinutesInSimDay = 1440f;
public const float kSimMinutesInSimHour = 60f;

private const float kSimulatorTicksPerSimSecond = 0.625f;
private const float kSimulatorTicksPerSimMinute = kSimulatorTicksPerSimSecond * 60;
private const float kSimulatorTicksPerSimHour = kSimulatorTicksPerSimMinute * 60;
private const float kSimulatorTicksPerSimDay = kSimulatorTicksPerSimHour * 24;
private const float kSimulatorTicksPerSimWeek = kSimulatorTicksPerSimDay * 7;
private const float kSimulatorTicksPerSimYear = kSimulatorTicksPerSimWeek * 52;
private const float kSimSecondsPerSimulatorTick = 1 / kSimulatorTicksPerSimSecond;
private const float kSimMinutesPerSimulatorTick = 1 / kSimulatorTicksPerSimMinute;
private const float kSimHoursPerSimulatorTick = 1 / kSimulatorTicksPerSimHour;
private const float kSimDaysPerSimulatorTick = 1 / kSimulatorTicksPerSimDay;
private const float kSimWeeksPerSimulatorTick = 1 / kSimulatorTicksPerSimWeek;
private const float kSimYearsPerSimulatorTick = 1 / kSimulatorTicksPerSimYear;

private static long sSimTickCnt;
private static DateAndTime sStartTime;
private static long sTicksAdvanced;
Test Subject
#48 Old 27th Jun 2009 at 11:50 PM
I'm so glad someone more capable that me is working on this.
If you can ever get a step by step working that would be great.
xD
Lab Assistant
#49 Old 27th Jun 2009 at 11:54 PM
Hopefully I'll be able to finish a working version within a reasonable amount of time. If I knew how to hack the script that deals with the cheat console and what different commands do, I could try to make this modifiable within the game. I think I'm going to do a bit of digging, so with any luck I'll find something of value.
Lab Assistant
#50 Old 28th Jun 2009 at 2:29 AM
It's possible they did not declare the constants like that, but they did them based off calculations as well, and the compiler just did a fairly common optimization of constant subexression evaluation producing the final constant values.
Page 2 of 3
Back to top