Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

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

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

    2. Forum Support

    3. Site Suggestions

The Hero

24h TimeCycle

Recommended Posts

The Hero

We already talked about this in the skygfx topic a bit, now a separate thread.

 

The timecycle in San Andreas only has 8 hour definitions per weather as opposed to 24 hours like in every other GTA game. This mod fixes that, it will read a full 24h file from TIMECYC_24H.DAT in the data directory.

 

ASI: http://aap.papnet.eu/gta/24h/timecycle24.asi

Default timecycp.dat converted to 24h: http://aap.papnet.eu/gta/24h/timecyc_24h.dat

Source: https://github.com/GTAmodding/timecycle24

Script to convert to 24h format: http://aap.papnet.eu/gta/utils/timecycle_sa_to24h.py usage: timecycle_sa_to24h.py input_timecyc.dat > output_timecyc.dat

 

Exe versions known to work: compact, hoodlum.

 

The source code has many more functions than are used by this mod. I reverse engineered and reimplemented them so that I could extend CColourSet (since some colour sets are allocated on the stack of CTimeCycle::CalcColoursForPoint I pretty much had to reimplement the whole function). Use the source for your mods if you want to extend timecyc.dat with more/different columns. My reason to do this was to have the game load a VCS timecyc.dat for VCSPC.

 

Have fun!

Edited by The Hero

Share this post


Link to post
Share on other sites
gts.

Magnificent work!

 

Can be timecyc_24h.dat loaded from modloader?

Edited by gts.

Share this post


Link to post
Share on other sites
Claude_Lib

My reason to do this was to have the game load a VCS timecyc.dat for VCSPC.

Does it mean that VCSPC is gonna get revived soon? I certainly hope it does. Edited by Claude_Lib

Share this post


Link to post
Share on other sites
Crspy

Did anybody test it ? it crashes directly everytime i start the game. sometimes it generates a crashlog and sometimes it doesn't.

crashlog:

 

Game version: GTA SA 1.0 US
Unhandled exception at 0x748DB919 in gta_sa.exe: 0xC0000005: Access violation reading location 0x748DB919.
Register dump:
EAX: 0x0028F454 EBX: 0x00000008 ECX: 0x000000B8 EDX: 0x000000B8
EDI: 0xC4D00000 ESI: 0x00000000 EBP: 0x00000009 EIP: 0x748DB919
ESP: 0x0028F1D4 EFL: 0x00210202 CS: 0x00000023 SS: 0x0000002B
GS: 0x0000002B FS: 0x00000053 ES: 0x0000002B DS: 0x0000002B

Stack dump:
0x0028F1D4: C4D00000 00000000 00560618 00000008 00000000 00000003
0x0028F1EC: 00000000 0028F69C 00000001 00000015 00000000 3F7E81B5
0x0028F204: 00000009 0F0B44C8 3F7E81B0 00000000 3F800000 00000000
0x0028F21C: 00B7C690 00000000 3BBF2800 3BBF258D 00000008 00000000
0x0028F234: 00B7C690 3F800000 3F733334 BED8237F 00000000 015E0000
0x0028F24C: 015E0000 03A31FE8 00000000 03A31FE8 0028F280 77BDAA63
0x0028F264: 00000000 03A31FE0 00000000 00000000 3F800000 C47A4000
0x0028F27C: 065A52C0 3F800000 3F800000 415CFF6E 00000000 00003BF8
0x0028F294: 000007FF 03950000 00000000 0000077F 015E00C4 015E6250
0x0028F2AC: 000008A6 00000800 03A2DAB0 015E0000 03A31FE0 00000000
base: 0x00090000 top: 0x0028F1D4 bottom: 0x00290000

Backtrace (may be wrong):
=>0x748DB919 in unknown (+0x748db919) (0x0028F1D0)
0xC4D00000 in unknown (+0xc4d00000) (0x0028F1D8)
0x00560618 in gta_sa.exe (+0x160618)




Shutting down Mod Loader...
Shutting down filesystem watcher...
Shutting down menu...
Unloading plugin "gta3.std.fx"
Unloading plugin "gta3.std.asi"
Unloading plugin "gta3.std.bank"
Unloading plugin "gta3.std.data"
Unloading plugin "gta3.std.movies"
Unloading plugin "gta3.std.scm"
Unloading plugin "gta3.std.text"
Unloading plugin "gta3.std.tracks"
Unloading plugin "gta3.std.sprites"
Unloading plugin "gta3.std.stream"
Mod Loader has been shutdown.

 

