The .lba file format is a binary file format used in GZ and TPP to store locator data for gimmicks. Its technical name is unknown, but it’s referred to in DataSets as a locaterFile (sic) and is unofficially called a GimmickLocatorSet by FoxLib.
While most entities have their transforms specified by a Locator, TransformData, or TransformEntity in a DataSet, gimmicks instead pull their transform from a .lba file. An example can be found in s10070_gimmick.fox2[1]:
<entity class="TppPermanentGimmickData" classVersion="0" addr="0x07C64B50" unknown1="144" unknown2="3094">
<staticProperties>
<property name="name" type="String" container="StaticArray" arraySize="1">
<value>gntn_cntn001_vrtn001_gim_i0000|TppPermanentGimmick_gntn_cntn001_vrtn001</value>
</property>
<property name="dataSet" type="EntityHandle" container="StaticArray" arraySize="1">
<value>0x06C69D20</value>
</property>
<property name="partsFile" type="FilePtr" container="StaticArray" arraySize="1">
<value>/Assets/tpp/parts/environ/object/guantanamo/container/gntn_cntn001/gntn_cntn001_vrtn001.parts</value>
</property>
<property name="locaterFile" type="FilePtr" container="StaticArray" arraySize="1">
<value>/Assets/tpp/level/mission2/story/s10070/lba/gntn_cntn001_vrtn001.lba</value>
</property>
<property name="parameters" type="EntityPtr" container="StaticArray" arraySize="1">
<value>0x00000000</value>
</property>
<property name="flags1" type="uint32" container="StaticArray" arraySize="1">
<value>1</value>
</property>
<property name="flags2" type="uint32" container="StaticArray" arraySize="1">
<value>0</value>
</property>
</staticProperties>
<dynamicProperties />
</entity>
In this case, when the gimmick is spawned, gntn_cntn001_vrtn001.lba is read to determine where it should be placed. This has a few advantages over specifying the transform directly in the DataSet: most importantly, it’s possible to query the Locator in Lua and to grab a reference to the gimmick from its Locator.
The ID of a gimmick can be obtained in Lua by calling
TppGimmick.GetGimmickID(gameId, locatorNameHash, dataSetNameHash)
Where gameId is a TppGameObject type ID[2], locatorNameHash is the StrCode32 hash of the locatorName (in this example, gntn_cntn001_vrtn001_gim_i0000|TppPermanentGimmick_gntn_cntn001_vrtn001), and dataSetNameHash is the PathFileNameCode32 hash of the dataSetName (in this example, /Assets/tpp/level/mission2/story/s10070/s10070_gimmick.fox2).
Many TppGimmick functions take in a gimmick ID, such as TppGimmick.GetGameObjectId and TppGimmick.SetVisibility.
By using these functions, you can perform various operations on gimmicks through scripting, such as showing them, hiding them, breaking them, querying their location, querying their broken status, and sending messages when their state changes.
There are three known types of gimmick locators. Their technical names are unknown but have been given unofficial names in FoxLib:
This section, the main body of the file, contains one entry for each locator. Its content differs depending on the type of locator. PowerCutAreaGimmickLocators and NamedGimmickLocators use unscaled transforms and ScaledGimmickLocators use scaled transforms.
The footer, only present in NamedGimmickLocatorSets and ScaledGimmickLocatorSets, has one entry for each locator.