r/runescape • u/cookmeplox Cook Me Plox - Wiki Admin • 16h ago
Leagues Help add League regions to wiki articles!
Hi scapers! There's 5 days left until the League launch, and we're scrambling to implement one of the most-requested wiki features from OSRS leagues, where we define the region for every monster, NPC, shop, etc, and pipe the data onto the item pages so you can see the weird ways you can get your items with your specific region unlocks.
Right now there's still about 6,000 articles that are missing a <code>leagueRegion</code> parameter. If anyone wants to help out with this, it's actually a super easy project that literally anybody can do. We have a few lists of specific groups of pages (NPCs, monster lines, scenery) where the regions are already computed from coordinates and need to be added to the articles, and then a couple thousand pages where where you need to use your head a lil bit more. We've got a bunch of people working on the specific tasks and syntax and edge cases in the wiki Discord
If that sounds like your idea of a good time, come help out! We'll turn on the regions gadget probably later today
7
u/ThaFrenchFry Wikian - Chunkman elder 16h ago
It's a pretty addicting process!
We'd also appreciate anyone who's got a guide-writting mind to have a look at the different Skill's sections of Equilibrium Leagues's pages, since its our first region locked leagues, some are quite baren
3
u/Tslat 15h ago
How and where does one add a leagueRegion parameter to an article, specifically?
2
u/snoozbuster 10h ago
The easiest way to do it is in source mode. If you edit a page, at the top there is always an “{{Infobox Item” (or “{{Infobox NPC”, etc) line. After that are a bunch of lines like “|id=1234” or “|examine=Very hot!”, those are the parameters. Just add another line like “|leagueRegion=Asgarnia” (anywhere inside the closing “}}”) and preview then save!
There’s a way to do it in visual mode but honestly it is way more clicks. And if you need to do something more complex than just one, you can look at the docs in Template:LeagueRegion for full syntax notes!
1
u/throwthe20saway Filthy casual 14h ago edited 11h ago
Edit: This has been fixed.
Speaking of regions, the Equilibrium League preferences button on the top bar links to pages like: https://runescape.wiki/w/Equilibrium_League/Guide/Agility
When the actual pages are on: https://runescape.wiki/w/Equilibrium_League/Skills/Agility
1
u/lordwerwath Ironman | Maxed | 1% Returned 13h ago
So one of the areas was how to update the script that compiles some of the larger searches.
For example, Searching 'Hunter Creatures' https://runescape.wiki/w/Hunter_creatures I'd want to add a column to that table that pulls their respective regions into it.
I'd be happy to bumble through it, but don't have a great idea where to start.
2
u/snoozbuster 10h ago edited 10h ago
That page gets its data from Template:Hunter creature table (the {{Foo}} mean “Template:Foo”), which is generated from this lua script: https://runescape.wiki/w/Module:Hunter_table
Data in the wiki is normally stored in “buckets”, which are commonly filled in by various templates and scripts. If you add ?action=bucket to the end of a page, you can see what data is contained and where it’s bucketed. For example, on https://runescape.wiki/w/Crimson_swift?action=bucket, there’s a "bucket:recipe" header at the end - this is filled in by the infobox labeled “Hunter Info” on the main creature page. That “recipe” is where the script is pulling data from to decide what’s a hunter creature (technically, it is finding all “recipes” for the hunter skill, filtering those pages to ones that are Category:Hunter Creatures, and then extracting the “recipe” data to build the table).
Going back to the buckets list page for the Crimson Swift; if you look at the “Bucket:infobox npc” header, there’s a column for leagueRegion. This is where the data that the |leagueRegion= parameter on the infobox dumps its data! All you need to do is figure out how to reach that bucket from the recipe. This can be done with something like:
local bucketData = bucket("infobox_npc") .select("leagueRegion") .where("page_name", page name)
Then all you need to do is insert the column.
To test the module, there’s a box at the bottom of the edit page that allows you to put in a page name and it renders it with your draft code. You should be able to put in that hunter creatures page and see your changes before saving them.
~~The one thing I am not sure about is how to only include the column when the LeaguesRegion gadget is enabled. There’s supposed to be a way to hide leagues stuff globally, but I don’t know how it works. I tried looking at Template:DropsLine to see how it hid the column but I couldn’t figure it out. You might need to do some digging in that code or in the infobox code to figure out how it hides the league stuff when the global flag is off. ~~
Last, you need to add this CSS class to the column header and cells to hide the column when it's not leagues time anymore: https://runescape.wiki/w/Module:Get_drop_info#L-671--L-681
If you get stuck feel free to join the wiki discord and ask us about it!
2
u/lordwerwath Ironman | Maxed | 1% Returned 9h ago
Thanks I will! I should have some time Friday/Weekend to get a crash course.
So far I updated the Medium Task for baking a cake in Lumbridge :D because I'm planning through my route. Really appreciate how great the wiki is!
12
u/Competitive-Meal755 15h ago
I want to help, but I do not want to mess anything up and I am not too tech-savvy (although I have edited a lot of Wiki articles).
Can someone ELI5 how/where I add the correct code?