68 proto
bool WriteToString(
void variable_out,
bool nice, out
string result);
100 proto
bool ReadFromString(
void variable_in,
string jsonString, out
string error);
192 Error(
"Vertex doesn't exist");
226 for (
int i = 0; i < selections.Count(); ++i)
228 string selection_name = selections.Get(i).GetName();
231 if (selection_name ==
name)
233 return selections.Get(i);
268class ProxySubpart
extends Entity
578 const string Cursor =
"set:dayz_gui image:cursor";
583 const string EngineOff =
"set:dayz_gui image:engine_off";
584 const string EngineOn =
"set:dayz_gui image:engine_on";
586 const string LadderOff =
"set:dayz_gui image:ladderoff";
587 const string LadderUp =
"set:dayz_gui image:ladderup";
589 const string CloseHood =
"set:dayz_gui image:close_hood";
590 const string OpenHood =
"set:dayz_gui image:open_hood";
591 const string GetOut =
"set:dayz_gui image:getout";
593 const string Reload =
"set:dayz_gui image:reload";
864 bool m_SuppressNextFrame =
true;
865 void SetInputSuppression(
bool state) {}
866 bool GetInputSuppression() {}
891 Error(
"MenuData | OnSetDefaultCharacter - failed to get data class!");
904 Error(
"MenuData | OnGetDefaultCharacter - failed to get data class!");
954 if (!
GetGame().IsDedicatedServer())
976 string attachment_type;
977 for (
int i = 0; i < DefaultCharacterCreationMethods.GetAttachmentSlotsArray().
Count(); i++)
979 slot_ID = DefaultCharacterCreationMethods.GetAttachmentSlotsArray().Get(i);
980 if (DefaultCharacterCreationMethods.GetConfigArrayCountFromSlotID(slot_ID) > 0)
982 attachment_type = DefaultCharacterCreationMethods.GetConfigAttachmentTypes(slot_ID).GetRandomElement();
993 ErrorEx(
"WARNING - trying to equip non-existent object! | MenuDefaultCharacterData::EquipDefaultCharacter");
998 string attachment_type;
999 string current_attachment_type;
1000 EntityAI current_attachment_object;
1004 attachment_type =
"";
1005 current_attachment_type =
"";
1008 current_attachment_object = player.GetInventory().FindAttachment(slot_ID);
1010 if (current_attachment_object)
1012 current_attachment_type = current_attachment_object.GetType();
1014 if (current_attachment_type != attachment_type)
1016 if (current_attachment_object)
1017 g_Game.ObjectDelete(current_attachment_object);
1018 if (attachment_type !=
"")
1019 player.GetInventory().CreateAttachmentEx(attachment_type,slot_ID);
1089 Print(
"-----------");
1090 Print(
"m_AttachmentsMap contents:");
1095 Print(
"index " + j);
1096 Print(
"debugID: " + debugID);
1097 Print(
"debugType: " + debugType);
1099 Print(
"-----------");
1103class DefaultCharacterCreationMethods
1137 const static string m_Path =
"cfgCharacterCreation";
1152 return types.Count();
MenuDefaultCharacterData GetMenuDefaultCharacterData(bool fill_data=true)
proto native void ConfigGetTextArray(string path, out TStringArray values)
Get array of strings from config on path.
proto native MenuData GetMenuData()
Return singleton of MenuData class - at main menu contains characters played with current profile.
const string CloseCarDoors
const string OpenCarDoors
const string GetInCommander
script counterpart to engine's class Inventory
static proto native EntityAI LocationCreateEntity(notnull InventoryLocation inv_loc, string type, int iSetupFlags, int iRotation)
creates new item directly at location
proto native int GetOptionsCount()
Registered options count.
proto native OptionsAccess GetOption(int index)
Get option by index.
proto native OptionsAccess GetOptionByType(int accessType)
Get option by AccessType.
proto native void Initialize()
Initializes option values with the current users settings.
proto native void Revert()
Load config with options and Revert every option, see OptionsAccess::Revert.
proto native void Apply()
Tests, Applies every option and save config with options to file, see OptionsAccess::Test,...
proto native int NeedRestart()
Checks if any option is changed and needs restart, see OptionsAccess::IsChanged, OptionsAccess::NeedR...
proto native void Test()
Tests every option, see OptionsAccess::Test.
proto native int IsChanged()
Checks if any option is changed, see OptionsAccess::IsChanged.
void DisplayBadge(int key, int value)
void DisplayStance(int stance)
void SetCursorIconScale(string type, float percentage)
void Update(float timeslice)
void ShowHudUI(bool show)
void ShowWalkieTalkie(bool show)
void ShowQuickbarPlayer(bool show)
void ShowQuickBar(bool show)
void ShowHudPlayer(bool show)
void DisplayNotifier(int key, int tendency, int status)
void ShowHudInventory(bool show)
void ShowWalkieTalkie(int fadeOutSeconds)
void SetConnectivityStatIcon(EConnectivityStatType type, EConnectivityStatLevel level)
void SetCursorIcon(string icon)
void SpawnHitDirEffect(DayZPlayer player, float hit_direction, float intensity_max)
void RefreshQuickbar(bool itemChanged=false)
void ToggleHeatBufferPlusSign(bool show)
void SetStamina(int value, int range)
void ShowQuickbarUI(bool show)
void SetCursorIconOffset(string type, float x, float y)
void SetTemperature(string temp)
void Init(Widget hud_panel_widget)
void SetWalkieTalkieText(string text)
void SetCursorIconSize(string type, float x, float y)
void SetPermanentCrossHair(bool show)
void SetStaminaBarVisibility(bool show)
provides access to slot configuration
Class for sending RPC over network.
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.
static const string NAME_FIRE
proto native owned string GetPropertyValue(int index)
proto native owned string GetName(Object myObject)
static const string NAME_MEMORY
proto native int GetPropertyCount()
static const string NAME_GEOMETRY
proto native bool GetSelections(notnull out array< Selection > selections)
Selection GetSelectionByName(string name)
proto native owned string GetPropertyName(int index)
proto native vector GetVertexPosition(int vertex_index)
proto native int GetSelectionCount()
static const string NAME_VIEW
static const string NAME_ROADWAY
proto native owned string GetModeName(int index)
private void ~MeleeCombatData()
proto native int GetModesCount()
proto native float GetModeRange(int index)
proto native owned string GetAmmoTypeName(int index)
private void MeleeCombatData()
UIScriptedMenu CreateScriptedMenu(int id)
int GetControlDisabledMode()
void CreateDebugMonitor()
void RefreshCrosshairVisibility()
array< vector > GetActiveRefresherLocations()
ObjectSnapCallback GetInventoryDropCallback()
void SetVoNActive(bool active)
void EnableAllInputs(bool bForceSupress=false)
void RemoveActiveInputRestriction(int restrictor)
map< int, ref WidgetFadeTimer > GetVoiceLevelTimers()
void OnGameplayDataHandlerLoad()
void OnMouseButtonPress(int button)
int GetRespawnModeClient()
WorldLighting GetWorldLighting()
ImageWidget GetMicrophoneIcon()
ScriptInvoker GetOnInputPresetChanged()
void AddActiveInputRestriction(int restrictor)
void PlayerControlEnable(bool bForceSupress)
void AddActiveInputExcludes(array< string > excludes)
protected ref ScriptInvoker m_OnInputDeviceChanged
protected ref ScriptInvoker m_OnInputDeviceDisconnected
ScriptModule MissionScript
void HideVoiceLevelWidgets()
void SyncRespawnModeInfo(PlayerIdentity identity)
server-side
void OnItemUsed(InventoryItem item, Man owner)
void SetRespawnModeClient(int mode)
for client-side usage
ref array< vector > m_ActiveRefresherLocations
protected ref ScriptInvoker m_OnInputPresetChanged
bool IsInputExcludeActive(string exclude)
map< int, ImageWidget > GetVoiceLevelWidgets()
GameplayEffectWidgets_base GetEffectWidgets()
ScriptInvoker GetOnInputDeviceConnected()
UIScriptedMenu GetNoteMenu()
void PlayerControlDisable(int mode)
deprecated
void UpdateVoiceLevelWidgets(int level)
protected ref ScriptInvoker m_OnInputDeviceConnected
bool IsInputRestrictionActive(int restriction)
bool InsertCorpse(Man player)
void OnKeyRelease(int key)
bool IsPlayerDisconnecting(Man player)
void OnUpdate(float timeslice)
ScriptInvoker GetOnInputDeviceDisconnected()
UIScriptedWindow CreateScriptedWindow(int id)
void OnEvent(EventType eventTypeId, Param params)
void RemoveActiveInputExcludes(array< string > excludes, bool bForceSupress=false)
deprecated
void OnPlayerRespawned(Man player)
void SetNoteMenu(UIScriptedMenu menu)
WidgetFadeTimer GetMicWidgetFadeTimer()
ScriptInvoker GetOnInputDeviceChanged()
void AddDummyPlayerToScheduler(Man player)
void StartLogoutMenu(int time)
void SetPlayerRespawning(bool state)
void HideCrosshairVisibility()
bool IsPlayerRespawning()
void CreateLogoutMenu(UIMenuPanel parent)
void OnMouseButtonRelease(int button)
Invokers for ParticleManager events.
ref ScriptInvoker Event_OnRevert
proto void GetItemText(out string value)
proto native int GetItemsCount()
proto native int GetIndex()
private proto Managed GetScriptEvents()
Get the events.
proto native int GetAccessType()
AccessType of current option.
proto native void Switch()
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 Revert()
Reverts the option value to old value if the value has changed and wasnt applied. This function has e...
proto native void Apply()
Applies the option value if the value has changed and forgets the old value. This function has no eff...
proto native int NeedRestart()
If the option value will take effect only after the game is restarted.
private proto void SetScriptEvents(Managed events)
Set the events.
proto native void Test()
Sets the option value internaly if the value has changed and wasnt set immediately upon change.
proto native void SetIndex(int index)
proto void GetItemText(int index, out string value)
OptionsAccessEvents GetEvents()
Get the events.
proto native int SetChangeImmediately()
If the value is changed internally immediately upon change.
proto native int IsChanged()
If the option value is changed and not applied or reverted. Value can already be set internally if th...
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Player description (base engine class)
proto int GetPingMin()
ping range estimation
private void ~PlayerIdentityBase()
proto int GetPingAvg()
ping range estimation
proto int GetPingMax()
ping range estimation
proto owned string GetId()
unique id of player (hashed steamID, database Xbox id...) can be used in database or logs
proto owned string GetPlainName()
nick without any processing
proto int GetBandwidthAvg()
bandwidth estimation (in kbps)
proto owned string GetPlainId()
plaintext unique id of player (cannot be used in database or logs)
proto owned string GetName()
nick (short) name of player
proto int GetBandwidthMax()
bandwidth estimation (in kbps)
proto int GetPingAct()
ping range estimation
proto int GetBandwidthMin()
bandwidth estimation (in kbps)
proto int GetPlayerId()
id of player in one session (is reused after player disconnects)
proto owned string GetFullName()
full name of player
proto Man GetPlayer()
get player
private 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)
ScriptInvoker Class provide list of callbacks usage:
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
void ScriptJunctureData()
void ~ScriptJunctureData()
proto native void Reset()
Module containing compiled scripts.
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...
proto native void Reset()
Reset internal buffer which stores written data. After Reset is callded, ScriptRPC can be used again ...
proto native ParamsReadContext GetReadContext()
void ~ScriptReadWriteContext()
proto native ParamsWriteContext GetWriteContext()
void ScriptReadWriteContext()
proto native int GetVertexCount()
proto native owned string GetName()
private void ~Selection()
proto native int GetLODVertexIndex(int sel_vertex_index)
vector GetVertexPosition(LOD lod, int index)
Serialization general interface. Serializer API works with:
proto bool Write(void value_out)
proto bool Read(void value_in)
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.
const EventType SetFreeCameraEventTypeID
params: SetFreeCameraEventParams
proto native float GetMax()
Serializer ParamsReadContext
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 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
Param1< float > ServerFpsStatsUpdatedEventParams
float
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
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_CONTROLLER_LS_XAXIS
@ 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_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.