Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update "Next Event" Estimate based on login timer/world hops #3

Open
Marstead opened this issue Oct 2, 2022 · 26 comments
Open

Update "Next Event" Estimate based on login timer/world hops #3

Marstead opened this issue Oct 2, 2022 · 26 comments

Comments

@Marstead
Copy link

Marstead commented Oct 2, 2022

Random events can only spawn at 5-minute intervals (when the login timer reads 05:00 - 05:10), but the estimate in the plugin does not round up to these intervals. For example, if you have 2:30 remaining as the estimated next event and then hop worlds, the actual next earliest time you can get an event is at 5:00, but the plugin estimate does not update to reflect this.

Update the plugin estimate either based on the login timer (if that information is accessible) or jump it to the next 5-minute interval whenever the player logs off or hops worlds.

@zmanowar
Copy link
Owner

zmanowar commented Nov 5, 2022

Good information! Do you happen to have a source? I'll add a toggle and set this behind it.

@Marstead
Copy link
Author

Marstead commented Nov 6, 2022

You've got me over here furiously googling for an official source -- it's not stated on the Wiki, I can find a few reddit threads on it, but it's something any player can pretty trivially verify. If you turn on the "Login Timer" feature in the native RuneLite Report Button plugin, you'll see that a Random Event never spawns outside of ~15 seconds on the end of a multiple of 5 minutes. I have a bunch of recorded video of the game including dozens of random event spawns where you can see this login timer, I posted an example of the most recent event I encountered below.

image

It's also the mechanic that allowed big content creators like Settled & Verf to reliably lamp skills by being sure to stand in random-event-legal areas at these 5-minute intervals.

I can post some screenshots but I bet you could conclusively prove this with the plugin itself if you also started recording the login timer value on spawn. Anyway, a toggle would be perfect!

@njitnelav
Copy link

This would be a very QOL improvement!

@zmanowar
Copy link
Owner

Looking for some feedback for representing this concept.

I've been toying with how to display the 5 minute intervals + 5 minute login timer minimums to the user. I first implemented an overlay which swaps out the timers but that didn't feel great.

I then pivoted to a progress bar that's split.

  • There's a 5 minute blue section at the beginning which represents the initial 5 minute login timer.
    • This gets reset back to 0 if the player logs out.
  • A gold/yellow section which represents the overall time spent waiting for a random.
    • This will not be reset if the player logs out.

Example of a player who just logged in:
image

And after the initial 5 minute timer has elapsed:
image

Note the overlay isn't great but I'm just using it to help represent the progress bar concept, and the times in the screenshots may not be consistent. There would be some hover text to describe the sections a little better and maybe a label immediately on the progress bar detailing what stage of spawnability(?) they're on.

I'm very open to everyone's thoughts on the above representation and any other design ideas, and a I have a few questions that I'll attempt to answer on my own (eventually...) but any input is also welcome.

  • Does the initial 5 minute timer count towards the 1 hour estimated limit?
    • I haven't found a way to accurately estimate the randoms, or to fit them on a "1 hour limit" -- based on my data they spawn relatively normally between 25 minutes and 2 hours, depending on time spent in instances and other illegal areas.
    • This would essentially mean that the blue section of the bar and the gold section increase at the same time; until the blue stops after the initial 5 minutes.
  • Would it be better to have a timer that counts in 5 minute (± 15 sec) intervals? There could be a tracker for how many intervals have passed instead of a "countdown".
    • Could be a progress bar that fills at 5 minutes and resets at 5:15 or timer counting in 5 minute intervals.
    • After each interval some indicator could tick up 3 -> 4 to indicate you've been waiting for a random for 20 minutes.

There's also #4, which I have confirmed and am able to replicate. Will be moving to use a different Δ-event-timing implementation that's significantly more robust and innately includes the initial login time.

@Marstead
Copy link
Author

This looks great and the current implementation you mocked up there would already be useful! Let me read over your post a bit to see if I have any additional ideas, but even this as-is would be an improvement, I think.

@Marstead
Copy link
Author

Marstead commented Nov 11, 2022

It may help to give a detailed use case for the Random Event Analytics plugin. I'll number these for discussion as a post, and then I'll write out my ideas for what would be useful.

  1. When you are playing normally without being attendant to random events, there are many ways to play suboptimally and therefore trigger fewer random events to spawn.

