meta.xml

From GTA Connected
Revision as of 13:12, 12 March 2026 by PerikiyoXD (talk | contribs) (New `meta.xml`)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Resource `meta.xml`

Defines metadata and file declarations for a resource. Every resource must contain a `meta.xml` file or the resource will not load.


Basic Structure

<meta>
    <info author="" type="" version="" description="" />
    <script src="" type="" language="" />
    <dependency src="" />
    <map src="" type="" />
    <file src="" type="" />
</meta>

Complete Example

<meta>
    <info 
        author="JohnDoe"
        type="gameplay"
        version="1.0.0"
        description="Example resource"
    />

    <script src="server/main.js" type="server" language="javascript" />
    <script src="client/ui.js" type="client" language="javascript" />

    <file src="config/settings.json" type="server" />
    <file src="ui/index.html" type="client" />

    <map src="maps/city.map" type="map" />

    <dependency src="core" />
</meta>

Elements

<meta>

Root element that contains all metadata and file declarations for the resource.

Only one `<meta>` element should exist in a `meta.xml`.


<info>

Provides general metadata about the resource.

Attributes

Attribute Description
author Name of the resource author.
type Resource category or custom description.
version Resource version number.
description Short description explaining the resource.

Example

<info 
    author="JohnDoe"
    type="gameplay"
    version="1.0.0"
    description="Adds custom gameplay mechanics"
/>

<script>

Declares a script file that should be loaded by the resource.

Each script file must have its own `<script>` entry.

Attributes

Attribute Description
src Relative path to the script file.
type Execution side (server or client).
language Script language used by the file.

Example

<script src="server/main.js" type="server" language="javascript" />
<script src="client/ui.js" type="client" language="javascript" />

<file>

Declares a custom file included in the resource.

Attributes

Attribute Description
src Relative path to the file.
type Target side (client or server).

Example

<file src="config/settings.json" type="server" />
<file src="ui/index.html" type="client" />

<dependency>

Declares a required resource dependency.

If specified, the dependency resource must load before this one.

Attributes

Attribute Description
src Name of the required resource.

Example

<dependency src="core" />
<dependency src="database" />

<map>

Registers a map file used by the resource.

Attributes

Attribute Description
src Relative path to the map file.
type Map type definition.

Example

<map src="maps/city.map" type="map" />

Path Rules

All src attributes use paths relative to the resource root folder.

Valid Examples

example.js
client/ui.js
server/modules/auth.js
assets/images/logo.png

Invalid Example

/absolute/path/file.js

Absolute paths are not supported.


Key Rules

  • Every resource must include a meta.xml.
  • Each script requires its own <script> entry.
  • All src paths are relative to the resource root folder.
  • Dependencies ensure correct resource load order.
  • Custom files must be declared using <file> to be available at runtime.