Difference between revisions of ".patch"

From GTAMods Wiki
Jump to navigation Jump to search
(Created page with "'''.patch''' files are used in GTA V to update .meta files during game load. The file name of the .patch file (without extension) will match the file name of the .met...")
 
(updated link and added a note of the format being unused)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
'''.patch''' files are used in GTA V to update [[META|.meta]] files during game load. The file name of the .patch file (without extension) will match the file name of the .meta file (without extension) it patches. Patches are XML formatted text files and can be edited with any text editor.
+
'''.patch''' files are exclusively used in the PS3 and X360 versions of GTA V to update [[Metadata File|Metadata files]] during game load. The file name of the .patch file (without extension) will match the file name of the Metadata file (without extension) it patches. Patches are XML formatted text files and can be edited with any text editor.
 +
 
 +
This file format has been deprecated in all subsequent game platforms in favor of replacing entire Metadata files through the update package.
  
 
==Item==
 
==Item==

Latest revision as of 12:26, 27 August 2024

.patch files are exclusively used in the PS3 and X360 versions of GTA V to update Metadata files during game load. The file name of the .patch file (without extension) will match the file name of the Metadata file (without extension) it patches. Patches are XML formatted text files and can be edited with any text editor.

This file format has been deprecated in all subsequent game platforms in favor of replacing entire Metadata files through the update package.

Item

The <Item > </Item> brackets define what is being patched and inside the brackets is the parameter that will be patched.

Verb

Verb is how the patch will place what it's changing

Value:
PUT = Overwrite existing parameter.
POST = Create new parameter.

URI

The URI is used to define exactly what parameter in the .meta file is going to be patched. Example URI:

uri="weaponShopItems/1/weaponComponents/1/cost"
	    (A)	    (B)	     (C)       (D) (E)

(A) here refers the weaponShopItems sections of a .meta file

(B) is the number of (A) sections, starting at 0. So this is referring to the 2nd weaponShopItems section.

(C) refers to the weaponComponents sections within the 2nd weaponShopItems section.

(D) is the number of (C) sections. So this is referring to the 2nd weaponComponents inside the 2nd weaponShopItems section.

(E) is the parameter name.

Using .patches

Below is an example of changing a parameter of the Obey 9F.

Example from vehicles.meta:

<?xml version="1.0" encoding="UTF-8"?>
<CVehicleModelInfo__InitDataList>
  <residentTxd>vehshare</residentTxd>
  <residentAnims />
  <InitDatas>
    <Item>
      <modelName>ninef</modelName>
      <txdName>ninef</txdName>
      <handlingId>NINEF</handlingId>
      <gameName>NINEF</gameName>
      ...

Example of a patch for vehicles.meta:

	<Item verb="PUT" uri="InitDatas/0/handlingId">Cheetah</Item>

This patch will change the very first InitDatas handlingID parameter (the hardtop 9F) so that it will use the Cheetah handling name in handling.meta.