Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (84,950 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

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

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

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. 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

    2. Red Dead Redemption

    3. 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. Forum Support

    2. Site Suggestions

The Hero

24h TimeCycle

Recommended Posts

The Hero

Why not use my python script? o_O

Share this post


Link to post
Share on other sites
MMK_033

Why not use my python script? o_O

 

Uh, never mind :rol: . I thought this script doesn't work properly with custom timecyc.dat files saved by Ingame Timecyc Editor. Sometimes it saves color values as -100, -50, -30 etc. So I did that table, but now I found out that for this case you just need to clear the header of input timecycle file till:

//////////// EXTRASUNNY_LA
Edited by MMK_033

Share this post


Link to post
Share on other sites
The Hero

You can also modify the python script if you see any bugs. I only used it with console timecyc.dat files as these are the ones that aren't broken. I don't care about the PC timecyc.dat but you can hack it however you like.

Share this post


Link to post
Share on other sites
MMK_033

You can also modify the python script if you see any bugs. I only used it with console timecyc.dat files as these are the ones that aren't broken. I don't care about the PC timecyc.dat but you can hack it however you like.

I ain't into that language much so I don't really have any particular idea how to fix this issue, but I see that you can change this:

 

w.append(interpolate(lines[7], lines[0], 2.0/3.0)) # 11pm

to this:

 

w.append(interpolate(lines[7], lines[0], 1.0/2.0)) # 11pm

to make it more accurate at calculating settings for 23:00 time line.

Share this post


Link to post
Share on other sites
The Hero

Oh sh*t, you're right. That was a bug. Fixed now, thanks!

Share this post


Link to post
Share on other sites
kkjj

I want to convert my timecyc.dat into 24h format but I don't know how to use the python script??

Can someone please help me..

Share this post


Link to post
Share on other sites
Dyabda
Forgive me for my stupidity.

Do I need to rename the file timecyc_24.dat in timecycp.dat?

Edited by Dyabda

Share this post


Link to post
Share on other sites
LaDiDa

 

Forgive me for my stupidity.

Do I need to rename the file timecyc_24.dat in timecycp.dat?

No.

Share this post


Link to post
Share on other sites
Dyabda

 

Forgive me for my stupidity.

Do I need to rename the file timecyc_24.dat in timecycp.dat?

No.

 

It should be left as it is?

Share this post


Link to post
Share on other sites
Inadequate

It should be left as it is?

Yes.

Share this post


Link to post
Share on other sites
kkjj

I want to convert my timecyc.dat into 24h format but I don't know how to use the python script??

Can someone please help me..

Anyone??

Share this post


Link to post
Share on other sites
Inadequate

Read the main post, everything you need to know is there.

Share this post


Link to post
Share on other sites
kkjj

Read the main post, everything you need to know is there.

But I don't know how to do that.

I can't understand anything..

It is so remote for me..

Please help.

Edited by kkjj

Share this post


Link to post
Share on other sites
Ash_735

Ok, important question, are you going to be doing anything with the exported 24h timecyc or just use that in your game?

 

If you're just going to use the outputted one as is, then you really don't need this, it won't magically make 8hour timecycs all vibrant and unique, the converter acts as a BASE to then edit from.

Share this post


Link to post
Share on other sites
kkjj

Ok, important question, are you going to be doing anything with the exported 24h timecyc or just use that in your game?

 

If you're just going to use the outputted one as is, then you really don't need this, it won't magically make 8hour timecycs all vibrant and unique, the converter acts as a BASE to then edit from.

I want to edit the sun color hour by hour to make it realistic..

And this the thing that I am searching..

Share this post


Link to post
Share on other sites
MMK_033

I want to convert my timecyc.dat into 24h format but I don't know how to use the python script??

Can someone please help me..

1. Extract this script and your timecyc.dat to your user folder (the path is something like "C:\Users\%USER_NAME%")

2. Press Start (Windows) button, find cmd.exe and run it (but don't run it "as admin" for this case).

3. If you see the last string displaying your user folder path, type there the next:

timecycle_sa_to24h.py timecyc.dat > timecyc_24h.dat

You should get something like this:

C:\Users\%USER_NAME%>timecycle_sa_to24h.py timecyc.dat > timecyc_24h.dat

Press Enter after you did all the previous steps, you'll get the new converted timecyc_24h.dat file in the same folder when it's done.

Try to download and install this if it doesn't work.

 

-----

 

P.S. As I mentioned before, if you have your timecyc.dat edited by Ingame Timecyc Editor, just open it with Notepad and remove the header before you use the script to convert it to 24-hour format. This is neccessary to avoid some issues while converting. The file should start from:

//////////// EXTRASUNNY_LA//Amb Amb_Obj Dir...//Midnight...
Edited by MMK_033

Share this post


Link to post
Share on other sites
The Hero

I think it needs python2 btw, but I'm not sure. I don't know what the issue with the ingame timecyc editor is, never seen what kind files it produces. I saw i didn't handle empty lines correctly though. It should be fine now, but see for yourself.

Share this post


Link to post
Share on other sites
kkjj

 

I want to convert my timecyc.dat into 24h format but I don't know how to use the python script??

Can someone please help me..

1. Extract this script and your timecyc.dat to your user folder (the path is something like "C:\Users\%USER_NAME%")

2. Press Start (Windows) button, find cmd.exe and run it (but don't run it "as admin" for this case).

3. If you see the last string displaying your user folder path, type there the next:

timecycle_sa_to24h.py timecyc.dat > timecyc_24h.dat
You should get something like this:
C:\Users\%USER_NAME%>timecycle_sa_to24h.py timecyc.dat > timecyc_24h.dat
Press Enter after you did all the previous steps, you'll get the new converted timecyc_24h.dat file in the same folder when it's done.

Try to download and install this if it doesn't work.

 

-----

 

P.S. As I mentioned before, if you have your timecyc.dat edited by Ingame Timecyc Editor, just open it with Notepad and remove the header before you use the script to convert it to 24-hour format. This is neccessary to avoid some issues while converting. The file should start from:

//////////// EXTRASUNNY_LA//Amb Amb_Obj Dir...//Midnight...
Thank you Soo much..

Share this post


Link to post
Share on other sites
MMK_033

I think it needs python2 btw, but I'm not sure. I don't know what the issue with the ingame timecyc editor is, never seen what kind files it produces. I saw i didn't handle empty lines correctly though. It should be fine now, but see for yourself.

The update works fine, gotta say. The problem with "-100" color values is seems to be fixed now.

There's no major difference in file formatting of IGTE-timecyc with original timecyc, it just have the 3-string header generated (including indent):

 

9f5aab4f5b33.jpg

Edited by MMK_033

Share this post


Link to post
Share on other sites
The Hero

The script inserted some negative values where the line couldn't be parsed properly so the errors would stand out. Concerning the header, I think I just didn't handle empty lines correctly. Since they don't occur in the original files I hadn't considered the case.

Share this post


Link to post
Share on other sites
Junior_Djjr

I'm using this mod to create a timecycle that the night starts early (so remembering how it is in several countries). Before the result was bad, now everything was possible. :)

 

But my idea still has a problem: what is the memory address where I can change the time when night vertex color starts? I searched a little but without success. You should know, since you worked with it on SkyGfx.

Share this post


Link to post
Share on other sites
The Hero

The function at 0x5D7F80

 

From IDA:

 

 

 

void __cdecl CCustomBuildingRenderer::UpdateDayNightBalanceParam(){    long double v0; // [email protected]    float v1; // [sp+0h] [bp-4h]@1    v0 = (long double)(CClock::ms_nGameClockMinutes + 60 * CClock::ms_nGameClockHours)       + (long double)CClock::ms_nGameClockSeconds * 0.016666668;    v1 = v0;    if ( v0 < 360.0 )        goto LABEL_11;    if ( v1 < 420.0 )    {        CCustomBuildingDNPipeline::m_fDNBalanceParam = (420.0 - v1) * 0.016666668;        return;    }    if ( v1 < 1200.0 )    {        CCustomBuildingDNPipeline::m_fDNBalanceParam = 0.0;        return;    }    if ( v1 >= 1260.0 )LABEL_11:        CCustomBuildingDNPipeline::m_fDNBalanceParam = 1.0;    else        CCustomBuildingDNPipeline::m_fDNBalanceParam = 1.0 - (1260.0 - v1) * 0.016666668;}

 

Edited by The Hero

Share this post


Link to post
Share on other sites
Junior_Djjr

Thanks :p

This code is in some .idb or was it rewritten separately?
The .idb that I use is horrible...

 

void __cdecl __calculateDaylightLightingState(){  double v0; // [email protected]  float v1; // [sp+0h] [bp-4h]@1   v0 = (double)((unsigned __int8)CClock__GameClockMinutes + 60 * CClock::ms_nGameClockHours)     + (double)(unsigned __int16)CClock__GameClockSeconds * 0.016666668;  v1 = v0;  if ( v0 < 360.0 )    goto LABEL_11;  if ( v1 < 420.0 )  {    daylightLightingState = (420.0 - v1) * 0.016666668;    return;  }  if ( v1 < 1200.0 )  {    daylightLightingState = 0.0;    return;  }  if ( v1 >= 1260.0 )LABEL_11:    daylightLightingState = 1.0;  else    daylightLightingState = 1.0 - (1260.0 - v1) * 0.016666668;}

 

 

Share this post


Link to post
Share on other sites
Junior_Djjr

Very different from mine (downloaded somewhere from fastman92 / DK22Pac weeks ago). It will help me a lot :)

Share this post


Link to post
Share on other sites
Alex_00700

why when I teleport in Marco's Bistro across enex marker the sky is becoming black? and if i teleport ago the sky remains black.

iI1T_5r1RB_KMoQDIEUecw.png

5hL8iPkHS6_Vw4XhXCGi0A.png

Edited by Alex_00700

Share this post


Link to post
Share on other sites
Ash_735

Have you changed anything?

Share this post


Link to post
Share on other sites
Alex_00700

Have you changed anything?

No, but i noticed that if I lost any story mission, the bug disappears.

Share this post


Link to post
Share on other sites
Reameb

Wanted to use this but needs python. Hell no buddy miss me with that sh*t. but nice work on the timecyc :D

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

×

Important Information

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