Initialisation Order: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Merged page sections and added colour coding)
(environment)
Line 32: Line 32:
! JIP
! JIP
! Related To
! Related To
! Exec Environment
|-
|-
|Functions with ''recompile'' attribute are recompiled
|Functions with ''recompile'' attribute are recompiled
Line 37: Line 38:
|✔
|✔
|[[Functions Library (Arma 3)]]
|[[Functions Library (Arma 3)]]
|
|-
|-
|Functions with ''preInit'' attribute are called
|Functions with ''preInit'' attribute are called
Line 42: Line 44:
|
|
|[[Functions Library (Arma 3)]]
|[[Functions Library (Arma 3)]]
|Unscheduled
|-
|-
|Object Init Event Handlers are called
|Object Init Event Handlers are called
Line 47: Line 50:
|
|
|
|
|Unscheduled
|-
|-
|Object initialization fields are called
|Object initialization fields are called
Line 52: Line 56:
|
|
|
|
|Unscheduled
|-
|-
|bgcolor="#95F0AD"| init.sqs is executed
|bgcolor="#95F0AD"| init.sqs is executed
Line 57: Line 62:
|bgcolor="#95F0AD"|
|bgcolor="#95F0AD"|
|bgcolor="#95F0AD"| [[Event Scripts]]
|bgcolor="#95F0AD"| [[Event Scripts]]
|
|-
|-
|bgcolor="#95F0AD"| init.sqf is executed
|bgcolor="#95F0AD"| init.sqf is executed
Line 62: Line 68:
|bgcolor="#95F0AD"|  
|bgcolor="#95F0AD"|  
|bgcolor="#95F0AD"| [[Event Scripts]]
|bgcolor="#95F0AD"| [[Event Scripts]]
|
|-
|-
|Persistent functions are called
|Persistent functions are called
Line 67: Line 74:
|✔
|✔
|[[BIS_fnc_MP]]
|[[BIS_fnc_MP]]
|
|-
|-
|Modules are initialized
|Modules are initialized
|All
|All
|
|
|
|
|
Line 77: Line 86:
|
|
|[[Event Scripts]]
|[[Event Scripts]]
|Scheduled
|-
|-
|initPlayerLocal.sqf is executed
|initPlayerLocal.sqf is executed
Line 82: Line 92:
|✔
|✔
|[[Event Scripts]]
|[[Event Scripts]]
|Scheduled
|-
|-
|initPlayerServer.sqf is executed on the server
|initPlayerServer.sqf is executed on the server
Line 87: Line 98:
|✔
|✔
|[[Event Scripts]]
|[[Event Scripts]]
|Scheduled
|-
|-
|Functions with ''postInit'' attribute are called
|Functions with ''postInit'' attribute are called
Line 92: Line 104:
|
|
|[[Functions Library (Arma 3)]]
|[[Functions Library (Arma 3)]]
|Scheduled
|-
|-
|"BIS_fnc_init" variable is set to true
|"BIS_fnc_init" variable is set to true
|All
|All
|✔
|✔
|
|
|
|-
|-
Line 102: Line 116:
|bgcolor="#95DEF0"|✔
|bgcolor="#95DEF0"|✔
|bgcolor="#95DEF0"|[[Event Scripts]]
|bgcolor="#95DEF0"|[[Event Scripts]]
|Scheduled
|-
|-
|bgcolor="#95DEF0"|init.sqf is executed
|bgcolor="#95DEF0"|init.sqf is executed
Line 107: Line 122:
|bgcolor="#95DEF0"|✔
|bgcolor="#95DEF0"|✔
|bgcolor="#95DEF0"|[[Event Scripts]]
|bgcolor="#95DEF0"|[[Event Scripts]]
|Scheduled
|}
|}

Revision as of 19:17, 28 November 2014

This page is currently a WIP (Work in Progress) and not in a finished state

Introduction

Whenever a mission is launched (or joined in multiplayer) certain tasks are performed to ensure the mission's various components are initialized correctly and that everyone is synced in multiplayer games (particularly JIP players). Initialization order refers to the order in which those tasks are executed and it's important to take into account when setting up the start of a mission.

Event Scripts are a key part of a mission's initialization order and will be utilized often when working with SQF.

Arma 3

Take note that the order of initialization is different in single player and multiplayer environments. If an entry is unmarked then it applies to both.

Key
Item Meaning
Single Player Only
Multiplayer Only

In multiplayer the following is relevant to every machine including the server and headless clients. If the server is non-dedicated then it should be considered both a server and client.

Order of Initialization
Task Applies To JIP Related To Exec Environment
Functions with recompile attribute are recompiled All Functions Library (Arma 3)
Functions with preInit attribute are called All Functions Library (Arma 3) Unscheduled
Object Init Event Handlers are called All Unscheduled
Object initialization fields are called All Unscheduled
init.sqs is executed Single Player Event Scripts
init.sqf is executed Single Player Event Scripts
Persistent functions are called Client BIS_fnc_MP
Modules are initialized All
initServer.sqf is executed Server Event Scripts Scheduled
initPlayerLocal.sqf is executed Client Event Scripts Scheduled
initPlayerServer.sqf is executed on the server Client Event Scripts Scheduled
Functions with postInit attribute are called All Functions Library (Arma 3) Scheduled
"BIS_fnc_init" variable is set to true All
init.sqs is executed All Event Scripts Scheduled
init.sqf is executed All Event Scripts Scheduled