• Welcome to SC4 Devotion Forum Archives.
 

News:

The SC4 Devotion Forums are no longer active, but remain online in an archived, read-only "museum" state.  It is not possible for regular members to post or use the private messaging system, and no technical support will be provided for any issues pertaining to the forums in their current state.  Attachments (those that still work) are accessible without login.

The LEX has been replaced with SC4Evermore (SC4E), and SC4E maintains an active Discord server.  For traditional forums, we recommend Simtropolis.

Main Menu

Can the "game" month and year be reset?

Started by dedgren, May 02, 2007, 08:06:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wouanagaine

no he meant called. Dll contains code ( like exe ) that execute if called


New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio ♦ dedgren ♦ emilin ♦ Ennedi ♦ Heblem ♦ jplumbley
M4346 ♦ moganite ♦ Papab2000 ♦ Shadow Assassin ♦ Tarkus ♦ wouanagaine
Divide wouanagaine by zero and you will in fact get one...one bad-ass that is - Alek King of SC4

flame1396

so its a lot like a loaded text file being parsed?
The most astounding and unique aspect of the human race is our fervent application of our ingenuity to kill each other, thus completely defying the near-universally proven fact that the ultimate goal of a member of a species is to ensure the survival of the species.

sawtooth

When it comes down to the date I'll bet it's in Julian format.  That's what the file that stores graph data uses for the date stamp.

Changing the date in the city would likely mess up some of the graph and trend data which is likely why there isn't a cheat that seems to be working.  With Julian dates 2451545 comes out to Jan 1st 2000 12 Noon which I think is the time a new city starts.

Julian dates have a huge range compared to the UNIX timestamps but the resolution that the UNIX timestamps has is not needed for a date in a sim game.

Swamper77

Sawtooth,

Noon is indeed the base time that a new city starts. If you start a new city in a region, the beginning date is usually Jan 2nd 2000. If you start a city and then obliterate it, the start date reverts to Jan 1st 2000. This is just what I have noticed while playing lately with some test cities.

-Jan
You can call me Jan, if you want to.
Pagan and Proud!

Andreas

Quote from: Swamper77 on June 30, 2007, 07:52:19 PM
If you start a new city in a region, the beginning date is usually Jan 2nd 2000.

I guess this is the case because the game doesn't start in pause mode. So right after loading the game, the date skips from Jan 1st to Jan 2nd.
Andreas

ACEfanatic02

Quote from: flame1396 on June 25, 2007, 07:30:22 PM
so its a lot like a loaded text file being parsed?
Not quite.

Within the game engine, there are blocks of code called functions.  Functions take an input and yield an output.  Basically, they're the part of the code that does stuff.

While a .dll will load in the game, unless there is a function to call it, the information will not be used.  Buggi's cheat .dll enabled more options in the cheat box; this was possible because said functions already existed--they just could not be accessed from within the game.

Adding something like a transit network is impossible because we do not have the source code available to us.  It's likely that the networks are hard-coded into the game.  Even if they were not, we have no external files to take apart to find how to build new networks.  (And de-compiling the code to find them is: A - difficult, and B - illegal.)

-ACE
日本語勉強中-最近読んだ本はこちらで見えます。
Python Enthusiast

screamingman12

The game clock is somewhat corelated with the system clock (the one in the bottom right corner of your screen), I think someone found this out last Christmas, when we were messing with the snow easter egg. We found out if you set your system clock to December 25th, no matter what the date is, snow will appear at areas of high elevation.


"...the streetcar, the carriage of the people, was opposed; but that which is for the greatest good of the greatest number will always conquer in the end..." -Rapid Transit in Cities, Thomas Curtis Clarke, 1892

NetPCDoc

#27
YES!!!

SIMDATE format:

keyword - space - month - space - day-of-month - space - year

"SIMDATE 12 31 1999" will set in-game date to "1/1/00", and

