Dingleman Posted July 29, 2010 Share Posted July 29, 2010 In San Andreas I have started to make this mod that changes the map to and arctic/iceland setting. I thought it would be a sweet idea to add some lines to the scm and slow down the cycle of the clock in order to make it that day = six months and night = six months, just like at the north and south pole. Is this possible? If so, what opcodes would I need to put this in..? Thanks in advance. Link to comment Share on other sites More sharing options...
Adler Posted July 30, 2010 Share Posted July 30, 2010 Six months of daytime?? If I was living there I'd have to shoot myself in a couple of days. Anyways, this address (DWORD) stores how many ms = 1 sec. This opcode is setting 1 sec in game time to = 2 sec in real time. 0A8C: write_memory 0xB7015C size 4 value 2000 virtual_protect 0 Ummm I guess the math goes like: 365.242199 days/2 = 182.6211 days182.6211 days*24 hours/day = 4382.9064 hours4382.9064 hours*60 min/hour = 262974.384 min262974.384 min*60 sec/min = 15778463 sec15778463 sec*1000 ms/sec = 15778463000 ms but 15778463000 = 0x03AC783D18 in hex which uses 5 bytes not 4 (max for DWORDs) so it wouldn't work if you rewrite that address but who would ever play the game for 6 months? Maybe you should lower that so CJ doesn't get sleep problems. Link to comment Share on other sites More sharing options...
coin-god Posted July 30, 2010 Share Posted July 30, 2010 I cant think clearly right now (5 am), but I really think there should be a way of doing this without using memory addresses Link to comment Share on other sites More sharing options...
Adler Posted July 30, 2010 Share Posted July 30, 2010 I guess you could do it the way spaceeinstein did it in his Real Time Clock mod using timers instead of that address. Link to comment Share on other sites More sharing options...
ZAZ Posted July 30, 2010 Share Posted July 30, 2010 (edited) i made a realtimescript one week ago but the Realtime clock is a problem, because it needs to manipulate the game clock which have a connection to the weather. It cause a weatherchange every second I can fix it with a code which freeze the weather and makes weatherchange impossible The realtime script runs imediately after gameload and displays the time in hours/minutes/seconds/milliseconds just for verification the gameclock shows the real time {$CLEO .cs}03A4: name_thread 'REALTIME'[email protected] = [email protected] = [email protected] = 000BF: [email protected] = current_time_hours, [email protected] = [email protected] = 0:time1wait 003F0: enable_text_draw 1045A: text_draw_1number 200.0 60.0 'NUMBER' [email protected] // value045A: text_draw_1number 150.0 60.0 'NUMBER' [email protected] // value045A: text_draw_1number 100.0 60.0 'NUMBER' [email protected] // value045A: text_draw_1number 50.0 60.0 'NUMBER' [email protected] // [email protected] > 999jf @[email protected] = [email protected] += [email protected] > 59jf @[email protected] = [email protected] += [email protected] == 60jf @[email protected] = [email protected] += [email protected] == 24jf @[email protected] = 0:time200BF: [email protected] = current_time_hours, [email protected] = current_time_minutesif [email protected] == [email protected] == [email protected] == 59jf @time1wait 20000915: unknown_release_weather :time300C0: set_current_time [email protected] [email protected]: unknown_release_weatherjump @time1 Edited July 30, 2010 by ZAZ CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Deji Posted July 30, 2010 Share Posted July 30, 2010 The memory thing is a much better idea than the primal way... Much more optimized, reduced code, etc. It does it "naturally" with no weather glitches, etc. Link to comment Share on other sites More sharing options...
ZAZ Posted August 1, 2010 Share Posted August 1, 2010 The memory thing is a much better idea than the primal way... Much more optimized, reduced code, etc. It does it "naturally" with no weather glitches, etc. you're right, but 15778463000 = 0x03AC783D18 as Adler mentioned is counting 3 minutes to change the game clock by one minute i found values which are working 0A8C: write_memory 0xB7015C size 4 value 60000 virtual_protect 0 //-- Realtime if framelimiter = on0A8C: write_memory 0xB7015C size 4 value 58500 virtual_protect 0 //-- Realtime if framelimiter = off but what's the adress for San Andreas v2.0? CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
spaceeinstein Posted August 1, 2010 Share Posted August 1, 2010 You could take advantage of the days of the week SA has. How many weeks are in six months? Much better than counting how many milliseconds are in six months. Link to comment 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