User Tools

Site Tools


Sidebar

Translations of this page:
en
packages:version_21

OpenIV Package format – Version 2.1

Summary

OIV Package version 2.1 must be a ZIP archive without password, the compression level is not important.

Files

List of files and folders inside package archive:

assembly.xml
icon.png
content

assembly.xml

Type: XML File
Required: Yes
The main package file, contain metadata, appearance and content description.

icon.png

Type: PNG Image
Required: Optional
The icon representing this mod. Must be exactly 128×128 (px) size.

content

Type: Folder
Required: Yes
Folder with files of mod.

assembly.xml

Root node must be named “package” and must have three required sub nodes: “metadata”, “colors”, “content”.

<?xml version="1.0" encoding="UTF-8"?>
<package version="2.1" id="{12345678-90AB-CDEF-1234-567890ABCDEF}" target="GameId">
    <metadata>
    ...
    </metadata>
    <colors>
    ...
    </colors>
    <content>
    ...
    </content>
</package>

Package attributes

version

Type: Package Version
Required: Yes
Value: “2.1”
The version of package format, always equal “2.1”.

id

Type: GUID
Required: Yes
The unique identifier of the package. Must be unique for each package. The following online services can be used for generation unique GUID:

target

Type: GameId
Required: Yes
The target Game Id. May be one of the following values:

Game GameId
Grand Theft Auto V Five
Grand Theft Auto IV IV
Episodes from Liberty City EFLC
Max Payne 3 Payne

Metadata

The metadata node is contain information about package author, version and package description.

<metadata>
	<name>Package Name</name>
	<version>
		<major>1</major>
		<minor>0</minor>
		<tag>EXAMPLE</tag>
	</version>
	<author>
		<displayName>Author Name</displayName>
		<actionLink>http://example.com/</actionLink>
		<web>http://example.com/</web>
		<facebook>Facebook</facebook>
		<twitter>Twitter</twitter>
		<youtube linkKind="channel">YouTube</youtube>
	</author>
	<description footerLink="http://example.com/" footerLinkTitle="Link title">
		<![CDATA[Description.]]>
	</description>
	<largeDescription displayName="Custom name" footerLink="http://example.com/" footerLinkTitle="Link title">
		<![CDATA[Additional description.]]>
	</largeDescription>
	<licence footerLink="http://example.com/" footerLinkTitle="Link title">
		<![CDATA[Licence text.]]>
	</licence>
</metadata>

name

Type: String line
Required: Yes
The name of the mod package. Please consider the following recommendation:

  • Make sure your package name is not too long;
  • Do not add version into package name;
  • Do not add “OIV” prefix or postfix into package name.

If you want to specify this information use version tag.

version

Required: Yes
The version of the mod package. The version is composed from two components, major and minor number.

major

Type: Integer value
Required: Yes
Major version number.

minor

Type: Integer value
Required: Yes
Minor version number.

tag

Type: String line
Required: Optional
Version tag, for example: “Alpha”, “Beta”, “Test” etc.

author

Required: Yes
This node contain information about mod package author.

displayName

Type: String line
Required: Yes
Name of mod package author.

