GRGE: Difference between revisions

No edit summary
(contributions from myself and LINK2012)
 
Line 1: Line 1:
{{IplSection
{{IplSection
| game        = [[Grand Theft Auto: San Andreas|GTA SA]], [[Grand Theft Auto: Liberty City Stories|GTA LCS]], [[Grand Theft Auto: Vice City Stories|GTA VCS]] <!--- GTA IV?! well at least it DOES check for this section to exist --->
| game        = {{Icon-square|SA}} {{Icon-square|4}}
| description = Creates a garage
| description = Creates a garage
}}
}}
'''GRGE''' is one of the plain-text [[Item Placement|IPL]] sections, introduced with [[Grand Theft Auto: San Andreas|San Andreas]]. It replaces the previously used opcodes [[0219]], [[03BB]] and [[057A]]. It creates an invisible cube which interacts as a [[garage]]. Each garage can be used differently, for example by the [[script]].
'''GRGE''' is a section in the item placement file in [[Grand Theft Auto: San Andreas]] and [[Grand Theft Auto IV]]. It creates an invisible cube which interacts as a [[garage]]. The section replaces some functions that were controlled through the script in previous games, like opcodes 0219, 03BB and 057A.


== San Andreas Format ==
== Format ==
The format itself is easy, but understanding it seems hard. However the position values are pretty flexible and you can describe one garage in multiple ways.
<pre>
grge
PosX, PosY, PosZ, LineX, LineY, CubeX, CubeY, CubeZ, Flag, Type, Name
end
</pre>


PosX, PosY, PosZ, LineX, LineY, CubeX, CubeY, CubeZ, DoorType, GarageType, Name
{|class="wikitable center-col-1 center-col-2" style="width: 100%;"
 
!style="width: 3em;" |{{Icon-square|SA}}
{|class="prettytable" width="100%" class="collapsible"
!style="width: 12em;" |Identifier
!width="250px"|Identifier
!style="width: 6em;" |Type
!Description
!Description
|-
|-
|<center>PosX, PosY, PosZ</center>||A coordinate of one of the corner marks
|A,B,C ||PosX, PosY, PosZ ||float[3] ||A coordinate of one of the corner marks
|-
|D,E ||LineX, LineY ||float[2] ||Those values are [[Wikipedia:Euclidean_vector#Addition_and_subtraction|added]] to the first position values. They define one edge of the box
|-
|F,G,H ||CubeX, CubeY, CubeZ ||float[3] ||Another world coordinate. Together with the abstract line created with the first 5 coordinates this forms a cube in the world.
|-
|-
|<center>LineX, LineY</center>||Those values are [[:wp:Euclidean_vector#Addition_and_subtraction|added]] to the first position values. They define one edge of the box
|I ||Flags ||integer ||The garage behaviour ([[#Garage flags|see below]])
|-
|-
|<center>CubeX, CubeY, CubeZ</center>||Another world coordinate. Together with the abstract line created with the first 5 coordinates this forms a cube in the world.
|J ||Type ||integer ||The [[Garage#San Andreas|garage type]]
|-
|-
|<center>DoorType</center>||The type of the door
|K ||Name ||string ||The [[Garage#San Andreas 2|garage name]], a string which is used to manipulate the behaviour of garages through the <code>[[main.scm]]</code>
|}
 
=== Garage flags ===
{|class="wikitable"
! Flag
! Description
|-
|-
|<center>GarageType</center>||The type of the garage{{ref|1}}
| 0x1
| door opens up and rotate
|-
|-
|<center>Name</center>||A string which is used to manipulate the garages behaviour through the <code>[[main.scm]]</code>{{ref|2}}
| 0x2
| door goes in
|-
|-
| 0x4
| camera follow players
|}
|}
Sum the flags to mix them


=== Types of doors ===
Flag combination and their results:
{|class="prettytable"
{|class="wikitable"
! Flag
! Flag
! Description
! Description
Line 55: Line 74:
|}
|}


== Notes ==
=== Garage Doors ===
The garage door only opens if the [[IDE#Object_Flags|IDE]] flag value of the door is 2048 and the door is defined in the <code>object.dat</code> file.
The garage door only opens if the [[IDE#Object_Flags|IDE]] flag value of the door is 2048 and the door is defined in the <code>object.dat</code> file.


=== Notes ===
Garage doors are very important for the camera rotation. They control how the camera moves after you have entered a garage. If your camera moves wrong, then simply rotate the pivot of your garage door, map the new one and rotate it until it fits with the rotation you want. Then test if the camera moves correctly in-game.
Garage doors are very important for the camera rotation. They control how the camera moves after you have entered a garage. If your camera moves wrong, then simply rotate the pivot of your garage door, map the new one and rotate it until it fits with the rotation you want. Then test if the camera moves correctly in-game.


Line 65: Line 85:
*  [[Garage#San_Andreas|Garage types (SA)]]
*  [[Garage#San_Andreas|Garage types (SA)]]
*  [[Garage#San_Andreas_2|List of all default garage names (SA)]]
*  [[Garage#San_Andreas_2|List of all default garage names (SA)]]
{{gtasa}}


{{fdl}}
{{fdl}}

Latest revision as of 20:27, 30 June 2018

GRGE (IPL section)
Supported games:GTA San Andreas GTA IV
Short description:Creates a garage
IPL Sections:
AUZO CARS CULL ENEX GRGE INST
JUMP MULT OCCL PATH PICK TCYC

GRGE is a section in the item placement file in Grand Theft Auto: San Andreas and Grand Theft Auto IV. It creates an invisible cube which interacts as a garage. The section replaces some functions that were controlled through the script in previous games, like opcodes 0219, 03BB and 057A.

Format

grge
PosX, PosY, PosZ, LineX, LineY, CubeX, CubeY, CubeZ, Flag, Type, Name
end
GTA San Andreas Identifier Type Description
A,B,C PosX, PosY, PosZ float[3] A coordinate of one of the corner marks
D,E LineX, LineY float[2] Those values are added to the first position values. They define one edge of the box
F,G,H CubeX, CubeY, CubeZ float[3] Another world coordinate. Together with the abstract line created with the first 5 coordinates this forms a cube in the world.
I Flags integer The garage behaviour (see below)
J Type integer The garage type
K Name string The garage name, a string which is used to manipulate the behaviour of garages through the main.scm

Garage flags

Flag Description
0x1 door opens up and rotate
0x2 door goes in
0x4 camera follow players

Sum the flags to mix them

Flag combination and their results:

Flag Description
1 door opens up and out, camera remotely follows player
2 door opens straight up, camera remotely follows player
3 door opens up and in, camera remotely follows player
4 door opens straight up, camera follows player
5 door opens up and out, camera follows player
6 door opens straight up, camera follows player
7 door opens up and in, camera follows player

Notes

Garage Doors

The garage door only opens if the IDE flag value of the door is 2048 and the door is defined in the object.dat file.

Garage doors are very important for the camera rotation. They control how the camera moves after you have entered a garage. If your camera moves wrong, then simply rotate the pivot of your garage door, map the new one and rotate it until it fits with the rotation you want. Then test if the camera moves correctly in-game.

If you have not mapped a garage door the camera will move to the west, which corresponds to a garage door rotation of 0 degrees around the z axis.

See also

Copyrighted

This page is licensed under the GNU Free Documentation Licence. This page has a separate license to the CC-BY-SA that applies to most of Grand Theft Wiki.

The full text of the GNU FDL v1.2 is here. Click the "History" button to see the full list of authors. See Grand Theft Wiki:Copyright for more detail on our copyright policy.

GNU Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
See Grand Theft Wiki:Copyright for more information.