"SIMDATE 1 1 2000" will set in-game date to "1/2/00"

... someone/anyone - Please take it from here ...

-NetPCDoc
No detail is too small to be micromanaged.

P.S. screamingman12 - the game does have access to both the in-game clock and the Computer-System's-Clock.

dedgren

#28
SOLVED!

Our friend NetPCDoc has just made one post on SC4D, but what a post.


QuoteSIMDATE format:

keyword - space - month - space - day-of-month - space - year

"SIMDATE 12 31 1999" will set in-game date to "1/1/00", and

"SIMDATE 1 1 2000" will set in-game date to "1/2/00"

So, folks, make sure you have buggi's Extra Cheats DLL [linkie] installed in the top level of your plugins folder then, the next time you play SC4, punch up [ ctrl ][ x ] and, following the format described above, engage in a little time travel.

It works like a charm.  Along with our thanks, three Karma points for our friend, and a warm round of applause.


David

1352


D. Edgren

Please call me David...

Three Rivers Region- A collaborative development of the SC4 community
The 3RR Quick Finder [linkie]


I aten't dead.  —  R.I.P. Granny Weatherwax

Skype: davidredgren

ldvger

I know this is an old thread and no one has posted here in a long time, but I just wanted to say that newly started cities do not start on Jan.2, they start on Jan.1.  The first day rolls over pretty quickly and as someone noted a new city doesn't start in Pause mode, but, if you are really quick with your mouse (or keyboard, whichever you prefer...I'm a mouse user myself), you can pause a new city before the first day rolls over from 1/1/00 to 1/2/00. 

I know this is true because, like dedgren, I have a monster region of 256 large city tiles (16 to a side) and I started new cities in them one by one in only 3 (long) play sessions.  You get pretty fast at hitting that Pause button after about the 20th city in a row!

Lora/LD

SC4BOY

#30
I also have significant evidence, if not proof that resetting the game date will confuse certain events in a city .. In the process of testing and probing the "set date" function, I found that the date could be set with no apparent ill... I THOUGHT!! however after that I did it for a city which I was playing.. for no real reason other than being bored one day I guess.. I subtracted some amount.. about 40 years as I recall.. from about 2082 to about 2045 for the year. I didn't notice any problem until a few years later I noted a building garbage problem in  the city.. Well I sold some garbage to an adjacent city.. no effect.. the "graph" that should show the sale stayed dead flat where it was before.. So I added .. umm a modest amount of "garbage correction" stuff.. I didn't want to have the dreaded "wrap-around" instant garbage burial even.. :) So I plopped 2 or 3 recycle lots and another garbage "shipping lot" .. I may even have added a standard maxis "trash burner"... the garbage kept rising and I could not make a dent in the unrelented mounting garbage.. Anyways.. I kind of forgot about it, thinking I'd go back and look at it later (Link to "garbage assault" thread) .. the city was saved from an ignominious fate of being buried in garbage, but even to this day that city has problems with the garbage graphs.. they just don't track the garbage properly in time.. instead they are off and/or delayed by some amount.. I haven't sought to precisely define it, but it doesn't SEEM to be the amount "shifted".. just some amount..

Anyways, you ask, "Why are you rambling on so?".. just to say.. alter the date of your game at your own peril if its a city you're actually  playing.. :)

frdrcklim

Quote from: ldvger on July 29, 2009, 08:03:35 PM
I know this is an old thread and no one has posted here in a long time, but I just wanted to say that newly started cities do not start on Jan.2, they start on Jan.1.  The first day rolls over pretty quickly and as someone noted a new city doesn't start in Pause mode, but, if you are really quick with your mouse (or keyboard, whichever you prefer...I'm a mouse user myself), you can pause a new city before the first day rolls over from 1/1/00 to 1/2/00. 

It helps if you use the arrow keys on the keyboard to stop time :).
300... 200... 100... 50... 40... 30... 20... 10

Yep, I still got it.

Alburodelor

