Carrec — различия между версиями

Материал из GTAModding.ru
Перейти к: навигация, поиск
 
(не показана 1 промежуточная версия 1 участника)
Строка 1: Строка 1:
==Описание==
+
{{Перевод}}
 
+
 
carrec.img - это архив, который хранит множество R3 файлов(файлы с расширением .rrr). Эти файлы содержат информацию о путях транспортного средства, которые используются для катсцен GTA SA и GTA 4.
 
carrec.img - это архив, который хранит множество R3 файлов(файлы с расширением .rrr). Эти файлы содержат информацию о путях транспортного средства, которые используются для катсцен GTA SA и GTA 4.
 
GTA SA использует 426 .rrr файлов. Лимит количества использования этих файлов в игре, составляет 475.  
 
GTA SA использует 426 .rrr файлов. Лимит количества использования этих файлов в игре, составляет 475.  
  
В GTA 4, .rrr файлы расположены в директорий Grand Theft Auto IV/common/data/paths/
+
.rrr файлы в GTA IV расположены в директорий Grand Theft Auto IV/common/data/paths/
 +
 
 +
== Структура RRR файла ==
 +
Each RRR file contains no header, only a binary data, being a set of structures of 32 bytes in length each, described separate path points. The data in a path point structure goes as the following:
 +
 
 +
{|{{Таблица}}
 +
!Offset
 +
!Size (in bytes)
 +
!Type
 +
!Description
 +
!Notes
 +
|-
 +
|00||04||INT32||time||Timekey in milliseconds
 +
|-
 +
|04||02||INT16||velocity in direction X||Divide by 16383.5 to get floating point values
 +
|-
 +
|06||02||INT16||velocity in direction Y||Divide by 16383.5 to get floating point values
 +
|-
 +
|08||02||INT16||velocity in direction Z||Divide by 16383.5 to get floating point values
 +
|-
 +
|10||01||INT8||XYZ.right.x||Divide by 127.0 to get floating point values
 +
|-
 +
|11||01||INT8||XYZ.right.y||Divide by 127.0 to get floating point values
 +
|-
 +
|12||01||INT8||XYZ.right.z||Divide by 127.0 to get floating point values
 +
|-
 +
|13||01||INT8||XYZ.top.x||Divide by 127.0 to get floating point values
 +
|-
 +
|14||01||INT8||XYZ.top.y||Divide by 127.0 to get floating point values
 +
|-
 +
|15||01||INT8||XYZ.top.z||Divide by 127.0 to get floating point values
 +
|-
 +
|16||01||INT8||Steering Angle||Divide by 20.0 to get floating point values
 +
|-
 +
|17||01||INT8||Gas Pedal Power||Divide by 100.0 to get floating point values
 +
|-
 +
|18||01||INT8||Brake Pedal Power||Divide by 100.0 to get floating point values
 +
|-
 +
|19||01||INT8||Handbrake used flag||Bool: 1 = true, 0 = false
 +
|-
 +
|20||04||FLOAT||XYZ.pos.x||[[Wikipedia:IEEE_754|Standard float]]
 +
|-
 +
|24||04||FLOAT||XYZ.pos.y||Standard float
 +
|-
 +
|28||04||FLOAT||XYZ.pos.z||Standard float
 +
|}
 +
 
 +
When the vehicle is moving along the path, its XYZ structure is filled with the information from the proper fields of checkpoint data.
 +
 
 +
==Mission Script==
 +
===San Andreas===
 +
You can use the following opcodes to do stuff to your paths.<br>
 +
[[07C0]] - Loads the path<br>
 +
[[07C1]] - Checks if the path has been loaded<br>
 +
[[0873]] - Releases the path from memory<br>
 +
[[05EB]] - Assigns a vehicle to the path<br>
 +
[[0705]] - Assigns a vehicle to the path<br>
 +
[[085E]] - Assigns a vehicle to a looped path<br>
 +
