Skip to content

Firemaking Edge Cases

tannerdino edited this page Sep 12, 2024 · 2 revisions

Firemaking adjacent logs

When you light a fire, there's checks to see if the LOC can spawn on the log tile. There's also area based checks, to see if you're in an area that allows firemaking. These area based checks check the player coord, not the log coord!

2024-09-12_14-45-13.mp4

Firemaking and moving

When you use a tinderbox on a log in the inventory, you stop moving. There is an exception to this though! If you light a log on the exact tick you're expected to finish lighting a fire, you will light the log 'instantly'. This instant firemaking mechanic does not prevent your movement, but it still pushes you west in the same tick movement is processed.

Pushing west is done with the p_teleport() command. This command resets the players follow tile to west:

2024-09-12_14-31-44.mp4

If you instant firemake whilst moving west, you move an extra tile that tick. If instant firemake whilst moving east, you move one less tile that tick.

2024-09-12.15-00-07.mp4
2024-09-12.15-00-25.mp4

Firemaking and moving with queued script

If the player has a script queued onto them, and if they're delayed or have a modal interface open, movement is paused. However, since p_teleport() is used for the pushing effect on the player, that 'movement' isn't paused, only normal movement. You can see the effect this has when we have something queued and try to instant firemake whilst moving:

2024-09-12.15-08-33.mp4

Firemaking with Extended Delay

The firemaking script checks for lineofwalk() and if the player is still on the log tile, before pushing the player. If the player is still somehow on the log tile after pushing the player, the script attempts to push the player in the next direction in the WESN priority, causing an extra delay in the process.

A very common case for this is instant firemaking whilst walking east. Since the movement isn't cleared from the instant firemaking, you will move back onto the log tile after the p_teleport().

In this clip, west is checked then pushes and delays the player west. The player's movement isnt cleared, so we continue to move east, 'canceling' the push in a way. The script resumes after the delay, and sees the players still on the log tile. It checks east and pushes east, the player's movement isnt cleared, so it 'combines' with the push causing the player to move two tiles in one tick.

2024-09-12.15-19-20.mp4

Depending on the terrain, you can take this a step further to cause the player to keep pathing onto the log tile!

2024-09-12.16-38-30.mp4

Double firemaking trick

When p_opobj() is called, the player will move to and interact with the current active OBJ of the script. In the logic that pushes the player, if the player interacted with the OBJ in the previous tick, the movement towards the OBJ is preserved (i have no idea why its coded this way). This creates some interesting scenarios where if you instant firemake whilst lighting a log normally, you're delayed an extra tick and you move east instead of west.

2024-09-12_14-27-53.mp4

If east is blocked, you move south. If south and east is blocked, you move north.

2024-09-12.16-50-00.mp4

Even if you have something queued, the movement is still preserved. Its just paused an extra tick.

2024-09-12_14-35-51.mp4