DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
BiosLobbyService.c
Go to the documentation of this file.
1// ip, name, connection port, queryPort
2typedef Param4<string, string, int, int> CachedServerInfo;
3
4// Script File
5
7{
12 PING
15};
16
18{
21};
22
24{
25 string m_Id; // server id (IP:Port)
27}
28
30class GetServersResultRow
31{
32 string m_Id; // PC is IP:Port
33 int m_Priority; // PC something is working -> 667223046
34 string m_Name; // PC is name of server
35 string m_Description; // PC not work
36 string m_HostIp; // PC not work
37 int m_HostPort; // PC is works
40 string m_MapNameToRun; // PC not work alway 0
41 bool m_Modded; // PC not work alway 0
42 int m_ModeId; // PC not work alway 0
44 int m_RegionId; // PC not work alway 0
46 int m_MaxPlayers; // PC - max players
47 int m_FreeSlots; // PC - max players
49 string m_GameVersion; // PC not work alway ""
50 bool m_IsPasswordProtected; // PC work
55 bool m_IsDLC;
56
57 //Scripted
62
63 //characters alive
65 //steam friends - list of names separated by comma
67
68 int m_Ping;
71 int m_Disable3rdPerson; //1 for disabled, ie. hardcore
76 string m_ShardId;
78
80
81 string GetIpPort()
82 {
83#ifdef PLATFORM_WINDOWS
84 return m_Id;
85#else
86 return GetIP() + ":" + m_HostPort;
87#endif
88 }
89
90 string GetIP()
91 {
92#ifdef PLATFORM_WINDOWS
93 // Hack - In new Serverborwser on PC has bad m_HostIp but ID contains correct IP
94 array<string> parts = new array<string>;
95 m_Id.Split(":", parts);
96 return parts[0];
97#else
98 return m_HostIp;
99#endif
100 }
101
103 {
104 return m_IsSelected;
105 }
106
107 string GetValueStr(ESortType sort_type)
108 {
109 switch( sort_type )
110 {
111 case ESortType.HOST:
112 {
113 return m_Name;
114 }
115 }
116
117 return "";
118 }
119
120 int GetValueInt(ESortType sort_type)
121 {
122 switch( sort_type )
123 {
124 case ESortType.TIME:
125 {
126 return m_SortTime;
127 }
128 case ESortType.POPULATION:
129 {
131 }
132 case ESortType.SLOTS:
133 {
134 return m_MaxPlayers;
135 }
136 case ESortType.PING:
137 {
138 return m_Ping;
139 }
140 case ESortType.FAVORITE:
141 {
142
143 }
144 case ESortType.PASSWORDED:
145 {
146
147 }
148 }
149
150 return 0;
151 }
152};
153
154
156
158{
160};
161
164{
168
172
173 void SetOfficial( bool Official )
174 {
175 m_Official = Official;
176 m_UseOfficial = true;
177 }
178
179 void SetGameVersion( string GameVersion )
180 {
181 m_GameVersion = GameVersion;
182 m_UseGameVersion = true;
183 }
184
185 void SetRegionId( int RegionId )
186 {
187 m_RegionId = RegionId;
188 m_UseRegionId = true;
189 }
190};
191
194{
198
200};
201
204{
207 string m_SortBy; //na of property
209 string m_Name;
211 int m_Platform; // 1 - PC, 2 - xbox, 3 - PSN
219 int m_MinPlayers; // minimum 1
220 int m_MaxPlayers; // maximum 99
222 int m_RegionId; // 1 - Americas, 2 - Europe, 3 - Asia
226 string m_HostIp;
232
255
256 void SetAntiCheatFilter( bool anti_cheat )
257 {
258 m_AntiCheat = anti_cheat;
259 m_UseAntiCheat = true;
260 }
261
262 void SetNameFilter( string name )
263 {
264 m_Name = name;
265 m_UseName = true;
266 }
267
268 void SetGameTypeFilter( string game_type )
269 {
270 m_GameType = game_type;
271 m_UseGameType = true;
272 }
273
274 void SetModeIdFilter( int mode_id )
275 {
276 m_ModeId = mode_id;
277 m_UseModeId = true;
278 }
279
280 void SetGameVersionFilter( string game_version )
281 {
282 m_GameVersion = game_version;
283 m_UseGameVersion = true;
284 }
285
286 void SetOfficialFilter( bool official )
287 {
288 m_Official = official;
289 m_UseOfficial = true;
290 }
291
292 void SetJoinableFilter( bool joinable )
293 {
294 m_Joinable = joinable;
295 m_UseJoinable = true;
296 }
297
298 void SetMapNameToRun( string mapNameToRun )
299 {
300 m_MapNameToRun = mapNameToRun;
301 m_UseMapNameToRun = true;
302 }
303
304 void SetIsModdedFilter( bool is_modded )
305 {
306 m_IsModded = is_modded;
307 m_UseIsModded = true;
308 }
309
310 void SetMinPlayersFilter( int min_players )
311 {
312 m_MinPlayers = min_players;
313 m_UseMinPlayers = true;
314 }
315
316 void SetMaxPlayersFilter( int max_players )
317 {
318 m_MaxPlayers = max_players;
319 m_UseMaxPlayers = true;
320 }
321
322 void SetIsPasswordProtectedFilter( bool password_protected )
323 {
324 m_IsPasswordProtected = password_protected;
326 }
327
328 void SetRegionIdFilter( int region )
329 {
330 m_RegionId = region;
331 m_UseRegionId = true;
332 }
333
334 void SetPriorityFilter( int priority )
335 {
336 m_Priority = priority;
337 m_UsePriority = true;
338 }
339
340 void SetFreeSlotsMin( int freeSlotsMin )
341 {
342 m_FreeSlotsMin = freeSlotsMin;
343 m_UseFreeSlotsMin = true;
344 }
345
346 void SetFreeSlotsMax( int freeSlotsMax )
347 {
348 m_FreeSlotsMax = freeSlotsMax;
349 m_UseFreeSlotsMax = true;
350 }
351
352 void SetHostIp( string hostIp )
353 {
354 m_HostIp = hostIp;
355 m_UseHostIp = true;
356 }
357
358 void SetHostPort( int hostPort )
359 {
360 m_HostPort = hostPort;
361 m_UseHostPort = true;
362 }
363
364 void SetMouseAndKeyboardEnabled(bool enabledMouseAndKeyboard)
365 {
366 m_MouseAndKeyboardEnabled = enabledMouseAndKeyboard;
368 }
369
370 void SetFavorited( bool show )
371 {
372 m_SortBy += "F";
373 AddShow( show );
374
375 }
376
377 void SetFriendsPlaying( bool show )
378 {
379 m_SortBy += "P";
380 AddShow( show );
381 }
382
383 void SetPreviouslyPlayed( bool show )
384 {
385 m_SortBy += "R";
386 AddShow( show );
387 }
388
389 void SetProperVersionMatch( bool show )
390 {
391 m_SortBy += "V";
392 AddShow( show );
393 }
394
395 void SetFullServer( bool show )
396 {
397 m_SortBy += "S";
398 AddShow( show );
399 }
400
401 void SetThirdPerson( bool show )
402 {
403 m_SortBy += "3";
404 AddShow( show );
405 }
406
407 void SetPublic( bool show )
408 {
409 m_SortBy += "L";
410 AddShow( show );
411 }
412
413 void SetAcceleratedTime( bool show )
414 {
415 m_SortBy += "A";
416 AddShow( show );
417 }
418
419 void SetAllowedFilePatching( bool show )
420 {
421 m_SortBy += "7";
422 AddShow( show );
423 }
424
425 void SetLAN()
426 {
427 m_SortBy += "N";
428 }
429
430 void SetPingFilter( int pingMaxValue )
431 {
432 m_SortBy += "M" + pingMaxValue + ";";
433 }
434
435 void SetBattleyeProtection(bool show)
436 {
437 m_SortBy += "B";
438 AddShow(show);
439 }
440
441 void SetPassworded(bool show)
442 {
443 m_SortBy += "C";
444 AddShow(show);
445 }
446
447 void AddShow( bool show )
448 {
449 if( show )
450 m_SortBy += "+";
451 else
452 m_SortBy += "-";
453 }
454
455 void AddFavourite(string ip, int port)
456 {
457 m_FavoriteServers += ip + ";" + port + ";";
458 }
459
460 void SetWhitelistEnabled(bool whitelistEnabled)
461 {
462 m_WhitelistEnabled = whitelistEnabled;
464
465 m_SortBy += "W";
466 AddShow(whitelistEnabled);
467 }
468
469 void SetIsDLC(bool isDLC)
470 {
471 m_IsDLC = isDLC;
472 m_UseIsDLC = true;
473
474 m_SortBy += "D";
475 AddShow(isDLC);
476 }
477};
478
480{
482
491 proto native EBiosError GetServers(GetServersInput inputValues);
492
494
499
500 proto native void AddServerFavorite(string ipAddress, int port, int steamQueryPort);
501 proto native void RemoveServerFavorite(string ipAddress, int port, int steamQueryPort);
502 proto native void GetFavoriteServers(TStringArray favServers);
503
505
508 proto native void GetCachedFavoriteServerInfo(array<ref CachedServerInfo> favServersInfoCache);
509
513 proto native EBiosError GetServerModList(string serverId);
514
516
522 void OnDoneAsync(GetServersResult result_list, EBiosError error, string response)
523 {
524 /*
525 if (result_list.m_Results != null && result_list.m_Results.Count() > 0)
526 Print(result_list.m_Results[0].m_TimeOfDay);
527 */
528 OnlineServices.OnLoadServersAsync( result_list, error, response );
529 }
530
532 {
533 OnlineServices.OnAutoConnectToEmptyServer( result_list, error );
534 }
535
538 {
539 OnlineServices.OnGetServerModList( result_list, error );
540 }
541};
EBiosError
Possible Error codes for bios API. This is the list of errors that can be returned from bios API....
string m_TimeOfDay
class GetServerModListResult m_Id
GetServersResultRow the output structure of the GetServers operation that represents one game server.
bool m_WhitelistEnabled
string GetIpPort()
bool m_AllowedFilePatching
int m_SortTime
ESortOrder
@ ASCENDING
@ DESCENDING
string m_CreatedAt
string m_Name
int m_Priority
ESortType
@ HOST
@ PASSWORDED
@ SLOTS
@ POPULATION
@ TIME
@ FAVORITE
bool m_IsPasswordProtected
int m_FreeSlots
string m_ShardId
bool m_Official
bool m_IsDLC
int m_SortName
string m_UpdatedAt
bool m_MouseAndKeyboardEnabled
bool m_Modded
bool m_AntiCheat
bool m_Favorite
int m_Disable3rdPerson
disable3rdPerson servers for mode regular/hardcore
string GetIP()
int m_RegionId
string m_GameVersion
array< ref GetServersResultRow > GetServersResultRowArray
int m_Ping
bool m_Invisible
bool IsSelected()
Param4< string, string, int, int > CachedServerInfo
int m_ModeId
float m_EnvironmentNightTimeMul
bool m_IsSelected
int m_HostPort
int m_SteamQueryPort
int m_MinPlayers
int GetValueInt(ESortType sort_type)
float m_EnvironmentTimeMul
time multiplier of environment
string m_CharactersAlive
string m_MapNameToRun
int m_MaxPlayers
int m_CurrentNumberPlayers
bool m_IsExpanded
string m_HostIp
string m_SteamFriends
string GetValueStr(ESortType sort_type)
@ PING
string name
proto native void GetCachedFavoriteServerInfo(array< ref CachedServerInfo > favServersInfoCache)
Get cached info about favorited servers (ONLY ON WINDOWS)
void OnDoneAsync(GetServersResult result_list, EBiosError error, string response)
Async callback for GetServers.
proto native void GetFavoriteServers(TStringArray favServers)
proto native EBiosError GetFirstServerWithEmptySlot(GetFirstServerWithEmptySlotInput inputValues)
First 1st free server.
proto native void AddServerFavorite(string ipAddress, int port, int steamQueryPort)
proto native EBiosError GetServerModList(string serverId)
void OnGetFirstServerWithEmptySlot(GetFirstServerWithEmptySlotResult result_list, EBiosError error)
proto native void RemoveServerFavorite(string ipAddress, int port, int steamQueryPort)
void OnServerModList(GetServerModListResult result_list, EBiosError error)
Async callback for GetServerModList.
proto native EBiosError GetServers(GetServersInput inputValues)
Query game servers.
GetServersInput the input structure of the GetServers operation.
void SetGameVersion(string GameVersion)
GetServersInput the input structure of the GetServers operation.
void SetFreeSlotsMin(int freeSlotsMin)
void SetBattleyeProtection(bool show)
void SetAcceleratedTime(bool show)
void SetAllowedFilePatching(bool show)
void SetMinPlayersFilter(int min_players)
void SetMouseAndKeyboardEnabled(bool enabledMouseAndKeyboard)
void SetIsModdedFilter(bool is_modded)
void SetThirdPerson(bool show)
void SetIsDLC(bool isDLC)
void SetFreeSlotsMax(int freeSlotsMax)
void SetAntiCheatFilter(bool anti_cheat)
void SetHostPort(int hostPort)
void SetPriorityFilter(int priority)
void SetHostIp(string hostIp)
void SetMapNameToRun(string mapNameToRun)
void SetFavorited(bool show)
void SetModeIdFilter(int mode_id)
void AddFavourite(string ip, int port)
void SetPublic(bool show)
void SetMaxPlayersFilter(int max_players)
void SetPreviouslyPlayed(bool show)
void SetFullServer(bool show)
void AddShow(bool show)
void SetGameTypeFilter(string game_type)
void SetIsPasswordProtectedFilter(bool password_protected)
void SetPassworded(bool show)
void SetNameFilter(string name)
void SetFriendsPlaying(bool show)
void SetPingFilter(int pingMaxValue)
void SetOfficialFilter(bool official)
void SetWhitelistEnabled(bool whitelistEnabled)
void SetRegionIdFilter(int region)
void SetGameVersionFilter(string game_version)
void SetJoinableFilter(bool joinable)
void SetProperVersionMatch(bool show)
GetServersResult the output structure of the GetServers operation.
ref GetServersResultRowArray m_Results
static void OnLoadServersAsync(GetServersResult result_list, EBiosError error, string response)
static void OnGetServerModList(GetServerModListResult result_list, EBiosError error)
static void OnAutoConnectToEmptyServer(GetFirstServerWithEmptySlotResult result_list, EBiosError error)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
string m_Description
class purpose description
Definition EnEntity.c:845