Lou Montana/Sandbox – User

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Add Arma 4 stub)
m (Update w/ links)
 
(44 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{SideTOC}}
[[Category: Sandbox]]
[[Category: Sandbox]]
= Arma 4 =
{{Feature|informative|To go on [[Initialisation Order]].}}


{{quote|[[Bohemia Interactive]] is currently working on the Enfusion engine as a technology that will power their future games. There has '''not''' been '''any''' announcement or released plans for Arma 4 at this time|as of 2020/01/19}}
{| class="wikitable sortable align-center align-left-col-1"
{{BIMessagebox|as of 2020/01/19:|[[Bohemia Interactive]] is currently working on the Enfusion engine as a technology that will power their future games. There has '''not''' been '''any''' announcement or released plans for Arma 4 at this time.}}
|+ Order of Initialisation (use column sorting for respective machine order)
! rowspan="2" class="unsortable" style="text-align: center" | Task
! rowspan="2" | Exec Environment
! rowspan="1" colspan="5" class="unsortable" | Machine
|-
! Single Player
! Dedicated Server
! Hosted Server
! Multiplayer Client
! [[Multiplayer Scripting#Join In Progress|JIP]] MP Client
 
|-
| [[Arma 3: Functions Library|Functions]] with <syntaxhighlight lang="cpp" inline>recompile</syntaxhighlight> {{Link|Arma 3: Functions Library#Attributes 3|attribute}} are recompiled
| {{n/a}}
| 1 <!-- Single Player -->
| 1 <!-- Dedicated Server -->
| 1 <!-- Hosted Server -->
| 1 <!-- Multiplayer Client -->
| 1 <!-- JIP MP Client -->


; When is Arma 4 release? Is Arma 4 worked on?
|-
: As stated above, Arma 3 is the latest title of the Arma franchise and no other title has been announced, either in development or a release date.
| [[Arma 3: Functions Library|Functions]] with <syntaxhighlight lang="cpp" inline>preInit</syntaxhighlight> {{Link|Arma 3: Functions Library#Attributes 3|attribute}} are called
| [[Scheduler#Unscheduled Environment|Unscheduled]]
| 2 <!-- Single Player -->
| 2 <!-- Dedicated Server -->
| 2 <!-- Hosted Server -->
| 2 <!-- Multiplayer Client -->
| 2 <!-- JIP MP Client -->


; I heard something about Arma 4 being skipped and Arma 5 coming...?
|-
: It is nothing but a "next Half-Life" joke. If a future Arma title is to be released, it is more likely to be Arma 4.
| Object Init Event Handlers are called
| [[Scheduler#Unscheduled Environment|Unscheduled]]
| 3 <!-- Single Player -->
| 3 <!-- Dedicated Server -->
| 3 <!-- Hosted Server -->
| 3 <!-- Multiplayer Client -->
| {{Icon|unchecked}} <!-- JIP MP Client -->
 
|-
| Expressions of [[Eden Editor: Configuring Attributes|Eden Editor entity attributes]] are called<ref name="isPlayer"><sqf inline>isPlayer _entity</sqf> does not return [[true]] immediately. Once the entity has become a [[player]], it is transferred to the client.</ref>
| [[Scheduler#Unscheduled Environment|Unscheduled]]
| 4 <!-- Single Player -->
| 4 <!-- Dedicated Server -->
| 4 <!-- Hosted Server -->
| {{Icon|unchecked}} <!-- Multiplayer Client -->
| {{Icon|unchecked}} <!-- JIP MP Client -->


|-
| Object initialisation fields are called
| [[Scheduler#Unscheduled Environment|Unscheduled]]
| 5 <!-- Single Player -->
| 5 <!-- Dedicated Server -->
| 5 <!-- Hosted Server -->
| 4 <!-- Multiplayer Client -->
| 3 <!-- JIP MP Client -->


= Other data =
|- style="background-color: #95F0AD"
| [[Event Scripts#init.sqs|init.sqs]] is executed
|
| 6 <!-- Single Player -->
| <!-- Dedicated Server -->
| <!-- Hosted Server -->
| <!-- Multiplayer Client -->
| <!-- JIP MP Client -->


== Vehicles Speed and Fuel Stats ==
|- style="background-color: #95F0AD"
| [[Event Scripts#init.sqf|init.sqf]] is executed
| [[Scheduler#Scheduled Environment|Scheduled]]<ref name="enginewaits">Note '''in single player''' that while the environment is [[Scheduler#Scheduled Environment|Scheduled]] ([[canSuspend]] returns true), the engine seems to wait until the script is done executing, essentially behaving similarly to an [[Scheduler#Unscheduled Environment|Unscheduled environment]] - infinite loops will freeze the game, [[uiSleep]] may pause the game for up to ~20s (postInit), [[waitUntil]] can cause catastrophic issues, etc.</ref>
| <!-- Single Player -->
| <!-- Dedicated Server -->
| <!-- Hosted Server -->
| <!-- Multiplayer Client -->
| <!-- JIP MP Client -->


{| class="bikitable sortable"
!rowspan="2" | Class !! rowspan="2" | Name !! colspan="4" | Full tank consumption time !! colspan="3" | Speed
|-
|-
! Idle !! slow speed !! medium speed !! max speed !! slow speed !! medium speed !! max speed
| Expressions of [[Eden Editor: Configuring Attributes|Eden Editor scenario attributes]] are called<ref name="playerCommandNotAvailable">[[player]] is not available immediately.</ref>
| [[Scheduler#Unscheduled Environment|Unscheduled]]
| <!-- Single Player -->
| <!-- Dedicated Server -->
| <!-- Hosted Server -->
| <!-- Multiplayer Client -->
| <!-- JIP MP Client -->
 
|- style="background-color: #95DEF0"
| Persistent functions are called
|
| <!-- Single Player -->
| <!-- Dedicated Server -->
| <!-- Hosted Server -->
| <!-- Multiplayer Client -->
| <!-- JIP MP Client -->
 
|-
|-
| B_Truck_01_mover_F || HEMTT || 05:18:00 || 03:15:00 || 03:38:00 || 03:18:00 || 026,83 km/h || 070,94 km/h || 082,85 km/h
| [[Modules]] are initialised
|
| <!-- Single Player -->
| <!-- Dedicated Server -->
| <!-- Hosted Server -->
| <!-- Multiplayer Client -->
| {{Icon|unchecked}} <!-- JIP MP Client -->
 
|- style="background-color: #DEF0AD"
| [[Event Scripts#initServer.sqf|initServer.sqf]] is executed
| [[Scheduler#Scheduled Environment|Scheduled]]
| <!-- Single Player -->
| <!-- Dedicated Server -->
| <!-- Hosted Server -->
| {{n/a}} <!-- Multiplayer Client -->
| {{n/a}} <!-- JIP MP Client -->
 
|- style="background-color: #DEF0AD"
| [[Event Scripts#initPlayerLocal.sqf|initPlayerLocal.sqf]] is executed
| [[Scheduler#Scheduled Environment|Scheduled]]
| <!-- Single Player -->
| {{n/a}} <!-- Dedicated Server -->
| <!-- Hosted Server -->
| <!-- Multiplayer Client -->
| <!-- JIP MP Client -->
 
|- style="background-color: #DEF0AD"
| [[Event Scripts#initPlayerServer.sqf|initPlayerServer.sqf]] is executed on the server
| [[Scheduler#Scheduled Environment|Scheduled]]
| <!-- Single Player -->
| {{n/a}} <!-- Dedicated Server -->
| ?? <!-- Hosted Server -->
| <!-- Multiplayer Client -->
| <!-- JIP MP Client -->
 
|-
|-
| B_MRAP_01_F || Hunter (unarmed) || 04:33:00 || 02:47:00 || 01:56:00 || 01:44:00 || 037,13 km/h || 099,81 km/h || 116,45 km/h
| [[Arma 3: Functions Library|Functions]] with <syntaxhighlight lang="cpp" inline>postInit</syntaxhighlight> {{Link|Arma 3: Functions Library#Attributes 3|attribute}} are called
|-
| [[Scheduler#Scheduled Environment|Scheduled]]<ref name="enginewaits"/>
| B_LSV_01_unarmed_F || Prowler (unarmed) || 04:09:00 || 01:38:00 || 01:50:00 || 01:38:00 || 053,96 km/h || 147,06 km/h || 172,47 km/h
| <!-- Single Player -->
|-
| <!-- Dedicated Server -->
| B_Quadbike_01_F || Quad || 01:54:00 || 01:09:00 || 01:12:00 || 01:06:00 || 027,14 km/h || 070,77 km/h || 082,20 km/h
| <!-- Hosted Server -->
|-
| <!-- Multiplayer Client -->
| B_APC_Tracked_01_AA_F || IFV-6a Cheetah || 03:11:00 || 02:07:00 || 02:14:00 || 01:56:00 || 023,31 km/h || 046,31 km/h || 061,07 km/h
| <!-- JIP MP Client -->
|-
 
| B_APC_Wheeled_01_cannon_F || AMV-7 Marshall || 04:55:00 || 02:58:00 || 02:58:00 || 02:34:00 || 036,20 km/h || 060,41 km/h || 113,00 km/h
|- style="background-color: #95DEF0"
| [[Event Scripts#init.sqs|init.sqs]] is executed
| [[Scheduler#Scheduled Environment|Scheduled]]
| <!-- Single Player -->
| <!-- Dedicated Server -->
| <!-- Hosted Server -->
| <!-- Multiplayer Client -->
| <!-- JIP MP Client -->
 
|- style="background-color: #95DEF0"
| [[Event Scripts#init.sqf|init.sqf]] is executed
| [[Scheduler#Scheduled Environment|Scheduled]]
| <!-- Single Player -->
| <!-- Dedicated Server -->
| <!-- Hosted Server -->
| <!-- Multiplayer Client -->
| <!-- JIP MP Client -->
 
|-
|-
| B_APC_Tracked_01_CRV_F || CRV-6e Bobcat || 03:11:00 || 02:05:00 || 02:13:00 || 01:55:00 || 023,31 km/h || 046,31 km/h || 061,07 km/h
| [[remoteExec]]'s [[Multiplayer Scripting#Join In Progress|JIP]] queue
|}
| {{n/a}}
| {{n/a}} <!-- Single Player -->
| {{n/a}} <!-- Dedicated Server -->
| {{n/a}} <!-- Hosted Server -->
| {{n/a}} <!-- Multiplayer Client -->
| 42 <!-- JIP MP Client -->


Code used:
|- style="background-color: #EEE"
<spoiler><pre>veh = vehicle player;
| ''Scenario going''
wantedDelta = 3;
| {{n/a}}
| <!-- Single Player -->
| <!-- Dedicated Server -->
| <!-- Hosted Server -->
| <!-- Multiplayer Client -->
| <!-- JIP MP Client -->


previousPos = [0,0,0];
|-
currentPos = [0,0,0];
| [[Event Scripts#exit.sqf|exit.sqf]]
previousFuel = 0;
|
currentFuel = 0;
| <!-- Single Player -->
t = 0;
| <!-- Dedicated Server -->
| <!-- Hosted Server -->
| <!-- Multiplayer Client -->
| <!-- JIP MP Client -->


onEachFrame {
|-
isNil {
| [[Event Scripts#exit.sqs|exit.sqs]]
vehSpeed = speed veh;
|
| <!-- Single Player -->
| <!-- Dedicated Server -->
| <!-- Hosted Server -->
| <!-- Multiplayer Client -->
| <!-- JIP MP Client -->


if (t <= time) then {
|-
previousPos = currentPos;
| {{Link|Arma 3: Mission Event Handlers#Ended|"Ended" Mission Event Handler}}
currentPos = getPosATL veh;
|
distanceDelta = currentPos distance previousPos;
| <!-- Single Player -->
previousFuel = currentFuel;
| <!-- Dedicated Server -->
currentFuel = fuel veh;
| <!-- Hosted Server -->
| <!-- Multiplayer Client -->
| <!-- JIP MP Client -->


fuelLossPerMinute = (previousFuel - currentFuel) * (60 / (wantedDelta + (time - t)));
|-
|  {{Link|Arma 3: Mission Event Handlers#MPEnded|"MPEnded" Mission Event Handler}}
|
| <!-- Single Player -->
| <!-- Dedicated Server -->
| <!-- Hosted Server -->
| <!-- Multiplayer Client -->
| <!-- JIP MP Client -->


remainingTime = if (fuelLossPerMinute > 0) then {
|}
[(currentFuel / fuelLossPerMinute) * 60, "HH:MM:SS"] call BIS_fnc_secondsToString;
} else { -1 };
 
timeToEmpty = if (fuelLossPerMinute > 0) then {
[(1 / fuelLossPerMinute) * 60, "HH:MM:SS"] call BIS_fnc_secondsToString;
} else { -1 };


t = time + wantedDelta;
};


hintSilent format [
== See Also ==
"Speed: %1\nFuel loss: %2\n\nRemaining time: %3\nTime to empty: %4",
vehSpeed,
fuelLossPerMinute,
remainingTime,
timeToEmpty];


copyToClipboard format ["[%1, %2, %3]", typeOf veh, timeToEmpty, vehSpeed];
* [[Arma 3: Functions Library]]<!--
};
* [[Arma 2: Functions Library]] -->
};
* [[Arma 3: Remote Execution]], [[BIS_fnc_MP]] <!-- keep? -->
</pre></spoiler>
* [[Eden Editor: Configuring Attributes|Eden Editor: Configuring Attributes]]
* [[Event Scripts]]
* [[Scheduler]]

Latest revision as of 01:29, 18 March 2024

Order of Initialisation (use column sorting for respective machine order)
Task Exec Environment Machine
Single Player Dedicated Server Hosted Server Multiplayer Client JIP MP Client
Functions with recompile attribute are recompiled N/A 1 1 1 1 1
Functions with preInit attribute are called Unscheduled 2 2 2 2 2
Object Init Event Handlers are called Unscheduled 3 3 3 3 Unchecked
Expressions of Eden Editor entity attributes are called[1] Unscheduled 4 4 4 Unchecked Unchecked
Object initialisation fields are called Unscheduled 5 5 5 4 3
init.sqs is executed 6
init.sqf is executed Scheduled[2]
Expressions of Eden Editor scenario attributes are called[3] Unscheduled
Persistent functions are called
Modules are initialised Unchecked
initServer.sqf is executed Scheduled N/A N/A
initPlayerLocal.sqf is executed Scheduled N/A
initPlayerServer.sqf is executed on the server Scheduled N/A ??
Functions with postInit attribute are called Scheduled[2]
init.sqs is executed Scheduled
init.sqf is executed Scheduled
remoteExec's JIP queue N/A N/A N/A N/A N/A 42
Scenario going N/A
exit.sqf
exit.sqs
"Ended" Mission Event Handler
"MPEnded" Mission Event Handler


See Also

  1. isPlayer _entity does not return true immediately. Once the entity has become a player, it is transferred to the client.
  2. 2.0 2.1 Note in single player that while the environment is Scheduled (canSuspend returns true), the engine seems to wait until the script is done executing, essentially behaving similarly to an Unscheduled environment - infinite loops will freeze the game, uiSleep may pause the game for up to ~20s (postInit), waitUntil can cause catastrophic issues, etc.
  3. player is not available immediately.