Skip to content
Draft
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f35045a
Add files via upload
TrainWrack Mar 11, 2025
b31285b
Fix duplicate name
TrainWrack Mar 11, 2025
80b8406
typos
TrainWrack Mar 11, 2025
b5ce1e6
Update Environment.lua
TrainWrack Mar 11, 2025
49425df
Update Environment.lua
Lwmte Mar 11, 2025
e53e453
Add files via upload
TrainWrack Mar 12, 2025
b24a17e
Add files via upload
TrainWrack Mar 12, 2025
a257f81
Update Environment.lua
TrainWrack Mar 12, 2025
a76bb1a
Update Environment.lua
TrainWrack Mar 12, 2025
8f895b5
Update Environment.lua
TrainWrack Mar 12, 2025
c0aa3e0
Update Environment.lua
TrainWrack Mar 12, 2025
d6bd885
Update Environment.lua
Lwmte Mar 13, 2025
f4b6ec4
Added a condition to prevent horizon crossfade into the same slot
Lwmte Mar 13, 2025
5f8a0d3
Removed unnecessary args
Lwmte Mar 13, 2025
d92ede6
Merge branch 'develop' into pr/1001
Lwmte Mar 13, 2025
6469ac6
Update Changes.txt
Lwmte Mar 13, 2025
089a306
Fixed two more mistakes
Lwmte Mar 13, 2025
87534c2
Merge branch 'develop' into pr/1001
Lwmte Mar 13, 2025
e099fe6
Merge branch 'develop' into pr/1001
Lwmte Mar 13, 2025
9c6e6d8
WIP
TrainWrack Mar 15, 2025
1eccf0f
Finish Environment node
TrainWrack Mar 15, 2025
5f18556
UpdateNodes
TrainWrack Mar 15, 2025
5c41d2b
Cleanup Ammo counter nodes layout
TrainWrack Mar 15, 2025
9656b62
UI node catalog typo fixes
Lwmte Mar 15, 2025
4fde7ae
SimplifyKeypad Nodes
TrainWrack Mar 21, 2025
20e1c57
Merge branch 'develop' into develop
TrainWrack Mar 21, 2025
263bdd0
PathNodes
TrainWrack Mar 24, 2025
18df17f
Merge branch 'MontyTRC89:develop' into develop
TrainWrack Mar 24, 2025
786d1fd
BurningFloorNode
TrainWrack Dec 13, 2025
f829dcf
Delete TombLib/TombLib/Catalogs/TEN Node Catalogs/Path.lua
TrainWrack Dec 13, 2025
e971065
Fix merge deltas
TrainWrack Dec 13, 2025
78e3bd0
Merge remote-tracking branch 'upstream/develop' into BurningFloorNode
TrainWrack Dec 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions TombLib/TombLib/Catalogs/TEN Node Catalogs/Objects.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
local START_DELAY = 0.25
local BURN_DURATION = 1024
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the burning parameters should be included in the node itself. So the effect can be customised per burning floor.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, watching the OG version back : the colour of the burning floor doesn't fade to black

https://youtube.com/clip/UgkxVedmKiQO6JAusaCvA2GNosmuGOfgMkA3?si=5W7cAxM1Vt2-22-Z


local SOUNDS =
{
FIRE_LOOP = 150,
SHATTER = 347
}

local FIRE_OFFSETS =
{ --displacement, rotation, size
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these offsets relative to the OG Burning Floor object?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

{1219.784, 94.488, 2},
{924.822, -37.256, 2},
{1067.333, -203.896, 2},
{143.108, -206.638, 2},
{826.482, -85.558, 2},
{576.056, -127.676, 1},
{526.847, -48.063, 1},
{1253.348, -60.981, 1},
{593.997, -225.522, 1},
{1263.924, -24.288, 1},
{572.503, 25.722, 1},
{811.951, 84.365, 1},
{1252.326, -252.225, 0.5},
{1250.485, -226.342, 0.5},
{922.085, -188.477, 0.5},
{635.232, -16.846, 0.5}
}

LevelVars.Engine.BurningFloor = {}
LevelVars.Engine.BurningFloor.Active = false
LevelVars.Engine.BurningFloor.Counter = BURN_DURATION
LevelVars.Engine.BurningFloor.ItemName = nil
LevelVars.Engine.BurningFloor.PlayerInVolume = false

-- !Name "Burning Floor"
-- !Section "Objects"
-- !Description "Create a Burning Floor Object."
-- !Arguments "NewLine, Moveables"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No tooltips

-- !Arguments "NewLine, Moveables"
LevelFuncs.Engine.Node.BurningFloor = function(moveableName, activator)

local object = TEN.Objects.GetMoveableByName(activator)
local burningFloor = TEN.Objects.GetMoveableByName(moveableName)

LevelVars.Engine.BurningFloor.PlayerInVolume = false

if object:GetObjectID() == TEN.Objects.ObjID.BURNING_TORCH_ITEM and object:GetItemFlags(3) == 1 and (math.abs(object:GetPosition().y - burningFloor:GetPosition().y) < 64) and burningFloor:GetStatus() ~= Objects.MoveableStatus.DEACTIVATED then
LevelVars.Engine.BurningFloor.ItemName = moveableName
LevelVars.Engine.BurningFloor.Active = true
object:Destroy()
end

if object:GetObjectID() == TEN.Objects.ObjID.LARA and (math.abs(object:GetPosition().y - burningFloor:GetPosition().y) < 32) then
LevelVars.Engine.BurningFloor.PlayerInVolume = true
end

end

LevelFuncs.Engine.Node.RunBurningFloor = function()

if not LevelVars.Engine.BurningFloor.Active then
return
end

local burningFloor = TEN.Objects.GetMoveableByName(LevelVars.Engine.BurningFloor.ItemName)

LevelVars.Engine.BurningFloor.Counter = math.max(0, LevelVars.Engine.BurningFloor.Counter - 1)
local elapsed = BURN_DURATION - LevelVars.Engine.BurningFloor.Counter
local normalizedTime = elapsed / BURN_DURATION
local colorLife = 1 - normalizedTime
local c = math.floor(colorLife * 128)
burningFloor:SetColor(Color(c, c, c))

local fireLife = 0
if normalizedTime >= START_DELAY then
local t = (normalizedTime - START_DELAY) / (1 - START_DELAY)
fireLife = math.sin(t * math.pi)
end

local position = burningFloor:GetPosition()
local yaw = burningFloor:GetRotation().y

for _, entry in ipairs(FIRE_OFFSETS) do
local distance = entry[1]
local angleDeg = entry[2]
local size = entry[3]

local rot = Rotation(0, yaw + angleDeg, 0)
local firePos = position:Translate(rot, distance)

local fireStrength = fireLife * (0.8 + size * 0.6)
if fireStrength > 0.02 then
TEN.Effects.EmitFire(firePos, fireStrength)
end
end

TEN.Sound.PlaySound(SOUNDS.FIRE_LOOP)

if (math.abs(Lara:GetPosition().y - burningFloor:GetPosition().y) < 64) and normalizedTime >= START_DELAY and LevelVars.Engine.BurningFloor.PlayerInVolume then
Lara:SetEffect(Effects.EffectID.FIRE)
local ocb = burningFloor:GetOCB()
TEN.Sound.PlaySound(SOUNDS.SHATTER)
burningFloor:Shatter()
TEN.Flow.FlipMap(ocb)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AS well as the OCB parameter (ie: choose flipmap number) and then set the OCB of the specified burning floor object to it .

Lara:SetHP(20)
LevelVars.Engine.BurningFloor.Active = false
return
end

if LevelVars.Engine.BurningFloor.Counter == 0 then
local ocb = burningFloor:GetOCB()
TEN.Sound.PlaySound(SOUNDS.SHATTER)
burningFloor:Shatter()
TEN.Flow.FlipMap(ocb)
LevelVars.Engine.BurningFloor.Active = false
LevelVars.Engine.BurningFloor.Counter = BURN_DURATION
LevelVars.Engine.BurningFloor.ItemName = nil
end

end

TEN.Logic.AddCallback(TEN.Logic.CallbackPoint.PRELOOP, LevelFuncs.Engine.Node.RunBurningFloor)