Skip to main content

FB2Action_BookRead

Overview

  • BookRead action. Override the OnPlay/OnFinish/OnPaused/OnCanceled/OnTick timing hooks in Lua.

Metadata

FieldValue
Kindaction
EnvironmentB2 - Simulation
Categoryactions
ExtendsFB2Action_PlayAnim
Requirerequire('Actions.B2Action_BookRead')

Properties (6)

NameTypeDescription
BookAnimIdstringBook-side animation id (from Action.S2), used to resolve the book object's montage
BookAnimMontageNamestringResolved montage row id for the book object's animation, used to play the montage
BookDtIdstringBook data table id of the target carriable book, resolved at init and used for all book table lookups
BookReadTickTimeintegerAccumulated elapsed reading time in ticks, compared against the book's TotalReadTime to know when to end the loop
PrevTickTimeintegerTimestamp (game ticks) of the last tick update, used to compute the elapsed-tick delta added to BookReadTickTime
ProgressTimenumberTotal time this reading session should take, computed from the book's TotalReadTime and current game time scale

Functions (3)

FunctionParametersReturnsDescription
OnFinish--Callback invoked on Finish.
OnPlay--Callback invoked on Play.
OnTickDeltaTime: number, CurrentTime: FDateTime, GameDeltaMinutes: number-Callback invoked on Tick.

Override points (3)

Implement these in Lua as FB2Action_BookRead.Override_Name = function(...) end.

FunctionParametersReturnsDescription
Override_OnFinish--Timing hook called when the action finishes.
Override_OnPlay--Timing hook called when the action starts (play). Override in Lua to replace the start behavior.
Override_OnTickDeltaTime: number, CurrentTime: FDateTime, GameDeltaMinutes: number-Timing hook called every tick while the action runs. (performance-sensitive)