engineLoadDFF
This function loads a RenderWare Model (DFF) file into GTA.
Follow loading order ( COL -> TXD -> DFF ) as other orders can cause collisions, textures or the DFF not to load.
If some error occurs while loading the DFF, MTA will output a message - check out DFF error messages to know what they mean.
error messages
Texture archive corrupt - File size mismatch with section headers, Re-exporting the file is recommended. A texture archive in this resource is corrupt and may need attention, this error occurs because sections inside the file are telling the game the file is larger or smaller than it is Textures use the .txd extension, it is recommended to open this up with something like txd editor which can be found online and re-save it which should fix the section headers
DFF file corrupt - File size mismatch with section headers, Re-exporting the file is recommended. A DFF (model) in this resource is corrupt and may need attention, this error occurs because sections inside the file are telling the game the file is smaller than it is DFFs are models and use the .dff extension
This can be caused by inbuilt collision files being written to the file wrongly, to test this open up the file in RW Analyze and look at the bottom for a "frame extension" this is typically where collision data should be stored.
We are still unsure as to why this models are exported like this so if anyone has some information on this please visit bugs.mtasa.com and report any information you have under the new issues project
DFF file corrupt - frame with name ??? is over the 23 character limit A DFF frame name (or node) is beyond the limit of allowed characters this will certainly cause a crash and should be fixed immediately. This can be fixed by re-exporting the DFF file with a smaller name for the part in question.
DFF file corrupt - texture with name ??? is over the 32 character limit A DFF frame name (or node) is beyond the limit of allowed characters this will certainly cause a crash and should be fixed immediately. This can be fixed by re-exporting the DFF file with a smaller name for the part in question
DFF Tried to read beyond the file size, Re-exporting the file is recommended A DFF (model) in this resource is corrupt and needs attention, this error occurs because sections inside the file are telling the game the file is larger than the file size.
OOP Syntax Help! I don't understand this!
- Constructor: EngineDFF (...)
Syntax
dff|false engineLoadDFF ( string filePath/rawData )Required Arguments
- filePath/rawData: The filepath to the DFF file you want to load or whole data buffer of the DFF file.
Returns
- dff|false: dff element
Returns a DFF element if the dff file loaded, false otherwise.
Code Examples
local dff = engineLoadDFF("infernus.dff")engineReplaceModel(dff, 411)Changelog
Added option to use raw data instead of a file path.
See Also
Engine Functions
- engineAddClothingModelNew
- engineAddClothingTXDNew
- engineAddImageNew
- engineApplyShaderToWorldTexture
- engineFreeModel
- engineFreeTXDNew
- engineGetModelFlagsNew
- engineGetModelIDFromName
- engineGetModelLODDistance
- engineGetModelNameFromID
- engineGetModelPhysicalPropertiesGroup
- engineGetModelTextureNames
- engineGetModelTextures
- engineGetModelTXDIDNew
- engineGetModelVisibleTime
- engineGetObjectGroupPhysicalProperty
- engineGetPoolCapacityNew
- engineGetPoolDefaultCapacityNew
- engineGetPoolUsedCapacityNew
- engineGetSurfaceProperties
- engineGetVisibleTextureNames
- engineImageGetFileNew
- engineImageGetFilesNew
- engineImageGetFilesCountNew
- engineImageLinkDFFNew
- engineImageLinkTXDNew
- engineImportTXD
- engineLoadCOL
- engineLoadDFF
- engineLoadIFP
- engineLoadIMGNew
- engineLoadTXD
- enginePreloadWorldAreaNew
- engineRemoveImageNew
- engineRemoveShaderFromWorldTexture
- engineReplaceAnimation
- engineReplaceCOL
- engineReplaceModel
- engineRequestModel
- engineRequestTXDNew
- engineResetModelFlagsNew
- engineResetModelLODDistance
- engineResetModelTXDIDNew
- engineResetSurfaceProperties
- engineRestoreAnimation
- engineRestoreCOL
- engineRestoreDFFImageNew
- engineRestoreModel
- engineRestoreModelPhysicalPropertiesGroup
- engineRestoreObjectGroupPhysicalProperties
- engineRestoreTXDImageNew
- engineRestreamNew
- engineRestreamModelNew
- engineRestreamWorldUpdated
- engineSetAsynchronousLoading
- engineSetModelFlagNew
- engineSetModelFlagsNew
- engineSetModelLODDistanceUpdated
- engineSetModelPhysicalPropertiesGroupUpdated
- engineSetModelTXDIDNew
- engineSetModelVisibleTime
- engineSetObjectGroupPhysicalProperty
- engineSetPoolCapacityNew
- engineSetSurfaceProperties
- engineStreamingFreeUpMemory
- engineStreamingGetBufferSizeNew
- engineStreamingGetMemorySizeNew
- engineStreamingGetModelLoadStateNew
- engineStreamingGetUsedMemory
- engineStreamingReleaseModelNew
- engineStreamingRequestModelNew
- engineStreamingRestoreBufferSizeNew
- engineStreamingRestoreMemorySizeNew
- engineStreamingSetBufferSizeNew
- engineStreamingSetMemorySizeNew
- engineStreamingSetModelCacheLimitsNew