Hi there! I love random events. Recently I’ve been more curious on exactly how they spawn. I’ve been throwing some of the code into ai to dumb it down for me but there’s some questions I still have.
-
Aside from skill specific events is there any action that increases the chance of random events? I noticed in the code notes about things like alching and cooking “calling” events while other things like using an anvil and fletching were “not implemented”. Does that mean alching and such would net you more random events?
-
Do skill specific randoms like the watchman or river troll weight evenly with general randoms? I surmise that woodcutting for example would net you less general randoms because of the additional woodcutting randoms but are they all equal chance?
-
What is the actual spawn mechanism? People like swampletics have guessed it’s based off things like repeated actions, gaining xp and standing in one area, clicking. Where can I look in the code to find info such as this? I’ve been looking in “server-data-src-scripts-macro events” in the code so far, is there anywhere else with info on randoms?
Thanks for the project btw, pulled me back in after years of thinking I was done with Runescape. Already on my second account (not multilogging btw despite really wanting to). Rip irl.
From what I’ve seen on skill specific randoms I believe these are the chances of a random being a genie:
F2P:
fishing/woodcutting/mining: 14.3%
prayer: 16.7%
pretty much anything else: 25%
P2P:
fishing/woodcutting/mining: 12.5%
prayer: 14.3%
thieving chests: 14.3%
thieving not chests: 16.7%
pretty much anything else: 20%
So there’s multiple things that can check if a random event is due:
- 5 minute runescript timer (repeats), set on login
- Handful of actions, like alching and burying bones (osrs got rid of this)
Chance of receiving a random event is handed to each player by the engine, every 500 server ticks (this is separate from the 5 min runescript timer!). This is a 1/12 chance, and if you’ve been in your aggro zone for longer than 10 minutes this chance is increased to 1/6 (osrs also got rid of this).
Nothing else increases this chance, instances or banks do not do this, even in osrs. What Settled encountered was the runescript timer skipping the random event check, since he was not in an area that allowed random events. Skipping the random event check like this will ‘queue’ up random events until you enter an area that allows random events. In other words you can be due a random when inside an instance, but cant receive it until you finally exit (and the 5 min timer script runs).
XP has no effect on random events. But lots of ways of gaining xp will check if you’re due a random event, without having to wait for the 5 min runescript timer. And if you’re gaining lots of xp, you’re likely in the same area for over 10 minutes, making random events even more common.
Skills like woodcutting and fishing will yield less general randoms on average you’re right. And f2p has no strange plant so you technically get more genies there on average.
1 Like
Smiling while reading your response! Thanks for that! Fascinating…
It seems the biggest way to increase chance of randoms is to not leave your aggro zone. Unfortunately I now have more questions.
-
How big is a players’ aggro zone? I could see banking messing it up if the bank is too far away making you leave your aggro zone to bank. I’ve seen a lot of info on npcs varying aggro zones, does the player have their own zone that follows them around?
-
Does this mean that every time I get logged for inactivity (which seems awfully quick in this version and happens often) my chance at a random that I get every 500 ticks (which is also 5 mins?) is reset? Does this also reset the increase to 1/6 for being in my aggro zone longer than 10 mins?
-
Why have checks like alching etc. if there’s a check every 5 mins and the random event chance is a separate but equal time of 5 mins (assuming 500 ticks is 5 mins)? Unless these are staggered (like the random chance persists logged in or out because it’s off game ticks…?).
-
Does this mean genie meta is essentially standing still in f2p (not woodcutting or fishing, possibly training combat without banking)? Maybe burying a bone 2.5 mins after logging in and every subsequent 5 mins?
-
Are skill specific randoms like watchman or ents weighted the same as general randoms?
Heres how the aggro zone works:
Its two 21x21 squares. Every time you leave the two squares, a new one is generated, replacing the oldest square.
The 500 tick engine thing gives everyone in the server, at the same time, a chance to receive a random event next time their afk_event()
is checked (5 min runescript timer, or various actions). Logout doesnt effect anything.
- Why have checks like alching etc. if there’s a check every 5 mins and the random event chance is a separate but equal time of 5 mins (assuming 500 ticks is 5 mins)? Unless these are staggered (like the random chance persists logged in or out because it’s off game ticks…?).
I’m not sure, the original intent behind random events was to prevent botters, and skill specific random events need those checks in the actions themselves anyway.
- Are skill specific randoms like watchman or ents weighted the same as general randoms?
They’re all weighted the same, equal chance.
2 Likes
haha I’m literally watching that video you linked as I saw your reply!
I assume the first aggro square is centered around whatever square you log onto… however… logging out doesn’t reset aggro… so maybe not.
Very cool though. Thanks! 