[GH-ISSUE #546] Fires always last 30 seconds #3690

Closed
opened 2026-05-25 12:20:23 +00:00 by Dark98 · 6 comments
Owner

Originally created by @halogod35 on GitHub (Jan 26, 2023).
Original GitHub issue: https://github.com/2006-Scape/2006Scape/issues/546

java_leBiyGf8fA

Originally created by @halogod35 on GitHub (Jan 26, 2023). Original GitHub issue: https://github.com/2006-Scape/2006Scape/issues/546 ![java_leBiyGf8fA](https://user-images.githubusercontent.com/6503891/214740077-d8383bba-6d60-4bde-9bde-6468951f0355.gif)
Author
Owner

@advnau commented on GitHub (Jan 26, 2023):

Good catch!

Based off the the code it appears at lines https://github.com/2006-Scape/2006Scape/blob/master/2006Scape%20Server/src/main/java/com/rs2/game/content/skills/firemaking/Firemaking.java#L117-L124

that the fire duration is set to a number of game ticks that are equal to 60 + a random number from 0 to 30 (60-90 ticks total). Each tick is 600ms, so the fires are coded to last 36-54 seconds.

However, there is also an event that is run later in the code that is used to despawn the fires and add ashes

https://github.com/2006-Scape/2006Scape/blob/master/2006Scape%20Server/src/main/java/com/rs2/game/content/skills/firemaking/Firemaking.java#L158-L172.

If you look at the CycleEvent that is added in those lines, it is set to the duration of 60 (36 seconds), however this event is added at the start of lighting the fire and pre the player moving/fire object spawning.

This is why they always despawn.

The fire duration should be a random number between 100 and 200 game ticks (mod ash stated that fires are coded to last between 1 and 2 minutes.

<!-- gh-comment-id:1404497585 --> @advnau commented on GitHub (Jan 26, 2023): Good catch! Based off the the code it appears at lines https://github.com/2006-Scape/2006Scape/blob/master/2006Scape%20Server/src/main/java/com/rs2/game/content/skills/firemaking/Firemaking.java#L117-L124 that the fire duration is set to a number of game ticks that are equal to 60 + a random number from 0 to 30 (60-90 ticks total). Each tick is 600ms, so the fires are coded to last 36-54 seconds. However, there is also an event that is run later in the code that is used to despawn the fires and add ashes https://github.com/2006-Scape/2006Scape/blob/master/2006Scape%20Server/src/main/java/com/rs2/game/content/skills/firemaking/Firemaking.java#L158-L172. If you look at the CycleEvent that is added in those lines, it is set to the duration of 60 (36 seconds), however this event is added at the start of lighting the fire and pre the player moving/fire object spawning. This is why they always despawn. The fire duration should be a random number between 100 and 200 game ticks (mod ash stated that fires are coded to last between 1 and 2 minutes.
Author
Owner

@halogod35 commented on GitHub (Jan 26, 2023):

In addition to this, the ashes that the fires drop disappear very quickly compared to when you drop the same ashes on the ground.
Edit: I'm wrong, see below.

<!-- gh-comment-id:1404498015 --> @halogod35 commented on GitHub (Jan 26, 2023): ~~In addition to this, the ashes that the fires drop disappear very quickly compared to when you drop the same ashes on the ground.~~ Edit: I'm wrong, see below.
Author
Owner

@advnau commented on GitHub (Jan 26, 2023):

That is very strange because it calls the same method that is used for dropping items from your inventory.

<!-- gh-comment-id:1404505525 --> @advnau commented on GitHub (Jan 26, 2023): That is very strange because it calls the same method that is used for dropping items from your inventory.
Author
Owner

@halogod35 commented on GitHub (Jan 26, 2023):

You're right, I retract my last statement. I just tested this and they both disappear at the same time, both of which I would consider normal drop lengths. (It's about 1 minute 45 seconds or so)

Excruciatingly long proof:
java_YDlgGBIhkT

<!-- gh-comment-id:1404516561 --> @halogod35 commented on GitHub (Jan 26, 2023): You're right, I retract my last statement. I just tested this and they both disappear at the same time, both of which I would consider normal drop lengths. (It's about 1 minute 45 seconds or so) Excruciatingly long proof: ![java_YDlgGBIhkT](https://user-images.githubusercontent.com/6503891/214750733-5ac29de6-86fc-4a30-8c5d-49a3dfe02fa4.gif)
Author
Owner

@JohnsonMichaels123 commented on GitHub (Feb 7, 2023):

Looking into this

<!-- gh-comment-id:1420110631 --> @JohnsonMichaels123 commented on GitHub (Feb 7, 2023): Looking into this
Author
Owner

@advnau commented on GitHub (Feb 7, 2023):

Looking into this

Great to hear that! I linked to the relevant code in my earlier response on this thread. I must have forgotten about this issue. I look forward to the PR!

<!-- gh-comment-id:1420116645 --> @advnau commented on GitHub (Feb 7, 2023): > Looking into this Great to hear that! I linked to the relevant code in my earlier response on this thread. I must have forgotten about this issue. I look forward to the PR!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: 2006-Scape/2006Scape#3690