Quantcast

Jump to content

» «
Photo

24h TimeCycle

SA Released
91 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 24 July 2017 - 06:27 AM Edited by The Hero, 24 July 2017 - 09:06 PM.

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 32 others like this

gts.
  • gts.

    Gangsta

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

#2

Posted 24 July 2017 - 07:00 AM Edited by gts., 24 July 2017 - 07:03 AM.

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 24 July 2017 - 08:36 AM Edited by Claude_Lib, 24 July 2017 - 08:36 AM.

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, Rachel Amber and 1 other like this

Crspy
  • Crspy

    Kick

  • Members
  • Joined: 14 May 2015
  • None

#4

Posted 24 July 2017 - 11:31 AM Edited by Crspy, 24 July 2017 - 12:50 PM.

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

crashlog:

Spoiler

  • Rachel Amber 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 24 July 2017 - 12:20 PM

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

  • Crspy and Rachel Amber like this

Dash Shack
  • Dash Shack

    Rat

  • Members
  • Joined: 12 May 2015
  • Turkey

#6

Posted 24 July 2017 - 12:27 PM Edited by Dash Shack, 24 July 2017 - 12:27 PM.

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

  • ural, Crspy, Rachel Amber and 1 other like this

The Eddo
  • The Eddo

    Dead

  • Members
  • Joined: 02 Apr 2016
  • Canada

#7

Posted 24 July 2017 - 02:23 PM

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 24 July 2017 - 02:30 PM

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

  • Rachel Amber 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 24 July 2017 - 02:36 PM Edited by The Hero, 24 July 2017 - 02:44 PM.

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 24 July 2017 - 03:23 PM

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 24 July 2017 - 03:27 PM

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 24 July 2017 - 03:33 PM

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

Crspy
  • Crspy

    Kick

  • Members
  • Joined: 14 May 2015
  • None

#13

Posted 24 July 2017 - 04:27 PM Edited by Crspy, 24 July 2017 - 04:27 PM.

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 24 July 2017 - 04:34 PM

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 24 July 2017 - 04:54 PM Edited by Crspy, 24 July 2017 - 04:54 PM.

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 24 July 2017 - 05:03 PM

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.
  • Rachel Amber 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 24 July 2017 - 06:10 PM

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


Crspy
  • Crspy

    Kick

  • Members
  • Joined: 14 May 2015
  • None

#18

Posted 24 July 2017 - 06:11 PM Edited by Crspy, 24 July 2017 - 06:19 PM.

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

    Square Civilian

  • Members
  • Joined: 01 Jan 2014
  • Russia

#19

Posted 24 July 2017 - 06:19 PM Edited by madleg, 24 July 2017 - 06:35 PM.

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 Rachel Amber like this

Junior_Djjr
  • Junior_Djjr

    Modding Lover

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

#20

Posted 24 July 2017 - 06:23 PM Edited by Junior_Djjr, 24 July 2017 - 06:27 PM.

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.

  • Rachel Amber 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 24 July 2017 - 06:25 PM Edited by The Hero, 24 July 2017 - 06:27 PM.

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 24 July 2017 - 06:32 PM Edited by Crspy, 24 July 2017 - 06:35 PM.

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 24 July 2017 - 06:38 PM

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

  • Rachel Amber likes this

madleg
  • madleg

    Square Civilian

  • Members
  • Joined: 01 Jan 2014
  • Russia

#24

Posted 24 July 2017 - 06:45 PM

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

  • Rachel Amber 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 24 July 2017 - 06:52 PM

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.
  • mirh and Rachel Amber like this

madleg
  • madleg

    Square Civilian

  • Members
  • Joined: 01 Jan 2014
  • Russia

#26

Posted 24 July 2017 - 07:06 PM Edited by madleg, 24 July 2017 - 07:06 PM.

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 4 others like this

SilverRST
  • SilverRST

    Boss

  • Members
  • Joined: 25 Mar 2013
  • None

#27

Posted 24 July 2017 - 07:07 PM

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 24 July 2017 - 07:49 PM

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

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

Kane49
  • Kane49

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

  • Members
  • Joined: 06 Jun 2017
  • None

#29

Posted 24 July 2017 - 07:55 PM

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 24 July 2017 - 07:58 PM

Oh, compact exe, you're marvelous.

  • Rachel Amber likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users