DIFF

class CEApiSource

Constructors 2

private void CEApi()
private void ~CEApi()

Methods 63

proto native void ExportSpawnData()

Regenerates "storage/spawnpoints.bin" if necessary

NoteAlready happens automatically when server starts before it is loaded in
GetCEApi().ExportSpawnData();
proto native void ExportProxyData(vector vCenter = vector.Zero, float fRadius = 0)

Generates "storage/export/mapgrouppos.xml"

vCenter
vector Center of area to generate from
fRadius
float Radius in meters of area to generate from
NoteWhen using a zero vector, this will automatically get the world center
NoteWhen 0, this will automatically get a radius covering the map
// Export for whole map
GetCEApi().ExportProxyData();
proto native void ExportClusterData()

Generates "storage/export/mapgroupcluster.xml"

GetCEApi().ExportClusterData();
proto native void ExportProxyProto()

Generates "storage/export/mapgroupproto.xml"

GetCEApi().ExportProxyProto();
proto native void MarkCloseProxy(float fRadius, bool bAllSelections)

Invalidates loot spawn points which are closer than the radius supplied

fRadius
float The minimum desired distance in meters between loot spawn points
bAllSelections
bool When false, will only check the points within a container against each other, when true will against all points
NoteWill output a message indicating how many points were invalidated
NoteWhen 0 it will use a radius of 0.5
// Example: I want there to be a minimum distance of 0.3m between any loot spawn point
GetCEApi().MarkCloseProxy(0.3, true);
proto native void RemoveCloseProxy()

Removes all invalid points

NoteIs best paired with a MarkCloseProxy call first to invalidate unwanted points
NoteWill output a message indicating the amount of deleted points
GetCEApi().RemoveCloseProxy();
proto native void ListCloseProxy(float fRadius)

Outputs a list of all loot points closer than specified radius

fRadius
float The minimum desired distance in meters between loot spawn points
NoteThis will automatically be checking all points against all points
NoteThis is a better way of handling it than the above two methods, as it can be then be removed manually from the xmls
NoteIs the same as CEApi.EconomyOutput(EconomyOutputStrings.CLOSE, fRadius)
GetCEApi().ListCloseProxy(0.3);
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

sClassName
string The class name of the desired item to analyze

Returns: bool Whether the operation was successful, it might fail in certain scenarios if the CE doesn't update in time

NoteDEVELOPER/DIAG ONLY
NoteThis will only work if the loot spawner is active
NoteWhen using "*" as class name, instead of generating images, it will generate a .csv in storage/log containing the output of all spawnable items
GetCEApi().SpawnAnalyze("FlatCap_Grey");
proto native void TimeShift(float fShift)

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

fShift
float The value in seconds which will be subtracted from the current lifetimes
NoteUses RadiusLifetimeDecrease under the hood and then calculates the parameters to fit the world
NoteWill automatically clamp result between min and max lifetime [3, 316224000] (3 seconds to 10 years)
// Shortens the lifetimes of all items in the world by 3 seconds
GetCEApi().TimeShift(3);
proto native void OverrideLifeTime(float fLifeTime)

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

fLifeTime
float The lifetime for any DE spawned after this call
NoteWhen 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);
proto native Entity SpawnGroup(string sGroupName, vector vPos, float fAngle = -1)

Force spawn specific prototype group + loot at position

sGroupName
string The group name to spawn
vPos
vector The position to spawn the Entity at
fAngle
float Angle to spawn the Entity with in degrees [0, 360]

Returns: Entity The spawned Entity or null if unsuccessful

NoteDEVELOPER/DIAG ONLY
NoteThis can also spawn in other CE & DE related objects, but is best used exclusively for testing prototype groups
NoteWhen a negative value, will pick a random one
GetCEApi().SpawnGroup("Land_Shed_M1", Vector(5, 10, 5));
proto native void SpawnDE(string sEvName, vector vPos, float fAngle = -1)

Force spawn specific dynamic event

sEvName
string The DE to spawn
vPos
vector The position to spawn the Entity at
fAngle
float Angle to spawn the Entity with in degrees [0, 360]

Returns: bool Whether the spawn was successful

NoteDEVELOPER/DIAG ONLY
NoteVersatile, can be used for Animal, Infected, Static, Item and Vehicle
NoteIs the only one capable of spawning DE's that have DE Groups
NoteIs the same as the next one, but has ECE_FULL flags and a hidden flag which overrides herd limit
NoteThis is also FORCE spawn, so it will bypass any limit and avoidance checks
NoteWhen a negative value, will pick a random one
GetCEApi().SpawnDE("StaticHeliCrash", Vector(5, 10, 5));
proto native void SpawnDEEx(string sEvName, vector vPos, float fAngle, int uFlags)

