68 proto
bool WriteToString(
void variable_out,
bool nice, out
string result);
100 proto
bool ReadFromString(
void variable_in,
string jsonString, out
string error);
193 Error(
"Vertex doesn't exist");
227 for (
int i = 0; i < selections.Count(); ++i)
229 string selection_name = selections.Get(i).GetName();
232 if (selection_name ==
name)
234 return selections.Get(i);
269class ProxySubpart
extends Entity
377#ifdef FEATURE_NETWORK_RECONCILIATION
379 proto native
void Possess(Pawn pawn);
593 const string Cursor =
"set:dayz_gui image:cursor";
598 const string EngineOff =
"set:dayz_gui image:engine_off";
599 const string EngineOn =
"set:dayz_gui image:engine_on";
601 const string LadderOff =
"set:dayz_gui image:ladderoff";
602 const string LadderUp =
"set:dayz_gui image:ladderup";
604 const string CloseHood =
"set:dayz_gui image:close_hood";
605 const string OpenHood =
"set:dayz_gui image:open_hood";
606 const string GetOut =
"set:dayz_gui image:getout";
608 const string Reload =
"set:dayz_gui image:reload";
909 bool m_SuppressNextFrame =
true;
910 void SetInputSuppression(
bool state);
911 bool GetInputSuppression();
937 Error(
"MenuData | OnSetDefaultCharacter - failed to get data class!");
950 Error(
"MenuData | OnGetDefaultCharacter - failed to get data class!");
1000 if (!
GetGame().IsDedicatedServer())
1022 string attachment_type;
1023 for (
int i = 0; i < DefaultCharacterCreationMethods.GetAttachmentSlotsArray().
Count(); i++)
1025 slot_ID = DefaultCharacterCreationMethods.GetAttachmentSlotsArray().Get(i);
1026 if (DefaultCharacterCreationMethods.GetConfigArrayCountFromSlotID(slot_ID) > 0)
1028 attachment_type = DefaultCharacterCreationMethods.GetConfigAttachmentTypes(slot_ID).GetRandomElement();
1039 ErrorEx(
"WARNING - trying to equip non-existent object! | MenuDefaultCharacterData::EquipDefaultCharacter");
1044 string attachment_type;
1045 string current_attachment_type;
1046 EntityAI current_attachment_object;
1050 attachment_type =
"";
1051 current_attachment_type =
"";
1054 current_attachment_object = player.GetInventory().FindAttachment(slot_ID);
1056 if (current_attachment_object)
1058 current_attachment_type = current_attachment_object.GetType();
1060 if (current_attachment_type != attachment_type)
1062 if (current_attachment_object)
1063 g_Game.ObjectDelete(current_attachment_object);
1064 if (attachment_type !=
"")
1065 player.GetInventory().CreateAttachmentEx(attachment_type,slot_ID);
1135 Print(
"-----------");
1136 Print(
"m_AttachmentsMap contents:");
1141 Print(
"index " + j);
1142 Print(
"debugID: " + debugID);
1143 Print(
"debugType: " + debugType);
1145 Print(
"-----------");
1149class DefaultCharacterCreationMethods
1152 InventorySlots.SHOULDER,
1153 InventorySlots.MELEE,
1154 InventorySlots.HEADGEAR,
1155 InventorySlots.MASK,
1156 InventorySlots.EYEWEAR,
1157 InventorySlots.GLOVES,
1158 InventorySlots.ARMBAND,
1159 InventorySlots.BODY,
1160 InventorySlots.VEST,
1161 InventorySlots.BACK,
1162 InventorySlots.HIPS,
1163 InventorySlots.LEGS,
1183 const static string m_Path =
"cfgCharacterCreation";
1198 return types.Count();
1425 proto native
float GetMin();
1426 proto native
float GetMax();
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
proto native MenuData GetMenuData()
Return singleton of MenuData class - at main menu contains characters played with current profile.
proto native void ConfigGetTextArray(string path, out TStringArray values)
Get array of strings from config on path.
MenuDefaultCharacterData GetMenuDefaultCharacterData(bool fill_data=true)
const string GetInCommander
const string CloseCarDoors
const string OpenCarDoors
static proto native EntityAI LocationCreateEntity(notnull InventoryLocation inv_loc, string type, int iSetupFlags, int iRotation)
creates new item directly at location
script counterpart to engine's class Inventory
proto native void Test()
Tests every option, see OptionsAccess::Test.
proto native int GetOptionsCount()
Registered options count.
proto native int IsChanged()
Checks if any option is changed, see OptionsAccess::IsChanged.
proto native int NeedRestart()
Checks if any option is changed and needs restart, see OptionsAccess::IsChanged, OptionsAccess::NeedR...
proto native void Revert()
Load config with options and Revert every option, see OptionsAccess::Revert.
proto native void Initialize()
Initializes option values with the current users settings.
proto native void Apply()
Tests, Applies every option and save config with options to file, see OptionsAccess::Test,...
proto native OptionsAccess GetOptionByType(int accessType)
Get option by AccessType.
proto native OptionsAccess GetOption(int index)
Get option by index.
void ShowQuickbarPlayer(bool show)
void RefreshQuickbar(bool itemChanged=false)
void SetPermanentCrossHair(bool show)
void SetCursorIconOffset(string type, float x, float y)
void SetWalkieTalkieText(string text)
void SetCursorIcon(string icon)
void SetStamina(int value, int range)
void SpawnHitDirEffect(DayZPlayer player, float hit_direction, float intensity_max)
void ShowWalkieTalkie(int fadeOutSeconds)
void ShowHudUI(bool show)
void DisplayStance(int stance)
void SetStaminaBarVisibility(bool show)
void ShowQuickBar(bool show)
void Update(float timeslice)
void InitHeatBufferUI(Man player)
void SetCursorIconSize(string type, float x, float y)
void DisplayBadge(int key, int value)
void SetConnectivityStatIcon(EConnectivityStatType type, EConnectivityStatLevel level)
void ShowHudInventory(bool show)
void SetTemperature(string temp)
void ShowQuickbarUI(bool show)
void ShowHudPlayer(bool show)
void SetCursorIconScale(string type, float percentage)
void UpdateQuickbarGlobalVisibility()
void ShowWalkieTalkie(bool show)
void DisplayNotifier(int key, int tendency, int status)
void Init(Widget hud_panel_widget)
proto bool ReadFromString(void variable_in, string jsonString, out string error)
Json string deserialization to script variable.
proto bool WriteToString(void variable_out, bool nice, out string result)
Script variable serialization to json string.
proto native owned string GetPropertyValue(int index)
Selection GetSelectionByName(string name)
proto native int GetSelectionCount()
proto native owned string GetName(Object myObject)
static const string NAME_FIRE
static const string NAME_MEMORY
proto native int GetPropertyCount()
proto native vector GetVertexPosition(int vertex_index)
static const string NAME_GEOMETRY
static const string NAME_ROADWAY
proto native owned string GetPropertyName(int index)
static const string NAME_VIEW
proto native bool GetSelections(notnull out array< Selection > selections)
proto native int GetModesCount()
proto native float GetModeRange(int index)
proto native owned string GetAmmoTypeName(int index)
proto native owned string GetModeName(int index)
bool IsPlayerDisconnecting(Man player)
ref array< vector > m_ActiveRefresherLocations
WorldLighting GetWorldLighting()
UIScriptedMenu GetNoteMenu()
void RemoveActiveInputRestriction(int restrictor)
array< vector > GetActiveRefresherLocations()
void OnUpdate(float timeslice)
void CreateLogoutMenu(UIMenuPanel parent)
void AddDummyPlayerToScheduler(Man player)
void SetRespawnModeClient(int mode)
for client-side usage
void PlayerControlDisable(int mode)
deprecated
ref ScriptInvoker m_OnInputDeviceChanged
void SetPlayerRespawning(bool state)
void PlayerControlEnable(bool bForceSupress)
ref ScriptInvoker m_OnModMenuVisibilityChanged
map< int, ref WidgetFadeTimer > GetVoiceLevelTimers()
ref ScriptInvoker m_OnInputDeviceDisconnected
void OnKeyRelease(int key)
ScriptInvoker GetOnInputDeviceChanged()
void OnPlayerRespawned(Man player)
int GetControlDisabledMode()
ref ScriptInvoker m_OnInputDeviceConnected
ScriptModule MissionScript
ObjectSnapCallback GetInventoryDropCallback()
ref ScriptInvoker m_OnInputPresetChanged
void SyncRespawnModeInfo(PlayerIdentity identity)
server-side
ScriptInvoker GetOnInputDeviceDisconnected()
void AddActiveInputRestriction(int restrictor)
void OnMouseButtonRelease(int button)
ScriptInvoker GetOnInputPresetChanged()
void UpdateVoiceLevelWidgets(int level)
void AddActiveInputExcludes(array< string > excludes)
DynamicMusicPlayer GetDynamicMusicPlayer()
UIScriptedWindow CreateScriptedWindow(int id)
void RefreshCrosshairVisibility()
void OnMouseButtonPress(int button)
ScriptInvoker GetOnModMenuVisibilityChanged()
GameplayEffectWidgets_base GetEffectWidgets()
UIScriptedMenu CreateScriptedMenu(int id)
void HideVoiceLevelWidgets()
WidgetFadeTimer GetMicWidgetFadeTimer()
void OnItemUsed(InventoryItem item, Man owner)
ScriptInvoker GetOnTimeChanged()
int GetRespawnModeClient()
void OnGameplayDataHandlerLoad()
bool IsInputExcludeActive(string exclude)
ImageWidget GetMicrophoneIcon()
void SetNoteMenu(UIScriptedMenu menu)
bool IsInputRestrictionActive(int restriction)
bool InsertCorpse(Man player)
void OnEvent(EventType eventTypeId, Param params)
void EnableAllInputs(bool bForceSupress=false)
void CreateDebugMonitor()
void HideCrosshairVisibility()
void StartLogoutMenu(int time)
void RemoveActiveInputExcludes(array< string > excludes, bool bForceSupress=false)
deprecated
map< int, ImageWidget > GetVoiceLevelWidgets()
bool IsPlayerRespawning()
void SetVoNActive(bool active)
ScriptInvoker GetOnInputDeviceConnected()
ref ScriptInvoker m_OnTimeChanged
proto Managed GetScriptEvents()
Get the events.
proto native int GetIndex()
proto native int NeedRestart()
If the option value will take effect only after the game is restarted.
proto native int GetAccessType()
AccessType of current option.
proto native int GetDefaultIndex()
proto native int GetControlType()
Current option controller type. OA_CT_NUMERIC = 0, OA_CT_SWITCH = 1, OA_CT_LIST = 2.
proto native void Test()
Sets the option value internaly if the value has changed and wasnt set immediately upon change.
proto native void Apply()
Applies the option value if the value has changed and forgets the old value. This function has no eff...
proto void SetScriptEvents(Managed events)
Set the events.
OptionsAccessEvents GetEvents()
Get the events.
proto void GetItemText(out string value)
void GetAllItemsText(array< string > output)
proto native void SetIndex(int index)
proto native void Switch()
proto native int SetChangeImmediately()
If the value is changed internally immediately upon change.
proto native int GetItemsCount()
proto native void Revert()
Reverts the option value to old value if the value has changed and wasnt applied. This function has e...
proto void GetItemText(int index, out string value)
proto native int IsChanged()
If the option value is changed and not applied or reverted. Value can already be set internally if th...
ref ScriptInvoker Event_OnRevert
Invokers for ParticleManager events.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
proto string GetPlainId()
plaintext unique id of player (cannot be used in database or logs)
proto int GetPingMin()
ping range estimation
proto int GetPlayerId()
id of player in one session (is reused after player disconnects)
proto float GetOutputThrottle()
Throttling performed on output bandwidth since last update (percentage [0,1])
proto Man GetPlayer()
get player
proto int GetBandwidthMin()
bandwidth estimation (in kbps)
proto int GetPingAvg()
ping range estimation
proto int GetBandwidthAvg()
bandwidth estimation (in kbps)
proto string GetFullName()
full name of player
proto int GetPingMax()
ping range estimation
proto string GetName()
nick (short) name of player
proto int GetBandwidthMax()
bandwidth estimation (in kbps)
proto float GetInputThrottle()
Throttling performed on input bandwidth since last update(percentage [0,1]) (unknown value on Server)
proto string GetId()
unique id of player (hashed steamID, database Xbox id...) can be used in database or logs
void ~PlayerIdentityBase()
proto int GetPingAct()
ping range estimation
proto string GetPlainName()
nick without any processing
void PlayerIdentityBase()
This is a C++ managed class, so script has no business managing the lifetime.
The class that will be instanced (moddable)
static bool m_GunParticlesState
proto native void LoadFile(string path)
proto void Invoke(void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
invoke call on all inserted methods with given arguments
ScriptInvoker Class provide list of callbacks usage:
void ScriptJunctureData()
void ~ScriptJunctureData()
proto native void Reset()
Module containing compiled scripts.
proto native void Reset()
Reset internal buffer which stores written data. After Reset is callded, ScriptRPC can be used again ...
proto native void Send(Object target, int rpc_type, bool guaranteed, PlayerIdentity recipient=NULL)
Initiate remote procedure call. When called on client, RPC is evaluated on server; When called on ser...
void ~ScriptReadWriteContext()
void ScriptReadWriteContext()
proto native ParamsReadContext GetReadContext()
proto native ParamsWriteContext GetWriteContext()
vector GetVertexPosition(LOD lod, int index)
proto native int GetVertexCount()
proto native int GetLODVertexIndex(int sel_vertex_index)
proto native owned string GetName()
proto bool Write(void value_out)
proto bool Read(void value_in)
Serialization general interface. Serializer API works with:
Keeps information about currently loaded world, like temperature.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
const EventType LogoutCancelEventTypeID
params: LogoutCancelEventParams
static ref array< string > m_ConfigArrayNames
proto native float GetMin()
const int PROGRESS_UPDATE
Param1< int > RespawnEventParams
RespawnTime.
Param1< int > MPConnectionLostEventParams
Duration.
Param2< string, string > VONStartSpeakingEventParams
player name, player id
Param1< Man > LogoutCancelEventParams
Player.
Param1< int > SQFConsoleEventParams
const EventType PartyChatStatusChangedEventTypeID
no params
static int GetConfigArrayCountFromSlotID(int slot_ID)
How many 'default equip' types are listed in the corresponding array.
Param1< int > LoginTimeEventParams
LoginTime.
const EventType ClientNewEventTypeID
params: ClientNewEventParams
const EventType MPSessionEndEventTypeID
no params
const EventType ConnectingStartEventTypeID
no params
PlayerIdentity PROGRESS_START
static string GetPathFromSlotID(int slot_ID)
Returns config path of att. slot category, empty if undefined.
const int INDEX_NOT_FOUND
Param1< string > ScriptLogEventParams
static array< int > GetAttachmentSlotsArray()
Lists all customizable InventorySlots.
const EventType LoginStatusEventTypeID
params: LoginStatusEventParams
Param5< PlayerIdentity, bool, vector, float, int > ClientPrepareEventParams
PlayerIdentity, useDB, pos, yaw, preloadTimeout (= additional time in seconds to how long server wait...
Param1< vector > PreloadEventParams
Position.
Param1< bool > NetworkInputBufferEventParams
isFull
const EventType SetFreeCameraEventTypeID
params: SetFreeCameraEventParams
proto native float GetMax()
Serializer ParamsReadContext
Param4< float, float, int, int > ServerFpsStatsUpdatedEventParams
average server fps, highest frame time, skipped physics simulation steps server/client
Param2< PlayerIdentity, Man > ClientRespawnEventParams
PlayerIdentity, Man.
const EventType WorldCleaupEventTypeID
no params
static array< string > GetConfigAttachmentTypes(int slot_ID)
Lists all configured types (if any) for the appropriate attachment.
class MeleeCombatData NullStringArray[1]
Param1< string > DLCOwnerShipFailedParams
world name
Param1< int > LogoutEventParams
logoutTime
const EventType ClientReconnectEventTypeID
params: ClientReconnectEventParams
const EventType MPConnectionCloseEventTypeID
params: MPConnectionCloseEventParams
Param2< bool, bool > VONStateEventParams
listening, toggled
Param2< string, string > VONStopSpeakingEventParams
player name, player id
const EventType SelectedUserChangedEventTypeID
no params
Param2< int, string > MPConnectionCloseEventParams
EClientKicked, AdditionalInfo.
const EventType ClientRemovedEventTypeID
no params
const EventType VONStartSpeakingEventTypeID
params: VONStartSpeakingEventParams
const EventType VONStateEventTypeID
params: VONStateEventParams
const EventType RespawnEventTypeID
params: RespawnEventParams
const EventType MPSessionFailEventTypeID
no params
Param3< int, int, bool > WindowsResizeEventParams
Width, Height, Windowed.
const EventType VONUserStoppedTransmittingAudioEventTypeID
no params
const int PROGRESS_PROGRESS
Param4< PlayerIdentity, Man, int, bool > ClientDisconnectedEventParams
PlayerIdentity, Man, LogoutTime, AuthFailed.
const EventType PlayerDeathEventTypeID
params: PlayerDeathEventParams
const EventType StartupEventTypeID
no params
const EventType VONUserStartedTransmittingAudioEventTypeID
no params
const EventType DialogQueuedEventTypeID
no params
const EventType ClientRespawnEventTypeID
params: ClientRespawnEventParams
static const string m_Path
const EventType ClientConnectedEventTypeID
params: ClientConnectedEventParams
Param4< int, string, string, string > ChatMessageEventParams
channel, from, text, color config class
const EventType VONStopSpeakingEventTypeID
params: VONStopSpeakingEventParams
Param2< string, string > LoginStatusEventParams
text message for line 1, text message for line 2
const EventType MPSessionStartEventTypeID
no params
const EventType ClientNewReadyEventTypeID
params: ClientNewReadyEventParams
Param2< DayZPlayer, Object > PlayerDeathEventParams
Player, "Killer" (Beware: Not necessarily actually the killer, Client doesn't have this info)
Param2< PlayerIdentity, Man > ClientReconnectEventParams
PlayerIdentity, Man.
const EventType NetworkManagerClientEventTypeID
no params
const EventType PreloadEventTypeID
params: PreloadEventParams
Param1< int > ChatChannelEventParams
const EventType LoginTimeEventTypeID
params: LoginTimeEventParams
const EventType NetworkManagerServerEventTypeID
no params
Param1< PlayerIdentity > ConnectivityStatsUpdatedEventParams
PlayerIdentity.
Param2< string, string > ClientConnectedEventParams
Name, uid.
Param2< PlayerIdentity, Man > ClientReadyEventParams
PlayerIdentity, Man.
const EventType NetworkInputBufferEventTypeID
params: NetworkInputBufferEventParams
const EventType ServerFpsStatsUpdatedEventTypeID
params: ServerFpsStatsUpdatedEventParams
const EventType ConnectivityStatsUpdatedEventTypeID
params: ConnectivityStatsUpdatedEventParams
Param3< PlayerIdentity, vector, Serializer > ClientNewEventParams
PlayerIdentity, PlayerPos, Top, Bottom, Shoe, Skin.
Param2< PlayerIdentity, Man > ClientNewReadyEventParams
PlayerIdentity, Man.
class MenuDefaultCharacterData m_AttachmentSlots
proto native float GetDefault()
const EventType MPConnectionLostEventTypeID
params: MPConnectionLostEventParams
const EventType ClientDisconnectedEventTypeID
params: ClientDisconnectedEventParams
EntityAI SpawnEntity(string object_name, notnull InventoryLocation inv_loc, int iSetupFlags, int iRotation)
InventoryTraversalType
tree traversal type, for more see http://en.wikipedia.org/wiki/Tree_traversal
const EventType LogoutEventTypeID
params: LogoutEventParams
const EventType ScriptLogEventTypeID
params: ScriptLogEventParams
const EventType MPSessionPlayerReadyEventTypeID
no params
const EventType DLCOwnerShipFailedEventTypeID
params: DLCOwnerShipFailedParams
Param3< int, float, string > ProgressEventParams
state, progress, title
const int PROGRESS_FINISH
class ListOptionsAccess extends OptionsAccess ReadValue
OptionIDsScript
Used for script-based game options. For anything C++ based, you would most likely use "Option Access ...
@ OPTION_CONNECTIVITY_INFO
@ OPTION_BLEEDINGINDICATION
@ OPTION_AMBIENT_MUSIC_MODE
const EventType ChatChannelEventTypeID
params: ChatChannelEventParams
proto native CGame GetGame()
const EventType ProgressEventTypeID
params: ProgressEventParams
static array< string > GetConfigArrayNames()
for conversion of slot ID to config array's string
Param1< FreeDebugCamera > SetFreeCameraEventParams
Camera.
const EventType ClientReadyEventTypeID
params: ClientReadyEventParams
OptionAccessType
C++ OptionAccessType.
@ AT_OPTIONS_MOUSE_YAXIS_AIM_MOD
@ AT_OPTIONS_CONTROLLER_LS_YAXIS
@ AT_OPTIONS_VON_THRESHOLD_SLIDER
@ AT_OPTIONS_OBJECT_VISIBILITY_COMBO
@ AT_OPTIONS_CONTROLLER_LS_XAXIS
@ AT_OPTIONS_VISIBILITY_COMBO
@ AT_OPTIONS_CONTROLLER_RS_DEADZONE
@ AT_OPTIONS_BRIGHT_SLIDER
@ AT_OPTIONS_CONTROLLER_RS_YAXIS_INVERTED
@ AT_CONFIG_MOUSE_FILTERING
@ AT_OPTIONS_MOUSE_XAXIS_AIM_MOD
@ AT_OPTIONS_CONTROLLER_RS_YAXIS_AIM_MOD
@ AT_OPTIONS_TERRAIN_SHADER
@ AT_OPTIONS_GAMMA_SLIDER
@ AT_OPTIONS_DISPLAY_MODE
@ AT_OPTIONS_DRAWDISTANCE_SLIDER
@ AT_OPTIONS_EFFECTS_SLIDER
@ AT_OPTIONS_MOUSE_YAXIS_INVERTED
@ AT_OPTIONS_MUSIC_SLIDER
@ AT_OPTIONS_MOUSE_AND_KEYBOARD
@ AT_OPTIONS_CONTROLLER_LS_DEADZONE
@ AT_OPTIONS_CONTROLLER_LS_XAXIS_VEHICLE_MOD
@ AT_OPTIONS_CONTROLLER_RS_XAXIS
@ AT_OPTIONS_VISIBILITY_SLIDER
@ AT_OPTIONS_OBJECT_VISIBILITY_SLIDER
@ AT_OPTIONS_MASTER_VOLUME
@ AT_OPTIONS_CONTROLLER_RS_XAXIS_AIM_MOD
@ AT_OPTIONS_VON_INPUT_MODE
@ AT_OPTIONS_CONTROLLER_RS_YAXIS
@ AT_OPTIONS_SHADOW_VISIBILITY_SLIDER
@ AT_OPTIONS_FIELD_OF_VIEW
Serializer ParamsWriteContext
const EventType ClientPrepareEventTypeID
params: ClientPrepareEventParams
const EventType ChatMessageEventTypeID
params: ChatMessageEventParams
const EventType ConnectingAbortEventTypeID
no params
proto native void WriteValue(float value)
void Error(string err)
Messagebox with error message.
proto void Print(void var)
Prints content of variable to console/log.
array< string > TStringArray
proto int ToLower()
Changes string to lowercase. Returns length.