Quantcast

Jump to content

» «
Photo

24h TimeCycle

SA Released
55 replies to this topic
The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#1

Posted 4 weeks ago Edited by The Hero, 4 weeks ago.

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...timecycle24.asi
Default timecycp.dat converted to 24h: http://aap.papnet.eu...timecyc_24h.dat
Source: https://github.com/G...ing/timecycle24
Script to convert to 24h format: http://aap.papnet.eu...cle_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!
  • Ash_735, gamerzworld, Gramps and 28 others like this

gts.
  • gts.

    Gangsta

  • Members
  • Joined: 20 Jun 2015
  • United-States

#2

Posted 4 weeks ago Edited by gts., 4 weeks ago.

Magnificent work!

 

Can be timecyc_24h.dat loaded from modloader?


Claude_Lib
  • Claude_Lib

    Talkative like never before

  • Members
  • Joined: 26 Jun 2009
  • Russia

#3

Posted 4 weeks ago Edited by Claude_Lib, 4 weeks ago.

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.
  • ChengizVlad09, Blue, NOskillx and 1 other like this

Crspy
  • Crspy

    Kick

  • Members
  • Joined: 14 May 2015
  • None

#4

Posted 4 weeks ago Edited by Crspy, 4 weeks ago.

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

crashlog:

Spoiler

  • NOskillx and Kane49 like this

El Dorado
  • El Dorado

    If it keeps on rainin' levee's goin' to break

  • Feroci
  • Joined: 07 Nov 2013
  • Brazil

#5

Posted 4 weeks ago

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

  • Crspy and NOskillx like this

Dash Shack
  • Dash Shack

    Rat

  • Members
  • Joined: 12 May 2015
  • Turkey

#6

Posted 4 weeks ago Edited by Dash Shack, 4 weeks ago.

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

  • ural, Crspy, NOskillx and 1 other like this

The Eddo
  • The Eddo

    Dead

  • Members
  • Joined: 02 Apr 2016
  • Canada

#7

Posted 4 weeks ago

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


Kane49
  • Kane49

    The Original Balla OG / a.k.a. ~iiCriminnaaL

  • Members
  • Joined: 06 Jun 2017
  • None

#8

Posted 4 weeks ago

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

  • NOskillx likes this

The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#9

Posted 4 weeks ago Edited by The Hero, 4 weeks ago.

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?

Kane49
  • Kane49

    The Original Balla OG / a.k.a. ~iiCriminnaaL

  • Members
  • Joined: 06 Jun 2017
  • None

#10

Posted 4 weeks ago

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?


LaDiDa
  • LaDiDa

    I'm only human

  • Members
  • Joined: 12 Jul 2016
  • Netherlands

#11

Posted 4 weeks ago

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

 

Modloader.log:

Spoiler

The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#12

Posted 4 weeks ago

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.
  • NOskillx likes this

Crspy
  • Crspy

    Kick

  • Members
  • Joined: 14 May 2015
  • None

#13

Posted 4 weeks ago Edited by Crspy, 4 weeks ago.

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

there you go   https://drive.google...Y2JEV3BrakM4UmM


The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#14

Posted 4 weeks ago

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

Crspy
  • Crspy

    Kick

  • Members
  • Joined: 14 May 2015
  • None

#15

Posted 4 weeks ago Edited by Crspy, 4 weeks ago.

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...dGs2U2JRblNGRTA

also , how to get a full crash dump ?  


The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#16

Posted 4 weeks ago

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.
  • NOskillx likes this

_CP_
  • _CP_

    Boss

  • Feroci
  • Joined: 27 Dec 2007
  • Poland
  • Most Helpful Modding 2016 [Runner-up]
    Best Vehicle 2016 [IVPack]
    Best Map 2013 "ViceCityStories PC Edition"

#17

Posted 4 weeks ago

https://www.dropbox....e.6116.rar?dl=0


Crspy
  • Crspy

    Kick

  • Members
  • Joined: 14 May 2015
  • None

#18

Posted 4 weeks ago Edited by Crspy, 4 weeks ago.

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...ZkFmQ3JWeUx6Vm8


madleg
  • madleg

    Crackhead

  • Members
  • Joined: 01 Jan 2014
  • Russia

#19

Posted 4 weeks ago Edited by madleg, 4 weeks ago.

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.

  • Crspy and NOskillx like this

Junior_Djjr
  • Junior_Djjr

    Modding Lover

  • Members
  • Joined: 16 Dec 2011
  • Brazil
  • Best Map 2016 [San Andreas INSANITY] [Contribution]

#20

Posted 4 weeks ago Edited by Junior_Djjr, 4 weeks ago.

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.

  • NOskillx likes this

The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#21

Posted 4 weeks ago Edited by The Hero, 4 weeks ago.

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.

Crspy
  • Crspy

    Kick

  • Members
  • Joined: 14 May 2015
  • None

#22

Posted 4 weeks ago Edited by Crspy, 4 weeks ago.

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,

  • ural, Jinx., SilverRST and 1 other like this

Inadequate
  • Inadequate

    Midnight Emulator

  • Members
  • Joined: 11 Apr 2012
  • None

#23

Posted 4 weeks ago

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

  • NOskillx likes this

madleg
  • madleg

    Crackhead

  • Members
  • Joined: 01 Jan 2014
  • Russia

#24

Posted 4 weeks ago

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

  • NOskillx likes this

The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#25

Posted 4 weeks ago

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.

madleg
  • madleg

    Crackhead

  • Members
  • Joined: 01 Jan 2014
  • Russia

#26

Posted 4 weeks ago Edited by madleg, 4 weeks ago.

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

  • Blackbird88, Silent, lopezloo and 3 others like this

SilverRST
  • SilverRST

    Big Homie

  • Members
  • Joined: 25 Mar 2013
  • None

#27

Posted 4 weeks ago

How do you find the address? With IDA pro?


The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#28

Posted 4 weeks ago

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

All right, all right. Did that now...
  • gamerzworld and NOskillx like this

Kane49
  • Kane49

    The Original Balla OG / a.k.a. ~iiCriminnaaL

  • Members
  • Joined: 06 Jun 2017
  • None

#29

Posted 4 weeks ago

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


_CP_
  • _CP_

    Boss

  • Feroci
  • Joined: 27 Dec 2007
  • Poland
  • Most Helpful Modding 2016 [Runner-up]
    Best Vehicle 2016 [IVPack]
    Best Map 2013 "ViceCityStories PC Edition"

#30

Posted 4 weeks ago

Oh, compact exe, you're marvelous.

  • NOskillx likes this




2 user(s) are reading this topic

1 members, 1 guests, 0 anonymous users