1a. You can hop worlds or log off near to a 5-minute interval, "wasting" the time built up to that interval.
2a. You can approach most bank chests near the 5-minute interval, which disables random event spawning, and will actively despawn any live random events. Anecdotally, it seems like if you are unfortunately standing near a bank on an interval when a random event would have spawned, it simply won't spawn at all and the entire timer will reset. While I can't prove this, it is provable that if you have an event spawn and then run to a bank tile it will immediately despawn, which is undesirable.
3a. You can enter an instance during a 5-minute interval. There's again anecdotal evidence that being in an instance "credits" you spawn chance in some way, see Settled's Swampletics series where he was able to consistently spawn random events on 5-minute intervals after exiting Theater of Blood.

  1. Therefore to play optimally, you want to avoid logging off, hopping worlds, getting near a bank tile or entering an instance when the following conditions are true:

2a. It has been long enough since a random event interval that another one can now spawn (as you say, minimum ~25 minutes, typically ~1 hour)
2b. You are close to another 5-minute interval

  1. It is "optimal" to only log off or hop worlds shortly after 5-minute intervals, after a random event spawns or after you confirm a random event has NOT spawned.

  2. It is "optimal" to only visit bank tiles when you are nowhere near a 5-minute interval so as to not accidentally be standing at one when an event could spawn, or to accidentally despawn a spawned event while running to the tile.

  3. It is "optimal" to enter instances either only during the 25-minute lead-up period or to pop out for 5-minute intervals.

  4. It is unclear how the game decides whether a random event may spawn -- it appears to be 25 minutes - 2 hours as you say, but is that 25 minutes of real time regardless of login time, or is it only counting 5-minute intervals where the player has remained logged in the entire time? In other words, if I log in for 1 minute and then hop worlds, and then stay on that world for 1 minute and then hop worlds, and do that until I have hopped worlds 25 times, does the game consider 25 minutes having passed or 0 minutes having passed (for the purposes of spawning random events)? This sounds like an easy test case but the randomness would make it difficult to know conclusively without a ton of player data.

  5. My hypothesis for random event spawning, again based on anecdote, is this -- every 5-minute interval where the player is logged in without logging out or hopping worlds, the game rolls for a random event. It then records how many total rolls it has done since the last event was spawned. The math is calibrated in such a way that it is either astronomically unlikely or impossible to roll a random event on the first, second, third, or fourth intervals. A random can only spawn with a very low chance on the 5th interval, and then the chance increases for each additional interval. Once the random event spawns, the count of intervals resets back to 0.

7a. The implication of this behavior is that if a player logs out or hops worlds before a 5-minute interval elapses, that time is completely wasted and does not count at all toward possible future random event rolls. A player who logs in for 15 seconds and hops and a player who logs in for 4 minutes and 38 seconds and hops both have a total of 0 intervals logged. This is why random events never seem to spawn during "mass hopping" activities like shopscaping or hunting implings.
7b. This hypothesis may be incorrect; it requires a lot of data to confirm or disprove. Recorded data would need to include both actual time passed and consecutive 5-minute intervals logged separately. So a player who logs in for 5 minutes 24 seconds after a random event and then hops will have 1 interval + 5 minutes 24 seconds of time logged. If she then stays logged in for 4 minutes 36 seconds and hops again, she will still have only 1 interval logged, but now 10 minutes logged. If she then hops a third time after 7 minutes 38 seconds she will have 2 intervals + 17 minutes 38 seconds logged.

@Marstead
Copy link
Author

Marstead commented Nov 11, 2022

So given that use case information here is what I think would be useful from the plugin with regards to 5-minute interval tracking. This is an overwhelming number of requests -- like I said before if you just add the intervals in your mockup I think that will be a massive improvement! So don't feel like you need to do all or any of these. But you were looking for more input so here would be the set of Features that would best meet the needs in the use case in the post above.


Feature 1: Log all consecutive ~5-minute intervals that have elapsed since the last random event spawn. If the player hops or logs off before reaching ~5-minutes, do not record an interval.

Feature 2: Continue to log the raw time (Hours/Minutes/Seconds) Elapsed since the last random event spawn, separate from the total number of unbroken intervals.

