Arma Reforger Script API
Loading...
Searching...
No Matches
Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
SCR_WorldFilesHelper Interface Reference

Static Public Member Functions

static string CreateWorld (string relativeWorldDirectory, string worldName, array< ResourceName > defaultLayerEntities=null, bool overwriteWorldFile=false, bool overwriteDefaultLayerFile=false)
 Create a world and registers it through Resource Manager.
 
static bool ReplaceWorldEntity (string relativeWorldFilePath, ResourceName newWorldEntityPrefab)
 Replaces the current WorldEntity (GenericWorldEntity or Prefab) by the provided Prefab.
 

Static Protected Member Functions

static string GetDefaultLayerAbsoluteFilePath (string relativeWorldFilePath)
 Get the absolute path to the default layer (worldDir/worldName_Layers/default.layer)
 

Static Protected Attributes

static const string GENERIC_WORLD_ENTITY_CLASS = "GenericWorldEntity"
 
static const string LAYERS_DIR = "%1_Layers"
 
static const string DEFAULT_LAYER = "default.layer"
 

Member Function Documentation

◆ CreateWorld()

static string SCR_WorldFilesHelper.CreateWorld ( string  relativeWorldDirectory,
string  worldName,
array< ResourceName >  defaultLayerEntities = null,
bool  overwriteWorldFile = false,
bool  overwriteDefaultLayerFile = false 
)
static

Create a world and registers it through Resource Manager.

Parameters
[in]relativeWorldDirectoryaddon-prefixed path
[in]worldNamecreated files will be based on this name
[in]defaultLayerEntitiesentities to be created in the default layer - if no GenericWorldEntity Prefab is provided, a default one will be created
[in]overwriteWorldFileif set to true, deletes and rewrites world file if it exists
[in]overwriteDefaultLayerFileif set to true, deletes and rewrites default layer file if it exists
Returns
addon-prefixed world .ent RELATIVE file path on success, empty string on failure

◆ GetDefaultLayerAbsoluteFilePath()

static string SCR_WorldFilesHelper.GetDefaultLayerAbsoluteFilePath ( string  relativeWorldFilePath)
staticprotected

Get the absolute path to the default layer (worldDir/worldName_Layers/default.layer)

Parameters
[in]relativeWorldFilePathaddon-prefixed .ent file path in which to replace the GenericWorldEntity
Returns
path to the default layer or empty string on error

◆ ReplaceWorldEntity()

static bool SCR_WorldFilesHelper.ReplaceWorldEntity ( string  relativeWorldFilePath,
ResourceName  newWorldEntityPrefab 
)
static

Replaces the current WorldEntity (GenericWorldEntity or Prefab) by the provided Prefab.

Parameters
[in]relativeWorldFilePathaddon-prefixed .ent file path in which to replace the GenericWorldEntity
[in]newWorldEntityPrefabthe new WorldEntity Prefab; if empty, default GenericWorldEntity is be used
Returns
true on success, false otherwise

Member Data Documentation

◆ DEFAULT_LAYER

const string SCR_WorldFilesHelper.DEFAULT_LAYER = "default.layer"
staticprotected

◆ GENERIC_WORLD_ENTITY_CLASS

const string SCR_WorldFilesHelper.GENERIC_WORLD_ENTITY_CLASS = "GenericWorldEntity"
staticprotected

◆ LAYERS_DIR

const string SCR_WorldFilesHelper.LAYERS_DIR = "%1_Layers"
staticprotected

The documentation for this interface was generated from the following file: