PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
ModifierBase.c File Reference

Enumerations

enum  eModifiersTickType { TICK = 1 , ACTIVATE_CHECK = 2 , DEACTIVATE_CHECK = 4 }
 

Functions

void ModifierBase ()
 
void InitBase (PlayerBase player, ModifiersManager manager)
 
void Init ()
 Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)
 
PlayerBase GetPlayer ()
 
bool IsPersistent ()
 
void MakeParamObjectPersistent (Param object)
 
void ResetLastTickTime ()
 
string GetDebugText ()
 
string GetDebugTextSimple ()
 
void DisableActivateCheck ()
 
void DisableDeactivateCheck ()
 
void Tick (float delta_time)
 
bool IsActive ()
 
void SetLock (bool state)
 
bool IsLocked ()
 
bool IsTrackAttachedTime ()
 
float GetAttachedTime ()
 
void SetAttachedTime (float time)
 
int GetModifierID ()
 
string GetName ()
 Test name getter. Strictly for UI porposes!
 
bool ActivateCondition (PlayerBase player)
 
bool DeactivateCondition (PlayerBase player)
 
void OnActivate (PlayerBase player)
 is called when an inactive modifier gets activated during gameplay, is NOT called on activation upon player server connection(see OnReconnect)
 
void OnReconnect (PlayerBase player)
 is called when a modifier is being re-activated upon player server connection, use to activate systems which are not persistent and need to run alongside active modifiers
 
void OnDeactivate (PlayerBase player)
 
void Activate ()
 
void ActivateRequest (EActivationType trigger)
 
void Deactivate (bool trigger=true)
 
void OnStoreSave (ParamsWriteContext ctx)
 
private void OnTick (PlayerBase player, float deltaT)
 
private void AnalyticsRegisterStat (int modifierId, string keySuffix)
 
private void AnalyticsSetState (int modifierId, float value)
 special treating of the value to set state only (without counter use)
 

Variables

enum eModifiersTickType m_ID = 0
 
ModifiersManager m_Manager
 
string m_System = "Modifiers"
 the manager instance
 
float m_ActivatedTime
 
bool m_TrackActivatedTime
 overall time this modifier was active
 
bool m_IsPersistent
 should this modifier track overall time it was active ?
 
PlayerBase m_Player
 is this modifier saved to the DB ?
 
float m_TickIntervalInactive = 5
 
float m_TickIntervalActive = 3
 
bool m_IsActive
 
bool m_ShouldBeActive
 
float m_AccumulatedTimeActive
 
float m_AccumulatedTimeInactive
 
float m_LastTickedActive
 
int m_TickType = (eModifiersTickType.TICK | eModifiersTickType.ACTIVATE_CHECK | eModifiersTickType.DEACTIVATE_CHECK)
 
float m_LastTickedInactive
 
bool m_IsLocked = false
 
EActivationType m_ActivationType
 
eModifierSyncIDs m_SyncID
 
PluginPlayerStatus m_ModulePlayerStatus
 max 32 synced modifiers supported, 0 == no sync
 
protected bool m_AnalyticsStatsEnabled
 

Enumeration Type Documentation

◆ eModifiersTickType

Enumerator
TICK 
ACTIVATE_CHECK 
DEACTIVATE_CHECK 

Function Documentation

◆ Activate()

◆ ActivateCondition()

override protected bool ActivateCondition ( PlayerBase  player)

◆ ActivateRequest()

void ActivateRequest ( EActivationType  trigger)

References m_ActivationType, and m_ShouldBeActive.

Referenced by Tick().

◆ AnalyticsRegisterStat()

private void AnalyticsRegisterStat ( int  modifierId,
string  keySuffix 
)

References EnumTools::EnumToString(), m_Player, and string::ToLower().

Referenced by Activate(), and Init().

◆ AnalyticsSetState()

private void AnalyticsSetState ( int  modifierId,
float  value 
)

special treating of the value to set state only (without counter use)

References EnumTools::EnumToString(), m_Player, and string::ToLower().

Referenced by Activate(), and Deactivate().

◆ Deactivate()

void Deactivate ( bool  trigger = true)

◆ DeactivateCondition()

override protected bool DeactivateCondition ( PlayerBase  player)

◆ DisableActivateCheck()

◆ DisableDeactivateCheck()

◆ GetAttachedTime()

◆ GetDebugText()

override string GetDebugText ( )

◆ GetDebugTextSimple()

string GetDebugTextSimple ( )

◆ GetModifierID()

int GetModifierID ( )

References m_ID.

◆ GetPlayer()

PlayerBase GetPlayer ( )

References m_Player.

Referenced by Actions_DoCancel(), Actions_DoInternalCommand(), Actions_Start(), ActivateModifier(), PluginBase::ActivateModifier(), MissionBase::AddActiveInputRestriction(), LayoutHolder::AddItemToQuickbarRadial(), ClientData::AddPlayerBase(), AddQuickbarItem(), VicinityItemManager::AddVicinityItems(), EntityAI::AdvancedCommunication(), DayZCreature::AttenuateSoundIfNecessary(), DayZPlayer::AttenuateSoundIfNecessary(), CameraShake::CameraShake(), UIScriptedMenu::CameraToolsMenu(), InventoryGridController::CanAddItemInHandToInventory(), LayoutHolder::CanAddToQuickbarEx(), Attachments::CanCombine(), Attachments::CanCombineAmmo(), Container::CanCombineAmmo(), VicinitySlotsContainer::CanCombineAmmo(), LayoutHolder::CanCombineEx(), BaseBuildingBase::CanDisplayAttachmentCategory(), BaseBuildingBase::CanDisplayAttachmentSlot(), LayoutHolder::CanDropEx(), LayoutHolder::CanEquipEx(), UIScriptedMenu::CanOpenMenu(), BaseBuildingBase::CanReceiveAttachment(), LayoutHolder::CanSwapOrTakeToHandsEx(), LayoutHolder::CanTakeToInventoryEx(), CheckAllowUpdate(), UIScriptedMenu::CheckForLightsAndNVG(), Attachments::Combine(), PlayerContainer::Combine(), VicinitySlotsContainer::Combine(), PluginDayzPlayerDebug_Ctrl::CommandHandler(), PluginDayzPlayerDebug_Weapons::CommandHandler(), DayZPlayer::CommandHandlerDebug(), MissionBase::CreateLogoutMenu(), DeactivateModifier(), PluginBase::DeactivateModifier(), PluginDayzPlayerDebug_OtherCmds::Death_Start(), PluginBase::DeleteSceneObject(), WeaponDebug::DisplayGeneralInfo(), Hud::DisplayPresence(), Hud::DisplayStance(), PoweredOptic_Base::DoMeasurement(), Icon::DoubleClick(), HandsContainer::DoubleClick(), AttachmentCategoriesRow::DoubleClick(), ClosableContainer::DoubleClick(), PlayerContainer::DoubleClick(), VicinitySlotsContainer::DoubleClick(), ZombieContainer::DoubleClick(), Icon::DraggingOver(), ClosableContainer::DraggingOver(), DraggingOverCenterPanel(), ClosableContainer::DraggingOverGrid(), ClosableContainer::DraggingOverGrid(), HandsArea::DraggingOverHandsPanel(), HandsContainer::DraggingOverHeader(), ClosableContainer::DraggingOverHeader(), VicinityContainer::DraggingOverHeader(), ZombieContainer::DraggingOverHeader(), Icon::DraggingOverSwap(), ScriptConsoleItemsTab::DrawItems(), ClosableContainer::DropReceived(), HandsContainer::DropReceived(), AttachmentCategoriesRow::DropReceived(), ClosableContainer::DropReceived(), Icon::DropReceivedFromMain(), EntityLightSource::EOnInit(), HandsContainer::EquipItem(), ItemManager::EvaluateContainerDragabilityDefault(), DayZPlayer::EvaluateDamageHit(), Event_OnClick(), AnalyticsManagerClient::Event_OnEntityKilled(), VicinityItemManager::ExcludeFromContainer_Phase1(), VicinityItemManager::ExcludeFromContainer_Phase2(), VicinityItemManager::ExcludeFromContainer_Phase3(), UIScriptedMenu::ExecuteSelectedItem(), UIScriptedMenu::GameRespawn(), UIScriptedMenu::GameRetry(), GestureMenuItem(), ItemManager::GetChosenCombinationFlag(), HandsContainer::GetCombinationFlags(), ItemManager::GetCombinationFlags(), ColorManager::GetItemColor(), UIScriptedMenu::GetItems(), InventoryGridController::GetQuickbarItemColor(), Attachments::GetRecipeCount(), HandsContainer::GetRecipeCount(), PlayerContainer::GetRecipeCount(), ItemManager::GetRecipeCount(), ActionDismantlePart::GetText(), ActionRepairPart::GetText(), ActionTransferLiquid::GetText(), ActionWorldCraft::GetText(), ActionBuildShelter::GetText(), WeaponDebug::GetWeaponInHands(), UIScriptedMenu::HandleLights(), UIScriptedMenu::HandleNVG(), HandsContainer::HandsContainer(), MissionBase::HideInventory(), PluginDayzPlayerDebug_OtherCmds::Hit_Start(), Init(), UIScriptedMenu::Init(), ScriptConsoleGeneralTab::Init(), ManBase::InitEditor(), PluginBase::InitLoad(), MissionBase::InputBufferCheck(), HandsContainer::InspectItem(), AttachmentsOutOfReach::IsAttachmentReachable(), DayZPlayerImplement::IsControlledPlayer(), HandsContainer::IsEmpty(), BoatScript::IsInventoryVisible(), IsInventoryVisible(), HandsContainer::IsItemActive(), HandsContainer::IsItemWithQuantityActive(), UIScriptedMenu::IsLocalPlayer(), PluginBase::IsModifierLocked(), IsObjectObstructed(), IsObjectObstructedFilterEx(), ScriptConsoleGeneralTab::LateInit(), PluginConfigHandler::LoadScenePlayer(), PluginBase::LockModifier(), LockModifier(), Icon::MouseClick(), AttachmentCategoriesRow::MouseClick(), PlayerContainer::MouseClick(), ZombieContainer::MouseClick(), HandsContainer::MouseClick2(), ClosableContainer::MouseClick2(), MoveFocusByArea(), ActionMenu::NextAction(), ActionMenu::NextActionCategory(), OnActivate(), OnCenterPanelDropReceived(), ScriptConsoleGeneralTab::OnChange(), HudDebugWinBase::OnChange(), PluginDayzPlayerDebug_Weapons::OnClick(), UIScriptedMenu::OnClick(), ScriptConsoleGeneralTab::OnClick(), ScriptConsoleItemsTab::OnClick(), UIScriptedMenu::OnDoubleClick(), ScriptConsoleGeneralTab::OnDoubleClick(), ScriptConsoleItemsTab::OnDoubleClick(), Icon::OnDraggingOverBackground(), PlayerContainer::OnDropReceivedFromGhostArea(), ZombieContainer::OnDropReceivedFromGhostArea(), AttachmentCategoriesRow::OnDropReceivedFromHeader(), ClosableContainer::OnDropReceivedFromHeader(), VicinityContainer::OnDropReceivedFromHeader(), VicinitySlotsContainer::OnDropReceivedFromHeader(), VicinityContainer::OnDropReceivedFromIcon(), Grenade_Base::OnExplosionEffects(), PluginBase::OnGUITimer(), HandsArea::OnHandsPanelDropReceived(), SlotsIcon::OnIconDrag(), InventoryGridController::OnItemDrag(), InventoryGridController::OnItemDrop(), InventoryGridController::OnItemDropReceived(), MissionBenchmark::OnLocationSwitch(), MissionBase::OnMissionFinish(), ScriptConsoleGeneralTab::OnMouseButtonDown(), ScriptConsoleSoundsTab::OnMouseButtonDown(), Icon::OnPerformCombination(), HandsContainer::OnPerformCombination(), Icon::OnPerformRecipe(), Hud::OnPlayerLoaded(), InventoryItem::OnRightClick(), OnRightPanelDropReceived(), OnScheduledTick(), OnSelectAction(), ScriptConsoleVicinityTab::OnSelectAction(), ScriptedWidgetEventHandler::OnSelectAction(), ScriptedWidgetEventHandler::OnSelectActionEx(), OnShow(), DayZPlayer::OnStepEvent(), PluginBase::OnUIEditorOpened(), DayZPlayerCameraBase::OnUpdate(), PoweredOptic_Base::OnWorkStart(), PoweredOptic_Base::OnWorkStop(), MissionBase::Pause(), Icon::PerformCombination(), UIScriptedMenu::Play(), MissionBase::PlayerControlDisable(), MissionBase::PlayerControlEnable(), PlayerPreview::PlayerPreview(), PlayerSyncDelete(), ScriptConsoleSoundsTab::PlaySoundEvent(), PluginDayzPlayerDebug_Weapons::PluginDayzPlayerDebug_Weapons(), ActionMenu::PrevAction(), ActionMenu::PrevActionCategory(), UIScriptedMenu::PrimaryAction(), UIScriptedMenu::ProcessEmoteConditionRequest(), ActionMenu::Refresh(), ScriptConsoleGeneralTab::RefreshPlayerPosEditBoxes(), Hud::RefreshPlayerTags(), VicinityItemManager::RefreshVicinityItems(), InventoryGridController::Remove(), EntityAI::RemoveAction(), RemoveAction(), InventoryItem::RemoveAction(), BoatScript::RemoveAction(), RequestDetailedInfo(), ResetModifiers(), HudDebugWinBase::ResetStats(), RightArea::RightArea(), HudDebugWinBase::RPCChangeStat(), ScriptConsoleEnfScriptTab::RunEnscript(), ScriptConsoleEnfScriptTab::RunEnscriptServer(), RunRPC(), SceneObject::SceneObjectSynch(), ScriptConsoleSoundsTab::ScriptConsoleSoundsTab(), UIScriptedMenu::SecondaryAction(), HandsPreview::Select(), PlayerContainer::Select(), VicinitySlotsContainer::Select(), ZombieContainer::Select(), PluginBase::SelectAndFocusPlayerObject(), SendRPC(), HudDebugWinHorticulture::SendRPCSpeed(), HudDebugWinHorticulture::SendRPCUpdate(), HandsContainer::SetActive(), PluginBase::SetDeveloperItemClient(), PluginBase::SetDeveloperItemClientEx(), HandsContainer::SetLastActive(), Container::SetLock(), UIScriptedMenu::SetPreset(), Hud::SetStamina(), SetUpdate(), HudDebugWinBase::SetUpdate(), ScriptedWidgetEventHandler::ShowActionMenu(), MissionBase::ShowInventory(), ItemManager::ShowSourceDropzone(), Hud::ShowVehicleInfo(), PluginBase::SpawnEntityInInventory(), PluginBase::SpawnFromClipboard(), PluginBase::SpawnNewInfectedEntity(), ScriptConsoleItemsTab::SpawnPreset(), InventoryItem::SplitIntoStackMaxClient(), HandsContainer::SplitItem(), Icon::Swap(), HandsContainer::TakeAsAttachment(), ClosableContainer::TakeAsAttachment(), DeveloperTeleport::TeleportAtCursor(), DeveloperTeleport::TeleportAtCursorEx(), TestOwnership(), Tick(), PluginDayzPlayerDebug_Weapons::Tick(), MissionBase::TickScheduler(), ToggleDebugWindowEvent(), PluginBase::ToggleFreeCamera(), PluginBase::ToggleFreeCameraBackPos(), HandsContainer::TransferItem(), AttachmentCategoriesRow::TransferItem(), VicinitySlotsContainer::TransferItem(), Attachments::TransferItemToVicinity(), HandsContainer::TransferItemToVicinity(), AttachmentCategoriesRow::TransferItemToVicinity(), PluginDayzPlayerDebug_OtherCmds::Uncon_End(), PluginDayzPlayerDebug_OtherCmds::Uncon_Start(), HudDebugWinBase::Update(), UIScriptedMenu::Update(), ScriptConsoleGeneralTab::Update(), ScriptConsoleSoundsTab::Update(), Hud::UpdateBloodName(), UpdateConsoleToolbar(), MissionBase::UpdateDebugMonitor(), UIScriptedMenu::UpdateInfo(), Attachments::UpdateInterval(), HandsHeader::UpdateInterval(), VicinityContainer::UpdateInterval(), UpdateInterval(), PlayerPreview::UpdateInterval(), InventoryGridController::UpdateItems(), ScriptConsoleGeneralTab::UpdateMousePos(), ScriptConsoleSoundsTab::UpdateMousePos(), PluginBase::UpdateStatsLocal(), ScriptConsoleGeneralTab::UpdateTime(), ActionMenu::UpdateWidgets(), UIScriptedMenu::~CameraToolsMenu(), InventoryItem::~ItemBase(), SceneObject::~SceneObject(), and ScriptConsoleGeneralTab::~ScriptConsoleGeneralTab().

◆ Init()

void Init ( )

Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)

References AnalyticsRegisterStat(), m_AnalyticsStatsEnabled, and m_ID.

◆ InitBase()

void InitBase ( PlayerBase  player,
ModifiersManager  manager 
)

◆ IsActive()

◆ IsLocked()

bool IsLocked ( )

References m_IsLocked.

Referenced by IsLockedOnGate(), MissionBase::OnUpdate(), and Tick().

◆ IsPersistent()

bool IsPersistent ( )

References m_IsPersistent.

◆ IsTrackAttachedTime()

bool IsTrackAttachedTime ( )

References m_TrackActivatedTime.

◆ MakeParamObjectPersistent()

void MakeParamObjectPersistent ( Param  object)

References m_Manager.

Referenced by TestDiseaseMdfr::Init().

◆ ModifierBase()

◆ OnActivate()

void OnActivate ( PlayerBase  player)

is called when an inactive modifier gets activated during gameplay, is NOT called on activation upon player server connection(see OnReconnect)

References m_NextEvent, PAIN_EVENT_INTERVAL_MAX, PAIN_EVENT_INTERVAL_MIN, and Math::RandomFloatInclusive().

◆ OnDeactivate()

void OnDeactivate ( PlayerBase  player)

Referenced by Deactivate().

◆ OnReconnect()

void OnReconnect ( PlayerBase  player)

is called when a modifier is being re-activated upon player server connection, use to activate systems which are not persistent and need to run alongside active modifiers

◆ OnStoreSave()

◆ OnTick()

◆ ResetLastTickTime()

void ResetLastTickTime ( )

References m_LastTickedActive.

◆ SetAttachedTime()

void SetAttachedTime ( float  time)

References m_ActivatedTime.

◆ SetLock()

void SetLock ( bool  state)

◆ Tick()

Variable Documentation

◆ m_AccumulatedTimeActive

float m_AccumulatedTimeActive

Referenced by Tick().

◆ m_AccumulatedTimeInactive

float m_AccumulatedTimeInactive

Referenced by Tick().

◆ m_ActivatedTime

float m_ActivatedTime

◆ m_ActivationType

EActivationType m_ActivationType

◆ m_AnalyticsStatsEnabled

◆ m_ID

enum eModifiersTickType m_ID = 0

◆ m_IsActive

◆ m_IsLocked

◆ m_IsPersistent

◆ m_LastTickedActive

float m_LastTickedActive

Referenced by ResetLastTickTime().

◆ m_LastTickedInactive

float m_LastTickedInactive

◆ m_Manager

◆ m_ModulePlayerStatus

PluginPlayerStatus m_ModulePlayerStatus

◆ m_Player

PlayerBase m_Player

is this modifier saved to the DB ?

◆ m_ShouldBeActive

bool m_ShouldBeActive

Referenced by ActivateRequest(), Deactivate(), and Tick().

◆ m_SyncID

◆ m_System

string m_System = "Modifiers"

the manager instance

Referenced by MessageReceiverBase::DisplayElementBase().

◆ m_TickIntervalActive

◆ m_TickIntervalInactive

◆ m_TickType

◆ m_TrackActivatedTime