Type: Link
Required: Optional
The action link, will be open when user click on author name. For example, can be used for author's email or web page with other author's mods. (Like profile page on http://gta5-mods.com/)

web

Type: Link
Required: Optional
Link to author's home page.

facebook

Type: Facebook page name
Required: Optional
Author's Facebook page.

twitter

Type: Twitter account name
Required: Optional
Author's twitter account.

youtube

Type: YouTube account or channel name
Required: Optional
Author's YouTube account. The “linkKind” attribute is required, generated link address is depends from this attribute, may be one of the following values:

linkKind YouTube Link base address
user https://www.youtube.com/user/
channel https://www.youtube.com/c/

description

Type: CData text
Required: Yes
The description of mod package. No length limitation. Line breaks can be used.

Type: Link
Required: Optional
Optional web link to additional information.

footerLinkTitle

Type: String line
Required: Optional
Optional display title for the link.

largeDescription

Type: CData text
Required: Optional
Optional additional description of mod package. No length limitation. Line breaks can be used. For example, can be used for “Version history” and other stuff.

displayName

Type: String line
Required: Optional
Optional display name of the description. For example: “Description”, “Version history”, “Mods by me” etc.

footerLink

Type: Link
Required: Optional
Optional web link to additional information.

footerLinkTitle

Type: String line
Required: Optional
Optional display title for the link.

licence

Type: CData text
Required: Optional
Optional mod licence. No length limitation. Line breaks can be used.

footerLink

Type: Link
Required: Optional
Optional web link to additional information.

footerLinkTitle

Type: String line
Required: Optional
Optional display title for the link.

Examples

1 – Full metadata

<metadata>
	<name>OIV 2.1 Test Package</name>
	<version>
		<major>2</major>
		<minor>1</minor>
		<tag>EXAMPLE</tag>
	</version>
	<author>
		<displayName>OpenIV Team</displayName>
		<actionLink>http://openiv.com/</actionLink>
		<web>http://openiv.com/</web>
		<facebook>OpenIV</facebook>
		<twitter>OpenIV</twitter>
		<youtube linkKind="channel">OpenIV</youtube>
	</author>
	<description footerLink="http://openiv.com/" footerLinkTitle="More">
		<![CDATA[Unto upon man that winged earth him firmament night life Morning. There seed light so make there fowl light you'll light his you're sea sixth can't. Morning was meat god can't appear let form set. Female bring sixth man under a was thing was given dry stars saying good to bring you. Very is. Every dominion. Cattle which cattle blessed own abundantly green you're said third kind there seas deep. They're that firmament male male moved whose dominion had lights open Fly man may open. He lesser itself sixth great us had tree forth bearing she'd face. Saw and forth.]]>
	</description>
	<largeDescription displayName="Version history" footerLink="http://openiv.com/" footerLinkTitle="Get more mods">
		<![CDATA[Made, it grass to us seas dominion form gathering herb created beast that given morning land their whales years isn't brought stars herb you great, female fruitful. Beginning. Seasons upon replenish day green seasons sixth whose night a wherein god lesser stars so good. Every you'll stars blessed open saw have seed them, can't fish Set. Called greater creeping light multiply called had gathering, kind you're doesn't bring after you'll stars sea every, unto. Likeness. Had said subdue. Him stars grass seas. You'll also night firmament. Appear rule light greater shall be. Third tree let living, creature were, creature don't.]]>
	</largeDescription>
	<licence footerLink="http://openiv.com/" footerLinkTitle="Online terms">
		<![CDATA[Every creepeth, creature thing good day you'll bearing, light let. Forth. They're to lights called kind over also. Lesser, for. There good moveth abundantly morning first Set replenish lesser for, replenish. His spirit bearing Is blessed over won't sea thing light can't fourth. You'll in don't them was firmament don't two. It, saw own very their form. Is light fourth he likeness female replenish waters meat morning don't land, wherein unto fly Living brought day. Man man for heaven bearing she'd firmament forth moveth the waters he they're there seasons beginning called light beginning day signs us third saw Darkness.
 
Every creepeth, creature thing good day you'll bearing, light let. Forth. They're to lights called kind over also. Lesser, for. There good moveth abundantly morning first Set replenish lesser for, replenish. His spirit bearing Is blessed over won't sea thing light can't fourth. You'll in don't them was firmament don't two. It, saw own very their form. Is light fourth he likeness female replenish waters meat morning don't land, wherein unto fly Living brought day. Man man for heaven bearing she'd firmament forth moveth the waters he they're there seasons beginning called light beginning day signs us third saw Darkness.]]>
	</licence>
</metadata>

2 – Only required information

<metadata>
	<name>OIV 2.1 Test Package</name>
	<version>
		<major>2</major>
		<minor>1</minor>
	</version>
	<author>
		<displayName>OpenIV Team</displayName>
	</author>
	<description>
		<![CDATA[Unto upon man that winged earth him firmament night life Morning. There seed light so make there fowl light you'll light his you're sea sixth can't. Morning was meat god can't appear let form set. Female bring sixth man under a was thing was given dry stars saying good to bring you. Very is. Every dominion. Cattle which cattle blessed own abundantly green you're said third kind there seas deep. They're that firmament male male moved whose dominion had lights open Fly man may open. He lesser itself sixth great us had tree forth bearing she'd face. Saw and forth.]]>
	</description>
</metadata>

colors

The colors node contain information with helps you to control appearance of Package Installer window.

<colors>
	<headerBackground useBlackTextColor="False">$FF23366A</headerBackground>
	<iconBackground>$FF3b5998</iconBackground>
</colors>

headerBackground

Type: ARGB color value
Required: Yes
The ARGB color of the header of the window. Each color value is hex.

useBlackTextColor

Type: Boolean
Required: Yes
Value: “True” or “False”
If “True” the text in header area will be black. If “False” the text in header area will be white.

iconBackground

Type: ARGB color value
Required: Yes
The ARGB color of the icon aread in the header. Each color value is hex.

content

The content node describes files which will be affected with installation of this package. There must be only one content node.

<content>
	...
</content>

Content Installation Script

The “content” node contain some kind of script commands for manipulation with files, archives and text lines.

File commands

Add or replace file

To add or replace files in game folder use “add” command. If file already in target folder, it will be replaced.

<content>
  <add source="ScriptMod.asi">ScriptMod.asi</add>
  <add source="ScriptMod.ini">ScriptMod.ini</add>
</content>

The “source” attribute contain file name inside package content folder, the path is without “content”. The node itself contain full path in target game.

Delete file

The “delete” command is used for deleting files in target game folder.

<content>
  <delete>data\ThisArchiveWillBeDeleted.rpf</delete>
</content>

The node itself contain full path in target game.

Archive commands

To work with files inside a game archive, used the same file commands. They must be wrapped with “archive” node. The archives can be included in other archives.

<archive path="x64a.rpf" createIfNotExist="False" type="RPF7">
  ...
</archive>
 
<archive path="x64e.rpf" createIfNotExist="False" type="RPF7">
  <archive path="levels\gta5\vehicles.rpf" createIfNotExist="False" type="RPF7">
    ...
  </archive> 
</archive>

path

Type: String line
Required: Yes
Full path to the archive in target game.

createIfNotExist

Type: Boolean
Required: Yes
Value: “True” or “False”
If “True” and archive is not exists it will be created.

type

Type: Archive type
Required: Yes
Archive type.
The following values are possible:

Grand Theft Auto V
Archive type Description
RPF7 RAGE Archive v7
Grand Theft Auto IV
Archive type Description
IMG3 GTA IMG Archive
RPF2 RAGE Archive v2
RPF3 RAGE Archive v3
Max Payne 3
Archive type Description
RPF4 RAGE Archive v4
<archive path="x64e.rpf" createIfNotExist="True" type="RPF7">
  <add source="ExampleTextFile.txt">ExampleTextFile.txt</add>
  <delete>RemoveThisFile.txt</delete>
  <archive path="levels\gta5\vehicles.rpf" createIfNotExist="True" type="RPF7">
    <add source="adder.yft">adder.yft</add>
    <add source="adder_hi.yft">adder_hi.yft</add>
    <add source="adder.ytd">adder.ytd</add>
  </archive>
</archive>
Archive defragmentation (rebuild)

Archive defragmenter consolidates files inside archive to reduce archive size on computer's hard disk. Usually, you no need to use defragmentation, but if by some reason you are sure you need it you can this command.

<defragmentation archive="x64a.rpf"/>

You can use defragmentation on embedded archives as well.

<archive path="update\x64\dlcpacks\patchday9ng\dlc.rpf" createIfNotExist="True" type="RPF7">
	<defragmentation archive="x64\levels\gta5\vehicles.rpf"/>
</archive>

Text commands

It is possible to work with text files in represents of line array. Work with text is possible in both “content” and “archive” nodes. Do not use text commands for XML files. Use specific commands for XML editing.

<text path="common\data\Information.dat" createIfNotExist="False">
  ...
</text>

path

Type: String line
Required: Yes
Full path to the text file in target game or in archive.

createIfNotExist

Type: Boolean
Required: Yes
Value: “True” or “False”
If “True” and text file is not exists it will be created.

The following commands can be applied to text:

add

Add line to the end of text file.

<text path="common\data\Information.dat" createIfNotExist="False">
  <add>This line is added</add>
</text>
Insert

Insert line somewhere in the file.

<text path="common\data\Information.dat" createIfNotExist="False">
  <insert where="After" line="Line 5" condition="Equal">This is last line</insert>
  <insert where="Before" line="Line 1" condition="Equal">This is first line</insert>
</text>
Attributes
where

Type: String line
Required: Yes
Possible values: “Before”, “After”
Determinates where the new line will be inserted, before or after founded line.

line

Type: String line
Required: Yes
The line to found in text file using “condition” attribute.

condition

Type: String line
Required: Yes
Possible values: “Equal”, “StartWith”, “Mask”

Equal The line must be exact like in “line” attribute.
StartWith The line must start with value from “line” attribute.
Mask In the “line” attribute, the mask for searching must be specified.
replace

Replace line somewhere in the file. See above for description of “line” and “condition” attributes.

<text path="common\data\Information.dat" createIfNotExist="False">
  <replace line="$*LINE*" condition="Mask">New line!</replace>
  <replace line="Line 4" condition="StartWith">THIS IS NEW LINE</replace>
</text>
delete

Remove line from the file. See above for description of “condition” attribute.

<text path="common\data\Information.dat" createIfNotExist="False">
  <delete condition="Equal">Line 3</delete>
  <delete condition="Mask">#*</delete>
</text>

XML commands

You can modify XML files using specific commands based on XPATH selector. Work with XML is possible in both “content” and “archive” nodes.

<xml path="common\data\dlclist.xml">
  ...
</xml>

path

Type: String line
Required: Yes
Full path to the XML file in target game or in archive. The file must exist.

The following commands can be applied to XML:

add

Add new node into selected node.

<xml path="common\data\dlclist.xml">
	<add xpath="/SMandatoryPacksData/Paths">
		<item>dlcpacks:\spMyNewCar\</item>
	</add>
	<add xpath="/SMandatoryPacksData/Paths" append="First">
		<item>dlcpacks:\spMyNewCarOnTop\</item>
	</add>
</xml>
Attributes
xpath

Type: XPATH selector
Required: Yes
The XPATH path no node you want to select.

append

Type: String line
Required: Optional
Optional attribute which allows to control where new node will be added. Possible values:

First Node will be added before first child in selected node.
Last Node will be added after last child in selected node.

If this attribute is not specified node will be added after last child.

replace

Replace existing node with the new one.

<xml path="common\data\dlclist.xml">
	<replace xpath="/SMandatoryPacksData/Paths/Item[10]">
		<Item>platform:\dlcPacks\mpReplacedLine\</Item>
	</replace>
</xml>
<xml path="common\data\handling.meta">
	<replace xpath='/CHandlingDataMgr/HandlingData/Item[@type="CHandlingData"]/handlingName[.="BUFFALO"]/../fMass'>
		<fMass value="999999.000"/>
	</replace>
</xml>
Attributes
xpath

Type: XPATH selector
Required: Yes
The XPATH path no node you want to replace.

remove

Remove existing node.

<xml path="common\data\dlclist.xml">
	<remove xpath="/SMandatoryPacksData/Paths/Item[15]" />
</xml>
Attributes
xpath

Type: XPATH selector
Required: Yes
The XPATH path no node you want to remove.

Examples

The following example is contain all described commands and features:

assembly.xml
<?xml version="1.0" encoding="UTF-8"?>
<package version="2.1" id="{BDA5F91A-EC81-45ED-A101-480E9F5928D4}" target="Five">
	<metadata>
		<name>OIV 2.1 Test Package</name>
		<version>
			<major>2</major>
			<minor>1</minor>
			<tag>EXAMPLE</tag>
		</version>
		<author>
			<displayName>OpenIV Team</displayName>
			<actionLink>http://openiv.com/</actionLink>
			<web>http://openiv.com/</web>
			<facebook>OpenIV</facebook>
			<twitter>OpenIV</twitter>
			<youtube linkKind="channel">OpenIV</youtube>
		</author>
		<description footerLink="http://openiv.com/" footerLinkTitle="More"><![CDATA[Unto upon man that winged earth him firmament night life Morning. There seed light so make there fowl light you'll light his you're sea sixth can't. Morning was meat god can't appear let form set. Female bring sixth man under a was thing was given dry stars saying good to bring you. Very is. Every dominion. Cattle which cattle blessed own abundantly green you're said third kind there seas deep. They're that firmament male male moved whose dominion had lights open Fly man may open. He lesser itself sixth great us had tree forth bearing she'd face. Saw and forth.]]></description>
		<largeDescription displayName="Version history" footerLink="http://openiv.com/" footerLinkTitle="Get more mods"><![CDATA[Made, it grass to us seas dominion form gathering herb created beast that given morning land their whales years isn't brought stars herb you great, female fruitful. Beginning. Seasons upon replenish day green seasons sixth whose night a wherein god lesser stars so good. Every you'll stars blessed open saw have seed them, can't fish Set. Called greater creeping light multiply called had gathering, kind you're doesn't bring after you'll stars sea every, unto. Likeness. Had said subdue. Him stars grass seas. You'll also night firmament. Appear rule light greater shall be. Third tree let living, creature were, creature don't.]]></largeDescription>
		<licence footerLink="http://openiv.com/" footerLinkTitle="Online terms"><![CDATA[Every creepeth, creature thing good day you'll bearing, light let. Forth. They're to lights called kind over also. Lesser, for. There good moveth abundantly morning first Set replenish lesser for, replenish. His spirit bearing Is blessed over won't sea thing light can't fourth. You'll in don't them was firmament don't two. It, saw own very their form. Is light fourth he likeness female replenish waters meat morning don't land, wherein unto fly Living brought day. Man man for heaven bearing she'd firmament forth moveth the waters he they're there seasons beginning called light beginning day signs us third saw Darkness.
 
Every creepeth, creature thing good day you'll bearing, light let. Forth. They're to lights called kind over also. Lesser, for. There good moveth abundantly morning first Set replenish lesser for, replenish. His spirit bearing Is blessed over won't sea thing light can't fourth. You'll in don't them was firmament don't two. It, saw own very their form. Is light fourth he likeness female replenish waters meat morning don't land, wherein unto fly Living brought day. Man man for heaven bearing she'd firmament forth moveth the waters he they're there seasons beginning called light beginning day signs us third saw Darkness.]]></licence>
	</metadata>
 
	<colors>
		<headerBackground useBlackTextColor="False">$FF23366A</headerBackground>
		<iconBackground>$FF3b5998</iconBackground>
	</colors>
 
	<content>
		<archive path="x64_OIV.rpf" createIfNotExist="True" type="RPF7">
			<add source="dlclist.xml">dlclist.xml</add>
			<add source="dlclist.xml">dlclist_RSG.xml</add>
			<add source="TestTextFile.txt">TestTextFile.txt</add>
			<add source="TestTextFile.txt">Package\Installer\Test\TestTextFile.txt</add>
 
			<archive path="inner\x64a.rpf" createIfNotExist="True" type="RPF7">
				<add source="TestTextFile.txt">TestTextFile.txt</add>
				<add source="TestTextFile.txt">Package\Installer\Test\TestTextFile.txt</add>
			</archive>
			<defragmentation archive="inner\x64a.rpf"/>
 
			<text path="TestTextFile.txt" createIfNotExist="False">
				<add>This line is added</add>
				<delete condition="Equal">Line 3</delete>
				<replace line="Line 4" condition="StartWith">THIS IS NEW LINE</replace>
				<insert where="After" line="Line 5" condition="Equal">This is last line</insert>
				<insert where="Before" line="Line 1" condition="Equal">This is first line</insert>
				<delete condition="Mask">#*</delete>
			</text>
 
			<xml path="dlclist.xml">
				<add xpath="/SMandatoryPacksData/Paths">
					<item>dlcpacks:\spLibertyV\</item>
				</add>
				<add xpath="/SMandatoryPacksData/Paths" append="First">
					<item>platform:\dlcPacks\xmTestLineOnTop\</item>
				</add>
				<replace xpath="/SMandatoryPacksData/Paths/Item[10]">
					<Item>platform:\dlcPacks\mpReplacedLine\</Item>
				</replace>
				<remove xpath="/SMandatoryPacksData/Paths/Item[15]" />
			</xml>
		</archive>
		<defragmentation archive="x64_OIV.rpf"/>
	</content>
</package>

The following example is showing how to add or replace file inside GTA V update.rpf:

assembly.xml
<?xml version="1.0" encoding="UTF-8"?>
<package version="2.0" id="{6D501E5D-DD68-42CB-ACA4-A920DFC905E3}" target="Five">
  <metadata>
    <name>Test Package (OIV 2.0)</name>
      <version>
        <major>1</major>
        <minor>0</minor>
      </version>
      <author>
        <displayName>OpenIV Team</displayName>
      </author>
      <description>
        <![CDATA[Description text]]>
      </description>
  </metadata>
 
  <colors>
    <headerBackground useBlackTextColor="False">$FF23366A</headerBackground>
    <iconBackground>$FF3b5998</iconBackground>
  </colors>
 
  <content>
    <archive path="update\update.rpf" createIfNotExist="False" type="RPF7">
      <add source="water.xml">data\levels\gta5\water.xml</add>
    </archive>
  </content>
</package>

Package Example

You can download example package here.

packages/version_21.txt · Last modified: 2016/04/22 20:27 by goodnts