Edited by Crspy

Share this post


Link to post
Share on other sites
El Dorado

I would have so much fun with this 3, 4 years ago. But very interesting still.

Share this post


Link to post
Share on other sites
Dash Shack

It's crashing at my game too. Got postfx and ps2refl skins,weapons,cars and sound mod and some .asi plugins.

Edited by Dash Shack

Share this post


Link to post
Share on other sites
The Eddo

So what does it add? And why my game crashes when I click on gta_sa.exe?

Share this post


Link to post
Share on other sites
iiCriminnaaL 49

Crashes my game too. Tried in a clean game, same.

Share this post


Link to post
Share on other sites
The Hero

Strange. As always it doesn't crash for me :( Can someone give me a minidump? (explained in first post in skygfx topic)

EDIT: I replaced the file once more but I don't think it makes a difference. When does it crash anyway? In game somewhere? Before anything is loaded?

Edited by The Hero

Share this post


Link to post
Share on other sites
iiCriminnaaL 49

It crashes when load finishes, when screen turns black and being ready to start.

 

Should I copy it as it is or it must be renamed to timecyc.dat? And where should I put it? Inside data folder (as it's .dat) or in GTA SA directory?

Share this post


Link to post
Share on other sites
LaDiDa

crashes immediately after loading is done and a new game/loaded game is about to start:

 

Modloader.log:

 

 

Game version: GTA SA 1.0 US
Unhandled exception at 0x67BCB91B in apphelp.dll (+0x4b91b): 0x80000003: Breakpoint exception.
Register dump:
EAX: 0x0177AC4C EBX: 0x00000008 ECX: 0x000000B8 EDX: 0x000000B8
EDI: 0xC4D00000 ESI: 0x00000000 EBP: 0x00000009 EIP: 0x67BCB91B
ESP: 0x0177F1CC EFL: 0x00000287 CS: 0x00000023 SS: 0x0000002B
GS: 0x0000002B FS: 0x00000053 ES: 0x0000002B DS: 0x0000002B

Stack dump:
0x0177F1CC: C4D00000 00000000 00560618 00000008 00000000 00000001
0x0177F1E4: 00000000 0177F694 00000001 00000015 00000000 3F7D70A4
0x0177F1FC: 00000009 16D5CC50 3F7D70A0 00000000 3F800000 00000000
0x0177F214: 00B7C690 00000000 3C23D800 3C23D70B 00000008 00000000
0x0177F22C: 00B7C690 3F800000 3F733334 BEE66667 00000000 00000000
0x0177F244: 00000000 00000000 000002A0 00000000 00000000 02000002
0x0177F25C: 00000000 00000001 00000000 00000000 3F800000 C47A4000
0x0177F274: 05060108 3F800000 3F800000 415CDC14 0178028C 00000080
0x0177F28C: 012D0100 00000000 1A4E1040 00000000 0000002D 00000001
0x0177F2A4: 1A4D4278 00000000 0000005B 00000000 00000002 017803E4
base: 0x01580000 top: 0x0177F1CC bottom: 0x01780000

Backtrace (may be wrong):
=>0x67BCB91B SdbGetDatabaseVersion+0x14b in apphelp.dll (+0x4b91b) (0x0177F1D0)
0x00560618 in gta_sa.EXE (+0x160618)

 

 

Share this post


Link to post
Share on other sites
The Hero

It crashes when load finishes, when screen turns black and being ready to start.

 

Should I copy it as it is or it must be renamed to timecyc.dat? And where should I put it? Inside data folder (as it's .dat) or in GTA SA directory?

The code opens it as data/timecyc_24h.dat

 

 

Backtrace (may be wrong):

=>0x67BCB91B SdbGetDatabaseVersion+0x14b in apphelp.dll (+0x4b91b) (0x0177F1D0)

0x00560618 in gta_sa.EXE (+0x160618)

Makes you wonder what the call at 0x560613 does :/ A minidump could help i guess.

Share this post


Link to post
Share on other sites
The Hero

Doesn't help either I just get some random address...no idea how it got there. Maybe a full crash dump will help then. It's really strange how something as simple as that would crash the game. In Crspy's case I would assume it's due to the huge number of mods, but Kane49 said he used a clean game...

Share this post


Link to post
Share on other sites
Crspy

Doesn't help either I just get some random address...no idea how it got there. Maybe a full crash dump will help then. It's really strange how something as simple as that would crash the game. In Crspy's case I would assume it's due to the huge number of mods, but Kane49 said he used a clean game...

Ok , another minidump with a clean game only silent patch and OLA installed ( and modloader folder is empty ) ...... https://drive.google.com/open?id=0BztNk10xptkddGs2U2JRblNGRTA

 

also , how to get a full crash dump ?

Edited by Crspy

Share this post


Link to post
Share on other sites
The Hero

No, doesn't help. set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\DumpType to 2. The file will be big but i think it's the only way i can debug this.

Share this post


Link to post
Share on other sites
Crspy

No, doesn't help. set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\DumpType to 2. The file will be big but i think it's the only way i can debug this.

 

crashdump size 257MB ! :blink: thanks to 7z compression it's 53MB now

here's the Link : https://drive.google.com/open?id=0BztNk10xptkdZkFmQ3JWeUx6Vm8

Edited by Crspy

Share this post


Link to post
Share on other sites
madleg

i guess crash is caused because of some jmp at 0055F4C2 at least. i guess people here, just like me, have some jump instruction, so your mod just overwrites jmp address. Patch<void*>(0x55F4C5, (void*)&CTimeCycle::m_nAmbientRed); aaand its actually in exe file.

Edited by madleg

Share this post


Link to post
Share on other sites
Junior_Djjr

The source actually has a lot more than what the asi above does. I have reverse engineered and reimplemented most of the TimeCycle code so that I could extend CColourSet (since some colour sets are allocated on the stack of CTimeCycle::CalcColoursForPoint I pretty much had to reimplement the whole function). Most of this reversed code is actually unused in the asi above but you'll need it if you want to extend your timecyc.dat with more/different columns. My reason to do this was to have the game load a VCS timecyc.dat for VCSPC.

What about reimplement color calculations to fix flashing sky?

 

The game uses just 1 byte to process sky color calculations, maybe we need more bytes to fix it. So, maybe we can have also better, smoother color transitions? It would be interesting.

Edited by Junior_Djjr

Share this post


Link to post
Share on other sites
The Hero

And people told me they were using an unmodified game X( No idea where this jump comes from.

EDIT: it's f*cking HOODLUM. Use a proper exe, guys. compact ftw.

Edited by The Hero

Share this post


Link to post
Share on other sites
Crspy

And people told me they were using an unmodified game X( No idea where this jump comes from.

EDIT: it's f*cking HOODLUM. Use a proper exe, guys. compact ftw.

 

tbh , hoodlum ftw , compact f*ck the mods v3BI2BP.png

my point is , i have to sacrifice lots of mods compatibility to use compact,

Edited by Crspy

Share this post


Link to post
Share on other sites
Inadequate

What's the problem with your script and HOODLUM EXE, aap? I thought, should work with both EXEs without any problem.

Share this post


Link to post
Share on other sites
madleg

patch some bytes ( 0F B6 B9 at 0055F4C2) for poor people here, works for me fine (10 sec at least tho)

Share this post


Link to post
Share on other sites
The Hero

HOODLUM f*cks some sh*t up. It's a crappy exe that I don't really want to support. I put up another asi now that replaces the whole timecycle by my reversed code instead of only patching some functions. So if you absolutely have to use hoodlum for whatever reason, use the _replace.asi, otherwise you can use the more minimal one.

Share this post


Link to post
Share on other sites
madleg

all you had to do was memcpy((void*)0x0055F4C2, "\x0F\xB6\xB9", 3);
87px-0%2C292%2C0%2C433-BigSmoke-GTASA.jp

Edited by madleg

Share this post


Link to post
Share on other sites
SilverRST

How do you find the address? With IDA pro?

Share this post


Link to post
Share on other sites
The Hero

all you had to do was memcpy((void*)0x0055F4C2, "\x0F\xB6\xB9", 3);

All right, all right. Did that now...

Share this post


Link to post
Share on other sites
iiCriminnaaL 49

My game crashes with the new asi. (hoodlum, is it supported?)

Share this post


Link to post
Share on other sites
_CP_

Oh, compact exe, you're marvelous.

Share this post


Link to post
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

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

×

Important Information

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