spaceeinstein Posted July 15, 2005 Share Posted July 15, 2005 (edited) CONVERTED FOR SAN ANDREAS! Created by Barton Waterduck for Vice City. Converted by spaceeinstein for San Andreas. This is a script mod that controls the in-game clock to imitate real life ones. Installation for intermediate scripters only. Please download Barton's mission builder using Craig's link. The weather will stay the same but will be modified later on. 004F: create_thread ££TimeMod...:TimeMod0004: $weather = 6;; integer values0006: @33 = 0;; integer values - Reset internal timer:TimeLoop0001: wait 500 ms 00BF: @1 = current_time_hours, @2 = current_time_minutes00C0: set_current_time @1 @201B5: force_weather $weather00D6: if 00019: @33 > 59999;; integer values - if internal timer >= 1 minute004D: jump_if_false ££TimeLoop0006: @33 = 0;; integer values - reset the internal timer000A: @2 += 1;; integer values00D6: if 00019: @2 > 59;; integer values004D: jump_if_false ££TimeModL20006: @2 = 0;; integer values000A: @1 += 1;; integer values00D6: if 00038: $ON_MISSION == 0;; integer values004D: jump_if_false ££TimeModL30008: $weather += 1;; integer values00D6: if 00018: $weather > 19;; integer values004D: jump_if_false ££TimeModL30004: $weather = 0;; integer values:TimeModL300D6: if 00019: @1 > 23;; integer values004D: jump_if_false ££TimeModL20006: @1 = 0;; integer values:TimeModL200C0: set_current_time @1 @20002: jump ££TimeLoop Gltiches: May interfere with timers in the game. Edited July 22, 2005 by spaceeinstein Link to comment https://gtaforums.com/topic/203446-real-time-clock/ Share on other sites More sharing options...
Demarest Posted July 15, 2005 Share Posted July 15, 2005 Gltiches: May interfere with timers in the game. I don't think it will. And shouldn't it say "rewritten for SAMB" instead? Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2990769 Share on other sites More sharing options...
Dogmeat Posted July 15, 2005 Share Posted July 15, 2005 Damn I would love to use this but I just started playing SA with the opened up mod :< In VC there was only sunny weather when using this mod, same problem here? Could you release the main.scm file? Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2990873 Share on other sites More sharing options...
Demarest Posted July 15, 2005 Share Posted July 15, 2005 This is a script mod whereas Opened Up is a SCM mod. So you'd have to add this to that. If you got a compiled SCM of this mod, it would be the regular game with just this added. Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2991167 Share on other sites More sharing options...
Dogmeat Posted July 15, 2005 Share Posted July 15, 2005 (edited) Thanks... I got it working now... a great mod but there is a problem. The weather does not change... and it isn't even the sunny weather like in the VC version. Edited July 15, 2005 by Dogmeat Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2991204 Share on other sites More sharing options...
spaceeinstein Posted July 15, 2005 Author Share Posted July 15, 2005 Why should I say "rewritten for SA MB"? And the weather, I made it so it stays the same. There are a whole lot more weather types in San An but that's was late at night when I converted it. Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2992295 Share on other sites More sharing options...
Dogmeat Posted July 16, 2005 Share Posted July 16, 2005 Well how can I make it to be sunny weather because the default one puts your drawdistance to 0 and everything looks just blue and white "0004: $weather = 6;; integer values" Could it be this? Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2993447 Share on other sites More sharing options...
Demarest Posted July 16, 2005 Share Posted July 16, 2005 "0004: $weather = 6;; integer values"Could it be this? Nah. That's just the setting of a variable. Until that variable gets used for something, it wouldn't effect your game at all. For that matter, this code is totally useless 0008: $weather += 0;; integer values00D6: if 00018: $weather > 6;; integer values004D: jump_if_false ££TimeModL30004: $weather = 6;; integer values ...which begins to reveal what I meant by it being translated for SAMB. As CyQ pointed out earlier in the week, it's not really converting mods because with the exception of using @33 instead of @17, nothing about this is platform specific. It's just reworked so that a different interpreter can use it. If it was converted, code like I quoted would've been eliminated because it does nothing. $WEATHER is set to 6 to start, incremented, and constantly put through an if >6 then 6 check. It's ALWAYS going to be 6. So instead of using another global var, just always say force weather 6 and be done with it. Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2993479 Share on other sites More sharing options...
Dogmeat Posted July 16, 2005 Share Posted July 16, 2005 My skills on modding scm are almost zero... I can't figure out how to make it sunny. Could somebody just paste the line? Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2993881 Share on other sites More sharing options...
spaceeinstein Posted July 16, 2005 Author Share Posted July 16, 2005 O, yes, about that weather part, it was for my All In One Mod which uses the real time clock mod to make my permanent sunny weather in Vice City. I converted straight from that. Barton didn't do that, I did that, for my dead mod. If you want to fix that, here it is. 0008: $weather += 1 ;; integer values00D6: if 00018: $weather > 19 ;; integer values004D: jump_if_false ££TimeModL30004: $weather = 0 ;; integer values Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2994389 Share on other sites More sharing options...
Dogmeat Posted July 16, 2005 Share Posted July 16, 2005 Hmm i'm getting some sort of error when I try to compile it. "Memory beyond the defined range has been accessed. Use DEFINE MEMORY 43805 or higher to allocate enough memory." Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2994555 Share on other sites More sharing options...
Demarest Posted July 16, 2005 Share Posted July 16, 2005 "Memory beyond the defined range has been accessed. Use DEFINE MEMORY 43805 or higher to allocate enough memory." Actually, it says to set it to that and recompile. So... set it to that and recompile Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2995128 Share on other sites More sharing options...
Un3462 Posted July 16, 2005 Share Posted July 16, 2005 durrr locals but, here's the proper way to make your game 'real time' (ie without screwing up the weather or having to start a new game, etc): 1. open up your savegame in a hex editor. 2. at offset 81h change the two bytes "E8 03" to "60 EA". this changes the length of an in-game minute from 1000 milliseconds to 60000 ms. 3. then, at the very end of the savegame (offset 317FCh), add 5Fh to the dword there. this adjusts the savegame's checksum so that sa won't detect your tampering with it. 4. load it up! Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2995222 Share on other sites More sharing options...
Dogmeat Posted July 17, 2005 Share Posted July 17, 2005 (edited) Lol I didn't even notice the "define memory" at the start I now compiled it but the weather is still the same... And for that hex editor stuff... I managed to change the first part but I didn't get it the last part of it (dword)... forget this thing... I had enough Edited July 17, 2005 by Dogmeat Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2996156 Share on other sites More sharing options...
pekkapoika Posted July 17, 2005 Share Posted July 17, 2005 Hello! I put this code to opened up mod and it works fine (Sky looks little foggy). I was doing some missions and savings, weather was same until i was driving to desert stormy weather starts and i drive fast to los santos to saving my game several times (hoping that stormy go away). Now my game had only weather: storm and it wont stop (i try to save many times and even cheat to get littlefoggy/sunny weather back). How i can get better weather (cloudy or sunny) Please help me? Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2997471 Share on other sites More sharing options...
Dogmeat Posted July 18, 2005 Share Posted July 18, 2005 My game was very foggy too and the weather cheats are not working so I don't think that there is much you can do. I think that you have to mofidy your save game like CyQ said but I don't understand the "then, at the very end of the savegame (offset 317FCh), add 5Fh to the dword there" part. Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2998636 Share on other sites More sharing options...
V41N Posted July 18, 2005 Share Posted July 18, 2005 durrr locals but, here's the proper way to make your game 'real time' (ie without screwing up the weather or having to start a new game, etc): 1. open up your savegame in a hex editor. 2. at offset 81h change the two bytes "E8 03" to "60 EA". this changes the length of an in-game minute from 1000 milliseconds to 60000 ms. 3. then, at the very end of the savegame (offset 317FCh), add 5Fh to the dword there. this adjusts the savegame's checksum so that sa won't detect your tampering with it. 4. load it up! thanks for the help CyQ, but could you maybe give us some more details for installation? Which hex editor would you recommend? Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2998655 Share on other sites More sharing options...
Dogmeat Posted July 18, 2005 Share Posted July 18, 2005 I was using this one http://www.hhdsoftware.com/hex-editor-standard.html Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2998660 Share on other sites More sharing options...
Un3462 Posted July 18, 2005 Share Posted July 18, 2005 pretty much any hex editor will do. i generally use one called hex workshop. i'll elaborate on how to do step 3: - at the very end of the savegame you will find 4 bytes which make up a value. in my savegame these are "B0 27 24 01", but they can be pretty much anything. - if you reverse them you will get what is called a dword. in my case: 012427B0. - open up the windows calculator in scientific mode. set it to "hex". enter the dword, and add 5F to it. in my case: 012427B0 + 5F = 0124280F. - reverse the result again (0F 28 24 01), and overwrite the last 4 bytes in the savegame with that. Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2999030 Share on other sites More sharing options...
Dogmeat Posted July 18, 2005 Share Posted July 18, 2005 (edited) Thanks man! Now it seems to work just fine. ---Edit: Blah the weather is still kinda foggy...--- Edited July 18, 2005 by Dogmeat Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2999312 Share on other sites More sharing options...
spaceeinstein Posted July 18, 2005 Author Share Posted July 18, 2005 If you want to change the waether, try speeding up the game clock with a cheat. I didn't try it yet but try it. Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2999397 Share on other sites More sharing options...
pekkapoika Posted July 18, 2005 Share Posted July 18, 2005 Hello! I started new game and i changed all weather values 6 to 1(i didnt know what i was doing, but i have tested it: saving, driving all over sa and weather doesnt change anymore). Does this code have weather value (i like to chance weather more sunny) 0004: $weather = 6;; integer values(this?) Please help me Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-2999433 Share on other sites More sharing options...
ripple Posted July 22, 2005 Share Posted July 22, 2005 (edited) Thanks CyQ. P.S. I am sure Space will figure out how to deal with the weather eventually Edited July 23, 2005 by ripple Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-3012642 Share on other sites More sharing options...
spaceeinstein Posted July 22, 2005 Author Share Posted July 22, 2005 (edited) --- Edited July 22, 2005 by spaceeinstein Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-3012735 Share on other sites More sharing options...
Bloodburn Posted August 12, 2005 Share Posted August 12, 2005 durrr locals but, here's the proper way to make your game 'real time' (ie without screwing up the weather or having to start a new game, etc): 1. open up your savegame in a hex editor. 2. at offset 81h change the two bytes "E8 03" to "60 EA". this changes the length of an in-game minute from 1000 milliseconds to 60000 ms. 3. then, at the very end of the savegame (offset 317FCh), add 5Fh to the dword there. this adjusts the savegame's checksum so that sa won't detect your tampering with it. 4. load it up! I looked in my save game and I dont have an offset 81h... I searched for the byes and there are TONS of E8 03 instances.. Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-3088100 Share on other sites More sharing options...
KungFuJebus Posted August 12, 2005 Share Posted August 12, 2005 I use the timesync tool to play my game in real time isnt it the same thing? Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-3088117 Share on other sites More sharing options...
Bloodburn Posted August 12, 2005 Share Posted August 12, 2005 No, the timecyc tool plays the game according to the time in real life. If its 5pm in real life, its 5pm in the game. What im trying to do is have the game time RUN at a normal rate, but NOT reflect the actual time in reality.. so 1 minute = 60 seconds of time, in the game, but time stops when the game isnt on. Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-3088135 Share on other sites More sharing options...
ripple Posted August 13, 2005 Share Posted August 13, 2005 Bloodburn: it's there. Look for it on line 78. In my savegames it was always the first instance of 8E 03. It's odd that some people reported problem with the weather using Cy Q's method. I've had no problems with the weather, that is to say, a particular weather pattern usually lasts several hours real time, but always changes eventually, which actually makes it more realistic. The reason I opted to use Cy Q's method instead of adding the script to my .scm was because I was not sure the script does the same thing. I would not want my weather to change every 15 real time minutes. I am also wondering if editing the savegame would have any kind of impact on the missions. I am having problems triggering the Catalina missions using Craig's SA Opened Up mod. I've added other scripts to the .scm, which may be the culprit, but I am not sure if changing the game to progress in real time might cause the Catalina mission triggers to "break." Has anyone here had problems with that? This might turn out to be a rather ignorant question but I am just trying to narrow in on the cause of the problem I am experiencing. Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-3091408 Share on other sites More sharing options...
Bloodburn Posted August 13, 2005 Share Posted August 13, 2005 Bloodburn: it's there. Look for it on line 78. In my savegames it was always the first instance of 8E 03. It's odd that some people reported problem with the weather using Cy Q's method. I've had no problems with the weather, that is to say, a particular weather pattern usually lasts several hours real time, but always changes eventually, which actually makes it more realistic. The reason I opted to use Cy Q's method instead of adding the script to my .scm was because I was not sure the script does the same thing. I would not want my weather to change every 15 real time minutes. I am also wondering if editing the savegame would have any kind of impact on the missions. I am having problems triggering the Catalina missions using Craig's SA Opened Up mod. I've added other scripts to the .scm, which may be the culprit, but I am not sure if changing the game to progress in real time might cause the Catalina mission triggers to "break." Has anyone here had problems with that? This might turn out to be a rather ignorant question but I am just trying to narrow in on the cause of the problem I am experiencing. The hex workshop I have doesnt have "line numbers" and the first instance of "8E 03" is halfway though the savegame code. I guess Ill just backup my copy of it, and spend all night testing different "8E 03's" cause I have about 20 of them in the savegame hex. Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-3091714 Share on other sites More sharing options...
Flav_cool Posted August 27, 2005 Share Posted August 27, 2005 (edited) I can't find offset 81h either! That is I'm not even sure what an offset is. I just realized that the first instance of "E8 03" which is across two groups hence the space between them, says in hex workshop: "offset: 129 [0x00000081]" <- I just noticed the 81! This can't be a coincidence...I'll try changing it. EDIT: I did it and the whole process at the end. I'm getting a "corrupt saved game" error in SA. I've tried twice... What could I be doing wrong, I have the calculator on scientific and on hex mode, w/ dword selected on the right. EDIT 2: IT WORKED! I was reversing it wrong, ur just supposed to reverse the order of the bytes as groups so 01 i would make 10, but really you just have to put the groups backwords so 01 50 would have to be 50 01...as I noticed from his well given example. Thanks a lot cyq! Edited August 27, 2005 by Flav_cool Link to comment https://gtaforums.com/topic/203446-real-time-clock/#findComment-3137825 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now