Difference between revisions of "Native function"

From GTAMods Wiki
Jump to navigation Jump to search
(GTA V)
 
(One intermediate revision by one other user not shown)
Line 5: Line 5:
  
 
== GTA V ==
 
== GTA V ==
[[GTA V]] features [[List of native functions (GTA V)|~4500 natives]] and almost all of these functions are in use in the original game scripts, this means that while building game's main executable only the natives required by the scripts are included (IV scripts were using only 2/3 of them). There is no original native name list in GTA V, name hashes were used instead.
+
[[GTA V]] features [[List of native functions (GTA V)|~5200 natives]] and almost all of these functions are in use in the original game scripts, this means that while building game's main executable only the natives required by the scripts are included (IV scripts were using only 2/3 of them). There is no original native name list in GTA V, name hashes were used instead.
 +
 
 +
GTA V PC version has native hashes replaced with random 64-bit values, which may differ between patches.
  
 
== See also ==
 
== See also ==
* [[Scocl]] - an SCO compiler for GTA IV by {{U|Alexander Blade}}
+
* {{Icon|4}} [[Scocl]] - an SCO compiler for GTA IV by {{U|Alexander Blade}}
  
 
==External links ==
 
==External links ==

Latest revision as of 17:46, 6 June 2015

A native function is a one of the functions exposed by the RAGE engine to be called from a script. Comparing to the SCM engine from previous GTA 3D series, which used thousands of opcodes assigned for commands both handling the scripts and performing the in-game tasks (such as manipulating peds, vehicles, displaying texts, etc), RAGE has less than 100 opcodes only to handle the scripts itself. To retrieve the data and make any change in the game's world, a SCO script invokes an appropriate native function using a special opcode.

GTA IV

There are something like ~3000 of natives in GTA IV. Their names are stored in the game's executable file until 1.0.4.0 patch, they was replaced with their hashes from 1.0.7.0 patch.

GTA V

GTA V features ~5200 natives and almost all of these functions are in use in the original game scripts, this means that while building game's main executable only the natives required by the scripts are included (IV scripts were using only 2/3 of them). There is no original native name list in GTA V, name hashes were used instead.

GTA V PC version has native hashes replaced with random 64-bit values, which may differ between patches.

See also

External links