WifTutorialTankHijack
Overview
Shown near an enemy tank crewed by two or more gunners, teaching the tank-hijack mechanic. Notably, this tutorial can never permanently complete: its EndTutorial override forces every completion attempt back into a re-arm instead, so it just keeps reappearing for the rest of the playthrough.
Inheritance
- Inherits from:
MrxTutorial(src/resident/mrxtutorial.lua) β a real corpus module, already documented under Resident Modules, not an opaque native-only engine class despite this file living insrc/vz/. - Imports:
MrxFactionManager(used βGetFactionStringAbbrev,GetAttitudeLabel).
Instance pattern
A subclass of the corpusβs MrxTutorial task-framework base class β self-based lifecycle overrides, not the Inheritable/uGuid object pattern used in resident/. No module-level or per-instance state beyond what the base class itself tracks (_tEvents).
Functions
GetMessage()
Returns the fixed message key "[Tutorial.TankHijack]".
SetupActivationCriteria(self)
Registers an Event.ObjectProximity listener for any object labeled "tank" within 20 units of the player, calling self.ActivateTutorial2(self, tGuids) with the (possibly multi-element) table of matched tank objects.
ActivateTutorial2(self, tGuids)
For each matched tank: gets its gunner riders (Vehicle.GetRiders(uVehicleObject, "g")); computes the tankβs faction attitude toward the player via MrxFactionManager.GetFactionStringAbbrev/ GetAttitudeLabel and logs it via Debug.Printf (the if sFactionAttitude == "Hostile" then end check has an empty body β the attitude is computed and logged but never used to gate anything); counts gunners via table.getn. If this tank does not have more than 1 gunner, returns immediately without activating β a single non-multi-gunner tank in the matched set blocks activation for that whole check, even if a different matched tank might otherwise qualify. If every matched tank passes, calls self:ActivateTutorial() β note, unlike most tutorials in this category, no bDontNetSync argument is passed, so it defaults to falsy (net-synced).
EndTutorial(self, bComplete)
Overridden: if bComplete == true, forcibly rewrites it to false before calling MrxTutorial.EndTutorial(self, bComplete).
Events
Event.ObjectProximityβ any"tank"-labeled object within 20 units of the player.Event.TimerRelativeβ the inherited 20-second completion timer still fires (noSetupCompletionCriteriaoverride in this file), but see the note below on what actually happens when it does.
Notes for modders
- Trigger key:
"TankHijack". Self-arms viaSetupActivationCriteria. - This tutorial never permanently completes.
EndTutorialβs override rewrites anybComplete == truecall tofalsebefore forwarding to the base class, so even the inherited 20-second completion timer ends up re-arming the tutorial (viaSetupActivationCriteria) rather than marking it done in save data β it will keep reappearing every time the proximity/gunner-count conditions are met again. - The
if sFactionAttitude == "Hostile" then endbranch is empty β the attitude is computed and logged but never actually used to gate anything. This is a genuine empty branch in the decompiled source (not a decompiler artifact), likely leftover/debug code. - Requires 2+ gunners on every proximity-matched tank to activate at all β a single 0-or-1-gunner tank in range short-circuits the whole check via an early
return.