Vehicle streaming with newest format of data_file in fxmanifest.lua

  1. Client Canary b2189, FXServer version 4821
  2. What you expected to happen: Vehicle streaming with new format of data_file in fxmanifest.lua
  3. What actually happens: Vehicle streaming works with old format, but not with new.
  4. Category of bug (eg. client, server, weapons, peds, native): fxmanifest
  5. Reproducible steps, preferably with example script(s):
-- fxmanifest.lua

-- Doesn't work

-- Car (31.10.2021: without 'files' vehicle won't be streamed)
-- files {
--     'vehicles.meta',
--     'carvariations.meta',
--     'carcols.meta',
--     'handling.meta',
--     'vehiclelayouts.meta',
-- }
data_file('HANDLING_FILE')('handling.meta')
data_file('VEHICLE_LAYOUTS_FILE')('vehiclelayouts.meta')
data_file('VEHICLE_METADATA_FILE')('vehicles.meta')
data_file('CARCOLS_FILE')('carcols.meta')
data_file('VEHICLE_VARIATION_FILE')('carvariations.meta')
-- fxmanifest.lua

-- Works

-- Car (31.10.2021: without 'files' vehicle won't be streamed)
files {
     'vehicles.meta',
     'carvariations.meta',
     'carcols.meta',
     'handling.meta',
     'vehiclelayouts.meta',
 }
data_file('HANDLING_FILE')('handling.meta')
data_file('VEHICLE_LAYOUTS_FILE')('vehiclelayouts.meta')
data_file('VEHICLE_METADATA_FILE')('vehicles.meta')
data_file('CARCOLS_FILE')('carcols.meta')
data_file('VEHICLE_VARIATION_FILE')('carvariations.meta')

In addition to above I just mentioned errors in client console:

[ 77188] [b2189_GTAProce] MainThrd/ ^1Error: Failed to parse resources:/gb-assets/vehicles/vehicles.meta in rage::parManager::LoadFromStructure(const char*, …). Make sure this is a well-formed XML/PSO file.

[ 77203] [b2189_GTAProce] MainThrd/ ^1Error: Failed to parse resources:/gb-assets/vehicles/carvariations.meta in rage::parManager::LoadFromStructure(const char*, …). Make sure this is a well-formed XML/PSO file.

Sending the files:
carvariations.meta (4.8 KB)
vehicles.meta (5.6 KB)

What ‘new format’? There’s been no changes in this for a very long time, so I’m wondering where you heard about this supposed new format. :confused:

1 Like

For example, in many script I saw next way of including ytyp’s, by defining them first in files then as a data_file:

-- fxmanifest.lua
files {
    'stream/food_slimer_1.ytyp'
}
data_file 'DLC_ITYP_REQUEST' 'stream/food_slimer_1.ytyp'

But in some other scripts I can see only 1 line:

-- fxmanifest.lua
data_file('DLC_ITYP_REQUEST')('stream/food_slimer_1.ytyp')

I supposed that this is a newest format, which looks great and I like it much more!

That’s not ‘a new format’, #typ entries with DLC_ITYP_REQUEST are not referring to a physical file - only the entry name itself is used, you could even add feeeeeee/food_slimer_1.nfjsbnfsjfnsdfjn and it’d work fine - so they don’t have to be added to files at all (and doing so was even considered malformed).

Any entries that actually refer to an actual file need that file to be added to the packfile too, and this never changed, nor are parentheses in any way related.

Follow-up explanation from Matrix:

data_file is a hint to the game engine to read that file

however, the file does not automatically exist on the client, only on the server

so it also needs to be in files

which is a hint to the server to send that to the client

stream/ is different, since this is downloaded on request and automatically indexed

and DLC_ITYP_REQUEST is yet again different as it doesn’t refer to any real file path but just something looking like one, it actually refers to the base name of a .#typ file stored anywhere in the streaming file index

you may ask ‘why can’t data_file also imply file’, well, that’s because not all data_file strings are real files

for example DLC_ITYP_REQUEST, but also AUDIO_WAVEPACK or DLC_POP_GROUPS

or the file may have a similar name, like AUDIO_GAMEDATA

2 Likes