Difference between revisions of "Time cycle"
(→Weather Types) |
(images + lists + opcodes) |
||
Line 3: | Line 3: | ||
In [[GTA VC|Vice City]] the <code>timecyc.dat</code> file additionally stores settings for different interior appearances. There are '''23''' of those extra settings in one extra section (internally called '''"EXTRACOLOURS"'''). Each game hour represents one constant setting. | In [[GTA VC|Vice City]] the <code>timecyc.dat</code> file additionally stores settings for different interior appearances. There are '''23''' of those extra settings in one extra section (internally called '''"EXTRACOLOURS"'''). Each game hour represents one constant setting. | ||
− | |||
== File format == | == File format == | ||
A comment in the <code>timecyc.dat</code> file is preceded by a series of slashes ("//"). The game's parser simply ignores comments so that the number of ''uncommented'' lines must be a multiple of '''24''' for [[GTA 3|GTA III]] and ''Vice City'' (representing one for each ingame hour) and a multiple of '''8''' for [[GTA SA|San Andreas]] (representing ''00am, 05am, 06am, 07am, 00pm, 07pm, 08pm and 10pm'' in the order they appear). Each value of one entry gets interpolated with the previous and the next setting of the current ingame weather. | A comment in the <code>timecyc.dat</code> file is preceded by a series of slashes ("//"). The game's parser simply ignores comments so that the number of ''uncommented'' lines must be a multiple of '''24''' for [[GTA 3|GTA III]] and ''Vice City'' (representing one for each ingame hour) and a multiple of '''8''' for [[GTA SA|San Andreas]] (representing ''00am, 05am, 06am, 07am, 00pm, 07pm, 08pm and 10pm'' in the order they appear). Each value of one entry gets interpolated with the previous and the next setting of the current ingame weather. | ||
− | |||
=== Data types === | === Data types === | ||
Line 20: | Line 18: | ||
As mentioned above each setting consists out of a constant number of entries separated by whitespaces. The following table lists the entries and their descriptions in the order they appear: | As mentioned above each setting consists out of a constant number of entries separated by whitespaces. The following table lists the entries and their descriptions in the order they appear: | ||
− | {| | + | {|class="wikitable center-col-1" style="width: 100%;" |
− | ! | + | !style="width: 1.3em;"|{{Icon|3}} |
− | ! | + | !style="width: 1.3em;"|{{Icon|VC}} |
− | ! | + | !style="width: 1.3em;"|{{Icon|SA}} |
!width="20%"|Name | !width="20%"|Name | ||
!width="10%"|Data type | !width="10%"|Data type | ||
!Description | !Description | ||
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Static ambience color||TColor||The color of ambient light on map objects ''(see [[Item Placement|IPL]])''. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Dynamic ambience color||TColor||The color of ambient light on dynamically created objects like [[PEDS|pedestrians]] and [[CARS|vehicles]]. |
|- | |- | ||
− | |colspan="2"| | + | |colspan="2"|X||{{a|c}}|–||Static ambience blur color||TColor||Blurrig color value for static ambience color. |
|- | |- | ||
− | |colspan="2"| | + | |colspan="2"|X||{{a|c}}|–||Dynamic ambience blur color||TColor||Blurrig color value for dynamic ambience color. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Direct light color||TColor||The color of direct light on dynamicly created objects like ''pedestriants'' and ''vehicles''. Present in the timecyc.dat of GTA SA, but not loaded and unused by the game. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Sky top color||TColor||The color of the top of the [[wikipedia:Skybox_(video_games)|skysphere]]. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Sky bottom color||TColor||The color of the bottom of the ''skysphere''. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Sun core color||TColor||The color of the core [[wikipedia:Sprite_(computer_graphics)|sprite]] of the sun. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Sun corona color||TColor||The color of the corona ''sprite'' of the sun. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Sun core size||FLOAT||The size of the core ''sprite'' of the sun. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Sun corona size||FLOAT||The size of the corona ''sprite'' of the sun. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Sprite brightness||FLOAT||The the brightness of the above mentioned ''sprites''. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Shadow intensity||INT32||The intensity of the shadows of objects like ''pedestriants'', ''vehicles'' or poles. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Light shading value||INT32||Value used for the [[wikipedia:Shading|shading algorithm]] on ''pedestirants'' and ''vehicles'' {{ref|?}}. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Pole shading value||INT32||''Shading'' value for map objects with [[Ide#IDE_Flags|flag 32768]]. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Far clipping offset||FLOAT||The distance of the [[wikipedia:Clipping_(computer_graphics)|far clipping plane]] from the camera. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Fog start offset||FLOAT||The range of the distance fog from the camera. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Light on ground||FLOAT||Amount of light on the ground of the sea {{ref|?}}. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Lower clouds color||TColor||Color of the lower clounds. |
|- | |- | ||
− | |colspan="2"| | + | |colspan="2"|X||{{a|c}}|–||Upper clouds top color||TColor||Color of the top of the upper clouds. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Upper clouds bottom color||TColor||Color of the bottom of the upper clouds. |
|- | |- | ||
− | |colspan="2"| | + | |colspan="2"|X||{{a|c}}|–||Blur color||TColor||The color of trails. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Water color||TColor||Color of the water vertices. |
|- | |- | ||
− | |colspan="3"| | + | |colspan="3"|X||Water alpha level||UINT8||Alpha level for water vertices. |
|- | |- | ||
− | |colspan="2"| | + | |colspan="2"|–||{{a|c}}|X||Color correction 1 alpha||UINT8||Alpha level for first color correction value. |
|- | |- | ||
− | |colspan="2"| | + | |colspan="2"|–||{{a|c}}|X||Color correction 1||TColor||First color correction value. |
|- | |- | ||
− | |colspan="2"| | + | |colspan="2"|–||{{a|c}}|X||Color correction 2 alpha||UINT8||Alpha level for second color correction value. |
|- | |- | ||
− | |colspan="2"| | + | |colspan="2"|–||{{a|c}}|X||Color correction 2||TColor||Second color correction value. |
|- | |- | ||
− | |colspan="2"| | + | |colspan="2"|–||{{a|c}}|X||Lower clouds alpha level||UINT8||Alpha level for lower clouds. |
|- | |- | ||
− | |colspan="2"| | + | |colspan="2"|–||{{a|c}}|X||Upper clouds alpha level||UINT8||Alpha level for upper clouds. |
|- | |- | ||
− | |colspan="2"| | + | |colspan="2"|–||{{a|c}}|X||Water fading to white, amount of white light on water||UINT8||Usually 0. |
|} | |} | ||
Line 94: | Line 92: | ||
'''Timecycp''' is a version of timecyc.dat that came alongside the regular time cycle configuration file. Similar to the [[water1.dat]] file it is a leftover from the original PlayStation 2 version of ''San Andreas''. The file isn't used by the game and can safely be deleted. The only difference to the actual file is the encoding method. However its content is the same, apart from an additional character lighting setting that was absent on the PC version. Replacing the timecyc.dat with timecycp.dat by renaming the files, as stated above, will result in improved ped lighting. Other than that the game's ambient lighting and sky colours still remain the same. | '''Timecycp''' is a version of timecyc.dat that came alongside the regular time cycle configuration file. Similar to the [[water1.dat]] file it is a leftover from the original PlayStation 2 version of ''San Andreas''. The file isn't used by the game and can safely be deleted. The only difference to the actual file is the encoding method. However its content is the same, apart from an additional character lighting setting that was absent on the PC version. Replacing the timecyc.dat with timecycp.dat by renaming the files, as stated above, will result in improved ped lighting. Other than that the game's ambient lighting and sky colours still remain the same. | ||
− | == Weather | + | == Weather types == |
− | + | === GTA III === | |
− | + | {|class="wikitable center-col-1" | |
− | + | ! Type | |
− | + | ! style="width: 15em;" | [[SCM_language_III/VC_definitions#WEATHER|Enum]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | {|class="wikitable" | ||
− | ! | ||
− | ! [[SCM_language_III/VC_definitions#WEATHER|Enum]] | ||
! Image | ! Image | ||
|- | |- | ||
| 0 | | 0 | ||
| WEATHER_SUNNY | | WEATHER_SUNNY | ||
− | | [ | + | | [[File:III Weather-0.jpg|120px]] |
|- | |- | ||
| 1 | | 1 | ||
| WEATHER_CLOUDY | | WEATHER_CLOUDY | ||
− | | [ | + | | [[File:III Weather-1.jpg|120px]] |
|- | |- | ||
| 2 | | 2 | ||
| WEATHER_RAINY | | WEATHER_RAINY | ||
− | | [ | + | | [[File:III Weather-2.jpg|120px]] |
|- | |- | ||
| 3 | | 3 | ||
| WEATHER_FOGGY | | WEATHER_FOGGY | ||
− | | [ | + | | [[File:III Weather-3.jpg|120px]] |
|} | |} | ||
− | + | ||
− | {|class="wikitable" | + | === Vice City === |
− | ! | + | {|class="wikitable center-col-1" |
− | ! [[SCM_language_III/VC_definitions#WEATHER|Enum]] | + | ! Type |
+ | ! style="width: 15em;" | [[SCM_language_III/VC_definitions#WEATHER|Enum]] | ||
! Image | ! Image | ||
|- | |- | ||
| 0 | | 0 | ||
| WEATHER_SUNNY | | WEATHER_SUNNY | ||
− | | [ | + | | [[File:VC Weather-0.jpg|120px]] |
|- | |- | ||
| 1 | | 1 | ||
| WEATHER_CLOUDY | | WEATHER_CLOUDY | ||
− | | [ | + | | [[File:VC Weather-1.jpg|120px]] |
|- | |- | ||
| 2 | | 2 | ||
| WEATHER_RAINY | | WEATHER_RAINY | ||
− | | [ | + | | [[File:VC Weather-2.jpg|120px]] |
|- | |- | ||
| 3 | | 3 | ||
| WEATHER_FOGGY | | WEATHER_FOGGY | ||
− | | [ | + | | [[File:VC Weather-3.jpg|120px]] |
|- | |- | ||
| 4 | | 4 | ||
| WEATHER_EXTRA_SUNNY | | WEATHER_EXTRA_SUNNY | ||
− | | [ | + | | [[File:VC Weather-4.jpg|120px]] |
|- | |- | ||
| 5 | | 5 | ||
| WEATHER_HURRICANE | | WEATHER_HURRICANE | ||
− | | [ | + | | [[File:VC Weather-5.jpg|120px]] |
|- | |- | ||
| 6 | | 6 | ||
Line 159: | Line 150: | ||
| | | | ||
|} | |} | ||
+ | |||
+ | {| | ||
+ | ! San Andreas | ||
+ | ! Liberty City Stories | ||
+ | ! Vice City Stories | ||
+ | ! GTA V | ||
+ | |- | ||
| valign="top" | | | valign="top" | | ||
* [http://hotmist.ddo.jp/id/weather.html Ryosuke's website] | * [http://hotmist.ddo.jp/id/weather.html Ryosuke's website] | ||
Line 247: | Line 245: | ||
{{Incomplete}} | {{Incomplete}} | ||
+ | |||
+ | == Weather lists == | ||
+ | Weather is actually not random in GTA III and Vice City. Every game hour, the games go through the list of weather types to determine the upcoming weather. | ||
+ | |||
+ | === GTA III === | ||
+ | <pre style="width: 20em;"> | ||
+ | 00 00 00 00 00 00 00 00 00 00 00 00 | ||
+ | 00 00 00 00 01 01 02 02 01 00 00 00 | ||
+ | 01 03 03 01 00 00 01 01 00 00 00 00 | ||
+ | 00 00 00 00 01 01 02 02 01 02 01 00 | ||
+ | 00 00 00 00 00 00 00 00 00 03 03 00 | ||
+ | 00 00 02 01 | ||
+ | </pre> | ||
+ | This array for v1.0 starts at 0x5FFBC8 in memory. | ||
+ | |||
+ | === Vice City === | ||
+ | '''No hurricane''' | ||
+ | <pre style="width: 20em;"> | ||
+ | 04 04 04 04 04 04 04 04 00 00 00 04 | ||
+ | 04 04 00 00 00 04 04 04 04 00 00 04 | ||
+ | 04 04 04 04 04 04 04 04 04 04 00 00 | ||
+ | 00 00 00 00 00 00 00 01 02 02 02 02 | ||
+ | 01 00 00 00 00 04 04 04 04 04 04 04 | ||
+ | 04 04 04 04 | ||
+ | </pre> | ||
+ | This array for v1.0 starts at 0x699EE4 in memory. | ||
+ | |||
+ | '''Hurricane''' | ||
+ | <pre style="width: 20em;"> | ||
+ | 04 04 04 04 04 04 04 04 00 00 00 04 | ||
+ | 04 04 00 00 00 04 04 01 05 05 01 00 | ||
+ | 04 04 04 04 04 04 04 04 04 04 00 00 | ||
+ | 00 00 00 00 00 00 00 00 01 05 05 05 | ||
+ | 01 00 00 00 00 04 04 04 04 04 04 04 | ||
+ | 04 04 04 04 | ||
+ | </pre> | ||
+ | This array for v1.0 starts at 0x699F64 in memory. | ||
+ | |||
+ | == Mission script == | ||
+ | {| | ||
+ | | [[01B5]] || {{Icon|t}} || forces the upcoming weather type | ||
+ | |- | ||
+ | | [[01B6]] || {{Icon|t}} || forces the weather type immediately | ||
+ | |- | ||
+ | | [[01B7]] || {{Icon|t}} || releases the forced weather type | ||
+ | |- | ||
+ | | [[0251]] || {{Icon|3}} || stores the weather state | ||
+ | |- | ||
+ | | [[0252]] || {{Icon|3}} || restores the weather state | ||
+ | |- | ||
+ | | [[04F9]] || {{a|r}} | {{Icon|VC}} {{Icon|SA}} || sets the extra colors | ||
+ | |- | ||
+ | | [[04FA]] || {{a|r}} | {{Icon|VC}} {{Icon|SA}} || clears the extra colors | ||
+ | |- | ||
+ | | [[057C]] || {{a|c}} | {{Icon|VC}} || allows hurricane weather | ||
+ | |} | ||
== Tools == | == Tools == | ||
Line 256: | Line 310: | ||
* {{GTAF|255093|Modding timecyc.dat for Vice City}} | * {{GTAF|255093|Modding timecyc.dat for Vice City}} | ||
− | {{N|4|SA|VC}} | + | {{N|4|SA|VC|3}} |
− | [[Category:Map Formats | + | [[Category:Map Formats]] |
Revision as of 20:26, 9 August 2015
Article issues | |||
---|---|---|---|
|
The timecyc.dat data file contains the most important settings about the game's appearance. Basically it stores important information like colors and lighting for different hardcoded weather situations for each time of day. The settings themselves are constant and build a cycle around the whole day. So the exact name of the setting is time cycle.
In Vice City the timecyc.dat
file additionally stores settings for different interior appearances. There are 23 of those extra settings in one extra section (internally called "EXTRACOLOURS"). Each game hour represents one constant setting.
File format
A comment in the timecyc.dat
file is preceded by a series of slashes ("//"). The game's parser simply ignores comments so that the number of uncommented lines must be a multiple of 24 for GTA III and Vice City (representing one for each ingame hour) and a multiple of 8 for San Andreas (representing 00am, 05am, 06am, 07am, 00pm, 07pm, 08pm and 10pm in the order they appear). Each value of one entry gets interpolated with the previous and the next setting of the current ingame weather.
Data types
The file uses the following different data types directly or indirectly on an abstract level inside structures:
- INT8/UINT8 - signed/unsigned 8 bit integer (1 byte)
- INT32/UINT32 - signed/unsigned 32 bit integer (4 byte)
- FLOAT - single precision floating point number (4 byte)
- TColor - UINT8[3] representing the red, green and blue level (in the order they appear) of a color. (3 byte)
File hierarchy
As mentioned above each setting consists out of a constant number of entries separated by whitespaces. The following table lists the entries and their descriptions in the order they appear:
Name | Data type | Description | |||
---|---|---|---|---|---|
X | Static ambience color | TColor | The color of ambient light on map objects (see IPL). | ||
X | Dynamic ambience color | TColor | The color of ambient light on dynamically created objects like pedestrians and vehicles. | ||
X | – | Static ambience blur color | TColor | Blurrig color value for static ambience color. | |
X | – | Dynamic ambience blur color | TColor | Blurrig color value for dynamic ambience color. | |
X | Direct light color | TColor | The color of direct light on dynamicly created objects like pedestriants and vehicles. Present in the timecyc.dat of GTA SA, but not loaded and unused by the game. | ||
X | Sky top color | TColor | The color of the top of the skysphere. | ||
X | Sky bottom color | TColor | The color of the bottom of the skysphere. | ||
X | Sun core color | TColor | The color of the core sprite of the sun. | ||
X | Sun corona color | TColor | The color of the corona sprite of the sun. | ||
X | Sun core size | FLOAT | The size of the core sprite of the sun. | ||
X | Sun corona size | FLOAT | The size of the corona sprite of the sun. | ||
X | Sprite brightness | FLOAT | The the brightness of the above mentioned sprites. | ||
X | Shadow intensity | INT32 | The intensity of the shadows of objects like pedestriants, vehicles or poles. | ||
X | Light shading value | INT32 | Value used for the shading algorithm on pedestirants and vehicles [?]. | ||
X | Pole shading value | INT32 | Shading value for map objects with flag 32768. | ||
X | Far clipping offset | FLOAT | The distance of the far clipping plane from the camera. | ||
X | Fog start offset | FLOAT | The range of the distance fog from the camera. | ||
X | Light on ground | FLOAT | Amount of light on the ground of the sea [?]. | ||
X | Lower clouds color | TColor | Color of the lower clounds. | ||
X | – | Upper clouds top color | TColor | Color of the top of the upper clouds. | |
X | Upper clouds bottom color | TColor | Color of the bottom of the upper clouds. | ||
X | – | Blur color | TColor | The color of trails. | |
X | Water color | TColor | Color of the water vertices. | ||
X | Water alpha level | UINT8 | Alpha level for water vertices. | ||
– | X | Color correction 1 alpha | UINT8 | Alpha level for first color correction value. | |
– | X | Color correction 1 | TColor | First color correction value. | |
– | X | Color correction 2 alpha | UINT8 | Alpha level for second color correction value. | |
– | X | Color correction 2 | TColor | Second color correction value. | |
– | X | Lower clouds alpha level | UINT8 | Alpha level for lower clouds. | |
– | X | Upper clouds alpha level | UINT8 | Alpha level for upper clouds. | |
– | X | Water fading to white, amount of white light on water | UINT8 | Usually 0. |
Timecycp.dat
Timecycp is a version of timecyc.dat that came alongside the regular time cycle configuration file. Similar to the water1.dat file it is a leftover from the original PlayStation 2 version of San Andreas. The file isn't used by the game and can safely be deleted. The only difference to the actual file is the encoding method. However its content is the same, apart from an additional character lighting setting that was absent on the PC version. Replacing the timecyc.dat with timecycp.dat by renaming the files, as stated above, will result in improved ped lighting. Other than that the game's ambient lighting and sky colours still remain the same.
Weather types
GTA III
Type | Enum | Image |
---|---|---|
0 | WEATHER_SUNNY | |
1 | WEATHER_CLOUDY | |
2 | WEATHER_RAINY | |
3 | WEATHER_FOGGY |
Vice City
Type | Enum | Image |
---|---|---|
0 | WEATHER_SUNNY | |
1 | WEATHER_CLOUDY | |
2 | WEATHER_RAINY | |
3 | WEATHER_FOGGY | |
4 | WEATHER_EXTRA_SUNNY | |
5 | WEATHER_HURRICANE | |
6 | WEATHER_EXTRA_COLOURS |
San Andreas | Liberty City Stories | Vice City Stories | GTA V | ||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
This section is incomplete. You can help by fixing and expanding it.
Weather lists
Weather is actually not random in GTA III and Vice City. Every game hour, the games go through the list of weather types to determine the upcoming weather.
GTA III
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 02 02 01 00 00 00 01 03 03 01 00 00 01 01 00 00 00 00 00 00 00 00 01 01 02 02 01 02 01 00 00 00 00 00 00 00 00 00 00 03 03 00 00 00 02 01
This array for v1.0 starts at 0x5FFBC8 in memory.
Vice City
No hurricane
04 04 04 04 04 04 04 04 00 00 00 04 04 04 00 00 00 04 04 04 04 00 00 04 04 04 04 04 04 04 04 04 04 04 00 00 00 00 00 00 00 00 00 01 02 02 02 02 01 00 00 00 00 04 04 04 04 04 04 04 04 04 04 04
This array for v1.0 starts at 0x699EE4 in memory.
Hurricane
04 04 04 04 04 04 04 04 00 00 00 04 04 04 00 00 00 04 04 01 05 05 01 00 04 04 04 04 04 04 04 04 04 04 00 00 00 00 00 00 00 00 00 00 01 05 05 05 01 00 00 00 00 04 04 04 04 04 04 04 04 04 04 04
This array for v1.0 starts at 0x699F64 in memory.
Mission script
01B5 | forces the upcoming weather type | |
01B6 | forces the weather type immediately | |
01B7 | releases the forced weather type | |
0251 | stores the weather state | |
0252 | restores the weather state | |
04F9 | sets the extra colors | |
04FA | clears the extra colors | |
057C | allows hurricane weather |
Tools
External links
- GTAForums: Modding timecyc.dat for Vice City
Grand Theft Auto IV | |
---|---|
File Formats | .dat • .gxt • .ide • .img • .ipl • .nod • .sco • .rpf • .rrr • .wad • .wbd/.wbn • .wdd • .wdr • .wft • .whm • .wpl • .wtd |
Documentation | Audio • Bink Video • Cryptography • Cutscenes • GXT Text • Image listing • Keycodes • Map Listing • Native functions • Paths • Radar Blips • Radio Stations • Saves • Scenarios • VTable • Weapons |
Tools | ASI Loader • ENBSeries • G-Texture • GIMS IV • Ingame WPL Editor • IV Needle • OpenIV • SparkIV • XLiveLess • WPL Manager • X Mod Installer Alice • C++ Script Hook • .NET Script Hook • Scocl |
Tutorials | Importing Textures with OpenIV • Importing Textures with SparkIV |
Modifications | GTA Connected • Gostown IV • Four Multiplayer • IV Multiplayer • CitizenMP:IV Reloaded |
Useful links | Community portal • Discussion forums • Modding forums • Mods on GTAGarage.com |