Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Altering the Speed of Time


Dingleman
 Share

Recommended Posts

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

Six months of daytime?? If I was living there I'd have to shoot myself in a couple of days. tounge.gif

 

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. yawn.gif

23088_s.gif

Link to comment
Share on other sites

I cant think clearly right now (5 am), but I really think there should be a way of doing this without using memory addresses
Yl8KS.jpg
Link to comment
Share on other sites

I guess you could do it the way spaceeinstein did it in his Real Time Clock mod using timers instead of that address.

23088_s.gif

Link to comment
Share on other sites

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 by ZAZ
Link to comment
Share on other sites

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

 

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?

Link to comment
Share on other sites

spaceeinstein

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.