Difference between revisions of "CARS (IPL Section)"

From GTAMods Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
{{This|descripes the usage of the CARS section inside a plain text [[IPL]]. For the definition of vehicle models see [[CARS (IDE Section)]]}}
+
{{This|describes the usage of the CARS section inside a plain text [[IPL]]. For the definition of vehicle models see [[CARS (IDE Section)]]}}
 
{{IplSection
 
{{IplSection
 +
|name        = CARS
 
|game        = [[GTA SA]], [[GTA IV]]
 
|game        = [[GTA SA]], [[GTA IV]]
|description = Creates a [[IPL]] parked car generator
+
|description = Creates a parked car generator
 
}}
 
}}
 
+
The '''CARS''' section is a simplified method to create parked cars. Usually parked cars are created by the [[script]]s, but just as [[JUMP|unique stunt jumps]] they can be separated and written inside plain text or [[binary IPL]]s. Since parked car generators are related to [[savegame]]s{{ref|1}} a new game must be started before they are applied to the game. It is possible to create parked car generators without starting a new game using [[CLEO]]{{ref|2}}.
The '''CARS''' section is a simplified method to create parked cars. Usually parked cars are created by the [[SCM|Script]], but just as [[JUMP|unique stunt jumps]] they can be seperated and written inside plain text or [[Binary IPL|binary]] [[IPL]]s. Since parked car generators are related into [[Saves_(GTA_SA)#Block_12:_Car_Generators|savegames]] a new game must be started before they are applied to the game. It is possible to create parked car generators without starting a new game using [[CLEO]].{{ref|1}}
 
  
 
== Format ==
 
== Format ==
Line 11: Line 11:
 
''CARS'' or parked car generators are used to place permanently, randomly or limited cars which are placed (parked) around the world. For this they need a position, a rotation, information about which car should be placed, the car's colors and some additional information.
 
''CARS'' or parked car generators are used to place permanently, randomly or limited cars which are placed (parked) around the world. For this they need a position, a rotation, information about which car should be placed, the car's colors and some additional information.
  
=== GTA San Andreas ===
+
=== San Andreas ===
  
 
<pre>PosX, PosY, PosZ, Angle, CarID, PrimCol, SecCol, ForceSpawn, Alarm, DoorLock, Unknown1, Unknown2</pre>
 
<pre>PosX, PosY, PosZ, Angle, CarID, PrimCol, SecCol, ForceSpawn, Alarm, DoorLock, Unknown1, Unknown2</pre>
Line 44: Line 44:
 
{{Research}}
 
{{Research}}
  
==Script representation==
+
== Scripts ==
  
 +
=== [[Opcode]]s ===
 
* [[014B]] &ndash; Creates a parked car generator in [[SCM]]
 
* [[014B]] &ndash; Creates a parked car generator in [[SCM]]
 
* [[014C]] &ndash; Sets the flags for the parked car generator.
 
* [[014C]] &ndash; Sets the flags for the parked car generator.
 
* [[09E2]] &ndash; Creates a parked car generator where the car has a special numplate text.
 
* [[09E2]] &ndash; Creates a parked car generator where the car has a special numplate text.
* [[0A17]] &ndash; Identifies a parked car generator to be owned by the player
+
* [[0A17]] &ndash; Sets a parked car generator as owned by the player
  
<!--- ToDo: GTA IV native functions! --->
+
=== [[Native function]]s ===
{{Incomplete}}
+
* [[CREATE_CAR_GENERATOR]]
 +
* [[CREATE_CAR_GENERATOR_WITH_PLATE]]
 +
* [[CREATE_CARS_ON_GENERATORS_IN_AREA]]
 +
* [[DELETE_CAR_GENERATOR]]
 +
* [[DISABLE_CAR_GENERATORS]]
 +
* [[DISABLE_CAR_GENERATORS_WITH_HELI]]
 +
* [[FORCE_GENERATE_PARKED_CARS_TOO_CLOSE_TO_OTHERS]]
 +
* [[IS_OUR_PLAYER_HIGHER_PRIORITY_FOR_CAR_GENERATION]]
 +
* [[REMOVE_CARS_FROM_GENERATORS_IN_AREA]]
 +
* [[SET_ALL_CAR_GENERATORS_BACK_TO_ACTIVE]]
 +
* [[SET_CAR_GENERATORS_ACTIVE_IN_AREA]]
 +
* [[SET_HAS_BEEN_OWNED_FOR_CAR_GENERATOR]]
 +
* [[SWITCH_CAR_GENERATOR]]
  
==See also==
+
== References ==
* {{note|1}} [[Car_Spawn|Creating a parked car generator]] using SCM.
+
{{note|1}} {{Icon|SA}} [[Saves_(GTA_SA)#Block_12:_Car_Generators|Car generators in save files]]<br>
 +
{{note|2}} {{Icon|SA}} [[Car_Spawn|Creating a parked car generator]] via scripts.
  
==External Link==
+
== External Link ==
 
* {{GTAF|202532|Documentation of San Andreas IPL file format}}
 
* {{GTAF|202532|Documentation of San Andreas IPL file format}}
  

Revision as of 12:15, 19 April 2009

describes the usage of the CARS section inside a plain text IPL. For the definition of vehicle models see CARS (IDE Section)
CARS (IPL section)
Short description:Creates a parked car generator
Supported games:GTA SA, GTA IV
IPL Sections:
2DFX AUZO BLOK CARS CULL ENEX GRGE
INST JUMP LINK LODM MLO+ MULT OCCL
PATH PICK RTFX SLOW TCYC VNOD ZONE

The CARS section is a simplified method to create parked cars. Usually parked cars are created by the scripts, but just as unique stunt jumps they can be separated and written inside plain text or binary IPLs. Since parked car generators are related to savegames[1] a new game must be started before they are applied to the game. It is possible to create parked car generators without starting a new game using CLEO[2].

Format

CARS or parked car generators are used to place permanently, randomly or limited cars which are placed (parked) around the world. For this they need a position, a rotation, information about which car should be placed, the car's colors and some additional information.

San Andreas

PosX, PosY, PosZ, Angle, CarID, PrimCol, SecCol, ForceSpawn, Alarm, DoorLock, Unknown1, Unknown2
Identifier Description
PosX, PosY, PosZ
The real world coordinates of the car as floating point values.
Angle
The angle of the car in dagrees.
CarID
The ID number of the car as defined in the IDE or -1 for random car parks (influened by the popcycle.dat file)
PrimCol, SecCol
A car color defined in the carcols.dat file. If it is set to -1 the color will be randomly choosed.
ForceSpawn
Vehicles spawn more reliably if this is 1.
Alarm
The probability of triggering the alarm system (0 - 100).
DoorLock
The propability that the doors of the vehicle is locked (0 - 100).
Unknown1, Unknown2
Unknown (Zero).

Binary format

This section is incomplete. You can help by fixing and expanding it.

GTA IV

Scripts

Opcodes

  • 014B – Creates a parked car generator in SCM
  • 014C – Sets the flags for the parked car generator.
  • 09E2 – Creates a parked car generator where the car has a special numplate text.
  • 0A17 – Sets a parked car generator as owned by the player

Native functions

References

^ San Andreas Car generators in save files
^ San Andreas Creating a parked car generator via scripts.

External Link