fix missinglines

This commit is contained in:
kralrindo 2024-12-27 12:03:54 +03:00
parent 61da890f21
commit d4a08e1a59

384
ReadMe.md
View File

@ -1,117 +1,117 @@
**SDK RPAKs for R5Reloaded Modded Apex Project** **SDK RPAKs for R5Reloaded Modded Apex Project**
Created by: @KralRindo Created by: @KralRindo
**Credits** **Credits**
Repak, 010 Respawn Templates, RSX, and Model Converter: rexx, IcePixelx, Rika, AmosModz Repak, 010 Respawn Templates, RSX, and Model Converter: rexx, IcePixelx, Rika, AmosModz
**Required Tools** **Required Tools**
[Repak](https://github.com/r-ex/RePak) [Repak](https://github.com/r-ex/RePak)
[Respawn-mdl Templates](https://github.com/IJARika/respawn-mdl) [Respawn-mdl Templates](https://github.com/IJARika/respawn-mdl)
[010 Editor](https://www.sweetscape.com/010editor/) [010 Editor](https://www.sweetscape.com/010editor/)
[RSX](https://github.com/r-ex/rsx) [RSX](https://github.com/r-ex/rsx)
R5Reloaded supports asset types from Season 0-5. R5Reloaded supports asset types from Season 0-5.
**Asset Types** **Asset Types**
dtbl: Datatables, Comma-separated values (CSV). Custom or manually ported from Apex Seasons. dtbl: Datatables, Comma-separated values (CSV). Custom or manually ported from Apex Seasons.
shds: Material shadersets, Mixer Swatches (MSW). Connects two different shaders into one set. Only supported by the latest RSX version. shds: Material shadersets, Mixer Swatches (MSW). Connects two different shaders into one set. Only supported by the latest RSX version.
txtr: Texture assets, DirectDraw Surface Images (DDS). Ensure you check the texture types in the txtr section. txtr: Texture assets, DirectDraw Surface Images (DDS). Ensure you check the texture types in the txtr section.
matl: Materials, JavaScript Object Notation File (JSON). Exported with RSX or custom-made. Contains all material data. matl: Materials, JavaScript Object Notation File (JSON). Exported with RSX or custom-made. Contains all material data.
aseq: Animation sequences, Respawn Sequences (RSEQ). Animation data for Respawn Models, Cant be custom-made, needs to be exported using RSX. aseq: Animation sequences, Respawn Sequences (RSEQ). Animation data for Respawn Models, Cant be custom-made, needs to be exported using RSX.
arig: Animation rigs. Respawn Rigger Design File (RRIG). Model rig for Respawn Models, Cant be custom-made, needs to be exported using RSX. arig: Animation rigs. Respawn Rigger Design File (RRIG). Model rig for Respawn Models, Cant be custom-made, needs to be exported using RSX.
rmdl: Models, Respawn Model (RMDL) rmdl: Models, Respawn Model (RMDL)
uimg: Atlas, This is used for ui images, minimaps and loadscreens. See atlas section. uimg: Atlas, This is used for ui images, minimaps and loadscreens. See atlas section.
**Asset Order in Main RPak JSON** **Asset Order in Main RPak JSON**
dtbl > shdr > txtr > matl > aseq > arig > rmdl > uimg dtbl > shdr > txtr > matl > aseq > arig > rmdl > uimg
## DTBL Assets ## DTBL Assets
This asset type is used to define CSV format data tables within the RPak. Data tables can be used to configure and store structured data like weapon stats, loot tables, or other game-related information. Can be referenced within the scripts to manage various gameplay elements. This asset type is used to define CSV format data tables within the RPak. Data tables can be used to configure and store structured data like weapon stats, loot tables, or other game-related information. Can be referenced within the scripts to manage various gameplay elements.
We recommend structuring your CSV files with proper headers to ensure they are interpreted correctly by the game. A broken datatable can cause crashes. We recommend structuring your CSV files with proper headers to ensure they are interpreted correctly by the game. A broken datatable can cause crashes.
```json ```json
{ {
"_type": "dtbl", //Asset Type, in this case dtbl (datatable) "_type": "dtbl", //Asset Type, in this case dtbl (datatable)
"_path": "datatable/(datatable path).rpak" //CSV file path "_path": "datatable/(datatable path).rpak" //CSV file path
} }
``` ```
## SHDS Assets ## SHDS Assets
ShaderSets are used to define the set of shaders for materials, which control how objects are rendered, including effects like lighting, shadowing, and texture mapping. These assets must be exported with the RSX tool and are stored with the .msw extension. ShaderSets are used to define the set of shaders for materials, which control how objects are rendered, including effects like lighting, shadowing, and texture mapping. These assets must be exported with the RSX tool and are stored with the .msw extension.
```json ```json
{ {
"_type": "shds", //Asset Type, in this case, 'shds' for ShaderSet "_type": "shds", //Asset Type, in this case, 'shds' for ShaderSet
"_path": "shaderset/uberTnBnInterpAoCavOpmCbstCutVbweR5AoAnisoDirAmtUv0m0PSSamp222222222_sknp.rpak" //Path to the ShaderSet .msw file "_path": "shaderset/uberTnBnInterpAoCavOpmCbstCutVbweR5AoAnisoDirAmtUv0m0PSSamp222222222_sknp.rpak" //Path to the ShaderSet .msw file
} }
``` ```
Key Fields: Key Fields:
_type: This specifies the asset type. For ShaderSets. _type: This specifies the asset type. For ShaderSets.
_path: The file path to the ShaderSet asset (e.g., "shaderset/uberTnBnInterpAoCavOpmCbstCutVbweR5AoAnisoDirAmtUv0m0PSSamp222222222_sknp.rpak"). This path points to the .msw file that contains the compiled ShaderSet, which is used by materials in the game. _path: The file path to the ShaderSet asset (e.g., "shaderset/uberTnBnInterpAoCavOpmCbstCutVbweR5AoAnisoDirAmtUv0m0PSSamp222222222_sknp.rpak"). This path points to the .msw file that contains the compiled ShaderSet, which is used by materials in the game.
Additional Considerations: Additional Considerations:
Exporting with RSX: ShaderSets need to be exported using the RSX tool to ensure that the .msw file is correctly compiled. Exporting with RSX: ShaderSets need to be exported using the RSX tool to ensure that the .msw file is correctly compiled.
If the ShaderSet doesn't already exist in the R5Reloaded build, it needs to be explicitly referenced and included in the main RPak JSON. If the ShaderSet doesn't already exist in the R5Reloaded build, it needs to be explicitly referenced and included in the main RPak JSON.
## TXTR Assets ## TXTR Assets
This asset type is being used to add .dds type textures into the rpak, it's not being required to add if texture path is correct in the material json. This asset type is being used to add .dds type textures into the rpak, it's not being required to add if texture path is correct in the material json.
We strongly recommend using mipmapped textures for better performance and better look. We strongly recommend using mipmapped textures for better performance and better look.
```json ```json
{ {
"_type": "txtr", //Asset Type, in this case txtr which is texture "_type": "txtr", //Asset Type, in this case txtr which is texture
"_path": "texture/(texture path).rpak" //DDS file path "_path": "texture/(texture path).rpak" //DDS file path
} }
``` ```
Required .DDS Types: Required .DDS Types:
_col (albedo): BC7 sRGB _col (albedo): BC7 sRGB
_nml (normal): BC5U / R8G8 _nml (normal): BC5U / R8G8
_gls (gloss): BC4U _gls (gloss): BC4U
_spc (specular): BC7 sRGB _spc (specular): BC7 sRGB
_ilm (emissive): BC7 sRGB _ilm (emissive): BC7 sRGB
_ao (ambient occlusion): BC4U _ao (ambient occlusion): BC4U
_cav (cavity): BC4U _cav (cavity): BC4U
_opa (opacity): BC4U _opa (opacity): BC4U
UI Assets: UI Assets:
BC7 sRGB BC7 sRGB
Loadscreens: Loadscreens:
BC1 sRGB (Low Quality) BC1 sRGB (Low Quality)
BC7 sRGB BC7 sRGB
Minimap: Minimap:
BC1 sRGB BC1 sRGB
## MATL Assets ## MATL Assets
Material assets (matl) are a core part of how objects are rendered in the game, as they define properties like shaders, textures, blend states, and surface properties. Materials are packaged in .rpak files but internally reference a JSON file that holds the actual material data. Material assets (matl) are a core part of how objects are rendered in the game, as they define properties like shaders, textures, blend states, and surface properties. Materials are packaged in .rpak files but internally reference a JSON file that holds the actual material data.
Overview of MATL Assets: Overview of MATL Assets:
Material JSON: The material data contains information about the shader used, textures applied, blend states, depth/stencil settings, surface properties, and more. Material JSON: The material data contains information about the shader used, textures applied, blend states, depth/stencil settings, surface properties, and more.
Reference in Main RPak JSON: MATL asset refers to the material file by pointing to an .rpak file, which is responsible for loading the material data JSON. Reference in Main RPak JSON: MATL asset refers to the material file by pointing to an .rpak file, which is responsible for loading the material data JSON.
Ported Materials: If a material was ported from another Apex build, or if it uses special materials like depth or colpass materials, these must be explicitly included in the RPak. Ported Materials: If a material was ported from another Apex build, or if it uses special materials like depth or colpass materials, these must be explicitly included in the RPak.
This is an example of how a material asset is referenced in the main RPak JSON. This is an example of how a material asset is referenced in the main RPak JSON.
```json ```json
{ {
"_type": "matl", //Asset Type (Material) "_type": "matl", //Asset Type (Material)
"_path": "material/models/Weapons_R2/epg/epg_mag_sknp.rpak" //Path to the material .rpak file "_path": "material/models/Weapons_R2/epg/epg_mag_sknp.rpak" //Path to the material .rpak file
} }
``` ```
The "_type": "matl", The "_type": "matl",
The "_path" "material/jsonpath.rpak" specifies the path to the .json file that contains the material data. The "_path" "material/jsonpath.rpak" specifies the path to the .json file that contains the material data.
Material Data JSON Example: Material Data JSON Example:
This is an example of the material data JSON that would be loaded when the material .json file is referenced. It contains the properties of the material, including its textures, shader, blend states, and other properties. This is an example of the material data JSON that would be loaded when the material .json file is referenced. It contains the properties of the material, including its textures, shader, blend states, and other properties.
```json ```json
{ {
"name": "models/Weapons_R2/epg/epg_mag", "name": "models/Weapons_R2/epg/epg_mag",
@ -156,53 +156,53 @@ This is an example of the material data JSON that would be loaded when the mater
"$colpassMaterial": "0x0" "$colpassMaterial": "0x0"
} }
``` ```
Key Fields in Material Data JSON: Key Fields in Material Data JSON:
name: The name of the material (used for reference). name: The name of the material (used for reference).
width and height: Texture dimensions (used for material setup). width and height: Texture dimensions (used for material setup).
glueFlags and glueFlags2: Various flags related to material behavior. glueFlags and glueFlags2: Various flags related to material behavior.
blendStates: Blend states that define how materials blend with others. blendStates: Blend states that define how materials blend with others.
depthStencilFlags, rasterizerFlags, uberBufferFlags: Various rendering flags. depthStencilFlags, rasterizerFlags, uberBufferFlags: Various rendering flags.
features: Additional features or settings that modify how the material behaves. features: Additional features or settings that modify how the material behaves.
samplers: Defines how textures are sampled by the GPU. samplers: Defines how textures are sampled by the GPU.
surfaceProp: Defines the surface property (e.g., plastic). surfaceProp: Defines the surface property (e.g., plastic).
shaderType: The shader type used (in this case, sknp). shaderType: The shader type used (in this case, sknp).
shaderSet: A reference to the ShaderSet associated with this material. shaderSet: A reference to the ShaderSet associated with this material.
$textures: A dictionary of textures applied to the material, where keys represent the texture slots (e.g., albedo, normal, spec, etc.) and the values are paths to the texture .rpak files. $textures: A dictionary of textures applied to the material, where keys represent the texture slots (e.g., albedo, normal, spec, etc.) and the values are paths to the texture .rpak files.
$depthShadowMaterial, $depthPrepassMaterial, etc.: Optional fields that point to specific depth or colpass materials. These should be included if the material uses them. $depthShadowMaterial, $depthPrepassMaterial, etc.: Optional fields that point to specific depth or colpass materials. These should be included if the material uses them.
If the material uses special depth or colpass materials ($depthShadowMaterial, $depthPrepassMaterial, etc.), these materials must also be ported and included in the RPak. These materials are used in advanced rendering techniques like shadow mapping or post-processing effects. If the material uses special depth or colpass materials ($depthShadowMaterial, $depthPrepassMaterial, etc.), these materials must also be ported and included in the RPak. These materials are used in advanced rendering techniques like shadow mapping or post-processing effects.
Custom materials may require special handling for compatibility. Check below for the texture slot types. Custom materials may require special handling for compatibility. Check below for the texture slot types.
slot0: _col slot0: _col
slot1: _nml slot1: _nml
slot2: _gls/_exp slot2: _gls/_exp
slot3: _spc slot3: _spc
slot4: _ilm slot4: _ilm
slot5: _ao slot5: _ao
slot6: _cav/cvt slot6: _cav/cvt
slot7: _opa slot7: _opa
slot8: detail/camo slot8: detail/camo
slot9: _dm_nml/_nml (detail normal map) slot9: _dm_nml/_nml (detail normal map)
slot10: _msk (detail texture mask) slot10: _msk (detail texture mask)
Blend Materials (used for maps): Blend Materials (used for maps):
slot16: _bm (blendmap) slot16: _bm (blendmap)
slot22: _col slot22: _col
slot23: _nml slot23: _nml
slot24: _gls/_exp slot24: _gls/_exp
slot25: _spc slot25: _spc
## RRIG Assets (Animation Rigs) ## RRIG Assets (Animation Rigs)
Animation Rigs (rrig) define how models animate by specifying the bone structure and animation layers. These rigs are used by .rmdl models to apply various animations, such as walking, running, aiming, etc. When an animation seq is referenced in a rig, the associated animation sequences are automatically loaded by the RPak, so you don't need to explicitly reference them separately. Animation Rigs (rrig) define how models animate by specifying the bone structure and animation layers. These rigs are used by .rmdl models to apply various animations, such as walking, running, aiming, etc. When an animation seq is referenced in a rig, the associated animation sequences are automatically loaded by the RPak, so you don't need to explicitly reference them separately.
These assets define the skeleton and animation layers for a model. Each animation rig can have multiple animation sequences that are applied to a model based on the rig's bone structure. These assets define the skeleton and animation layers for a model. Each animation rig can have multiple animation sequences that are applied to a model based on the rig's bone structure.
Sequences: Animation sequences are included by the RPak tool when the animation rig is loaded. They don't need to be explicitly listed unless additional customization is needed. Sequences: Animation sequences are included by the RPak tool when the animation rig is loaded. They don't need to be explicitly listed unless additional customization is needed.
This is an example of how an animation rig (.rrig) is referenced in the main RPak JSON file. It also includes a list of animation sequences that belong to this rig. This is an example of how an animation rig (.rrig) is referenced in the main RPak JSON file. It also includes a list of animation sequences that belong to this rig.
```json ```json
{ {
"_type": "arig", //Asset Type (Animation Rig) "_type": "arig", //Asset Type (Animation Rig)
@ -218,34 +218,34 @@ This is an example of how an animation rig (.rrig) is referenced in the main RPa
] ]
} }
``` ```
Key Fields in RRIG Asset JSON: Key Fields in RRIG Asset JSON:
_type: "arig" specifies that this is an animation rig asset. _type: "arig" specifies that this is an animation rig asset.
_path: "animrig/filepath.rrig" The path to the .rrig file that defines the animation rig. _path: "animrig/filepath.rrig" The path to the .rrig file that defines the animation rig.
$sequences: A list of animation sequences associated with the rig. These are applied based on the animation rig's configuration, so they are automatically loaded by the RPak tool. $sequences: A list of animation sequences associated with the rig. These are applied based on the animation rig's configuration, so they are automatically loaded by the RPak tool.
Bone Structure: The .rrig file defines the skeleton, so it must be compatible with the model (.rmdl) that references it. This ensures the animations are applied correctly to the model's bones. Bone Structure: The .rrig file defines the skeleton, so it must be compatible with the model (.rmdl) that references it. This ensures the animations are applied correctly to the model's bones.
Sequences and Animations: If the animation sequences (e.g., idle, attack) have been defined in the rig, they are automatically linked to the model. However, any additional animation sequence that isn't part of the original rig cannot be added into the rig. Otherwise this will cause a crash Sequences and Animations: If the animation sequences (e.g., idle, attack) have been defined in the rig, they are automatically linked to the model. However, any additional animation sequence that isn't part of the original rig cannot be added into the rig. Otherwise this will cause a crash.
## RSEQ Assets ## RSEQ Assets
Animation Sequences (rseq) are animation files that define the movement or behavior of a model, such as idle animations, attack animations, etc. These sequences are often associated with Animation Rigs (.rrig) and Models (.rmdl). However, if they are not part of a rig or model, they must be explicitly included in the main RPak JSON. Animation Sequences (rseq) are animation files that define the movement or behavior of a model, such as idle animations, attack animations, etc. These sequences are often associated with Animation Rigs (.rrig) and Models (.rmdl). However, if they are not part of a rig or model, they must be explicitly included in the main RPak JSON.
It is essential to not rename the .rseq files. Renaming these files will cause a breakage in the GUIDs (Global Unique Identifiers) of the animations, resulting in missing references and crashes. It is essential to not rename the .rseq files. Renaming these files will cause a breakage in the GUIDs (Global Unique Identifiers) of the animations, resulting in missing references and crashes.
```json ```json
{ {
"_type": "rseq", //Asset Type, in this case 'rseq' for animation sequences "_type": "rseq", //Asset Type, in this case 'rseq' for animation sequences
"_path": "animseq/props/testanimfolder/close_idle.rseq" //Path to the animation sequence file "_path": "animseq/props/testanimfolder/close_idle.rseq" //Path to the animation sequence file
} }
``` ```
In most cases we don't need this asset type, only use for this would be replacing an animation sequence from R5Reloaded build. In most cases we don't need this asset type, only use for this would be replacing an animation sequence from R5Reloaded build.
## MDL_ Assets ## MDL_ Assets
This asset type is used to define 3D models (RMDL) within the RPak. These models can be static or dynamic, and they may include animations and physics files. Models are typically loaded into the game by their file paths and can be used as props, characters, or other interactive elements. This asset type is used to define 3D models (RMDL) within the RPak. These models can be static or dynamic, and they may include animations and physics files. Models are typically loaded into the game by their file paths and can be used as props, characters, or other interactive elements.
```json ```json
{ {
"_type": "mdl_", //Asset Type, in this case mdl_ (model) "_type": "mdl_", //Asset Type, in this case mdl_ (model)
@ -262,27 +262,27 @@ This asset type is used to define 3D models (RMDL) within the RPak. These models
] ]
} }
``` ```
Key Fields: Key Fields:
_type: Asset type, always set to "mdl_" for model assets. _type: Asset type, always set to "mdl_" for model assets.
_path: Path to the model file within the game assets (e.g., mdl/props/kralstest/thisisa_testprop.rmdl). _path: Path to the model file within the game assets (e.g., mdl/props/kralstest/thisisa_testprop.rmdl).
$animrigs: An array of paths to the animation rigs associated with the model. These rigs define how the model will animate (e.g., animrig/props/prowler_hatch_tt/prowler_hatch_tt.rrig). $animrigs: An array of paths to the animation rigs associated with the model. These rigs define how the model will animate (e.g., animrig/props/prowler_hatch_tt/prowler_hatch_tt.rrig).
$sequences: Optional array of paths to animation sequences for the model. If a model doesnt have an animation rig but still requires animations, these sequences can be applied directly to the model. Sequences included within the model doesn't require to be added seperately aka RePak will auto add them. $sequences: Optional array of paths to animation sequences for the model. If a model doesnt have an animation rig but still requires animations, these sequences can be applied directly to the model. Sequences included within the model doesn't require to be added seperately aka RePak will auto add them.
Important Notes: Important Notes:
Materials: Every material used by the model must be included in the main rpak json. Missing materials may result in GUID errors. Materials: Every material used by the model must be included in the main rpak json. Missing materials may result in GUID errors.
Physics Files: If the model is interactive or needs physics behavior, make sure to include the associated .phy file. Physics Files: If the model is interactive or needs physics behavior, make sure to include the associated .phy file.
//========================================================= //=========================================================
// Surface Types // // Surface Types //
//========================================================= //=========================================================
// ----------------------------- // -----------------------------
// Surface Materials // Surface Materials
// ----------------------------- // -----------------------------
default default
metal_titan metal_titan
solidmetal / NOTE: Almost nothing is solid metal - so "metal" is sheet metal solidmetal / NOTE: Almost nothing is solid metal - so "metal" is sheet metal
@ -308,11 +308,11 @@ grass
brokenglass brokenglass
gravel gravel
bloodyflesh bloodyflesh
// ----------------------------- // -----------------------------
// Non Surface Materials // Non Surface Materials
// ----------------------------- // -----------------------------
shellcasing_small shellcasing_small
shellcasing_large shellcasing_large
weapon / NOTE: Weapon models - sounds for when weapons drop weapon / NOTE: Weapon models - sounds for when weapons drop
@ -324,11 +324,11 @@ pottery / NOTE: Ceramic jug, mug
grenade / NOTE: Solid hand grenade grenade / NOTE: Solid hand grenade
grenade_triple_threat grenade_triple_threat
bouncygrenade bouncygrenade
// ----------------------------- // -----------------------------
// world materials // world materials
// ----------------------------- // -----------------------------
metal_bouncy metal_bouncy
slipperymetal / Note: Airboat pontoons have very low friction slipperymetal / Note: Airboat pontoons have very low friction
slipperyslime slipperyslime
@ -371,11 +371,11 @@ brakingrubbertire
slidingrubbertire_front slidingrubbertire_front
slidingrubbertire_rear slidingrubbertire_rear
// ----------------------------- // -----------------------------
// objects // objects
// ----------------------------- // -----------------------------
floating_metal_barrel floating_metal_barrel
plastic_barrel_buoyant plastic_barrel_buoyant
roller roller