Feature 3: Report to the player when they are in a "Eligible for a Random Event" Window. This could include a visual indicator like the bar you're demoing with tick marks for intervals. Maybe the bar is red when it is impossible for a random event to spawn (<25 minutes have elapsed since the last spawn), turns yellow once it is possible but unlikely for a random to spawn (>25 minutes since the last spawn), and turns green when a random event is very likely to spawn (>55 minutes since the last spawn). Or if it's possible to do a color gradient, it goes from red progressively to yellow from 0 to 25 minutes, and then yellow progressively to green from 25 to 55 minutes, as it becomes increasingly likely for an event to spawn.

Feature 4: Let the player toggle between raw minutes logged (Feature 2 above) or 5-minute intervals (Feature 1 above) when determining hypothetical eligibility for randoms to spawn. In other words, if they select raw time, then the plugin will show them as eligible for a random event to spawn when 25 raw logged-in minutes have passed since the last spawn. If they select intervals, the plugin will show them as eligible only after 5 intervals have passed.

Feature 5: Let the player optionally turn on a chat notification that fires when they first become eligible for a random event spawn, based on whether they selected raw time or intervals in Feature 4. Let players also set a notification for when they become overdue, again based on raw time (1 hour from last event) or intervals (12 intervals from last event).

Feature 6: Let the player optionally turn on a chat notification that fires when they are close to a 5-minute interval. Let the player determine how many seconds of warning they would like before the notification fires, probably up to a maximum of 30 seconds. So if they pick 15 seconds warning, they would get a chat message when the game timer is at 4:45, 9:45, 14:45, 20:45, etc. This would let players know to avoid hopping, instances, and bank tiles when an interval is nearing.

Feature 7: Let the player tweak how often they get notifications from Feature 6 above. Some players may want to get a warning:

  • at every 5-minute interval regardless of eligibility
  • only at 5-minute intervals after they are considered eligible for a spawn (after 25+ minutes / 5 intervals)
  • only at 5-minute intervals when it is getting close to the 1-hour average spawn time (after 55+ minutes / 11 intervals)
  • only at 5-minute intervals when they are "late/overdue" for a spawn (after 60+ minutes / 12 intervals)

Whether these notifications fire based on raw minutes elapsed or 5-minute intervals should be based on their toggle selection in Feature 4.

Feature 8: Project the "Random Event Estimation" using the current 1-hour average. However, take the player's current login timer into account and round the estimate up to the next nearest 5-minute interval. For example, if the player has been logged in for 57 minutes since the last random event spawn and has not hopped or logged off (Login timer says 57 minutes), project a spawn in 3 minutes. If the player immediately hops or logs off at the 57-minute mark, round up the estimate to 5 minutes.

Feature 9: Base the 1-hour average in Feature 8 on the player's specification in Feature 4. If the player chose Raw Time in Feature 4 just use the raw 1-hour of login time (base functionality). If they instead chose Intervals in Feature 4 then round the estimate based on intervals. For example, suppose the player selected Intervals in Feature 4. They have been logged in for 43 minutes since the last random event spawn and have not hopped or logged off (Login timer says 43 minutes). This is equal to 8 intervals, so the time projection will show 4 intervals to go until a random event should spawn. If the player hops worlds at 44 minutes 12 seconds, the time projection will still show 4 intervals to go until a random event should spawn, because they have reset the clock.

Feature 10: When the player is overdue for a random event, display both the number of raw minutes AND the number of consecutive 5-minute intervals that have elapsed over the estimate, and constantly show a countdown to the next 5-minute interval as an ongoing estimate.

For example, say the player saw a random event spawn 1 hour 22 minutes ago, and they have been logged-in consecutively without hopping for the entire 1 hour 22 minutes. This means they are 4 intervals overdue for a random event. The plugin would say they are 22 minutes overdue, 4 intervals overdue, and would show a 3-minute countdown to the next interval at 1 hour 25 minutes.

If that player hops immediately at the 1 hour 22 minute mark, the plugin will now say they are still 22 minutes overdue, 4 intervals overdue, and would show a 5-minute countdown to the next interval. If they stay on the second world for +6 minutes and still do not get a spawn, the plugin will show them as 28 minutes overdue, 5 intervals overdue, and would see a 4-minute countdown to the next interval.

Feature 11: Allow players to export their random event data to the clipboard, including all data currently collected plus the new 5-minute interval delta in Feature 2. This will facilitate testing the "Interval Count" vs. "Raw Time Passed" hypotheses.


