|
Arma Reforger Script API
|
Public Member Functions | |
| SCR_EntityCatalog | GetEntityCatalogOfType (EEntityCatalogType catalogType, bool printNotFound=true) |
| Get Entity catalog of specific type not part of a faction The catalog contains all entities part of the specific type not part of a faction. | |
| SCR_EntityCatalog | GetFactionEntityCatalogOfType (EEntityCatalogType catalogType, FactionKey factionKey, bool printNotFound=true) |
| Get Entity catalog of specific type linked to given faction The catalog contains all entities part of the faction of that specific type. | |
| SCR_EntityCatalog | GetFactionEntityCatalogOfType (EEntityCatalogType catalogType, notnull SCR_Faction faction, bool printNotFound=true) |
| Get Entity catalog of specific type linked to given faction The catalog contains all entities part of the faction of that specific type. | |
| int | GetAllEntityCatalogs (notnull out array< SCR_EntityCatalog > outEntityCatalogs) |
| Get all entity catalogs not part of a faction The catalogs contain all entities not part of a faction. | |
| int | GetAllFactionEntityCatalogs (notnull out array< SCR_EntityCatalog > outEntityCatalogs, FactionKey factionKey) |
| Get all entity catalogs within the faction The catalogs contain all entities part of the faction. | |
| int | GetAllFactionEntityCatalogs (notnull out array< SCR_EntityCatalog > outEntityCatalogs, notnull SCR_Faction faction) |
| Get all entity catalogs within the faction The catalogs contain all entities part of the faction. | |
| SCR_EntityCatalogEntry | GetEntryWithPrefabFromCatalog (EEntityCatalogType catalogType, ResourceName prefabToFind) |
| Return entry with specific prefab within general catalog Ignores Disabled Entries Note this search can be somewhat extensive. | |
| SCR_EntityCatalogEntry | GetEntryWithPrefabFromFactionCatalog (EEntityCatalogType catalogType, ResourceName prefabToFind, notnull SCR_Faction faction) |
| Return entry with specific prefab within faction catalog Ignores Disabled Entries Note this search can be somewhat extensive. | |
| SCR_EntityCatalogEntry | GetEntryWithPrefabFromGeneralOrFactionCatalog (EEntityCatalogType catalogType, ResourceName prefabToFind, notnull SCR_Faction faction, bool prioritizeGeneralCatalog=false) |
| Return entry with specific prefab within general or faction catalog Ignores Disabled Entries Note this search can be somewhat extensive. | |
| SCR_EntityCatalogEntry | GetEntryWithPrefabFromAnyCatalog (EEntityCatalogType catalogType, ResourceName prefabToFind, SCR_Faction priorityFaction=null, bool prioritizeGeneralOfPriorityFaction=false) |
| Return entry with specific prefab within general or ANY faction catalog Note this search can be quite extensive! | |
| int | GetFilteredEditorPrefabsOfAllFactions (EEntityCatalogType catalogType, EEditorMode editorMode, notnull out array< ResourceName > filteredPrefabsList, array< EEditableEntityLabel > includedLabels=null, array< EEditableEntityLabel > excludedLabels=null, bool needsAllIncludedLabels=true, bool getFactionLessPrefabs=false) |
| Get all prefabs that have the spawner data, the given labels and are valid in the editor mode for all factions. | |
| int | GetFilteredEditorPrefabs (EEntityCatalogType catalogType, EEditorMode editorMode, SCR_Faction faction, notnull out array< ResourceName > filteredPrefabsList, array< EEditableEntityLabel > includedLabels=null, array< EEditableEntityLabel > excludedLabels=null, bool needsAllIncludedLabels=true) |
| Get all prefabs that have the spawner data, the given labels and are valid in the editor mode. | |
| bool | GetArsenalItems (out array< SCR_ArsenalItem > arsenalItems, SCR_EArsenalItemType typeFilter=-1, SCR_EArsenalItemMode modeFilter=-1, SCR_EArsenalGameModeType arsenalGameModeType=-1, EArsenalItemDisplayType requiresDisplayType=-1) |
| Get all arsenal items configured on the faction Values taken from General Catalog ITEM. | |
| bool | GetFactionArsenalItems (out array< SCR_ArsenalItem > arsenalItems, SCR_Faction faction, SCR_EArsenalItemType typeFilter=-1, SCR_EArsenalItemMode modeFilter=-1, SCR_EArsenalGameModeType arsenalGameModeType=-1, EArsenalItemDisplayType requiresDisplayType=-1) |
| Get all arsenal items configured on the faction Values taken from Faction Catalog ITEM. | |
| int | GetAllArsenalItems (out array< SCR_ArsenalItem > allArsenalItems, SCR_EArsenalItemType typeFilter=-1, SCR_EArsenalItemMode modeFilter=-1, SCR_EArsenalGameModeType arsenalGameModeType=-1, EArsenalItemDisplayType requiresDisplayType=-1) |
| Get all arsenal items configured in any faction and the non-faction catalogs. | |
| array< SCR_ArsenalItem > | GetFilteredArsenalItems (SCR_EArsenalItemType typeFilter, SCR_EArsenalItemMode modeFilter, SCR_EArsenalGameModeType arsenalGameModeType, SCR_Faction faction=null, EArsenalItemDisplayType requiresDisplayType=-1) |
| Get arsenal items filtered by SCR_EArsenalItemType filter, caches values. | |
| ResourceName | GetIdentityItemForCharacter (ChimeraCharacter character) |
| ResourceName | GetDefaultIdentityItem () |
| override void | EOnInit (IEntity owner) |
| override void | OnPostInit (IEntity owner) |
Public Member Functions inherited from SCR_BaseGameModeComponent | |
| SCR_BaseGameMode | GetGameMode () |
| void | OnGameEnd () |
| Called on all machines when the world ends. | |
| void | OnGameStateChanged (SCR_EGameModeState state) |
| Called when game mode state changes called on all machines. | |
| void | OnGameModeStart () |
| Called on every machine when game mode starts. | |
| void | OnGameModeEnd (SCR_GameModeEndData data) |
| Called when game mode ends. | |
| void | OnPlayerConnected (int playerId) |
| Called after a player is connected. | |
| void | OnPlayerAuditSuccess (int playerId) |
| Event is called when player connecting Session hosting current Game Mode where is required authentication verification via. | |
| void | OnPlayerAuditFail (int playerId) |
| Event is called when player connecting Session hosting current Game Mode AuditFail() call may be called under two occasions: 1) verification is required but failed (account is not valid, player is banned, internet issues) 2) player cannot be verified as authentication is not required or possible - where it may be valid behavior (server online connectivity turned off for example) Basically non-audited player cannot access persistency/ etc. | |
| void | OnPlayerAuditTimeouted (int playerId) |
| Event is called when player connected to Session was kicked and did not reconnected in time This mean that slot reservation can be canceled. | |
| void | OnPlayerAuditRevived (int playerId) |
| Event is called when player reconnected successfully back to Session after kick This mean that slot reservation need to be finished (closed). | |
| void | OnPlayerRegistered (int playerId) |
| Called on every machine after a player is registered (identity, name etc.). | |
| void | OnPlayerDisconnected (int playerId, KickCauseCode cause, int timeout) |
| Called after a player is disconnected. | |
| bool | PreparePlayerEntity_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, SCR_SpawnData data, IEntity entity) |
| void | OnSpawnPlayerEntityFailure_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, IEntity entity, SCR_SpawnData data, SCR_ESpawnResult reason) |
| void | OnPlayerSpawnFinalize_S (SCR_SpawnRequestComponent requestComponent, SCR_SpawnHandlerComponent handlerComponent, SCR_SpawnData data, IEntity entity) |
| bool | HandlePlayerKilled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator instigator) |
| See SCR_BaseGameMode.HandlePlayerKilled. | |
| void | OnPlayerKilled (notnull SCR_InstigatorContextData instigatorContextData) |
| Called after a player gets killed. | |
| void | OnPlayerKilledHandled (int playerId, IEntity playerEntity, IEntity killerEntity, notnull Instigator instigator) |
| Called after player gets killed in cases where the kill was handled by the game mode, supressing the default OnPlayerKilled behaviour. | |
| void | OnPlayerDeleted (int playerId, IEntity player) |
| Called after a player gets deleted. | |
| void | OnPlayerRoleChange (int playerId, EPlayerRole roleFlags) |
| Called when player role changes. | |
| void | OnWorldPostProcess (World world) |
| Called once loading of all entities of the world have been finished (still within the loading) | |
| void | OnControllableSpawned (IEntity entity) |
| When a controllable entity is spawned, this event is raised. | |
| void | OnControllableDestroyed (notnull SCR_InstigatorContextData instigatorContextData) |
| When a controllable entity is destroyed, this event is raised. | |
| void | OnControllableDeleted (IEntity entity) |
| Prior to a controllable entity being DELETED, this event is raised. | |
| void | SCR_BaseGameModeComponent (IEntityComponentSource src, IEntity ent, IEntity parent) |
Static Public Member Functions | |
| static SCR_EntityCatalogManagerComponent | GetInstance () |
| static ScriptInvokerVoid | GetOnEntityCatalogInitialized () |
| static void | InitCatalogs (notnull array< ref SCR_EntityCatalog > entityCatalogArray, notnull map< EEntityCatalogType, ref SCR_EntityCatalog > entityCatalogMap) |
| Init Catalog lists to move the arrays into a map for faster processing. | |
Protected Member Functions | |
| bool | GetArsenalItems (out array< SCR_ArsenalItem > arsenalItems, notnull SCR_EntityCatalog itemCatalog, SCR_EArsenalItemType typeFilter=-1, SCR_EArsenalItemMode modeFilter=-1, SCR_EArsenalGameModeType arsenalGameModeType=-1, EArsenalItemDisplayType requiresDisplayType=-1) |
| Gets a filtered list of arsenal items. | |
| void | Init () |
Protected Attributes | |
| ref array< ref SCR_EntityCatalog > | m_aEntityCatalogs |
| ref map< EEntityCatalogType, ref SCR_EntityCatalog > | m_mEntityCatalogs = new map<EEntityCatalogType, ref SCR_EntityCatalog>() |
| SCR_FactionManager | m_FactionManager |
| bool | m_bInitDone |
Protected Attributes inherited from SCR_BaseGameModeComponent | |
| SCR_BaseGameMode | m_pGameMode |
| The game mode entity this component is attached to. | |
Static Protected Attributes | |
| static SCR_EntityCatalogManagerComponent | s_Instance |
| static ref ScriptInvokerVoid | s_OnEntityCatalogInitialized |
| override void SCR_EntityCatalogManagerComponent.EOnInit | ( | IEntity | owner | ) |
| int SCR_EntityCatalogManagerComponent.GetAllArsenalItems | ( | out array< SCR_ArsenalItem > | allArsenalItems, |
| SCR_EArsenalItemType | typeFilter = -1, | ||
| SCR_EArsenalItemMode | modeFilter = -1, | ||
| SCR_EArsenalGameModeType | arsenalGameModeType = -1, | ||
| EArsenalItemDisplayType | requiresDisplayType = -1 ) |
Get all arsenal items configured in any faction and the non-faction catalogs.
Note this is a very intensive seach Values taken from Faction Catalog ITEM
| [out] | allArsenalItems | output array |
| [in] | typeFilter | filter for Types (-1 is ignore filter) |
| [in] | modeFilter | filter for Modes (-1 is ignore filter) |
| [in] | arsenalGameModeType | The Arsenal Game mode type which dictates which items are available (-1 is unrestricted) |
| [in] | requiresDisplayType | Requires the Arsenal data to have display data type (-1 is ignore) |
| int SCR_EntityCatalogManagerComponent.GetAllEntityCatalogs | ( | notnull out array< SCR_EntityCatalog > | outEntityCatalogs | ) |
Get all entity catalogs not part of a faction The catalogs contain all entities not part of a faction.
| [out] | List | of all catalogs within the faction |
| int SCR_EntityCatalogManagerComponent.GetAllFactionEntityCatalogs | ( | notnull out array< SCR_EntityCatalog > | outEntityCatalogs, |
| FactionKey | factionKey ) |
Get all entity catalogs within the faction The catalogs contain all entities part of the faction.
| [out] | List | of all catalogs within the faction |
| [in] | factionKey | key of faction to get all catalogs from |
| int SCR_EntityCatalogManagerComponent.GetAllFactionEntityCatalogs | ( | notnull out array< SCR_EntityCatalog > | outEntityCatalogs, |
| notnull SCR_Faction | faction ) |
Get all entity catalogs within the faction The catalogs contain all entities part of the faction.
| [out] | List | of all catalogs within the faction |
| [in] | faction | faction to get all catalogs from |
|
protected |
Gets a filtered list of arsenal items.
| [out] | arsenalItems | output array |
| [in] | faction | faction to get items from |
| [in] | typeFilter | filter for Types (-1 is ignore filter) |
| [in] | modeFilter | filter for Modes (-1 is ignore filter) |
| [in] | arsenalGameModeType | The Arsenal Game mode type which dictates which items are available (-1 is unrestricted) |
| [in] | requiresDisplayType | Requires the Arsenal data to have display data type (-1 is ignore) |
| bool SCR_EntityCatalogManagerComponent.GetArsenalItems | ( | out array< SCR_ArsenalItem > | arsenalItems, |
| SCR_EArsenalItemType | typeFilter = -1, | ||
| SCR_EArsenalItemMode | modeFilter = -1, | ||
| SCR_EArsenalGameModeType | arsenalGameModeType = -1, | ||
| EArsenalItemDisplayType | requiresDisplayType = -1 ) |
Get all arsenal items configured on the faction Values taken from General Catalog ITEM.
| [out] | arsenalItems | output array |
| [in] | typeFilter | filter for Types (-1 is ignore filter) |
| [in] | modeFilter | filter for Modes (-1 is ignore filter) |
| [in] | arsenalGameModeType | The Arsenal Game mode type which dictates which items are available (-1 is unrestricted) |
| [in] | requiresDisplayType | Requires the Arsenal data to have display data type (-1 is ignore) |
| ResourceName SCR_EntityCatalogManagerComponent.GetDefaultIdentityItem | ( | ) |
| SCR_EntityCatalog SCR_EntityCatalogManagerComponent.GetEntityCatalogOfType | ( | EEntityCatalogType | catalogType, |
| bool | printNotFound = true ) |
Get Entity catalog of specific type not part of a faction The catalog contains all entities part of the specific type not part of a faction.
| [in] | catalogType | Type to get catalog of |
| [in] | printNotFound | True will print a warning if the given category was not found |
| SCR_EntityCatalogEntry SCR_EntityCatalogManagerComponent.GetEntryWithPrefabFromAnyCatalog | ( | EEntityCatalogType | catalogType, |
| ResourceName | prefabToFind, | ||
| SCR_Faction | priorityFaction = null, | ||
| bool | prioritizeGeneralOfPriorityFaction = false ) |
Return entry with specific prefab within general or ANY faction catalog Note this search can be quite extensive!
Ignores Disabled Entries
| [in] | catalogType | Catalog type to get entry in |
| [in] | prefabToFind | Prefab the entry has that you are looking for |
| [in] | prioritizeGeneralOfPriorityFaction | If true will search in general catalog then faction catalogs. False it will first search priorityFaction (if any) than General than any other faction |
| [in] | priorityFaction | If given it will first try and get the entry from this faction before searching all the other factions |
| SCR_EntityCatalogEntry SCR_EntityCatalogManagerComponent.GetEntryWithPrefabFromCatalog | ( | EEntityCatalogType | catalogType, |
| ResourceName | prefabToFind ) |
Return entry with specific prefab within general catalog Ignores Disabled Entries Note this search can be somewhat extensive.
| [in] | catalogType | Catalog type to get entry in |
| [in] | prefabToFind | Prefab the entry has that you are looking for |
| SCR_EntityCatalogEntry SCR_EntityCatalogManagerComponent.GetEntryWithPrefabFromFactionCatalog | ( | EEntityCatalogType | catalogType, |
| ResourceName | prefabToFind, | ||
| notnull SCR_Faction | faction ) |
Return entry with specific prefab within faction catalog Ignores Disabled Entries Note this search can be somewhat extensive.
| [in] | catalogType | Catalog type to get entry in |
| [in] | prefabToFind | Prefab the entry has that you are looking for |
| [in] | faction | faction to find entry in |
| SCR_EntityCatalogEntry SCR_EntityCatalogManagerComponent.GetEntryWithPrefabFromGeneralOrFactionCatalog | ( | EEntityCatalogType | catalogType, |
| ResourceName | prefabToFind, | ||
| notnull SCR_Faction | faction, | ||
| bool | prioritizeGeneralCatalog = false ) |
Return entry with specific prefab within general or faction catalog Ignores Disabled Entries Note this search can be somewhat extensive.
| [in] | catalogType | Catalog type to get entry in |
| [in] | prefabToFind | Prefab the entry has that you are looking for |
| [in] | prioritizeGeneralCatalog | If true will search in general catalog then faction catalog. False to search the other way around |
| [in] | faction | faction to find entry in along with general catalog |
| bool SCR_EntityCatalogManagerComponent.GetFactionArsenalItems | ( | out array< SCR_ArsenalItem > | arsenalItems, |
| SCR_Faction | faction, | ||
| SCR_EArsenalItemType | typeFilter = -1, | ||
| SCR_EArsenalItemMode | modeFilter = -1, | ||
| SCR_EArsenalGameModeType | arsenalGameModeType = -1, | ||
| EArsenalItemDisplayType | requiresDisplayType = -1 ) |
Get all arsenal items configured on the faction Values taken from Faction Catalog ITEM.
| [out] | arsenalItems | output array |
| [in] | faction | faction to get items from |
| [in] | typeFilter | filter for Types (-1 is ignore filter) |
| [in] | modeFilter | filter for Modes (-1 is ignore filter) |
| [in] | arsenalGameModeType | The Arsenal Game mode type which dictates which items are available (-1 is unrestricted) |
| [in] | requiresDisplayType | Requires the Arsenal data to have display data type (-1 is ignore) |
| SCR_EntityCatalog SCR_EntityCatalogManagerComponent.GetFactionEntityCatalogOfType | ( | EEntityCatalogType | catalogType, |
| FactionKey | factionKey, | ||
| bool | printNotFound = true ) |
Get Entity catalog of specific type linked to given faction The catalog contains all entities part of the faction of that specific type.
| [in] | catalogType | Type to get catalog of |
| [in] | factionKey | FactionKey of faction |
| [in] | printNotFound | True will print a warning if the given category was not found |
| SCR_EntityCatalog SCR_EntityCatalogManagerComponent.GetFactionEntityCatalogOfType | ( | EEntityCatalogType | catalogType, |
| notnull SCR_Faction | faction, | ||
| bool | printNotFound = true ) |
Get Entity catalog of specific type linked to given faction The catalog contains all entities part of the faction of that specific type.
| [in] | catalogType | Type to get catalog of |
| [in] | faction | Faction to find |
| [in] | printNotFound | True will print a warning if the given category was not found |
| array< SCR_ArsenalItem > SCR_EntityCatalogManagerComponent.GetFilteredArsenalItems | ( | SCR_EArsenalItemType | typeFilter, |
| SCR_EArsenalItemMode | modeFilter, | ||
| SCR_EArsenalGameModeType | arsenalGameModeType, | ||
| SCR_Faction | faction = null, | ||
| EArsenalItemDisplayType | requiresDisplayType = -1 ) |
Get arsenal items filtered by SCR_EArsenalItemType filter, caches values.
| [in] | typeFilter | Combined flags for available items for this faction (RIFLE, MAGAZINE, EQUIPMENT, RADIOBACKPACK etc.) |
| [in] | modeFilter | Things like AMMO and CONSUMABLE |
| [in] | faction | If empty will take non-faction data else will take the data from the faction |
| [in] | arsenalGameModeType | The Arsenal Game mode type which dictates which items are available (-1 is unrestricted) |
| [in] | requiresDisplayType | Requires the Arsenal data to have display data type (-1 is ignore) |
| int SCR_EntityCatalogManagerComponent.GetFilteredEditorPrefabs | ( | EEntityCatalogType | catalogType, |
| EEditorMode | editorMode, | ||
| SCR_Faction | faction, | ||
| notnull out array< ResourceName > | filteredPrefabsList, | ||
| array< EEditableEntityLabel > | includedLabels = null, | ||
| array< EEditableEntityLabel > | excludedLabels = null, | ||
| bool | needsAllIncludedLabels = true ) |
Get all prefabs that have the spawner data, the given labels and are valid in the editor mode.
| catalogType | Type to catalog to get prefabs from | |
| editorMode | Editor mode to get valid entries from | |
| faction | Faction (Optional) to get valid prefabs from | |
| [out] | filteredPrefabsList | Filltered array of valid prefabs |
| includedLabels | A list of labels the entity needs all/any to have. Can be null if any of the other arrays are filled | |
| excludedLabels | A list of labels the entity CANNOT have ANY of. Can be null if any of the other arrays are filled | |
| needsAllIncludedLabels | If true included List all needs to be true, if false any needs to be true |
| int SCR_EntityCatalogManagerComponent.GetFilteredEditorPrefabsOfAllFactions | ( | EEntityCatalogType | catalogType, |
| EEditorMode | editorMode, | ||
| notnull out array< ResourceName > | filteredPrefabsList, | ||
| array< EEditableEntityLabel > | includedLabels = null, | ||
| array< EEditableEntityLabel > | excludedLabels = null, | ||
| bool | needsAllIncludedLabels = true, | ||
| bool | getFactionLessPrefabs = false ) |
Get all prefabs that have the spawner data, the given labels and are valid in the editor mode for all factions.
| catalogType | Type to catalog to get prefabs from | |
| editorMode | Editor mode to get valid entries from | |
| [out] | filteredPrefabsList | Filltered array of valid prefabs |
| includedLabels | A list of labels the entity needs all/any to have. Can be null if any of the other arrays are filled | |
| excludedLabels | A list of labels the entity CANNOT have ANY of. Can be null if any of the other arrays are filled | |
| needsAllIncludedLabels | If true included List all needs to be true, if false any needs to be true | |
| getFactionLessPrefabs | If true than it will also get the prefabs not assigned to any faction |
| ResourceName SCR_EntityCatalogManagerComponent.GetIdentityItemForCharacter | ( | ChimeraCharacter | character | ) |
|
static |
|
static |
|
protected |
|
static |
Init Catalog lists to move the arrays into a map for faster processing.
| [in] | entityCatalogArray | Array of entity catalog to move into the map |
| [in] | entityCatalogMap | the map to move the catalogs to. Catalogs with the same type will be merged |
| override void SCR_EntityCatalogManagerComponent.OnPostInit | ( | IEntity | owner | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |