DayZ 1.24
Loading...
Searching...
No Matches
CfgPlayerSpawnDataJson.c File Reference

Go to the source code of this file.

Classes

class  PlayerSpawnJsonDataBase
 
class  PlayerSpawnPreset
 
class  PlayerSpawnPresetItemSetBase
 base for any item set More...
 
class  PlayerSpawnPresetDiscreteItemSetSlotData
 one item set for slot More...
 
class  PlayerSpawnPresetComplexChildrenType
 used for specific hierarchical child spawning More...
 

Functions

bool TranslateAndValidateSlot (EntityAI parent, inout int slotID)
 Translates slot name to match something from both 'CfgSlots' and 'attachments[]' in entity's config.
 
override bool IsValid ()
 slot name validity checked separately
 

Variables

PlayerSpawnJsonDataBase presets
 
PlayerSpawnPreset slotName
 
ref array< ref PlayerSpawnPresetDiscreteItemSetSlotDatadiscreteItemSets
 
PlayerSpawnPresetItemSetBase spawnWeight
 
PlayerSpawnPresetDiscreteItemSetSlotData name
 one set for cargo
 
PlayerSpawnPresetComplexChildrenType healthMin
 
float healthMax
 
float quantityMin
 
float quantityMax
 

Function Documentation

◆ IsValid()

override bool IsValid ( )

slot name validity checked separately

Checks if the ScriptCaller is valid.

Definition at line 95 of file CfgPlayerSpawnDataJson.c.

96 {
97 if (!super.IsValid())
98 return false;
99
100 if (discreteItemSets == null || discreteItemSets.Count() < 1)
101 {
102 Debug.Log("discreteItemSets for slot: " + slotName + " undefined", "n/a", "Validation", "PlayerSpawnPresetSlotData");
103 return false;
104 }
105
106 return true;
107 }
ref array< ref PlayerSpawnPresetDiscreteItemSetSlotData > discreteItemSets
PlayerSpawnPreset slotName
Definition Debug.c:14
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Definition Debug.c:133

References discreteItemSets, Debug::Log(), slotName, and spawnWeight.

◆ TranslateAndValidateSlot()

bool TranslateAndValidateSlot ( EntityAI parent,
inout int slotID )

Translates slot name to match something from both 'CfgSlots' and 'attachments[]' in entity's config.

Definition at line 66 of file CfgPlayerSpawnDataJson.c.

67 {
68 string tmp = slotName;
69 if (slotName == "shoulderL")
70 tmp = "Shoulder";
71 else if (slotName == "shoulderR")
72 tmp = "Melee";
73
76 {
77 Debug.Log("Wrong slot name used: " + slotName, "n/a", "Validation", "PlayerSpawnPresetSlotData");
78 return false;
79 }
80 if (!parent)
81 {
82 Debug.Log("No parent entity found when trying to populate slot: " + slotName, "n/a", "Validation", "PlayerSpawnPresetSlotData");
83 return false;
84 }
85 if (!parent.GetInventory().HasAttachmentSlot(slotID))
86 {
87 Debug.Log("Slot: " + slotName + " undefined on entity: " + parent.GetType(), "n/a", "Validation", "PlayerSpawnPresetSlotData");
88 return false;
89 }
90
91 return true;
92 }
provides access to slot configuration
static proto native bool IsSlotIdValid(int slotId)
verifies existence of the slot id
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id

References InventorySlots::GetSlotIdFromString(), InventorySlots::IsSlotIdValid(), Debug::Log(), and slotName.

Variable Documentation

◆ discreteItemSets

Definition at line 63 of file CfgPlayerSpawnDataJson.c.

Referenced by IsValid().

◆ healthMax

float healthMax

Definition at line 203 of file CfgPlayerSpawnDataJson.c.

◆ healthMin

◆ name

one set for cargo

Referenced by Add(), JsonObject::AddBool(), JsonObject::AddFloat(), JsonObject::AddInt(), AddModifier(), ScriptedWidgetEventHandler::AddPlayer(), JsonObject::AddString(), ScriptedWidgetEventHandler::AddTab(), JsonObject::AddVector2(), NotificationUI::AddVoiceNotification(), UIScriptedMenu::Apply(), ChangePPEMaterial(), Icon::Combine(), UIScriptedMenu::ConnectLastSession(), ConstructionPart::ConstructionPart(), PluginBase::ContainsFirstClass(), EntityLightSource::CreateLight(), EntityLightSource::CreateLightAtObjMemoryPoint(), CfgParam::CreateParam(), PluginConfigHandler::CustomLocationsAdd(), PluginConfigHandler::CustomLocationsRemove(), DebugAgentData::DebugAgentData(), DebugModifierData::DebugModifierData(), BleedingSourcesManagerBase::DisplayDebug(), Icon::DoubleClick(), HandsContainer::DoubleClick(), AttachmentCategoriesRow::DoubleClick(), ClosableContainer::DoubleClick(), PlayerContainer::DoubleClick(), VicinitySlotsContainer::DoubleClick(), ZombieContainer::DoubleClick(), Icon::DraggingOver(), DraggingOverCenterPanel(), Icon::DraggingOverCombine(), ClosableContainer::DraggingOverGrid(), HandsContainer::DraggingOverGrid(), AttachmentCategoriesRow::DraggingOverGrid(), ClosableContainer::DraggingOverGrid(), HandsArea::DraggingOverHandsPanel(), HandsContainer::DraggingOverHeader(), AttachmentCategoriesContainer::DraggingOverHeader(), AttachmentCategoriesRow::DraggingOverHeader(), VicinityContainer::DraggingOverHeader(), ZombieContainer::DraggingOverHeader(), VicinityContainer::DraggingOverIcon(), Icon::DraggingOverSwap(), Icon::DropReceivedFromMain(), GestureMenuItem(), ItemMap::GetActionWidgetOverride(), BleedingSourcesManagerBase::GetBitFromSelectionName(), PluginBase::GetConfigRecursive(), ScriptConsoleGeneralTab::GetCurrentLocationName(), ManBase::GetDebugActions(), PluginBase::GetID(), GetIDFromClassname(), HandsContainer::GetItemPreviewItem(), AttachmentCategoriesRow::GetItemPreviewItem(), ClosableContainer::GetItemPreviewItem(), ClosableContainer::GetItemPreviewWidget(), PlayerContainer::GetItemPreviewWidget(), ClosableContainer::GetItemPreviewWidgetDragOrDrop(), JsonObject::GetJson(), Managed::GetLastPlayedServer(), IEntity::GetLODByName(), GetName(), PluginFileHandler::GetParamByName(), PluginFileHandler::GetParameterArray(), PluginFileHandler::GetParameterBool(), PluginFileHandler::GetParameterFloat(), PluginFileHandler::GetParameterInt(), PluginFileHandler::GetParameterString(), ParticleList::GetParticleIDByName(), GetProfileValueBool(), DayZIntroScene::GetSelectedUserName(), LOD::GetSelectionByName(), IEntity::GetSelectionPositionLS(), IEntity::GetSelectionPositionMS(), IEntity::GetSelectionPositionOld(), IEntity::GetSelectionPositionWS(), SoundSetMap::GetSoundSetID(), GetValidDepenentPartsArray(), CfgParam::GetValueByName(), DayZPlayer::HandleView(), ScriptConsoleItemsTab::Init(), Attachments::InitAttachmentGrid(), AttachmentCategoriesContainer::InitGhostSlots(), ItemBase::InitializeSlots(), BleedingSourcesManagerBase::IsBleedingSourceActive(), ScriptConsoleGeneralTab::IsLocationNameAvailable(), CfgParam::IsParamExist(), PlayerContainer::ItemAttached(), ZombieContainer::ItemAttached(), ScriptedWidgetEventHandler::LoadData(), Widget::LoadVideo(), ModifierDebugObj::ModifierDebugObj(), VicinitySlotsContainer::MouseButtonDown(), VicinitySlotsContainer::MouseClick(), HandsContainer::MouseClick2(), InventoryItem::NameToID(), OnCenterPanelDropReceived(), UIScriptedMenu::OnChange(), OnClick(), ScriptedWidgetEventHandler::OnClick(), UIScriptedMenu::OnClick(), ZombieContainer::OnDropReceivedFromGhostArea(), AttachmentCategoriesContainer::OnDropReceivedFromHeader(), VicinityContainer::OnDropReceivedFromHeader(), VicinitySlotsContainer::OnDropReceivedFromHeader(), ZombieContainer::OnDropReceivedFromHeader(), VicinityContainer::OnDropReceivedFromIcon(), HFSMBase< WeaponStateBase, WeaponEventBase, WeaponActionBase, WeaponGuardBase >::OnFailThresholdBreached(), HandsArea::OnHandsPanelDropReceived(), InventoryGridController::OnItemDraggingOver(), InventoryGridController::OnItemDropReceived(), JsonApiStruct::OnItemObject(), UIScriptedMenu::OnMouseEnter(), JsonApiStruct::OnObject(), OnRightPanelDropReceived(), PluginBase::OnSpawnErrorReport(), JsonApiStruct::OnStartArray(), PluginFileHandler::ParamExist(), PhysicsGeomDef::PhysicsGeomDef(), ScriptedWidgetEventHandler::PlayerListEntryScriptedWidget(), PluginDayzPlayerDebugUserData::PluginDayzPlayerDebugUserData(), ScriptedWidgetEventHandler::PrepareOwnedSlotsTooltip(), ItemManager::PrepareSlotsTooltip(), UIScriptedMenu::Refresh(), ScriptConsoleGeneralTab::RefreshLocations(), RegisterAnimation(), BleedingSourcesManagerBase::RegisterBleedingZone(), BleedingSourcesManagerBase::RegisterBleedingZoneEx(), KeysToUIElements::RegisterKeyToUIElement(), PluginBase::RegisterVariable(), ScriptedWidgetEventHandler::Reload(), PluginFileHandler::RemoveParamByName(), PluginFileHandler::RemoveParameter(), PluginFileHandler::RemoveParameterArray(), CfgParam::RenameParam(), PluginFileHandler::RenameParam(), UIScriptedMenu::Save(), Managed::SaveCharName(), DayZIntroSceneXbox::SaveCharName(), ManBase::SaySoundSet(), PluginBase::SendRPCMods(), MenuDefaultCharacterData::SetCharacterName(), ColorManager::SetColor(), ClosableContainer::SetEntity(), ClosableHeader::SetName(), Header::SetName(), ScriptedWidgetEventHandler::SetName(), GetServersInput::SetNameFilter(), SceneData::SetNameMission(), SceneData::SetNameScene(), PluginFileHandler::SetParameterArray(), PluginFileHandler::SetParameterBool(), PluginFileHandler::SetParameterFloat(), PluginFileHandler::SetParameterInt(), PluginFileHandler::SetParameterString(), CGame::SetPlayerGameName(), SetProfileValueBool(), UIScriptedMenu::SetServerInfo(), ItemManager::SetTemperature(), Managed::SetupPlayerName(), SoundObjectBuilder::SetVariable(), StatDebugObject::StatDebugObject(), Icon::Swap(), SyncedValue::SyncedValue(), SyncedValueAgent(), SyncedValueLevel(), SyncedValueModifier::SyncedValueModifier(), PlayerContainer::ToggleWidget(), ScriptedWidgetEventHandler::TutorialKeybinds(), array::Update(), ScriptedWidgetEventHandler::Update(), UIScriptedMenu::UpdateCategoryName(), UpdateConstructionParts(), Container::UpdateHeaderText(), UpdateNumericalVarsWidget(), DayZIntroSceneXbox::UpdateSelectedUserName(), UIScriptedMenu::UpdateSlotInfo(), HudDebugWinBase::UpdateValues(), HFSMBase< WeaponStateBase, WeaponEventBase, WeaponActionBase, WeaponGuardBase >::ValidateAndRepairHelper(), and WorkbenchPluginAttribute::WorkbenchPluginAttribute().

◆ presets

◆ quantityMax

◆ quantityMin

float quantityMin

Definition at line 204 of file CfgPlayerSpawnDataJson.c.

Referenced by ScriptedWidgetEventHandler::BuildCursor().

◆ slotName

◆ spawnWeight

Referenced by IsValid().