Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл CentralEconomy.c

См. исходные тексты.

Структуры данных

class  EconomyLogCategories
 Categories for CEApi.EconomyLog. Подробнее...
 
class  EconomyOutputStrings
 Special strings for CEApi.EconomyOutput. Подробнее...
 
class  CEItemProfile
 

Функции

class EconomyLogCategories EconomyMapStrings ()
 Special strings for CEApi.EconomyMap.
 
void EconomyLogCategories ()
 
void ~EconomyLogCategories ()
 
void ~EconomyMapStrings ()
 
static string Category (string category)
 Generates string that will make CEApi.EconomyMap use all items with this category.
 
static string Tag (string tag)
 Generates string that will make CEApi.EconomyMap use all items with this tag.
 
void EconomyOutputStrings ()
 
void ~EconomyOutputStrings ()
 
void ~CEApi ()
 
proto native void ExportSpawnData ()
 Regenerates "storage/spawnpoints.bin" if necessary.
 
proto native void ExportProxyData (vector vCenter=vector.Zero, float fRadius=0)
 Generates "storage/export/mapgrouppos.xml".
 
proto native void ExportClusterData ()
 Generates "storage/export/mapgroupcluster.xml".
 
proto native void ExportProxyProto ()
 Generates "storage/export/mapgroupproto.xml".
 
proto native void MarkCloseProxy (float fRadius, bool bAllSelections)
 Invalidates loot spawn points which are closer than the radius supplied.
 
proto native void RemoveCloseProxy ()
 Removes all invalid points.
 
proto native void ListCloseProxy (float fRadius)
 Outputs a list of all loot points closer than specified radius.
 
proto native bool SpawnAnalyze (string sClassName)
 Will emulate the spawning of the item which is being looked at and generate images (.tga) in storage/lmap and output logs.
 
proto native void TimeShift (float fShift)
 Subtracts the supplied value from the current lifetime of all items in the world.
 
proto native void OverrideLifeTime (float fLifeTime)
 Fills in the Debug Lifetime, which will be used for any new DE spawned.
 
proto native Entity SpawnGroup (string sGroupName, vector vPos, float fAngle=-1)
 Force spawn specific prototype group + loot at position.
 
proto native void SpawnDE (string sEvName, vector vPos, float fAngle=-1)
 Force spawn specific dynamic event.
 
proto native void SpawnDEEx (string sEvName, vector vPos, float fAngle, int uFlags)
 Force spawn specific dynamic event.
 
proto native void SpawnLoot (string sEvName, vector vPos, float fAngle, int iCount=1, float fRange=1)
 Spawn an item through CE.
 
proto native void SpawnDynamic (vector vPos, bool bShowCylinders=true, float fDefaultDistance=0)
 Spawn all entities with dynamic category through CE.
 
proto native void SpawnVehicles (vector vPos, bool bShowCylinders=false, float fDefaultDistance=20)
 Spawn all entities with vehicles category through CE.
 
proto native void SpawnBuilding (vector vPos, bool bShowCylinders=false, float fDefaultDistance=20)
 Spawn all entities with building category through CE.
 
proto native void SpawnEntity (string sClassName, vector vPos, float fRange, int iCount)
 Spawn an entity through CE.
 
proto native Object SpawnSingleEntity (string sClassName, vector vPos)
 Spawn an entity through CE.
 
proto native void SpawnRotation (string sClassName, vector vPos, float fRange, int iCount, int iFlags)
 Spawn an entity through CE.
 
proto native void SpawnPerfTest (string sClassName, int iCount)
 Spawn an entity through CE, x amount of times in a grid.
 
proto native void CleanMap ()
 Queue up the depleting of lifetime of everything in the world.
 
proto native void EconomyLog (string sLogType)
 Outputs debug file to storage/log/*.csv.
 
proto native void EconomyMap (string sMapType)
 Outputs debug file to storage/lmap/*.tga showing the current places this is spawned.
 
proto native void EconomyOutput (string sOutputType, float fRange)
 Outputs debug logs into server log or rpt.
 
proto native void RadiusLifetimeIncrease (vector vCenter, float fRadius, float fValue)
 Process lifetime increase within radius by value (sec)
 
proto native void RadiusLifetimeDecrease (vector vCenter, float fRadius, float fValue)
 Process lifetime decrease within radius by value (sec)
 
proto native void RadiusLifetimeReset (vector vCenter, float fRadius)
 Process lifetime reset to default value from DB within radius.
 
Globals API

Get values from globals.xml

proto native int GetCEGlobalInt (string varName)
 Get int from globals.xml.
 
proto native float GetCEGlobalFloat (string varName)
 Get float from globals.xml.
 
proto native string GetCEGlobalString (string varName)
 Get string from globals.xml.
 
Avoidance API

Optimized internal methods that the CE uses to avoid spawning DE within certain distances

proto native bool AvoidPlayer (vector vPos, float fDistance)
 Check if there is a player within a radius.
 
proto native bool AvoidVehicle (vector vPos, float fDistance, string sDEName="")
 Check if there is a vehicle within a radius.
 
proto native int CountPlayersWithinRange (vector vPos, float fRange)
 Check if there is a vehicle within a radius.
 
CE Debug menu Script API

DIAG ONLY: These options are available from the in-game debug menu on Diag exe (Game > Central Economy), documentation can be found on wiki

proto native void LootSetSpawnVolumeVisualisation (ESpawnVolumeVis mode)
 "Spawn Volume Vis"
 
proto native void LootToggleSpawnSetup (bool mode)
 "Setup Vis"
 
proto native void LootToggleVolumeEditing (bool mode)
 "Edit Volume"
 
proto native void LootRetraceGroupPoints ()
 "Re-Trace Group Points"
 
proto native void LootExportGroup ()
 "Export Group >>"
 
proto native void LootExportAllGroups ()
 "Export All Groups >>>>" / GetCEApi.ExportProxyProto();
 
proto native void LootExportMap ()
 "<<< Export Map" / GetCEApi.ExportProxyData(vector.Zero, 0);
 
proto native void LootExportClusters ()
 "<<< Export Clusters" / GetCEApi().ExportClusterData()
 
proto native void LootDepleteLifetime ()
 "Deplete Lifetime"
 
proto native void LootSetDamageToOne ()
 "Set Damage = 1.0"
 
proto native void LootDepleteAndDamage ()
 "Damage + Deplete"
 
proto native void InfectedToggleVisualisation (bool mode)
 "Infected Vis"
 
proto native void InfectedToggleZoneInfo (bool mode)
 "Infected Zone Info"
 
proto native void InfectedSpawn ()
 "Infected Spawn"
 
proto native void InfectedResetCleanup ()
 "Reset Cleanup"
 
proto native void AnimalToggleVisualisation (bool mode)
 "Animal Vis"
 
proto native void AnimalSpawn ()
 "Animal Spawn"
 
proto native void AnimalAmbientSpawn ()
 "Ambient Spawn"
 
proto native void ToggleVehicleAndWreckVisualisation (bool mode)
 "Vehicle&Wreck Vis"
 
proto native void ToggleLootVisualisation (bool mode)
 "Loot Vis"
 
proto native void ToggleClusterVisualisation (bool mode)
 "Cluster Vis"
 
proto native void ToggleDynamicEventStatus (bool mode)
 "Dynamic Events Status"
 
proto native void ToggleDynamicEventVisualisation (bool mode)
 "Dynamic Events Vis"
 
proto native void DynamicEventSpawn ()
 "Dynamic Events Spawn"
 
proto native void DynamicEventExport ()
 "Export Dyn Event >>"
 
proto native void ToggleOverallStats (bool mode)
 "Overall Stats"
 

Переменные

const int ECE_NONE = 0
 
const int ECE_SETUP = 2
 
const int ECE_TRACE = 4
 
const int ECE_CENTER = 8
 
const int ECE_UPDATEPATHGRAPH = 32
 
const int ECE_ROTATIONFLAGS = 512
 
const int ECE_CREATEPHYSICS = 1024
 
const int ECE_INITAI = 2048
 
const int ECE_AIRBORNE = 4096
 
const int ECE_EQUIP_ATTACHMENTS = 8192
 
const int ECE_EQUIP_CARGO = 16384
 
const int ECE_EQUIP = 24576
 
const int ECE_EQUIP_CONTAINER = 2097152
 
const int ECE_LOCAL = 1073741824
 
const int ECE_NOSURFACEALIGN = 262144
 
const int ECE_KEEPHEIGHT = 524288
 
const int ECE_NOLIFETIME = 4194304
 
const int ECE_NOPERSISTENCY_WORLD = 8388608
 
const int ECE_NOPERSISTENCY_CHAR = 16777216
 
const int ECE_DYNAMIC_PERSISTENCY = 33554432
 
const int ECE_IN_INVENTORY = 787456
 
const int ECE_PLACE_ON_SURFACE = 1060
 
const int ECE_OBJECT_SWAP = 787488
 
const int ECE_FULL = 25126
 
const int RF_NONE = 0
 
const int RF_FRONT = 1
 
const int RF_TOP = 2
 
const int RF_LEFT = 4
 
const int RF_RIGHT = 8
 
const int RF_BACK = 16
 
const int RF_BOTTOM = 32
 
const int RF_ALL = 63
 
const int RF_IGNORE = 64
 
const int RF_TOPBOTTOM = 34
 
const int RF_LEFTRIGHT = 12
 
const int RF_FRONTBACK = 17
 
const int RF_RANDOMROT = 64
 
const int RF_ORIGINAL = 128
 
const int RF_DECORRECTION = 256
 
const int RF_DEFAULT = 512
 
const string Economy = "economy"
 
const string EconomyRespawn = "economy_respawn"
 
const string RespawnQueue = "respawn_queue"
 
const string Container = "container"
 
const string Matrix = "matrix"
 
const string UniqueLoot = "uniqueloot"
 
const string Bind = "bind"
 
const string SetupFail = "setupfail"
 
const string Storage = "storage"
 
const string Classes = "class"
 
const string Category = "category"
 
const string Tag = "tag"
 
const string SCategory = "s_category"
 
const string STag = "s_tag"
 
const string SAreaflags = "s_areaflags"
 
const string SCrafted = "s_crafted"
 
const string MapGroup = "map_group"
 
const string MapComplete = "map_complete"
 
const string InfectedZone = "infected_zone"
 
const string ALL_ALL = "all:all"
 Everything.
 
const string ALL_LOOT = "all:loot"
 All loot.
 
const string ALL_VEHICLE = "all:vehicle"
 All vehicles.
 
const string ALL_INFECTED = "all:infected"
 All infected.
 
const string ALL_ANIMAL = "all:animal"
 All animals.
 
const string ALL_PLAYER = "all:player"
 All players.
 
const string ALL_PROXY = "all:proxy"
 All proxies.
 
const string ALL_PROXY_STATIC = "all:proxystatic"
 All static loot spawns.
 
const string ALL_PROXY_DYNAMIC = "all:proxydynamic"
 All dynamic loot spawns.
 
const string ALL_PROXY_ABANDONED = "all:proxyabandoned"
 All abandoned loot spawns.
 
class EconomyOutputStrings OFF = 0
 
class EconomyOutputStrings ADAPTIVE = 0
 
class EconomyOutputStrings VOLUME = 0
 
class EconomyOutputStrings OCCUPIED = 0
 
const string LINKS = "links"
 Lists stats regarding which loot spawn) that are linked together and how many there are.
 
const string SUSPICIOUS = "suspicious"
 Lists loot spawns that have more loot than their maximum + 4.
 
const string DE_CLOSE_POINT = "declosepoint"
 Lists DE spawns that have positions that are within supplied range (< fRange, not equal)
 
const string ABANDONED = "abandoned"
 Lists loot spawns that have been marked as abandoned.
 
const string EMPTY = "empty"
 Lists loot spawns that are not abandoned but have no loot.
 
const string CLOSE = "close"
 Lists loot spawns that are not abandoned and within the supplied range (< fRange, not equal)
 
const string WORLD = "world"
 Lists the number of objects inside of categories.
 
const string STATUS = "status"
 Lists overall CE stats.
 
const string LOOT_SIZE = "lootsize"
 Lists the maxlootsize of all CE items.
 

DEPRECATED/LEGACY

These don't do anything anymore but are left for backwards compatibility

class CEItemProfile CEApi () = 0
 API to interact with Central Economy.
 
proto native void PlatformStatTest ()
 
proto native void LootToggleProxyEditing (bool mode)
 
proto native void OnUpdate ()
 
proto native CEApi GetCEApi ()
 Get the CE API.
 

Функции

◆ AnimalAmbientSpawn()

proto native void AnimalAmbientSpawn ( )
private

"Ambient Spawn"

◆ AnimalSpawn()

proto native void AnimalSpawn ( )
private

"Animal Spawn"

◆ AnimalToggleVisualisation()

proto native void AnimalToggleVisualisation ( bool mode)
private

"Animal Vis"

◆ AvoidPlayer()

proto native bool AvoidPlayer ( vector vPos,
float fDistance )
private

Check if there is a player within a radius.

Аргументы
vPosvector The center point
fDistancefloat The radius around the center point
Возвращает
bool Returns false when there is a player inside supplied area, true when it successfully avoided players
GetCEApi().AvoidPlayer(Vector(500, 0, 500), 20);
proto native CEApi GetCEApi()
Get the CE API.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

Используется в ItemBase::SpawnCatch().

◆ AvoidVehicle()

proto native bool AvoidVehicle ( vector vPos,
float fDistance,
string sDEName = "" )
private

Check if there is a vehicle within a radius.

Аргументы
vPosvector The center point
fDistancefloat The radius around the center point
sDENamestring A specific DE to avoid, if left empty, will avoid all vehicles
Возвращает
bool Returns false when there is a vehicle inside supplied area, true when it successfully avoided vehicles
GetCEApi().AvoidVehicle(Vector(500, 0, 500), 500, "VehicleCivilianSedan");

◆ Category()

static string Category ( string category)
staticprivate

Generates string that will make CEApi.EconomyMap use all items with this category.

Заметки
This is refering to the CE categories of loot defined in cfglimitsdefinition.xml
Предупреждения
This is persistent per session, when you set it, it will persist until it is set to something else
Аргументы
categorystring The desired loot category
Возвращает
string The string to pass into CEApi.EconomyMap
GetCEApi().EconomyMap(EconomyMapStrings.Category("food"));
class EconomyLogCategories EconomyMapStrings()
Special strings for CEApi.EconomyMap.
113 {
114 return string.Format("category:%1", category);
115 }
Definition EntityAI.c:95

◆ CleanMap()

proto native void CleanMap ( )
private

Queue up the depleting of lifetime of everything in the world.

Заметки
DEVELOPER/DIAG ONLY
GetCEApi().CleanMap();

◆ CountPlayersWithinRange()

proto native int CountPlayersWithinRange ( vector vPos,
float fRange )
private

Check if there is a vehicle within a radius.

Аргументы
vPosvector The center point
fRangefloat The radius around the center point
Возвращает
int The amoutn of players inside supplied area
GetCEApi().CountPlayersWithinRange(Vector(500, 0, 500), 500);

◆ DynamicEventExport()

proto native void DynamicEventExport ( )
private

"Export Dyn Event >>"

◆ DynamicEventSpawn()

proto native void DynamicEventSpawn ( )
private

"Dynamic Events Spawn"

◆ EconomyLog()

proto native void EconomyLog ( string sLogType)
private

Outputs debug file to storage/log/*.csv.

Заметки
DEVELOPER/DIAG ONLY
Аргументы
sLogTypestring The type of log (EconomyLogCategories)
Categories for CEApi.EconomyLog.
Definition CentralEconomy.c:70
const string Economy
Definition CentralEconomy.c:74

◆ EconomyLogCategories()

void EconomyLogCategories ( )
private

◆ EconomyMap()

proto native void EconomyMap ( string sMapType)
private

Outputs debug file to storage/lmap/*.tga showing the current places this is spawned.

Заметки
DEVELOPER/DIAG ONLY
This works best when you have an image of the map to overlay the tga with afterwards
Аргументы
sMapTypestring The type of lmap, can be just a class name or a special string
Заметки
There are several prefixes and sets of strings that can be passed in here, see EconomyMapStrings
// To check only a specific item
GetCEApi().EconomyMap("Deagle");

◆ EconomyMapStrings()

class EconomyLogCategories EconomyMapStrings ( )

Special strings for CEApi.EconomyMap.

◆ EconomyOutput()

proto native void EconomyOutput ( string sOutputType,
float fRange )
private

Outputs debug logs into server log or rpt.

Заметки
DEVELOPER/DIAG ONLY
Аргументы
sOutputTypestring One of the strings specified in EconomyOutputStrings
fRangefloat Range parameter used for some of the options
GetCEApi().EconomyOutput(EconomyOutputStrings.CLOSE, 3);
Special strings for CEApi.EconomyOutput.
Definition CentralEconomy.c:159
const string CLOSE
Lists loot spawns that are not abandoned and within the supplied range (< fRange, not equal)
Definition CentralEconomy.c:193

◆ EconomyOutputStrings()

void EconomyOutputStrings ( )
private

◆ ExportClusterData()

proto native void ExportClusterData ( )
private

Generates "storage/export/mapgroupcluster.xml".

GetCEApi().ExportClusterData();

◆ ExportProxyData()

proto native void ExportProxyData ( vector vCenter = vector.Zero,
float fRadius = 0 )
private

Generates "storage/export/mapgrouppos.xml".

Аргументы
vCentervector Center of area to generate from
Заметки
When using a zero vector, this will automatically get the world center
Аргументы
fRadiusfloat Radius in meters of area to generate from
Заметки
When 0, this will automatically get a radius covering the map
// Export for whole map
GetCEApi().ExportProxyData();

◆ ExportProxyProto()

proto native void ExportProxyProto ( )
private

Generates "storage/export/mapgroupproto.xml".

GetCEApi().ExportProxyProto();

◆ ExportSpawnData()

proto native void ExportSpawnData ( )
private

Regenerates "storage/spawnpoints.bin" if necessary.

Заметки
Already happens automatically when server starts before it is loaded in
GetCEApi().ExportSpawnData();

◆ GetCEApi()

proto native CEApi GetCEApi ( )
private

Get the CE API.

Предупреждения
Only exists when the game has CE enabled
Заметки
This means that this will work on anything which is running a mission with an initialized Hive
Client does not have Hive when connected to a server, only the server does if it was set up in the init.c

Используется в BaseBuildingBase::AfterStoreLoad(), CGame::GlobalsInit(), HandlePlayerBody(), BaseBuildingBase::InitRefresherData(), Entity::MaxLifetimeRefreshCalc(), BaseBuildingBase::OnCEUpdate(), DayZPlayerCommandDeathCallback::OnSimulationEnd(), BaseBuildingBase::SetRefresherActive(), ItemBase::SpawnCatch() и BaseBuildingBase::TerritoryFlag().

◆ GetCEGlobalFloat()

proto native float GetCEGlobalFloat ( string varName)
private

Get float from globals.xml.

Заметки
type="1"
Аргументы
varNamestring The name of the entry
Возвращает
float The value or float.MIN if not found/not a float

◆ GetCEGlobalInt()

proto native int GetCEGlobalInt ( string varName)
private

Get int from globals.xml.

Заметки
type="0"
Аргументы
varNamestring The name of the entry
Возвращает
int The value or int.MIN if not found/not an int

◆ GetCEGlobalString()

proto native string GetCEGlobalString ( string varName)
private

Get string from globals.xml.

Заметки
type="2"
Аргументы
varNamestring The name of the entry
Возвращает
string The value or empty string if not found/not a string

◆ InfectedResetCleanup()

proto native void InfectedResetCleanup ( )
private

"Reset Cleanup"

◆ InfectedSpawn()

proto native void InfectedSpawn ( )
private

"Infected Spawn"

◆ InfectedToggleVisualisation()

proto native void InfectedToggleVisualisation ( bool mode)
private

"Infected Vis"

◆ InfectedToggleZoneInfo()

proto native void InfectedToggleZoneInfo ( bool mode)
private

"Infected Zone Info"

◆ ListCloseProxy()

proto native void ListCloseProxy ( float fRadius)
private

Outputs a list of all loot points closer than specified radius.

Заметки
This will automatically be checking all points against all points
This is a better way of handling it than the above two methods, as it can be then be removed manually from the xmls
Is the same as CEApi.EconomyOutput(EconomyOutputStrings.CLOSE, fRadius)
Аргументы
fRadiusfloat The minimum desired distance in meters between loot spawn points
GetCEApi().ListCloseProxy(0.3);

◆ LootDepleteAndDamage()

proto native void LootDepleteAndDamage ( )
private

"Damage + Deplete"

◆ LootDepleteLifetime()

proto native void LootDepleteLifetime ( )
private

"Deplete Lifetime"

◆ LootExportAllGroups()

proto native void LootExportAllGroups ( )
private

"Export All Groups >>>>" / GetCEApi.ExportProxyProto();

◆ LootExportClusters()

proto native void LootExportClusters ( )
private

"<<< Export Clusters" / GetCEApi().ExportClusterData()

◆ LootExportGroup()

proto native void LootExportGroup ( )
private

"Export Group >>"

◆ LootExportMap()

proto native void LootExportMap ( )
private

"<<< Export Map" / GetCEApi.ExportProxyData(vector.Zero, 0);

◆ LootRetraceGroupPoints()

proto native void LootRetraceGroupPoints ( )
private

"Re-Trace Group Points"

◆ LootSetDamageToOne()

proto native void LootSetDamageToOne ( )
private

"Set Damage = 1.0"

◆ LootSetSpawnVolumeVisualisation()

proto native void LootSetSpawnVolumeVisualisation ( ESpawnVolumeVis mode)
private

"Spawn Volume Vis"

◆ LootToggleProxyEditing()

proto native void LootToggleProxyEditing ( bool mode)
private

◆ LootToggleSpawnSetup()

proto native void LootToggleSpawnSetup ( bool mode)
private

"Setup Vis"

◆ LootToggleVolumeEditing()

proto native void LootToggleVolumeEditing ( bool mode)
private

"Edit Volume"

◆ MarkCloseProxy()

proto native void MarkCloseProxy ( float fRadius,
bool bAllSelections )
private

Invalidates loot spawn points which are closer than the radius supplied.

Заметки
Will output a message indicating how many points were invalidated
Аргументы
fRadiusfloat The minimum desired distance in meters between loot spawn points
Заметки
When 0 it will use a radius of 0.5
Аргументы
bAllSelectionsbool When false, will only check the points within a container against each other, when true will against all points
// Example: I want there to be a minimum distance of 0.3m between any loot spawn point
GetCEApi().MarkCloseProxy(0.3, true);

◆ OverrideLifeTime()

proto native void OverrideLifeTime ( float fLifeTime)
private

Fills in the Debug Lifetime, which will be used for any new DE spawned.

Аргументы
fLifeTimefloat The lifetime for any DE spawned after this call
Заметки
When this is set back to 0, it will stop using the Debug Lifetime
// Any DE spawned after this call will have a lifetime of 300 seconds
GetCEApi().OverrideLifeTime(300);

◆ PlatformStatTest()

proto native void PlatformStatTest ( )
private

◆ RadiusLifetimeDecrease()

proto native void RadiusLifetimeDecrease ( vector vCenter,
float fRadius,
float fValue )
private

Process lifetime decrease within radius by value (sec)

Заметки
Will automatically clamp result between min and max lifetime [3, 316224000] (3 seconds to 10 years)
Аргументы
vCentervector The center point
fRadiusfloat The radius around the center point
fValuefloat The value to decrease the lifetime by
GetCEApi().RadiusLifetimeDecrease(Vector(500, 0, 500), 3, 500);

◆ RadiusLifetimeIncrease()

proto native void RadiusLifetimeIncrease ( vector vCenter,
float fRadius,
float fValue )
private

Process lifetime increase within radius by value (sec)

Заметки
Will automatically clamp result between min and max lifetime [3, 316224000] (3 seconds to 10 years)
Аргументы
vCentervector The center point
fRadiusfloat The radius around the center point
fValuefloat The value to increase the lifetime by
Заметки
When 0, this will reset it to default instead (but it's better to use RadiusLifetimeReset still)
GetCEApi().RadiusLifetimeIncrease(Vector(500, 0, 500), 3, 500);

◆ RadiusLifetimeReset()

proto native void RadiusLifetimeReset ( vector vCenter,
float fRadius )
private

Process lifetime reset to default value from DB within radius.

Аргументы
vCentervector The center point
fRadiusfloat The radius around the center point
GetCEApi().RadiusLifetimeReset(Vector(500, 0, 500), 3);

◆ RemoveCloseProxy()

proto native void RemoveCloseProxy ( )
private

Removes all invalid points.

Заметки
Is best paired with a MarkCloseProxy call first to invalidate unwanted points
Will output a message indicating the amount of deleted points
GetCEApi().RemoveCloseProxy();

◆ SpawnAnalyze()

proto native bool SpawnAnalyze ( string sClassName)
private

Will emulate the spawning of the item which is being looked at and generate images (.tga) in storage/lmap and output logs.

Заметки
DEVELOPER/DIAG ONLY
This will only work if the loot spawner is active
Аргументы
sClassNamestring The class name of the desired item to analyze
Заметки
When using "*" as class name, instead of generating images, it will generate a .csv in storage/log containing the output of all spawnable items
Возвращает
bool Whether the operation was successful, it might fail in certain scenarios if the CE doesn't update in time
GetCEApi().SpawnAnalyze("FlatCap_Grey");

◆ SpawnBuilding()

proto native void SpawnBuilding ( vector vPos,
bool bShowCylinders = false,
float fDefaultDistance = 20 )
private

Spawn all entities with building category through CE.

Заметки
DEVELOPER/DIAG ONLY
Will print additional logs to RPT
Аргументы
vPosvector The position to spawn the Entities at
Заметки
This will be the starting position, the items will be split into segments by CE BBox size (smallest to largest)
Аргументы
bShowCylindersbool Whether to draw the CE BBox with debug shapes
Заметки
Red: Invalid BBox; Yellow: Not in DB; Green: All ok
These will most likely just always be red
Аргументы
fDefaultDistancefloat The default distance to use when the entity does not have a CE BBox
Заметки
This means that all the ones with invalid CE BBoxes will be piled up at the starting position when this is 0
GetCEApi().SpawnBuilding(Vector(5, 10, 5), true);

◆ SpawnDE()

proto native void SpawnDE ( string sEvName,
vector vPos,
float fAngle = -1 )
private

Force spawn specific dynamic event.

Заметки
DEVELOPER/DIAG ONLY
Versatile, can be used for Animal, Infected, Static, Item and Vehicle
Is the only one capable of spawning DE's that have DE Groups
Is the same as the next one, but has ECE_FULL flags and a hidden flag which overrides herd limit
This is also FORCE spawn, so it will bypass any limit and avoidance checks
Аргументы
sEvNamestring The DE to spawn
vPosvector The position to spawn the Entity at
fAnglefloat Angle to spawn the Entity with in degrees [0, 360]
Заметки
When a negative value, will pick a random one
Возвращает
bool Whether the spawn was successful
GetCEApi().SpawnDE("StaticHeliCrash", Vector(5, 10, 5));

◆ SpawnDEEx()

proto native void SpawnDEEx ( string sEvName,
vector vPos,
float fAngle,
int uFlags )
private

Force spawn specific dynamic event.

Заметки
DEVELOPER/DIAG ONLY
Is the same one as above but with the possibility of custom flags
Аргументы
sEvNamestring The DE to spawn
vPosvector The position to spawn the Entity at
fAnglefloat Angle to spawn the Entity with in degrees [0, 360]
Заметки
When a negative value, will pick a random one
Аргументы
uFlagsint ECE flags to apply while spawning the DE
Возвращает
bool Whether the spawn was successful
GetCEApi().SpawnDEEx("StaticHeliCrash", Vector(5, 10, 5), ECE_FULL);
const int ECE_FULL
Definition CentralEconomy.c:40

◆ SpawnDynamic()

proto native void SpawnDynamic ( vector vPos,
bool bShowCylinders = true,
float fDefaultDistance = 0 )
private

Spawn all entities with dynamic category through CE.

Заметки
DEVELOPER/DIAG ONLY
Will print additional logs to RPT
Аргументы
vPosvector The position to spawn the Entities at
Заметки
This will be the starting position, the items will be split into segments by CE BBox size (smallest to largest)
Аргументы
bShowCylindersbool Whether to draw the CE BBox with debug shapes
Заметки
Red: Invalid BBox; Yellow: Not in DB; Green: All ok
Аргументы
fDefaultDistancefloat The default distance to use when the entity does not have a CE BBox
Заметки
This means that all the ones with invalid CE BBoxes will be piled up at the starting position when this is 0
GetCEApi().SpawnDynamic(Vector(5, 10, 5), true);

◆ SpawnEntity()

proto native void SpawnEntity ( string sClassName,
vector vPos,
float fRange,
int iCount )
private

Spawn an entity through CE.

Заметки
DEVELOPER/DIAG ONLY
Is similar to SpawnLoot, but works better on Animal/Infected/Vehicle
Аргументы
sClassNamestring The entity to spawn
vPosvector The position to spawn the Entity at
fRangefloat Circle radius
Заметки
When iCount is larger than 1, changing this will make it so that they are spawned in a circle around vPos
Аргументы
iCountint The amount of items
GetCEApi().SpawnEntity("Deagle", Vector(5, 10, 5), 1, 9);

Используется в DayZPlayer::CommandHandlerDebug(), HandleStoreCartridge(), SelectStoreCartridge(), PluginBase::SpawnEntityInInventory(), PluginBase::SpawnEntityInPlayerInventory(), Entity::SpawnEntityOnGround() и Entity::SpawnEntityOnGroundPos().

◆ SpawnGroup()

proto native Entity SpawnGroup ( string sGroupName,
vector vPos,
float fAngle = -1 )
private

Force spawn specific prototype group + loot at position.

Заметки
DEVELOPER/DIAG ONLY
This can also spawn in other CE & DE related objects, but is best used exclusively for testing prototype groups
Аргументы
sGroupNamestring The group name to spawn
vPosvector The position to spawn the Entity at
fAnglefloat Angle to spawn the Entity with in degrees [0, 360]
Заметки
When a negative value, will pick a random one
Возвращает
Entity The spawned Entity or null if unsuccessful
GetCEApi().SpawnGroup("Land_Shed_M1", Vector(5, 10, 5));

◆ SpawnLoot()

proto native void SpawnLoot ( string sEvName,
vector vPos,
float fAngle,
int iCount = 1,
float fRange = 1 )
private

Spawn an item through CE.

Заметки
DEVELOPER/DIAG ONLY
Аргументы
sEvNamestring The DE to spawn
vPosvector The position to spawn the Entity at
fAnglefloat Angle to spawn the Entity with in degrees [0, 360]
Заметки
When a negative value, will pick a random one
Аргументы
iCountint The amount of items
fRangefloat Circle radius
Заметки
When iCount is larger than 1, changing this will make it so that they are spawned in a circle around vPos
GetCEApi().SpawnLoot("Deagle", Vector(5, 10, 5), 0, 9, 1);

◆ SpawnPerfTest()

proto native void SpawnPerfTest ( string sClassName,
int iCount )
private

Spawn an entity through CE, x amount of times in a grid.

Заметки
DEVELOPER/DIAG ONLY
The name may imply it does something else, but a profiler is needed to actually benchmark it
The position starts at 0 0 0
Аргументы
sClassNamestring The entity to spawn
iCountint The amount of items
GetCEApi().SpawnPerfTest("Deagle", 30);

◆ SpawnRotation()

proto native void SpawnRotation ( string sClassName,
vector vPos,
float fRange,
int iCount,
int iFlags )
private

Spawn an entity through CE.

Заметки
DEVELOPER/DIAG ONLY
Is the same as SpawnEntity, under the hood it just defaults to RF_ORIGINAL
Аргументы
sClassNamestring The entity to spawn
vPosvector The position to spawn the Entity at
fRangefloat Circle radius
Заметки
When iCount is larger than 1, changing this will make it so that they are spawned in a circle around vPos
Аргументы
iCountint The amount of items
iFlagsint The rotation flags to apply
GetCEApi().SpawnRotation("Deagle", Vector(5, 10, 5), 1, 9, RF_ALL);
const int RF_ALL
Definition CentralEconomy.c:54

◆ SpawnSingleEntity()

proto native Object SpawnSingleEntity ( string sClassName,
vector vPos )
private

Spawn an entity through CE.

Заметки
DEVELOPER/DIAG ONLY
Is the same as SpawnEntity, but spawns only one and returns the spawned Object
Аргументы
sClassNamestring The entity to spawn
vPosvector The position to spawn the Entity at
Возвращает
Object The spawned Object
GetCEApi().SpawnSingleEntity("Deagle", Vector(5, 10, 5));

◆ SpawnVehicles()

proto native void SpawnVehicles ( vector vPos,
bool bShowCylinders = false,
float fDefaultDistance = 20 )
private

Spawn all entities with vehicles category through CE.

Заметки
DEVELOPER/DIAG ONLY
Will print additional logs to RPT
Аргументы
vPosvector The position to spawn the Entities at
Заметки
This will be the starting position, vehicles spawn with 20m spacing
Make sure you do it on a surface as flat and open as possible, they need a lot of space
Аргументы
bShowCylindersbool Does nothing for Vehicles, left for backwards compat
fDefaultDistancefloat The default distance to use when the entity does not have a CE BBox
Заметки
This means that all the ones with invalid CE BBoxes will be piled up at the starting position when this is 0
GetCEApi().SpawnVehicles(Vector(5, 10, 5));

◆ Tag()

static string Tag ( string tag)
staticprivate

Generates string that will make CEApi.EconomyMap use all items with this tag.

Заметки
This is refering to the CE tags of loot defined in cfglimitsdefinition.xml
Предупреждения
This is persistent per session, when you set it, it will persist until it is set to something else
Аргументы
categorystring The desired loot tag
Возвращает
string The string to pass into CEApi.EconomyMap
GetCEApi().EconomyMap(EconomyMapStrings.Tag("floor"));
128 {
129 return string.Format("tag:%1", tag);
130 }

◆ TimeShift()

proto native void TimeShift ( float fShift)
private

Subtracts the supplied value from the current lifetime of all items in the world.

Заметки
Uses RadiusLifetimeDecrease under the hood and then calculates the parameters to fit the world
Will automatically clamp result between min and max lifetime [3, 316224000] (3 seconds to 10 years)
Аргументы
fShiftfloat The value in seconds which will be subtracted from the current lifetimes
// Shortens the lifetimes of all items in the world by 3 seconds
GetCEApi().TimeShift(3);

◆ ToggleClusterVisualisation()

proto native void ToggleClusterVisualisation ( bool mode)
private

"Cluster Vis"

◆ ToggleDynamicEventStatus()

proto native void ToggleDynamicEventStatus ( bool mode)
private

"Dynamic Events Status"

◆ ToggleDynamicEventVisualisation()

proto native void ToggleDynamicEventVisualisation ( bool mode)
private

"Dynamic Events Vis"

◆ ToggleLootVisualisation()

proto native void ToggleLootVisualisation ( bool mode)
private

"Loot Vis"

◆ ToggleOverallStats()

proto native void ToggleOverallStats ( bool mode)
private

"Overall Stats"

◆ ToggleVehicleAndWreckVisualisation()

proto native void ToggleVehicleAndWreckVisualisation ( bool mode)
private

"Vehicle&Wreck Vis"

◆ ~CEApi()

void ~CEApi ( )
private
229{}

◆ ~EconomyLogCategories()

void ~EconomyLogCategories ( )
private

◆ ~EconomyMapStrings()

void ~EconomyMapStrings ( )
private

◆ ~EconomyOutputStrings()

void ~EconomyOutputStrings ( )
private

Переменные

◆ ABANDONED

const string ABANDONED = "abandoned"
private

Lists loot spawns that have been marked as abandoned.

Заметки
In logs: "[autotest:ListAbandonedGroups]"

◆ ADAPTIVE

class EconomyOutputStrings ADAPTIVE = 0
private

◆ ALL_ALL

const string ALL_ALL = "all:all"
private

Everything.

◆ ALL_ANIMAL

const string ALL_ANIMAL = "all:animal"
private

All animals.

◆ ALL_INFECTED

const string ALL_INFECTED = "all:infected"
private

All infected.

◆ ALL_LOOT

const string ALL_LOOT = "all:loot"
private

All loot.

◆ ALL_PLAYER

const string ALL_PLAYER = "all:player"
private

All players.

◆ ALL_PROXY

const string ALL_PROXY = "all:proxy"
private

All proxies.

◆ ALL_PROXY_ABANDONED

const string ALL_PROXY_ABANDONED = "all:proxyabandoned"
private

All abandoned loot spawns.

◆ ALL_PROXY_DYNAMIC

const string ALL_PROXY_DYNAMIC = "all:proxydynamic"
private

All dynamic loot spawns.

◆ ALL_PROXY_STATIC

const string ALL_PROXY_STATIC = "all:proxystatic"
private

All static loot spawns.

◆ ALL_VEHICLE

const string ALL_VEHICLE = "all:vehicle"
private

All vehicles.

◆ Bind

const string Bind = "bind"
private

◆ Category

const string Category = "category"
private

◆ CEApi

class EconomyOutputStrings CEApi ( ) = 0
private

API to interact with Central Economy.

Заметки
Accessible through GetCEApi, make sure to read the documentation for that as well
Any mention of 'storage/' means the '$mission:storage_#' folder
228{}

◆ Classes

const string Classes = "class"
private

◆ CLOSE

const string CLOSE = "close"
private

Lists loot spawns that are not abandoned and within the supplied range (< fRange, not equal)

Заметки
In logs: "[autotest:ListCloseGroups]"
Is the same as CEApi.ListCloseProxy

◆ Container

const string Container = "container"
private

◆ DE_CLOSE_POINT

const string DE_CLOSE_POINT = "declosepoint"
private

Lists DE spawns that have positions that are within supplied range (< fRange, not equal)

Заметки
In logs: "[ClosePosition]"

◆ ECE_AIRBORNE

const int ECE_AIRBORNE = 4096

◆ ECE_CENTER

const int ECE_CENTER = 8

◆ ECE_CREATEPHYSICS

◆ ECE_DYNAMIC_PERSISTENCY

◆ ECE_EQUIP

const int ECE_EQUIP = 24576

◆ ECE_EQUIP_ATTACHMENTS

const int ECE_EQUIP_ATTACHMENTS = 8192

◆ ECE_EQUIP_CARGO

const int ECE_EQUIP_CARGO = 16384

◆ ECE_EQUIP_CONTAINER

const int ECE_EQUIP_CONTAINER = 2097152

◆ ECE_FULL

const int ECE_FULL = 25126

◆ ECE_IN_INVENTORY

◆ ECE_INITAI

const int ECE_INITAI = 2048

◆ ECE_KEEPHEIGHT

◆ ECE_LOCAL

◆ ECE_NOLIFETIME

const int ECE_NOLIFETIME = 4194304

Используется в ObjectSpawnerHandler::SpawnObject().

◆ ECE_NONE

◆ ECE_NOPERSISTENCY_CHAR

const int ECE_NOPERSISTENCY_CHAR = 16777216

◆ ECE_NOPERSISTENCY_WORLD

const int ECE_NOPERSISTENCY_WORLD = 8388608

◆ ECE_NOSURFACEALIGN

const int ECE_NOSURFACEALIGN = 262144

◆ ECE_OBJECT_SWAP

◆ ECE_PLACE_ON_SURFACE

const int ECE_PLACE_ON_SURFACE = 1060

Используется в FireplaceBase::AfterStoreLoad(), ItemBase::CreateConstructionKit(), CreateItemBasePiles(), CreateMagazinePiles(), CreateMagazinePilesFromBullet(), Managed::CreateNewCharacter(), ReplaceItemWithNewLambdaBase::CreateNewEntity(), ReplaceAndDestroyLambdaEx::CreateNewEntity(), CreateOrgan(), CAContinuousMineWood::CreatePrimaryItems(), ItemBase::CreateRope(), CAContinuousMineWood::CreateSecondaryItems(), Weapon::CreateWeaponWithAmmo(), EffectAreaLoader::CreateZones(), KitBase::DisassembleKit(), DropNonUsableMaterialsServer(), FlammableBase::EEItemDetached(), HeadGear_Base::EEItemLocationChanged(), Mask_Base::EEItemLocationChanged(), Inventory_Base::EmptySeedPack(), HandleFishingResultSuccess(), ItemBase::Harvest(), Hologram::Hologram(), FireplaceBase::IgniteEntityAsFireplace(), FishingRod_Base_New::OnDebugSpawn(), ActionPickupChicken::OnExecuteServer(), ActionCreateIndoorFireplace::OnExecuteServer(), ActionCreateIndoorOven::OnExecuteServer(), ActionDigInStash::OnFinishProgressServer(), ActionDigWorms::OnFinishProgressServer(), ActionSawPlanks::OnFinishProgressServer(), ActionStripCarrierVest::OnFinishProgressServer(), ActionUnpackGift::OnFinishProgressServer(), FireplaceBase::OnIgnitedThis(), GardenBase::OnPlacementComplete(), KitBase::OnPlacementComplete(), OnPlacementComplete(), TentBase::OnPlacementComplete(), GardenBase::OnStoreLoad(), ItemBase::OnStoreLoad(), UnboxLambda::OnSuccess(), OnSuccess(), ItemBase::RemovePlant(), ItemBase::RemovePlantEx(), Managed::SetAttachment(), ActionSortAmmoPile::SortAmmo(), ManBase::SpawnAI(), TrapSpawnBase::SpawnCatch(), Entity::SpawnEntityOnGround(), Entity::SpawnEntityOnGroundPos(), ManBase::SpawnEntityOnGroundPos(), ContaminatedArea_Dynamic::SpawnItems(), TentBase::SpawnKit(), PluginBase::SpawnNewInfectedEntity(), InventoryItem::SplitIntoStackMax() и FlammableBase::TryTransformIntoStick().

◆ ECE_ROTATIONFLAGS

const int ECE_ROTATIONFLAGS = 512

◆ ECE_SETUP

◆ ECE_TRACE

const int ECE_TRACE = 4

◆ ECE_UPDATEPATHGRAPH

const int ECE_UPDATEPATHGRAPH = 32

◆ Economy

const string Economy = "economy"
private

◆ EconomyRespawn

const string EconomyRespawn = "economy_respawn"
private

◆ EMPTY

const string EMPTY = "empty"
private

Lists loot spawns that are not abandoned but have no loot.

Заметки
In logs: "[autotest:ListEmptyGroups]"

◆ InfectedZone

const string InfectedZone = "infected_zone"
private

◆ LINKS

const string LINKS = "links"
private

Lists stats regarding which loot spawn) that are linked together and how many there are.

Заметки
In logs: "[linked_groups]"

◆ LOOT_SIZE

const string LOOT_SIZE = "lootsize"
private

Lists the maxlootsize of all CE items.

Заметки
In logs: "[autotest:ListLootSize]"

◆ MapComplete

const string MapComplete = "map_complete"
private

◆ MapGroup

const string MapGroup = "map_group"
private

◆ Matrix

const string Matrix = "matrix"
private

◆ OCCUPIED

class EconomyOutputStrings OCCUPIED = 0
private

◆ OFF

class EconomyOutputStrings OFF = 0
private

◆ RespawnQueue

const string RespawnQueue = "respawn_queue"
private

◆ RF_ALL

const int RF_ALL = 63

◆ RF_BACK

const int RF_BACK = 16

◆ RF_BOTTOM

const int RF_BOTTOM = 32

◆ RF_DECORRECTION

const int RF_DECORRECTION = 256

◆ RF_DEFAULT

◆ RF_FRONT

const int RF_FRONT = 1

◆ RF_FRONTBACK

const int RF_FRONTBACK = 17

◆ RF_IGNORE

const int RF_IGNORE = 64

Используется в ObjectSpawnerHandler::SpawnObject().

◆ RF_LEFT

const int RF_LEFT = 4

◆ RF_LEFTRIGHT

const int RF_LEFTRIGHT = 12

◆ RF_NONE

const int RF_NONE = 0

◆ RF_ORIGINAL

◆ RF_RANDOMROT

const int RF_RANDOMROT = 64

◆ RF_RIGHT

const int RF_RIGHT = 8

◆ RF_TOP

const int RF_TOP = 2

◆ RF_TOPBOTTOM

const int RF_TOPBOTTOM = 34

◆ SAreaflags

const string SAreaflags = "s_areaflags"
private

◆ SCategory

const string SCategory = "s_category"
private

◆ SCrafted

const string SCrafted = "s_crafted"
private

◆ SetupFail

const string SetupFail = "setupfail"
private

◆ STag

const string STag = "s_tag"
private

◆ STATUS

const string STATUS = "status"
private

Lists overall CE stats.

Заметки
In logs: "[autotest:OverallStatus]"

◆ Storage

const string Storage = "storage"
private

◆ SUSPICIOUS

const string SUSPICIOUS = "suspicious"
private

Lists loot spawns that have more loot than their maximum + 4.

Заметки
In logs: "[autotest:ListSuspiciousGroups]"

◆ Tag

const string Tag = "tag"
private

◆ UniqueLoot

const string UniqueLoot = "uniqueloot"
private

◆ VOLUME

class EconomyOutputStrings VOLUME = 0
private

◆ WORLD

const string WORLD = "world"
private

Lists the number of objects inside of categories.

Заметки
In logs: "[autotest:ProcessDebugLog]"