[[05EC]] - Releases the vehicle from a path<br>
 +
[[05ED]] - Freezes the vehicle along the path<br>
 +
[[05EE]] - Unfreezes the vehicle along the path<br>
 +
[[06FD]] - Sets the speed multiplier of the vehicle along the path<br>
 +
[[0706]] - Advances the vehicle along the path<br>
 +
[[060E]] - Checks if a path is assigned to the vehicle<br>
 +
If you load a non-existant path to a vehicle, path 1 will be loaded instead.
 +
 
 +
===GTA 4===
 +
Use the following [[native function]]s:<br>
 +
[[REQUEST_CAR_RECORDING]]<br>
 +
[[HAS_CAR_RECORDING_BEEN_LOADED]]<br>
 +
[[REMOVE_CAR_RECORDING]]<br>
 +
[[FIND_POSITION_IN_RECORDING]]<br>
 +
[[FIND_TIME_POSITION_IN_RECORDING]]<br>
 +
[[GET_POSITION_OF_CAR_RECORDING_AT_TIME]]<br>
 +
[[GET_TOTAL_DURATION_OF_CAR_RECORDING]]<br>
 +
[[SET_RECORDING_TO_POINT_NEAREST_TO_COORS]]<br>
 +
[[SYNCH_RECORDING_WITH_WATER]]<br>
 +
 
 +
== List of paths in San Andreas==
 +
{{Таблица}}
 +
 
 +
The following is a list of paths defined in the <code>carrec.img</code> file.
 +
{| {{Таблица}} class="collapsible"
 +
! ID
 +
! Description
 +
|-
 +
| 1
 +
| Driving School The 360
 +
|-
 +
| 2
 +
| Driving School The 180
 +
|-
 +
| 3
 +
| Unused Driving School unknown test
 +
|-
 +
| 4
 +
| Driving School Whip and Terminate
 +
|-
 +
| 5
 +
| Driving School Pop and Control
 +
|-
 +
| 7
 +
| Driving School Burn and Lap
 +
|-
 +
| 9
 +
| Driving School Cone Coil
 +
|-
 +
| 10
 +
| Driving School The '90'
 +
|-
 +
| 11
 +
| Driving School Wheelie Weave
 +
|-
 +
| 13
 +
| Driving School Spin and Go
 +
|-
 +
| 14
 +
| Driving School P. I. T. Maneuver
 +
|-
 +
| 15
 +
| Driving School Alley Oop
 +
|-
 +
| 16
 +
| Driving School City Slicking
 +
|-
 +
| 21
 +
| Unused Test Drive Cesar's Savanna, most likely used in beta version of game
 +
|-
 +
| 22
 +
| House Party Sweet's Greenwod
 +
|-
 +
| 23
 +
| House Party GSF's Voodoo
 +
|-
 +
| 24
 +
| Unused path, could have been used in Big Smoke, most likely used in beta version of game
 +
|-
 +
| 25
 +
| The Da Nang Thang Triad's Maverick
 +
|-
 +
| 27
 +
| Pier 69 enemy's Pony
 +
|-
 +
| 28
 +
| Pier 69 Toreno's helicopter
 +
|-
 +
| 30
 +
| OG Loc Freddy's PCJ 600 path 1 (beginning)
 +
|-
 +
| 31
 +
| OG Loc Freddy's PCJ 600 path 2
 +
|-
 +
| 32
 +
| OG Loc Freddy's PCJ 600 path 3
 +
|-
 +
| 33
 +
| OG Loc Freddy's PCJ 600 path 4
 +
|-
 +
| 34
 +
| OG Loc Freddy's PCJ 600 path 5
 +
|-
 +
| 35
 +
| OG Loc Freddy's PCJ 600 path 6
 +
|-
 +
| 36
 +
| OG Loc Freddy's PCJ 600 path 7
 +
|-
 +
| 37
 +
| OG Loc Freddy's PCJ 600 path 8
 +
|-
 +
| 38
 +
| OG Loc Freddy's PCJ 600 path 9
 +
|-
 +
| 39
 +
| OG Loc Freddy's PCJ 600 path 10
 +
|-
 +
| 40
 +
| OG Loc Freddy's PCJ 600 path 11 (end)
 +
|-
 +
| 41
 +
| unused Los Santos to San Fierro AT 400, most likely used in beta version of game
 +
|-
 +
| 42
 +
| Los Santos to San Fierro AT 400
 +
|-
 +
| 43
 +
| Las Venturas to San Fierro AT 400
 +
|-
 +
| 44
 +
| San Fierro to Las Venturas AT 400
 +
|-
 +
| 46
 +
| Los Santos to Las Venturas AT 400
 +
|-
 +
| 48
 +
| Las Venturas to Los Santos AT 400
 +
|-
 +
| 49
 +
| San Fierro to Los Santos AT 400
 +
|-
 +
| 50
 +
| OG Loc highway NPC 1
 +
|-
 +
| 51
 +
| OG Loc highway NPC 2
 +
|-
 +
| 52
 +
| OG Loc highway NPC 3
 +
|-
 +
| 53
 +
| OG Loc highway NPC 4
 +
|-
 +
| 54
 +
| OG Loc highway NPC 5
 +
|-
 +
| 55
 +
| OG Loc highway NPC 6
 +
|-
 +
| 56
 +
| OG Loc highway NPC 7
 +
|-
 +
| 57
 +
| OG Loc highway NPC 8
 +
|-
 +
| 58
 +
| OG Loc highway NPC 9
 +
|-
 +
| 59
 +
| OG Loc highway NPC 10
 +
|-
 +
| 60
 +
| OG Loc highway NPC 11
 +
|-
 +
| 65
 +
| Test Drive Cesar's Elegy path enter alley
 +
|-
 +
| 66
 +
| Test Drive cop 1 path enter alley
 +
|-
 +
| 67
 +
| Test Drive cop 2 path enter alley
 +
|-
 +
| 70
 +
| Test Drive Tram path 1
 +
|-
 +
| 71
 +
| Test Drive outside Otto's Autos NPC 1
 +
|-
 +
| 72
 +
| Test Drive outside Otto's Autos NPC 2
 +
|-
 +
| 73
 +
| Test Drive outside Otto's Autos NPC 3
 +
|-
 +
| 74
 +
| Test Drive outside Otto's Autos NPC 4
 +
|-
 +
| 75
 +
| Test Drive outside Otto's Autos NPC 5
 +
|-
 +
| 76
 +
| Test Drive outside Otto's Autos NPC 6
 +
|-
 +
| 77
 +
| Test Drive Tram path 2
 +
|-
 +
| 78
 +
| Test Drive Tram path 3
 +
|-
 +
| 79
 +
| Test Drive Cesar's Elegy path 1
 +
|-
 +
| 80
 +
| Test Drive Tram path 3
 +
|-
 +
| 81
 +
| Test Drive Cesar's Elegy path 2
 +
|-
 +
| 82
 +
| Unused Test Drive path
 +
|}
 +
 
 +
More to come soon. The last ID is 834.
 +
 
 +
== Внешние ссылки ==
  
 
{{SA-navi}}
 
{{SA-navi}}
 
[[Категория:GTA_SA]][[Категория:GTA_4]]
 
[[Категория:GTA_SA]][[Категория:GTA_4]]

Текущая версия на 15:59, 29 мая 2012

GlobeLang.png Эта статья требует полного или частичного перевода.
Часть этой статьи написана на иностранном языке. Если вы знаете его, пожалуйста, помогите с ее переводом на русский язык.

carrec.img - это архив, который хранит множество R3 файлов(файлы с расширением .rrr). Эти файлы содержат информацию о путях транспортного средства, которые используются для катсцен GTA SA и GTA 4. GTA SA использует 426 .rrr файлов. Лимит количества использования этих файлов в игре, составляет 475.

.rrr файлы в GTA IV расположены в директорий Grand Theft Auto IV/common/data/paths/

Содержание

Структура RRR файла

Each RRR file contains no header, only a binary data, being a set of structures of 32 bytes in length each, described separate path points. The data in a path point structure goes as the following:

Offset Size (in bytes) Type Description Notes
00 04 INT32 time Timekey in milliseconds
04 02 INT16 velocity in direction X Divide by 16383.5 to get floating point values
06 02 INT16 velocity in direction Y Divide by 16383.5 to get floating point values
08 02 INT16 velocity in direction Z Divide by 16383.5 to get floating point values
10 01 INT8 XYZ.right.x Divide by 127.0 to get floating point values
11 01 INT8 XYZ.right.y Divide by 127.0 to get floating point values
12 01 INT8 XYZ.right.z Divide by 127.0 to get floating point values
13 01 INT8 XYZ.top.x Divide by 127.0 to get floating point values
14 01 INT8 XYZ.top.y Divide by 127.0 to get floating point values
15 01 INT8 XYZ.top.z Divide by 127.0 to get floating point values
16 01 INT8 Steering Angle Divide by 20.0 to get floating point values
17 01 INT8 Gas Pedal Power Divide by 100.0 to get floating point values
18 01 INT8 Brake Pedal Power Divide by 100.0 to get floating point values
19 01 INT8 Handbrake used flag Bool: 1 = true, 0 = false
20 04 FLOAT XYZ.pos.x Standard float
24 04 FLOAT XYZ.pos.y Standard float
28 04 FLOAT XYZ.pos.z Standard float

When the vehicle is moving along the path, its XYZ structure is filled with the information from the proper fields of checkpoint data.

Mission Script

San Andreas

You can use the following opcodes to do stuff to your paths.
07C0 - Loads the path
07C1 - Checks if the path has been loaded
0873 - Releases the path from memory
05EB - Assigns a vehicle to the path
0705 - Assigns a vehicle to the path
085E - Assigns a vehicle to a looped path
05EC - Releases the vehicle from a path
05ED - Freezes the vehicle along the path
05EE - Unfreezes the vehicle along the path
06FD - Sets the speed multiplier of the vehicle along the path
0706 - Advances the vehicle along the path
060E - Checks if a path is assigned to the vehicle
If you load a non-existant path to a vehicle, path 1 will be loaded instead.

GTA 4

Use the following native functions:
REQUEST_CAR_RECORDING
HAS_CAR_RECORDING_BEEN_LOADED
REMOVE_CAR_RECORDING
FIND_POSITION_IN_RECORDING
FIND_TIME_POSITION_IN_RECORDING
GET_POSITION_OF_CAR_RECORDING_AT_TIME
GET_TOTAL_DURATION_OF_CAR_RECORDING
SET_RECORDING_TO_POINT_NEAREST_TO_COORS
SYNCH_RECORDING_WITH_WATER

List of paths in San Andreas

border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 0; border: 1px #aaa solid; border-collapse: collapse;"

The following is a list of paths defined in the carrec.img file.