I tried that and it had no effect. Im thinking maybe it effects what things cost at different stages of the game, but thats just a guess. It doesnt do anything to the turn year increment though.

joshriddle577

Quote from: dedgren on June 24, 2007, 01:07:01 PM

I'm still working on this.  If I can find where the savedfile the date is kept, I have a feeling it can be changed at will.  It's just teee-deee-us to find, that's all.

David

Well, I'm not that fancy with techie stuff or anything like that, but I have a feeling it is buried within the city file.
If so, I'd bet we could edit that to our will.

I usually open files that don't have a program associated with it in Notepad, and no luck there. The only part that was written in english was the part that held the pollution radius. :P

But it's far beyond my knowledge to know if it is in there somewhere or not......


RippleJet

Quote from: joshriddle577 on November 18, 2010, 05:19:45 PM
Well, I'm not that fancy with techie stuff or anything like that, but I have a feeling it is buried within the city file.
If so, I'd bet we could edit that to our will.

Yes, today we do know where the date and time are saved... in subfile 0x2990C1E5.
However, just like all other decoded (or parly decoded) subfiles of the savegames,
this one also contains the CRC record, which so far nobody has managed to decipher.

The CRC is a checksum, which is changed every time anything within the subfile is changed.
If the CRC is not correct, then the whole subfile is discarded.
Thus, at the moment we cannot make any changes to any subfiles...

Below is the partly decoded structure of the Date Subfile (0x2990C1E5):


DWORD     Size  (0x0000005B = 91 bytes)
DWORDCRC
DWORDMemory Address
WORDVersion  (0x0004)
BYTEUnknown  (0x00)
BYTEUnknown  (0x01)
DWORDUnknown  (always 1 for me, seen 0 as well)
DWORDUnknown  (always 0 for me, seen 1 and 2 as well)
DWORDUnknown  (0x00000000)
DWORDUnknown  (seen values between 15 and 32)
DWORDUnknown  (0x00000000)
BYTEUnknown  (0x00)
DWORDUnknown  (0x00000000)
BYTEUnknown  (0x00)
DWORDUnknown  (0x00000000)
BYTEUnknown  (0x00)
DWORDHours per Day  (always 24 for me)
BYTEUnknown  (0x00)
DWORDDay of Year  (between 1 and 366, 1 for new cities)
BYTEUnknown  (0x00)
DWORDWeek of Year  (between 1 and 53, 1 for new cities)
BYTEUnknown  (0x00)
DWORDMonth of Year  (between 1 and 12, 0 for new cities)
BYTEUnknown  (0x00)
DWORDYear  (starts at 2000, 0 for new cities)
BYTEUnknown  (0x00)
DWORDUnknown  (0x00000000)
BYTEUnknown  (0x00)
DWORDUnknown  (0x00000000)
BYTEUnknown  (0x00)
DWORDUnknown  (0x00000000)
BYTEUnknown  (0x00)
DWORDJulian Date  (starts at 0x00256858)

All those bytes that are 0x00, may very well be Boolean (set to False).

NetPCDoc

#35
Ok, as someone above said - old topic - but then this info may be better for being buried on an old topic...

Somewhere, Somewhen, while decoding a SimCity save file (for the dubious purpose of adding Simoleans) -
I found what I at first thought to be a CRC value; only to eventually realize
that what I was actually looking at was an 'address' in a link-list-entry!
i.e. [optional-foreward-list-address], [optional-reverse-list-address], [optional-id-for-this-link-in-list]
(not necesarily in this particular order and 'optional' is based on 'type' of link-list?)

A lot of RippleJet's 'unknown' values - I suspect - will prove to be 'data-type' information;
I.E. specifying things like binary-byte, binary-word, 16-bit-signed number, 32-bit-signed number, unsigned number, text-string, etc...
(at sometime - in the past - I used DatGen to compare raw data to information in exemplars to decode a lot of these 'data-type' codes)