Skip to content

Collection log - #148

Open
a-thoren wants to merge 11 commits into
OpenRune:mainfrom
a-thoren:feat/collection-log
Open

Collection log#148
a-thoren wants to merge 11 commits into
OpenRune:mainfrom
a-thoren:feat/collection-log

Conversation

@a-thoren

@a-thoren a-thoren commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This PR adds the entire collection log system minus the ability to display a player's last obtained entries.

Items in the collection log are cache-native via enums. We simply store a category's struct ID in the DB table and look up items via the associated enum.

Collection log varbits are assumed to adhere to the naming standard varbit.collection_item_itemname where itemname is an item's gameval.

I have tested this PR to check that full navigation between the collection log and overview is possible.

Note that while this PR adds varbits for every item in the collection log it does not add the underlying mechanic allowing a player to unlock every item in the collection log. As this project is currently fairly content-poor we only grant collection log entries from NPC drops as well as loot from relevant chests as added in #121. Adding collection log support in a module is very straightforward and simply requires a call to CollectionLog#grant.

The only issue I noticed that I'm unsure about is the fact that results from the search functionality always state that the count of an item is 0. This 0 appears to be hardcoded in the clientscript and I do not have an OSRS account where I can test if this is actually the case.

Another concern I have is that this PR necessitated the addition of a very large amount of varbits and varps which has significantly bloated the varp.toml and varbit.toml files. I'm not sure if there is another, better solution to this but if a reviewer has any notes I will of course amend this.

I also added the command ::componentdebug to easily allow me to find interface components rather than use the Widget Inspector. If a reviewer feels this is undesirable I have no issues removing it or any other debug commands added.

I should also note that the navigation via the collection log to the combat achievements currently does not work as combat achievements have not really been implemented AFAIK.

@advnau

advnau commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Cool PR!

You mention the large number of varps/varbits.
image
In this case all items are shared so rather than storing these as individual varps/varbits we could just have an inventory for these and then we add to that on the kills.

@a-thoren

a-thoren commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Cool PR!

You mention the large number of varps/varbits. image In this case all items are shared so rather than storing these as individual varps/varbits we could just have an inventory for these and then we add to that on the kills.

I did consider that approach, the reason I didn't choose it is that there is proof that Jagex uses an intermediate varbit system.
image

@Mark7625

Mark7625 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Cool PR!
You mention the large number of varps/varbits. image In this case all items are shared so rather than storing these as individual varps/varbits we could just have an inventory for these and then we add to that on the kills.

I did consider that approach, the reason I didn't choose it is that there is proof that Jagex uses an intermediate varbit system. image

tbf while ye your correct i think inv is cleaner, the varbits you shown aint used in cs2 ect so dont think it rlly matters i guess, a inv would make it so we need a hella lot less varbits are we can use inv to store amt and item

@a-thoren

a-thoren commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Alright, that's fair. I'm away for a couple of days but will migrate to an inventory when I get back

@advnau

advnau commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Cool PR!
You mention the large number of varps/varbits. image In this case all items are shared so rather than storing these as individual varps/varbits we could just have an inventory for these and then we add to that on the kills.

I did consider that approach, the reason I didn't choose it is that there is proof that Jagex uses an intermediate varbit system. image

Good call out. I just checked when clog was added and there was almost one thousand new varbits added that day. Its just a shame that not all of these have gameval names directly in the cache

@a-thoren

a-thoren commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Cool PR!
You mention the large number of varps/varbits. image In this case all items are shared so rather than storing these as individual varps/varbits we could just have an inventory for these and then we add to that on the kills.

I did consider that approach, the reason I didn't choose it is that there is proof that Jagex uses an intermediate varbit system. image

Good call out. I just checked when clog was added and there was almost one thousand new varbits added that day. Its just a shame that not all of these have gameval names directly in the cache

Completely agree, would've saved us a ton of bloat. But like you and Mark both said, an inventory will be cleaner and since items are driven by the cache enums, will further minimize the amount of work to support new categories

@a-thoren
a-thoren force-pushed the feat/collection-log branch from e7e182f to e8c88fa Compare August 8, 2026 08:00
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

Successfully merging this pull request may close these issues.

3 participants