ID Description
1 Driving School The 360
2 Driving School The 180
3 Unused Driving School unknown test
4 Driving School Whip and Terminate
5 Driving School Pop and Control
7 Driving School Burn and Lap
9 Driving School Cone Coil
10 Driving School The '90'
11 Driving School Wheelie Weave
13 Driving School Spin and Go
14 Driving School P. I. T. Maneuver
15 Driving School Alley Oop
16 Driving School City Slicking
21 Unused Test Drive Cesar's Savanna, most likely used in beta version of game
22 House Party Sweet's Greenwod
23 House Party GSF's Voodoo
24 Unused path, could have been used in Big Smoke, most likely used in beta version of game
25 The Da Nang Thang Triad's Maverick
27 Pier 69 enemy's Pony
28 Pier 69 Toreno's helicopter
30 OG Loc Freddy's PCJ 600 path 1 (beginning)
31 OG Loc Freddy's PCJ 600 path 2
32 OG Loc Freddy's PCJ 600 path 3
33 OG Loc Freddy's PCJ 600 path 4
34 OG Loc Freddy's PCJ 600 path 5
35 OG Loc Freddy's PCJ 600 path 6
36 OG Loc Freddy's PCJ 600 path 7
37 OG Loc Freddy's PCJ 600 path 8
38 OG Loc Freddy's PCJ 600 path 9
39 OG Loc Freddy's PCJ 600 path 10
40 OG Loc Freddy's PCJ 600 path 11 (end)
41 unused Los Santos to San Fierro AT 400, most likely used in beta version of game
42 Los Santos to San Fierro AT 400
43 Las Venturas to San Fierro AT 400
44 San Fierro to Las Venturas AT 400
46 Los Santos to Las Venturas AT 400
48 Las Venturas to Los Santos AT 400
49 San Fierro to Los Santos AT 400
50 OG Loc highway NPC 1
51 OG Loc highway NPC 2
52 OG Loc highway NPC 3
53 OG Loc highway NPC 4
54 OG Loc highway NPC 5
55 OG Loc highway NPC 6
56 OG Loc highway NPC 7
57 OG Loc highway NPC 8
58 OG Loc highway NPC 9
59 OG Loc highway NPC 10
60 OG Loc highway NPC 11
65 Test Drive Cesar's Elegy path enter alley
66 Test Drive cop 1 path enter alley
67 Test Drive cop 2 path enter alley
70 Test Drive Tram path 1
71 Test Drive outside Otto's Autos NPC 1
72 Test Drive outside Otto's Autos NPC 2
73 Test Drive outside Otto's Autos NPC 3
74 Test Drive outside Otto's Autos NPC 4
75 Test Drive outside Otto's Autos NPC 5
76 Test Drive outside Otto's Autos NPC 6
77 Test Drive Tram path 2
78 Test Drive Tram path 3
79 Test Drive Cesar's Elegy path 1
80 Test Drive Tram path 3
81 Test Drive Cesar's Elegy path 2
82 Unused Test Drive path

More to come soon. The last ID is 834.

Внешние ссылки

п · о · р
San Andreas Grand Theft Auto: San Andreas
Форматы файлов.col.cfg.cut.dff.dat.fxp.gxt.ide.ifp.img.ipl.rep.rrr.scm.txd.set
Документацияcarcols.datCarrecPed EventsPed TypeАдреса Памяти Функций (SA)Анимация моделей в SAВизуальные эффекты в скриптинге
Загруженные звукиКатсценыНомера оружияРисование на экранеТрюки с меткамиСтатистикаСтруктура аудио в SABeta версия
ИнструментыCLEOCollision File Editor IIENBSeriesG-ToolsGXT EditorIMG ToolPS2 TXD ModPS2 TXD ViewerLimit AdjusterMap EditorPathViewer
San Andreas Audio ToolkitSan Andreas Texture PlacerSanny BuilderTXD WorkshopTXDFuckerXBOX TXD PowerTool
ТуториалыРедактирование аудио в SAИзменение cutsceneDecision MakerПропуск роликовКонвертация автомобилей в SA
Основы маппинга GTA:SAДелаем ломающиеся объектыКонвертирование персонажа в SA2dfx в SanAndreasМоддинг San Andreas v2.0
Новая анимация персонажейУниверсальный солдат (GTA SA)
МодыAlien CityDesign Your Own MissionGTA: UnitedGTA StoriesGTA Berlin
МультиплеерgtaTournamentMulti Theft AutoSan Andreas Multiplayer