I think these will help players to plan their play optimally around intervals if they are hunting for specific randoms. With notifications, they can avoid hopping, logging out, visiting banks, or entering instances at suboptimal times, and be made aware of when they are eligible and therefore their play should be more sensitive to random event spawns. Also, by tracking both raw time elapsed and intervals we can gather collective data to determine conclusively how the spawns actually work.

@njitnelav
Copy link

njitnelav commented Nov 11, 2022

Is there any way to extract/export the data from the plugin so I could put it in excel and analyse in more detail?

@zmanowar
Copy link
Owner

#3 (comment) excellent feedback, I really, really appreciate it. I'll be away for the weekend but will digest these items and get back to you. Again, thank you both.

Is there any way to extract/export the data from the plugin so I could put it in excel and analyse in more detail?

Yes! If you check in <your user directory>/.runelite/random-event-analytics/ there'll be a few folders (check runelite documentation for more info, that .runelite is where RL screenshots are also stored). The folders will either be your account hash or username depending on what version of this plugin you last used. Inside there should be an events file that contains a list of all events and their data in JSON format.

Each separate line is another JSON object so you won't be able to parse it in one go without splitting the lines first. (I based the file-IO on TheStonedTurtle's lootLogger plugin). You should be able to split the lines and set the appropriate columns in excel.

I thought about implementing a local database for better storage but it adds a bit more Gradle config and complexity that isn't currently appropriate.

@njitnelav
Copy link

njitnelav commented Nov 14, 2022

Some observations from the past few days.

I've managed to get a random as soon as being logged in for only 15 minutes (after having logged out right after the previous random the day before). I've also had some randoms at the 20 minute mark. So either the 25 minute cooldown for randoms is incorrect, or it does not apply when you simply logout for a longer period of time. It'd be interesting to test out this theory as soon as the plugin timer is fixed and holds the login timer into account.

I've also noticed that the plugin countdown timer hadn't reset properly sometimes, tho it did as soon as the random spawned. but if I log out and for example close my runelite client andshut down my laptop and open it up again at a later time, the plugin timer seems to have forgotten it had reset itself. Now i'm not too sure this is a problem within the plugin itself, but it might be my runelite client, because my runelite settings also don't seem to save all of my tweaks and adjustments in the client, especially if I',m on multiple clients.. So i'd rather assume this is a problem on my end (maybe RL cache?)

@zmanowar
Copy link
Owner

I've managed to get a random as soon as being logged in for only 15 minutes

That makes sense, my 25 minute estimate was anecdotal, I believe in some of Settled's videos he gets randoms as early as 10?

but if I log out and for example close my runelite client andshut down my laptop and open it up again at a later time

updateConfig is the method that writes the timers to a file. I try to call updateConfig in all of the relevant places, eg. when a random is spawned ,when the client shuts down, when the users logs/hops, etc, but I'm sure there are some edge cases (ie. shutting down your laptop) that cause it not to fire. This should work despite RL config resetting itself, as I often notice my NPC Highlights or Tile Markers getting reset.

I'll keep an eye peeled for that issue while reworking the 5 minute timers.

@Marstead
Copy link
Author

If I had to guess I would think there is still a chance for random events to roll on the first, second, third, and fourth intervals (5 minutes, 10 minutes, 15 minutes, 20 minutes) but that the chance is astronomically low and only becomes "reasonable but rare" at the 25+ minute mark. I have a bout 6 months/hundreds of hours of Random Event Analytics data I could share if that'd help with trying to find a baseline. From eyeballing the list it looks like 95%+ of events happen between the 1h and 2h mark, I have a couple events that triggered at 25m or 30m, and I can find at least one event that spawned closer to 15m.

In any case if we're trying to show mark when players are Eligible for a random I think starting from 25m makes sense since spawns that happen earlier than that are so rare that it isn't worth players adjusting their behaviors around them.

@zmanowar
Copy link
Owner

zmanowar commented Nov 14, 2022

Wanted to bring this up as well, probably deserves it's own post in this discussion as I started to work through some of the suggestions I brought up a discussion with ModAsh.

Here's the thread: https://twitter.com/JagexAsh/status/1366001184872558594

In that thread ModAsh specifies:

[the spawn time of random events is between] 60-120 mins. It checks every few mins to see if the time has elapsed, so you'll probably find it's not evenly distributed.

Which, if what we've previously discussed is correct, might suggest that the timer elapses even if the player is NOT logged in.

I also suspect that new accounts have their timer set to "instant" spawn a random based on the Speedrun leaderboards for "obtain camo top" [ref] (5m 19s including tutorial island time). Still working through if that means anything pertinent for the timers, as it's totally possible Jagex manually sets the flag to "spawnable" on a new account as opposed to the timer doing it.

I'm playing around with some of Marstead's suggestions on a few accounts that only login for 5 minutes to collect some data.

/e The above comment and this were posted at the same time.

If I had to guess I would think there is still a chance for random events to roll on the first, second, third, and fourth intervals (5 minutes, 10 minutes, 15 minutes, 20 minutes) [...] In any case if we're trying to show mark when players are Eligible for a random I think starting from 25m makes sense since spawns that happen earlier than that are so rare that it isn't worth players adjusting their behaviors around them.

That's a good idea for a config flag.

@Marstead
Copy link
Author

Marstead commented Nov 14, 2022

That's a good idea for a config flag.

100% agree, better to give players direct control over it.

That's really interesting re: the Mod Ash thread. I looked through my own Analytics and the handful of times I experienced a crazy early spawn (~10-15 minutes) it was after being logged off for several hours. But at the same time, I can't say that I get an early random every time I log in for the first time each day. So something fuzzy must be happening around offline time. My guess is that maybe things get weird when a server restart/patch happens during logoff? Here's an instance I found of a random event with a <20 minute delta, I wanted to see if this happened to occur on a Tuesday -> Wednesday (patch day) and sure enough, I logged off before the patch and the event spawned after the patch.

image
image

(EDIT: These are Pacific Time fwiw)

@cooperka
Copy link

Related to spawn mechanics after being logged out: there's a new section on the wiki describing this based on some Jagex developer tweets:

To determine when the player will receive a random event, the game will pick a point in time between 1 and 2 hours in advance when the player is next due to receive an event spawn. If the player is available when that time rolls around, an event will be selected at random from all of those the player is eligible to receive ... In case the player is offline when they are due to receive one however, the timer will be extended by 10 to 70 minutes and continue counting down.

It is possible to briefly stall an event spawn if the player has an interface open or is in the middle of a repeated skilling action (through the "Make-X" option) when they are awarded an event, in which case its spawn will be delayed until the player becomes available again.

so that explains the fast 10-minute randoms after being logged out.

@zmanowar
Copy link
Owner

zmanowar commented Mar 11, 2023

Good find!

I've been falling behind with progress, just with life events and what-not. Going to work on it some this weekend. I've got most of the interval stuff working last time, can check it out on the instant-login-rework branch if you're curious (and also random event solvers / helpers on the helpers branch).

/e I wonder how the 10-70 minutes is determined. Is it, if you log out for 10-70 minutes during your eligibility period, when you log back in you will receive the event after the initial 5 minutes. And after 70 minutes it picks a new eligibility period somewhere between 1-2 hours from your next login?

/e2 Also looking for feedback as far as what stats / UX you all would like for the interval setup.

ISO Feedback for the new interval-based system's UI/UX

This isn't in release just yet, so you won't see it in your client unless you build the instant-login-rework branch yourself.

Decided to change it from an earlier mock-up as it implied there was a potential end/final event window.
Happy to change it back if you all prefer it (or any other neat ways to represent it) -- I'd expect the panel layout can be driven by config but trying to keep it fairly simple for v1 of this rework.

Panel

Currently there's a progress bar that fills for every 5 minute interval. The overlay says what stage we're at, currently describing the initial 5 minute interval and each interval after.
image

Hovering over the next event estimate shows how many 5 minute intervals have passed since the last random. (May also want to show total elapsed time or something else?)
image

The hover stats for the events in the panel largely remain the same, and logging out resets the timer back to 0. Eventually I'd like to implement the timer extension system described in the post above but need a little more info -- may be v2.
image

Notifications

I'm not sure what notification settings are appropriate.
ie.

  • Notify after intervals.
    • eg. -1 disables it, 0 will notify every 5 minutes, 12 will notify every 5 minutes after 60 minutes of being logged in
  • Notify seconds before eligibility.