Force spawn specific dynamic event

sEvName
string The DE to spawn
vPos
vector The position to spawn the Entity at
fAngle
float Angle to spawn the Entity with in degrees [0, 360]
uFlags
int ECE flags to apply while spawning the DE

Returns: bool Whether the spawn was successful

NoteDEVELOPER/DIAG ONLY
NoteIs the same one as above but with the possibility of custom flags
NoteWhen a negative value, will pick a random one
GetCEApi().SpawnDEEx("StaticHeliCrash", Vector(5, 10, 5), ECE_FULL);
proto native void SpawnLoot(string sEvName, vector vPos, float fAngle, int iCount = 1, float fRange = 1)

Spawn an item through CE

sEvName
string The DE to spawn
vPos
vector The position to spawn the Entity at
fAngle
float Angle to spawn the Entity with in degrees [0, 360]
iCount
int The amount of items
fRange
float Circle radius
NoteDEVELOPER/DIAG ONLY
NoteWhen a negative value, will pick a random one
NoteWhen 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);
proto native void SpawnDynamic(vector vPos, bool bShowCylinders = true, float fDefaultDistance = 0)

Spawn all entities with dynamic category through CE

vPos
vector The position to spawn the Entities at
bShowCylinders
bool Whether to draw the CE BBox with debug shapes
fDefaultDistance
float The default distance to use when the entity does not have a CE BBox
NoteDEVELOPER/DIAG ONLY
NoteWill print additional logs to RPT
NoteThis will be the starting position, the items will be split into segments by CE BBox size (smallest to largest)
NoteRed: Invalid BBox; Yellow: Not in DB; Green: All ok
NoteThis 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);
proto native void SpawnVehicles(vector vPos, bool bShowCylinders = false, float fDefaultDistance = 20)

Spawn all entities with vehicles category through CE

vPos
vector The position to spawn the Entities at
bShowCylinders
bool Does nothing for Vehicles, left for backwards compat
fDefaultDistance
float The default distance to use when the entity does not have a CE BBox
NoteDEVELOPER/DIAG ONLY
NoteWill print additional logs to RPT
NoteThis will be the starting position, vehicles spawn with 20m spacing
NoteMake sure you do it on a surface as flat and open as possible, they need a lot of space
NoteThis 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));
proto native void SpawnBuilding(vector vPos, bool bShowCylinders = false, float fDefaultDistance = 20)

Spawn all entities with building category through CE

vPos
vector The position to spawn the Entities at
bShowCylinders
bool Whether to draw the CE BBox with debug shapes
fDefaultDistance
float The default distance to use when the entity does not have a CE BBox
NoteDEVELOPER/DIAG ONLY
NoteWill print additional logs to RPT
NoteThis will be the starting position, the items will be split into segments by CE BBox size (smallest to largest)
NoteRed: Invalid BBox; Yellow: Not in DB; Green: All ok
NoteThese will most likely just always be red
NoteThis 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);
proto native void SpawnEntity(string sClassName, vector vPos, float fRange, int iCount)

Spawn an entity through CE

sClassName
string The entity to spawn
vPos
vector The position to spawn the Entity at
fRange
float Circle radius
iCount
int The amount of items
NoteDEVELOPER/DIAG ONLY
NoteIs similar to SpawnLoot, but works better on Animal/Infected/Vehicle
NoteWhen iCount is larger than 1, changing this will make it so that they are spawned in a circle around vPos
GetCEApi().SpawnEntity("Deagle", Vector(5, 10, 5), 1, 9);
proto native Object SpawnSingleEntity(string sClassName, vector vPos)

Spawn an entity through CE

sClassName
string The entity to spawn
vPos
vector The position to spawn the Entity at

Returns: Object The spawned Object

NoteDEVELOPER/DIAG ONLY
NoteIs the same as SpawnEntity, but spawns only one and returns the spawned Object
GetCEApi().SpawnSingleEntity("Deagle", Vector(5, 10, 5));
proto native void SpawnRotation(string sClassName, vector vPos, float fRange, int iCount, int iFlags)

Spawn an entity through CE

sClassName
string The entity to spawn
vPos
vector The position to spawn the Entity at
fRange
float Circle radius
iCount
int The amount of items
iFlags
int The rotation flags to apply
NoteDEVELOPER/DIAG ONLY
NoteIs the same as SpawnEntity, under the hood it just defaults to RF_ORIGINAL
NoteWhen iCount is larger than 1, changing this will make it so that they are spawned in a circle around vPos
GetCEApi().SpawnRotation("Deagle", Vector(5, 10, 5), 1, 9, RF_ALL);
proto native void SpawnPerfTest(string sClassName, int iCount)

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

sClassName
string The entity to spawn
iCount
int The amount of items
NoteDEVELOPER/DIAG ONLY
NoteThe name may imply it does something else, but a profiler is needed to actually benchmark it
NoteThe position starts at 0 0 0
GetCEApi().SpawnPerfTest("Deagle", 30);
proto native void CleanMap()

Queue up the depleting of lifetime of everything in the world

NoteDEVELOPER/DIAG ONLY
GetCEApi().CleanMap();
proto native void EconomyLog(string sLogType)

Outputs debug file to storage/log/*.csv

sLogType
string The type of log (EconomyLogCategories)
NoteDEVELOPER/DIAG ONLY
GetCEApi().EconomyLog(EconomyLogCategories.Economy);
proto native void EconomyMap(string sMapType)

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

sMapType
string The type of lmap, can be just a class name or a special string
NoteDEVELOPER/DIAG ONLY
NoteThis works best when you have an image of the map to overlay the tga with afterwards
NoteThere are several prefixes and sets of strings that can be passed in here, see EconomyMapStrings
// To check only a specific item
GetCEApi().EconomyMap("Deagle");
proto native void EconomyOutput(string sOutputType, float fRange)

Outputs debug logs into server log or rpt

sOutputType
string One of the strings specified in EconomyOutputStrings
fRange
float Range parameter used for some of the options
NoteDEVELOPER/DIAG ONLY
GetCEApi().EconomyOutput(EconomyOutputStrings.CLOSE, 3);
proto native void RadiusLifetimeIncrease(vector vCenter, float fRadius, float fValue)

Process lifetime increase within radius by value (sec)

vCenter
vector The center point
fRadius
float The radius around the center point
fValue
float The value to increase the lifetime by
NoteWill automatically clamp result between min and max lifetime [3, 316224000] (3 seconds to 10 years)
NoteWhen 0, this will reset it to default instead (but it's better to use RadiusLifetimeReset still)
GetCEApi().RadiusLifetimeIncrease(Vector(500, 0, 500), 3, 500);
proto native void RadiusLifetimeDecrease(vector vCenter, float fRadius, float fValue)

Process lifetime decrease within radius by value (sec)

vCenter
vector The center point
fRadius
float The radius around the center point
fValue
float The value to decrease the lifetime by
NoteWill automatically clamp result between min and max lifetime [3, 316224000] (3 seconds to 10 years)
GetCEApi().RadiusLifetimeDecrease(Vector(500, 0, 500), 3, 500);
proto native void RadiusLifetimeReset(vector vCenter, float fRadius)

Process lifetime reset to default value from DB within radius

vCenter
vector The center point
fRadius
float The radius around the center point
GetCEApi().RadiusLifetimeReset(Vector(500, 0, 500), 3);
proto native int GetCEGlobalInt(string varName)

Get int from globals.xml

varName
string The name of the entry

Returns: int The value or int.MIN if not found/not an int

Notetype="0"
proto native float GetCEGlobalFloat(string varName)

Get float from globals.xml

varName
string The name of the entry

Returns: float The value or float.MIN if not found/not a float

Notetype="1"
proto native string GetCEGlobalString(string varName)

Get string from globals.xml

varName
string The name of the entry

Returns: string The value or empty string if not found/not a string

Notetype="2"
proto native bool AvoidPlayer(vector vPos, float fDistance)

Check if there is a player within a radius

vPos
vector The center point
fDistance
float The radius around the center point

Returns: 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 bool AvoidVehicle(vector vPos, float fDistance, string sDEName = "")

Check if there is a vehicle within a radius

vPos
vector The center point
fDistance
float The radius around the center point
sDEName
string A specific DE to avoid, if left empty, will avoid all vehicles

Returns: 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");
proto native int CountPlayersWithinRange(vector vPos, float fRange)

Check if there is a vehicle within a radius

vPos
vector The center point
fRange
float The radius around the center point

Returns: int The amoutn of players inside supplied area

GetCEApi().CountPlayersWithinRange(Vector(500, 0, 500), 500);
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"

proto native void PlatformStatTest()

\name DEPRECATED/LEGACY These don't do anything anymore but are left for backwards compatibility

proto native void LootToggleProxyEditing(bool mode)
proto native void OnUpdate()