Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
centraleconomy.c
Go to the documentation of this file.
1
4// -------------------------------------------------------------------------
5// object (SF) Spawn Flags (use to setup behavior and/ or trigger functionality)
6//
7const int ECE_NONE = 0;
8
9const int ECE_SETUP = 2; // process full entity setup (when creating NEW entity)
10const int ECE_TRACE = 4; // trace under entity when being placed (from the point of creation)
11const int ECE_CENTER = 8; // use center from shape (model) for placement
12
13const int ECE_UPDATEPATHGRAPH = 32; // update navmesh when object placed upon it
14
15const int ECE_ROTATIONFLAGS = 512; // enable rotation flags for object placement
16const int ECE_CREATEPHYSICS = 1024; // create collision envelope and related physics data (if object has them)
17const int ECE_INITAI = 2048; // init ai
18const int ECE_AIRBORNE = 4096; // create flying unit in the air
19
20const int ECE_EQUIP_ATTACHMENTS = 8192; // equip with configured ATTACHMENTS
21const int ECE_EQUIP_CARGO = 16384; // equip with configured CARGO
22const int ECE_EQUIP = 24576; // equip with configured (ATTACHMENTS + CARGO)
23const int ECE_EQUIP_CONTAINER = 2097152; // populate DE/ group CONTAINER during spawn
24const int ECE_LOCAL = 1073741824; // create object locally
25
26const int ECE_NOSURFACEALIGN = 262144; // do not align object on surface/ terrain
27const int ECE_KEEPHEIGHT = 524288; // keep height when creating object (do not use trace or placement on surface)
28
29const int ECE_NOLIFETIME = 4194304; // do not set lifetime when creating the object
30const int ECE_NOPERSISTENCY_WORLD = 8388608; // do not save this object in world
31const int ECE_NOPERSISTENCY_CHAR = 16777216; // do not save this object in character
32const int ECE_DYNAMIC_PERSISTENCY = 33554432; // spawns in without persistency, once player takes it, persistency will be enabled if available
33
34// note: use predefined combination when not solving something specific
35//
36const int ECE_IN_INVENTORY = 787456; // ECE_CREATEPHYSICS|ECE_KEEPHEIGHT|ECE_NOSURFACEALIGN
37const int ECE_PLACE_ON_SURFACE = 1060; // ECE_CREATEPHYSICS|ECE_UPDATEPATHGRAPH|ECE_TRACE
38const int ECE_OBJECT_SWAP = 787488; // ECE_CREATEPHYSICS|ECE_UPDATEPATHGRAPH|ECE_KEEPHEIGHT|ECE_NOSURFACEALIGN
39
40const int ECE_FULL = 25126; // ECE_SETUP|ECE_TRACE|ECE_ROTATIONFLAGS|ECE_UPDATEPATHGRAPH|ECE_EQUIP
41
42// -------------------------------------------------------------------------
43// object (RF) Rotation Flags (use to force and/ or invoke placement rotation)
44//
45const int RF_NONE = 0;
46
47const int RF_FRONT = 1; // front side placement
48const int RF_TOP = 2; // top side placement
49const int RF_LEFT = 4; // left side placement
50const int RF_RIGHT = 8; // right side placement
51const int RF_BACK = 16; // back side placement
52const int RF_BOTTOM = 32; // bottom side placement
53
54const int RF_ALL = 63; // RF_FRONT|RF_TOP|RF_LEFT|RF_RIGHT|RF_BACK|RF_BOTTOM
55
56const int RF_IGNORE = 64; // ignore placement RF flags - object will spawn as model was created
57
58const int RF_TOPBOTTOM = 34; // RF_TOP|RF_BOTTOM
59const int RF_LEFTRIGHT = 12; // RF_LEFT|RF_RIGHT
60const int RF_FRONTBACK = 17; // RF_FRONT|RF_BACK
61
62const int RF_RANDOMROT = 64; // allow random rotation around axis when placing
63const int RF_ORIGINAL = 128; // use default placement setuped on object in config
64const int RF_DECORRECTION = 256; // angle correction when spawning InventoryItem at Building angle
65const int RF_DEFAULT = 512; // use default placement setuped on object in config
66
67// -------------------------------------------------------------------------
70{
71 private void EconomyLogCategories();
72 private void ~EconomyLogCategories();
73
74 const string Economy = "economy";
75 const string EconomyRespawn = "economy_respawn";
76 const string RespawnQueue = "respawn_queue";
77 const string Container = "container";
78 const string Matrix = "matrix";
79 const string UniqueLoot = "uniqueloot";
80 const string Bind = "bind";
81 const string SetupFail = "setupfail";
82 const string Storage = "storage";
83 const string Classes = "class";
84 const string Category = "category";
85 const string Tag = "tag";
86 const string SCategory = "s_category";
87 const string STag = "s_tag";
88 const string SAreaflags = "s_areaflags";
89 const string SCrafted = "s_crafted";
90 const string MapGroup = "map_group";
91 const string MapComplete = "map_complete";
92 const string InfectedZone = "infected_zone";
93}
94
95// -------------------------------------------------------------------------
98{
99 private void EconomyMapStrings();
100 private void ~EconomyMapStrings();
101
112 static string Category(string category)
113 {
114 return string.Format("category:%1", category);
115 }
116
127 static string Tag(string tag)
128 {
129 return string.Format("tag:%1", tag);
130 }
131
132
133
135 const string ALL_ALL = "all:all";
137 const string ALL_LOOT = "all:loot";
139 const string ALL_VEHICLE = "all:vehicle";
141 const string ALL_INFECTED = "all:infected";
143 const string ALL_ANIMAL = "all:animal";
145 const string ALL_PLAYER = "all:player";
147 const string ALL_PROXY = "all:proxy";
149 const string ALL_PROXY_STATIC = "all:proxystatic";
151 const string ALL_PROXY_DYNAMIC = "all:proxydynamic";
153 const string ALL_PROXY_ABANDONED = "all:proxyabandoned";
154}
155
156// -------------------------------------------------------------------------
158class EconomyOutputStrings
159{
160 private void EconomyOutputStrings();
161 private void ~EconomyOutputStrings();
162
167 const string LINKS = "links";
172 const string SUSPICIOUS = "suspicious";
177 const string DE_CLOSE_POINT = "declosepoint";
182 const string ABANDONED = "abandoned";
187 const string EMPTY = "empty";
193 const string CLOSE = "close";
198 const string WORLD = "world";
203 const string STATUS = "status";
208 const string LOOT_SIZE = "lootsize";
209}
210
211// -------------------------------------------------------------------------
212enum ESpawnVolumeVis
213{
214 OFF = 0,
215 ADAPTIVE,
216 VOLUME,
217 OCCUPIED,
218}
219
220// -------------------------------------------------------------------------
226class CEApi
227{
228 private void CEApi() {}
229 private void ~CEApi() {}
230
238 proto native void ExportSpawnData();
250 proto native void ExportProxyData( vector vCenter = vector.Zero, float fRadius = 0 );
257 proto native void ExportClusterData();
264 proto native void ExportProxyProto();
276 proto native void MarkCloseProxy( float fRadius, bool bAllSelections );
285 proto native void RemoveCloseProxy();
296 proto native void ListCloseProxy( float fRadius );
297
309 proto native bool SpawnAnalyze( string sClassName );
310
321 proto native void TimeShift( float fShift );
331 proto native void OverrideLifeTime( float fLifeTime );
332
346 proto native Entity SpawnGroup( string sGroupName, vector vPos, float fAngle = -1 );
363 proto native void SpawnDE( string sEvName, vector vPos, float fAngle = -1 );
378 proto native void SpawnDEEx( string sEvName, vector vPos, float fAngle, int uFlags );
393 proto native void SpawnLoot( string sEvName, vector vPos, float fAngle, int iCount = 1, float fRange = 1 );
394
409 proto native void SpawnDynamic( vector vPos, bool bShowCylinders = true, float fDefaultDistance = 0 );
424 proto native void SpawnVehicles( vector vPos, bool bShowCylinders = false, float fDefaultDistance = 20 );
440 proto native void SpawnBuilding( vector vPos, bool bShowCylinders = false, float fDefaultDistance = 20 );
441
455 proto native void SpawnEntity( string sClassName, vector vPos, float fRange, int iCount );
467 proto native Object SpawnSingleEntity( string sClassName, vector vPos );
482 proto native void SpawnRotation( string sClassName, vector vPos, float fRange, int iCount, int iFlags );
494 proto native void SpawnPerfTest( string sClassName, int iCount );
495
503 proto native void CleanMap();
504
513 proto native void EconomyLog( string sLogType );
514
526 proto native void EconomyMap( string sMapType );
536 proto native void EconomyOutput( string sOutputType, float fRange );
537
549 proto native void RadiusLifetimeIncrease( vector vCenter, float fRadius, float fValue );
560 proto native void RadiusLifetimeDecrease( vector vCenter, float fRadius, float fValue );
569 proto native void RadiusLifetimeReset( vector vCenter, float fRadius );
570
571
572
577
584 proto native int GetCEGlobalInt(string varName);
591 proto native float GetCEGlobalFloat(string varName);
598 proto native string GetCEGlobalString(string varName);
599
601
602
603
608
618 proto native bool AvoidPlayer(vector vPos, float fDistance); // return false when there is a player
629 proto native bool AvoidVehicle(vector vPos, float fDistance, string sDEName = "");
639 proto native int CountPlayersWithinRange(vector vPos, float fRange);
640
642
643
644
649
650 // "Loot Spawn Edit"
651 //{
653 proto native void LootSetSpawnVolumeVisualisation(ESpawnVolumeVis mode);
655 proto native void LootToggleSpawnSetup(bool mode);
657 proto native void LootToggleVolumeEditing(bool mode);
659 proto native void LootRetraceGroupPoints();
661 proto native void LootExportGroup();
663 proto native void LootExportAllGroups();
665 proto native void LootExportMap();
667 proto native void LootExportClusters();
668 //}
669
670 // "Loot Tool"
671 //{
673 proto native void LootDepleteLifetime();
675 proto native void LootSetDamageToOne();
677 proto native void LootDepleteAndDamage();
678 //}
679
680 // "Infected"
681 //{
683 proto native void InfectedToggleVisualisation(bool mode);
685 proto native void InfectedToggleZoneInfo(bool mode);
687 proto native void InfectedSpawn();
689 proto native void InfectedResetCleanup();
690 //}
691
692 // "Animal"
693 //{
695 proto native void AnimalToggleVisualisation(bool mode);
697 proto native void AnimalSpawn();
699 proto native void AnimalAmbientSpawn();
700 //}
701
703 proto native void ToggleVehicleAndWreckVisualisation(bool mode);
705 proto native void ToggleLootVisualisation(bool mode);
707 proto native void ToggleClusterVisualisation(bool mode);
708
710 proto native void ToggleDynamicEventStatus(bool mode);
712 proto native void ToggleDynamicEventVisualisation(bool mode);
714 proto native void DynamicEventSpawn();
716 proto native void DynamicEventExport();
717
719 proto native void ToggleOverallStats(bool mode);
720
722
723
724
729
730 proto native void PlatformStatTest();
731
732 proto native void LootToggleProxyEditing(bool mode);
733
734 proto native void OnUpdate();
735
737};
738
745proto native CEApi GetCEApi();
746
747// -------------------------------------------------------------------------
748class CEItemProfile
749{
750 private void CEItemProfile() {}
751 private void ~CEItemProfile() {}
752
753 proto native int GetNominal(); // nominal - how many items should be aproximately in map
754 proto native int GetMin(); // min - minimal count should be available in map
755
756 proto native float GetQuantityMin(); // min quantity (0.0 - 1.0) (like ammobox - this determine how many bullets are there, or water bottle)
757 proto native float GetQuantityMax(); // max quantity (0.0 - 1.0) (like ammobox - this determine how many bullets are there, or water bottle)
758
759 proto native float GetQuantity(); // random quantity (0.0 - 1.0)
760
761 proto native float GetLifetime(); // maximum lifetime in (seconds) - what is the idle before item abandoned at ground gets deleted
762 proto native float GetRestock(); // restock is oposite of lifetime - idle before item is allowed to respawn when required
763
764 proto native int GetCost(); // cost of item determines its 'value' for players (this serve as priority during respawn and cleanup operation)
765
766 proto native int GetUsageFlags(); // area usage flags (each bit has assigned group - which as part of map overlay effectively affects spawning)
767 proto native int GetValueFlags(); // area value flags (each bit has assigned group - which as part of map overlay effectively affects spawning)
768};
const int ECE_NONE
const int ECE_EQUIP_CARGO
const int ECE_AIRBORNE
const int RF_NONE
const int ECE_EQUIP
const int ECE_OBJECT_SWAP
const int ECE_EQUIP_ATTACHMENTS
const int ECE_NOSURFACEALIGN
const int ECE_LOCAL
const int ECE_ROTATIONFLAGS
const int RF_ORIGINAL
const int ECE_PLACE_ON_SURFACE
const int RF_FRONTBACK
const int ECE_EQUIP_CONTAINER
const int ECE_NOPERSISTENCY_WORLD
const int RF_FRONT
const int ECE_SETUP
const int ECE_UPDATEPATHGRAPH
const int RF_TOP
const int ECE_INITAI
const int ECE_KEEPHEIGHT
const int RF_LEFTRIGHT
const int RF_IGNORE
const int RF_RANDOMROT
const int RF_DECORRECTION
const int ECE_CENTER
const int RF_LEFT
const int RF_RIGHT
const int RF_TOPBOTTOM
const int ECE_DYNAMIC_PERSISTENCY
const int ECE_NOLIFETIME
const int ECE_TRACE
const int ECE_IN_INVENTORY
const int ECE_FULL
const int RF_DEFAULT
const int RF_ALL
const int ECE_NOPERSISTENCY_CHAR
const int RF_BACK
const int ECE_CREATEPHYSICS
const int RF_BOTTOM
class EconomyLogCategories EconomyMapStrings()
Special strings for CEApi.EconomyMap.
Categories for CEApi.EconomyLog.
Definition camera.c:2