Should also be able to incorporate changes to the overlay (eg. text changing colors when close to eligible window) if you all have any suggestions.

  • eg. 15 seconds before and after the eligibility interval the text on the overlay turns green.

@cooperka
Copy link

cooperka commented Mar 13, 2023

nice progress!! posting new advice based on updated findings for clarity.

things we know to be true based on Jagex tweets and easily testable gameplay:

  • assuming you are signed in and standing in a location that allows random events, you will get one every 60-120 minutes in exactly 5-minute intervals of your most recent login or world hop (log in at 10:01:59, get a random at 10:21:59 or 10:26:59 for example).

  • if you are in an unallowable bank, the random event will be cancelled instead of spawning.

  • if you are in a minigame (or combat? no, i just got one while actively in combat), the random event will be postponed to the very next 5-minute interval (over and over if you remain in a minigame) instead of spawning.

  • if you are signed out, it will be postponed 10-70 minutes (over and over if you remain signed out) plus 0-5 extra minutes to reach the newly-reset 5-minute interval after your next login.

  • if standing idly in-game to spawn randoms AFK, there's no risk to logging out after entering an event instance (such as the maze); you will still be there when logging back in when you're ready to complete the event.

  • [EDIT 2023-11-01] "The Genie, Dr. Jekyll, and Count Check himself will now be able to enter Banks. They won’t hang around for too long, but this should give you time to rootle through your Bank for that Herb Jekyll’s after." presumably this doesn't affect whether they can spawn in banks, only whether they disappear when following you into banks.

➡️ therefore, a player seeking to optimize the number of random events they encounter should do the following:

  • never bank at an unallowable location during a possible 5-minute spawn moment; this could delay the next random by up to 120 minutes

  • if following the banking rule, time your play sessions to include a full 70-minute or 120-minute time window (depending on when your last random was) to guarantee receiving a random event before logging out; otherwise it could delay the next random by up to 70 minutes if you are logged out during your next 5-minute spawn moment

  • if stepping away AFK without notifications, enter a minigame to pause randoms until your return

  • exit minigames regularly, right before a 5-minute spawn moment to see if a random is due yet; failing to do so merely delays the next random by at most 5 minutes

  • hop worlds right after (not right before) a 5-minute spawn moment to avoid pushing back the next random by up to 5 minutes

things i remain unsure about:

  • how soon is the soonest possible random event after logging in? (it's certainly happened at :10 minutes playtime, but what about :5 minutes?) and how is this affected by long periods of being signed out? the answer may be "you can get one any time" but i have a feeling that i've never gotten one after only :5 minutes playtime which leaves me confused about exactly how events are triggered.

  • how does the "make-x" dialogue or chatting with an NPC affect random events? Jagex suggested it could cause a slight delay but i haven't tested this. what about the minimap, settings, or poll booth? what about POH?

  • are boss instances considered minigames for the purposes of random events, or is there different logic to them? i have a hunch that vorkath for example is treated like an unallowable bank and cancels rather than postpones events.

@samszotkowski
Copy link

samszotkowski commented Apr 27, 2023

To answer the uncertainty about "how soon is the soonest after log in?" I think that is testable. Immediately after you get a random, lets assume the game sets the next one due in 60 minutes (this will be true about 1/13 attempts, assuming it chooses uniformly between 60 and 120). Log out, wait for between 55:01 and 59:59, then log back in. I think we expect the game to say "we're in the final 5-min interval before the random is due, so let's queue it up to spawn at 05:00 game time." If we try this lots of times and never get one at 05:00, we'll know our understanding is incomplete.

Based on what we know, I think if we simplify the situation and say we're always standing on a tile that lets us get a random, the only variables that matter in predicting a spawn are 1) real-world time of log-ins and log-outs since last random, and 2) real-world time of previous spawn. We already track 2, but tracking 1 would allow us to see if 05:00 spawns are possible, and answer other questions and test our models of understanding. I don't think it's necessary to track xp/hr or total xp, but more data won't hurt.

Only problem with my suggestion to track log-in/log-out times, is that it could become a very lengthy list if you're doing world-hopping. That should probably be its own plugin, but I do think that info would be necessary to put accurate bounds on the spawn estimation.

@njitnelav
Copy link

Hi Sam

No need to test the 5 minute theory, I have had it happen numerous times.
The way I play nowadays is I login until I get a random, I then logout and set a timer for 55 minutes, then log back in.

xp/r or total xp doesn't affect randoms as stated by Ash before, I've had account login and just sit idle and get randoms anywhere from 5 minutes to one hour +.

Greetings

@zmanowar
Copy link
Owner

zmanowar commented May 3, 2023

runelite/plugin-hub#4284 The plugin has been updated in the plugin hub, you should see the changes shortly. Let me know what you all think (and obviously if you find any issues)! Thanks for all your input thus far!

TODOs:

  • Notifications
    • Minimum # spawn windows to notify
    • Notify seconds before the window.
  • UI enhancements
    • some formatting
    • enhancements to overlay for more information

@Marstead
Copy link
Author

Marstead commented May 4, 2023

Really like the new bar! Will report if there are any issues.

@samszotkowski
Copy link

Update's looking good, though I am having a few issues. The countdown, green bar, and interval counter are not resetting once I get a random. Also, the countdown and green bar reset correctly when I log out, but not when I hop worlds.

@zmanowar
Copy link
Owner

zmanowar commented May 4, 2023

Also, the countdown and green bar reset correctly when I log out, but not when I hop worlds.

Nice find. I've added a commit (549a7e4) that should reset the login timer. Unsure when this will get pushed to the plugin-hub, probably after investigating:

The countdown, green bar, and interval counter are not resetting once I get a random.

Interesting, I'll try to reproduce this tomorrow. Was the random successfully logged / added to the panel? If it was, see if the bug goes away after a second random (it might be a bug in the initial conversion of your profile to the new time tracker)

@samszotkowski
Copy link

samszotkowski commented May 4, 2023

It was successfully logged, but it was my first random to spawn since the conversion so that seems like a likely explanation. Though it seems like the overlay debug tick counter did update, just not the countdown/intervals. I took this picture at 11:00, which is 47 minutes since the previous random. If you convert the ticks to minutes, you get a little less than 46 minutes (I spent a small amount of time logged out/hopping worlds testing things), so that seemed to update just fine.

image

I'll update my comment to say what happens when the next one spawns.

Update:
image
Tick counter, green bar, and countdown reset properly; interval counter and delta event time recorded are tied to time since login rather than time since last random.

@zmanowar
Copy link
Owner

zmanowar commented May 6, 2023

Trying to digest a few points from the wiki and put all of this together for better estimation.

This tweet thread, after a random event occurs, the game picks a real-life time in the future, somewhere between 1-2 hours.

The last two tweets in this thread with ModAsh suggest the "global" spawn timer continues counting down even if logged out.

Global timer [ie. counting down even when logged out], if I recall correctly.

Which seems to be correct based on njitnelav's comment.

Then in this tweet:

If you were offline when the time came for your next one, yes, it'll move itself forward by 10-70 mins and carry on ticking.

I've re-implemented the total-time logged in timer, we also store the real-time spawn and can calculate the difference between your last spawn and now (even if logged out).

Eg. If your last random was 55 minutes ago and you log off for the day, the next random should, presumably, spawn between 5-60 minutes after your login.

I would love to be able to show a probability of the next window being your random event -- assuming an even distribution and valid global and logged-in time tracking it shouldn't be too difficult to calculate.

Edit: I've added a new discussion to track probability: #13


Another (huge) task is to document all the locations randoms cannot spawn, which completely resets your eligibility timer (waiting another 1-2 hours). Starting a discussion here to document those. Don't feel like you have to go out of your way to test locations, just if you see anything!


Edit: I've also considered removing the XP tracking (and other unused fields, eg. NPC & Player Combat Level) from the plugin.

We know XP has no effect on randoms, but I don't want to remove a feature people are using.

@Infinitay
Copy link

I've re-implemented the total-time logged in timer, we also store the real-time spawn and can calculate the difference between your last spawn and now (even if logged out).

I recently started logging out every 55 minutes after reading this thread and reading tweets from Mod Ash. I noticed that even if I log out immediately after receiving a random event and logging back in after 55 minutes, the countdown timer's "Estimate" overlay still counts down from 1 hour. Based on the the quote, I assumed that the Eligible timer should have read 05:00 instead of 59:59. Is this intended? Because after all the timer is global in which case the time should still be ticking down even on log out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants