Package: osrsbox
osrsbox-dbA complete and up-to-date database of Old School Runescape (OSRS) items, monsters and prayersThis project hosts a complete and up-to-date database items, monsters and prayers in OSRS.Completemeans it holds every single item, monster and prayer in OSRS.Up-to-datemeans this database is updated after every weekly game update to ensure accurate information.The item database has extensive properties for each item: a total of 27 properties for every item, an additional 16 properties for equipable items, and an additional 3 properties for equipable weapons. These properties include the item ID and name, whether an item is tradeable, stackable, or equipable or if the item is members only. For any equipable item, there are additional properties about combat stats; for example, what slash attack bonus, magic defence bonus or prayer bonus that an item provides. For weapons, additional properties are added which include attack speed, combat stance and weapon type information.The monster database also has extensive properties: a total of 44 unique properties for each monster, as well as an array of item drops for each monster that has 6 additional properties per item drop. The base properties include the monster ID, name, member status, slayer properties, attack type, max hit, attack types and all monster combat stats. Each monster also has an associated array of drops which document the item ID, name, rarity, quantity, and any requirements to get the drop.The prayer database documents each prayer that available in-game and has detailed properties: a total of 8 properties for every prayer. The base properties include the prayer name, members status, description, requirements, and bonuses that it provides.Table of ContentsProject SummaryTheosrsboxPython PyPi PackageThe osrsbox RESTful APIThe osrsbox Static JSON APITheosrsbox-dbGitHub RepositoryThe Item DatabaseThe Monster DatabaseThe Prayer DatabaseProject ContributionAdditional Project InformationProject SummaryThe osrsbox-db project provides data for three different categories:ItemsMonstersPrayersThe osrsbox-db project and data is accessible using four methods:The Python PyPi packageThe RESTful APIThe Static JSON APIThe GitHub development repositoryWith four different methods to access data... most people will have the following question:Which one should I use?The following list is a short-sharp summary of the options:The Python PyPi package: Use this if you are programming anything in Python - as it is the simplest option. Install usingpip, and you are ready to do anything from experimenting and prototyping, to building a modern web app using something like Flask.The RESTful API: Use this if you are not programming in Python, and want an Internet-accessible API with rich-quering including filtering, sorting and projection functionality.The Static JSON API: Use this if you want Internet-accessible raw data (JSON files and PNG images) and don't need queries to filter data. This is a good option if you want todumpthe entire database contents, and saves the RESTful API from un-needed traffic.The GitHub development repository: The development repository provides the code and data to build the database. I would not recommend using the development repository unless you are (really) interested in the project or you want to contribute to the project.TheosrsboxPython PyPi PackageIf you want to access the item and monster database programmatically using Python, the simplest option is to use theosrsboxpackage available from PyPi. You can load the item and/or monster database and process item objects, monster objects, and their properties.Package Quick StartMake sure you have >= Python 3.6Install package using:pip install osrsboxItem database quick start:Import items API using:from osrsbox import items_apiLoad all items using:items = items_api.load()Loop items using:for item in items: print(item.name)Monster database quick start:Import monsters API using:from osrsbox import monsters_apiLoad all monsters using:monsters = monsters_api.load()Loop monsters using:for monster in monsters: print(monster.name)Prayer database quick start:Import prayers API using:from osrsbox import prayers_apiLoad all prayers using:prayers = prayers_api.load()Loop prayers using:for prayer in prayers: print(prayer.name)Package RequirementsFor theosrsboxPyPi package you must meet the following requirements:Python 3.6 or abovePip package managerDataclasses package (if Python is below 3.7)If you are using Python 3.6, thedataclassespackage will automatically be installed. If you are using Python 3.7 or above, thedataclassespackage is part of the standard library and will not be installed automatically.Package InstallationThe easiest way to install the osrsbox package is through thePython Package Indexusing thepipcommand. You need to havepipinstalled - and make sure it is updated (especially on Windows). Then you can install theosrsboxpackage using the followingpipcommand:pip install osrsboxPackage UpgradingThe package is consistently updated - usually after each weekly in-game update. This is because the in-game update usually introduces additional items into the game or changes existing items. Therefore, you should regularly check and update theosrsboxpackage. To achieve this, runpipwith theupgradeflag, as demonstrated in the following command:pip install --upgrade osrsboxPackage UsageThe key use of theosrsboxpackage is to load and automate the processing of OSRS items and their associated metadata. You can load the package usingimport osrsbox, however, you probably want to load theitems_apimodule ormonsters_apimodule. A simple example of using the package toloadall the items, then loop and print out the item ID and name of every item in OSRS is provided below:phoil@gilenor ~ $ python3.6
Python 3.6.8 (default, Jan 14 2019, 11:02:34) 
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from osrsbox import items_api
>>> items = items_api.load()
>>> for item in items:
...     print(item.id, item.name)Instead of using the Python interpreter, you can also write a simple script and import theosrsboxPython package. An example script is provided below, this time for themonsters_api:#!/usr/bin/python3

from osrsbox import monsters_api

monsters = monsters_api.load()
for monster in monsters:
    print(monster.id, monster.name)If you would like to review additional examples of using theosrsboxPython API, have a look at theitems_api_examplesfolderandmonsters_api_examplesfolder. There are a number of scripts available that provide examples of loading and processing data using the Python API.The osrsbox RESTful APITheofficial osrsbox-api GitHub repositoryhosts the source code used for the RESTful API. The officialosrsbox-apiproject is available from:https://api.osrsbox.comThe link provided above has an API landing page with detailed information on the project including a project summary, API endpoints, and links to useful documentation. Also, have a look at theofficialosrsbox-apiproject READMEfor more information. The README has a tutorial on how to build the API docker environment locally for testing purposes which might be useful.TheosrsboxStatic JSON APIThis project also includes an Internet-accessible, static JSON API for all items/monsters in the database. The JSON API was originally written for theosrsbox-tooltipsprojectbut has since been used for a variety of other projects. The JSON API is useful when you do not want to write a program in Python (as using the PyPi package is probably easier), but would like to fetch the database information programmatically over the Internet, and receive the data back in nicely structured JSON syntax. A key example is a web application.Static JSON API FilesThe JSON API is available in thedocsfolderin the osrsbox-db project repository. This folder contains the publicly available database. Every file inside this specific folder can be fetched using HTTP GET requests. The base URL for this folder ishttps://www.osrsbox.com/osrsbox-db/. Simply append any name of any file from thedocsfolder to the base URL, and you can fetch this data. A summary of the folders/files provided in the JSON API are listed below with descriptions:items-complete.json: A single JSON file that combines all single JSON files fromitems-jsonfolder. This file contains the entire osrsbox-db items database in one file. This is useful if you want to get the data for every single item.items-icons: Collection of PNG files (20K+) for every item inventory icon in OSRS. Each inventory icon is named using the unique item ID number.items-json: Collection of JSON files (20K+) of extensive item metadata for every item in OSRS. This folder contains the entire osrsbox-db item database where each item has an individual JSON file, named using the unique item ID number. This is useful when you want to fetch data for a single item where you already know the item ID number.items-json-slot: Collection of JSON files extracted from the database that are specific for each equipment slot (e.g., head, legs). This is useful when you want to only get item data for equipable items for one, or multiple, specific item slot.items-summary.json: A single JSON file that contains only the item names and item ID numbers. This file is useful when you want to download a small file (1.1MB) to quickly scan/process item data when you only need the item name and/or ID number.models-summary.json: A single JSON file that contains model ID numbers for items, objects, and NPCs. This file is useful to determine the model ID number for a specific item, object or NPC.monsters-complete.json: A single JSON file that combines all single JSON files from themonsters-jsonfolder. This file contains the entire osrsbox-db monster database in one file. This is useful if you want to get the data for every single monster in one file.monsters-json: Collection of JSON files (2.5K+) of extensive monster metadata for every monster in OSRS. This folder contains the entire osrsbox-db monster database where each monster has an individual JSON file, named using the unique monster ID number. This is useful when you want to fetch data for a single monster where you already know the item ID number.npcs-summary.json: A single JSON file that contains only the NPC names and NPC ID numbers. This file is useful when you want to download a small file (0.35MB) to quickly scan/process NPC data when you only need the NPC name and/or ID number. Note that this file contains both attackable, and non-attackable (monster) NPCs.objects-summary.json: A single JSON file that contains only the object names and object ID numbers. This file is useful when you want to download a small file (0.86MB) to quickly scan/process in-game object data when you only need the object name and/or ID number.prayer-icon: Collection of PNG files for each prayer in OSRS.prayer-json: Collection of individual JSON files with properties and metadata about OSRS prayers.Accessing the Static JSON APIThe JSON file for each OSRS item can be directly accessed using unique URLs provide through theosrsbox.combase URL. As mentioned, you can fetch JSON files using a unique URL, but cannot modify any JSON content. Below is a list of URL examples for items and monsters in the osrsbox-db database:https://www.osrsbox.com/osrsbox-db/items-json/2.jsonhttps://www.osrsbox.com/osrsbox-db/items-json/74.jsonhttps://www.osrsbox.com/osrsbox-db/items-json/35.jsonhttps://www.osrsbox.com/osrsbox-db/items-json/415.jsonhttps://www.osrsbox.com/osrsbox-db/items-json/239.jsonAs displayed by the links above, each item or monster is stored in theosrsbox-dbrepository, under theitems-jsonfolder ormonsters-jsonfolder. In addition to the single JSON files for each item, many other JSON files can be fetched. Some more examples are provided below:https://www.osrsbox.com/osrsbox-db/items-complete.jsonhttps://www.osrsbox.com/osrsbox-db/monsters-complete.jsonhttps://www.osrsbox.com/osrsbox-db/items-summary.jsonhttps://www.osrsbox.com/osrsbox-db/items-json-slot/items-cape.jsonhttps://www.osrsbox.com/osrsbox-db/prayer-json/protect-from-magic.jsonSo how can you get and use these JSON files about OSRS items? It is pretty easy but depends on what you are trying to accomplish and what programming language you are using. Some examples are provided in the following subsections.Accessing the JSON API using Command Line ToolsTake a simple example of downloading a single JSON file. In a Linux system, we could use thewgetcommand to download a single JSON file, as illustrated in the example code below:wget https://www.osrsbox.com/osrsbox-db/items-json/12453.jsonYou could perform a similar technique using thecurltool:curl https://www.osrsbox.com/osrsbox-db/items-json/12453.jsonFor Windows users, you could use PowerShell:Invoke-WebRequest -Uri "https://www.osrsbox.com/osrsbox-db/items-json/12453.json" -OutFile "12453.json"Accessing the JSON API using PythonMaybe you are interested in downloading a single (or potentially multiple) JSON files about OSRS items and processing the information in a Python program. The short script below downloads the12453.jsonfile using Python'surlliblibrary, loads the data as a JSON object and prints the contents to the console. The code is a little messy, primarily due to supporting both Python 2 and 3 - as you can see from thetryandexceptimporting method implemented.import json

try:
    from urllib.request import urlopen
except ImportError:
    from urllib2 import urlopen

url = ("https://www.osrsbox.com/osrsbox-db/items-json/12453.json")
response = urlopen(url)
data = response.read().decode("utf-8")
json_obj = json.loads(data)
print(json_obj)Accessing the JSON API using JavaScriptFinally, let's have a look at JavaScript (specifically jQuery) example to fetch a JSON file from the osrsbox-db and build an HTML element to display in a web page. The example below is a very simple method to download the JSON file using the jQuerygetJSONfunction. Once we get the JSON file, we loop through the JSON entries and print each key and value (e.g.,nameandBlack wizard hat (g)) on its own line in adivelement.<!DOCTYPE html>
<html>
  <head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
    <script>
      $(document).ready(function(){
          $("button").click(function(){
              $.getJSON("https://www.osrsbox.com/osrsbox-db/items-json/12453.json", function(result){
                  $.each(result, function(i, field){
                      $("div").append(i + " " + field + "<br>");
                  });
              });
          });
      });
    </script>
  </head>
  <body>
    <button>Get JSON data</button>
    <div></div>
  </body>
</html>Theosrsbox-dbGitHub RepositoryTheofficial osrsbox-db GitHub repositoryhosts the source code for the entire osrsbox-db project. The Python PyPi package is located in theosrsboxfolder of the official development repository, while the other folders in this repository are used to store essential data and Python modules to build the item database.Using the Development RepositoryIf using this repository (the development version), you will need to fulfill some specific requirements. This includes having the following tools available on your system:Python 3.6 or abovePip - the standard package manager for PythonA selection of additional Python packagesAs a short example, I configured my Ubuntu 18.04 system to run the development repository code using the following steps:sudo apt update
sudo apt install python3-pipThese two commands will install thepip3command, allowing the installation of Python packages. Then you can usepip3to install additional packages. The development repository requires a variety of Python packages in addition to the mandatorydataclassespackage. These package requirements are documented in therequirements.txtfile. It is recommended to use thevenvmodule to set up your environment, then install the specified requirements. As an example, the following workflow is provided for Linux-based environments (make surepython3is available first):git clone --recursive https://github.com/osrsbox/osrsbox-db.git
cd osrsbox-db
python -m venv venv
source venv/bin/activate
pip3 install -r requirements.txtWhen you have finished with working in theosrsbox-dbrepository, make sure to deactivate the currentvenvenvironment using:deactivateSummary of Repository Structurebuilders: The builders are the code that performs automatic regeneration of the databases. These builders read in a variety of data and produce a JSON file for each item or monster.items: The item database builder that uses a collection of Python scripts to build the item database. Thebuilder.pyscript is the primary entry point, and thebuild_item.pymodule does the processing of each item.monsters: The monster database builder that uses a collection of Python scripts to build the monster database. Thebuilder.pyscript is the primary entry point, and thebuild_monster.pymodule does the processing of each monster. Additionally, thedrop_table.pymodule contains a selection of hard-coded drop tables for the various OSRS Wiki drop table templates such as the rare, herb, seed, gem and catacombs drop tables.data: Collection of useful data files used in the osrsbox-db project.cache: OSRS client cache dump (not present in repository due to size, but populated using thescripts/cachescripts).icons: Item and prayer icons in base64.items: Data used for item database generation.monsters: Data used for monster database generation.schemas: JSON schemas for the item and monster database, as well as schemas for item, npc and object definitions from cache data.wiki: OSRS Wiki data dump including all item and monster page titles and page data.docs: The publicly accessible item database available through this repo or by using the static JSON API. This folder contains the actual item database that is publicly available, or browsable within this repository (see section above for more information).osrsbox: The Python PyPi package:items_api: The Python API for interacting with the items database. The API has modules to load all items in the database, iterate through items, and access the different item properties.items_api_examples: A collection of simple Python scripts that use theitems_apito provide an example of what can be achieved and how to use the items database.monsters_api: The Python API for interacting with the monster database. The API has modules to load all monsters in the database, iterate through items, and access different monster properties.monsters_api_examples: A collection of simple Python scripts that use themonsters_apito provide an example of what can be achieved and how to use the monster's database.scripts: A collection of scripts (using Python and BASH) to help automate common tasks including dumping the OSRS cache, scraping the OSRS wiki, generating schemas, updating the databases, and inserting data into a MongoDB database.cache: A collection of scripts to extract useful data from the OSRS cache item, npc and object definition files.icons: Various scripts to help process, check or update item icons.items: A collection of scripts to help process data for the item builder.monsters: A collection of scripts to help process data for the monster builder.update: A collection of scripts for automating the data collection and database regeneration.wiki: A collection of scripts for automating data extraction from the OSRS Wiki using the MediaWiki API.test: A collection of PyTest tests.Item, Monster and Prayer Database SchemasTechnically, theosrsbox-dbis not really a database - more specifically it should be called a data set. Anyway... the contents in the item/monster/prayer database need to adhere to a specified structure, as well as specified data types for each property. This is achieved (documented and tested) using theCerberus project. The Cerberus schema is useful to determine the properties that are available for each entity, and the types and requirements for each property, including:type: Specifies the data type (e.g., boolean, integer, string)required: If the property must be populated (true or false)nullable: If the property can be set tonullorNoneThe Cerberus schemas are provided in a dedicated repository calledosrsbox/schemas, and implorted into this project as a submodule - this is because the schemas are used in other repositories and central management is required. The schemas are loaded into thedata/schemasfolder and includes:schema-items.json: This file defines the item schema, the defined properties, the property types, and some additional specifications including regex validation, and/or property type specification.schema-monsters.json: This file defines the monster schema, the defined properties, the property types, and some additional specifications including regex validation, and/or property type specification.schema-prayers.json: This file defines the prayer schema, the defined properties, the property types, and some additional specifications including regex validation, and/or property type specification.All Cerberus schema files are authored using Cerberus version 1.3.2. This project uses theCerberusPyPi package.The Item DatabaseEach item is represented by Python objects when using the PyPiosrsboxpackage, specifically using Python dataclass objects. Additionally, the data is accessible directly by parsing the raw JSON files. There are three types of objects, or classifications of data, that can be used to represent part of an in-game OSRS item, each outlined in the following subsections.Item PropertiesAnItemPropertiesobject type includes basic item metadata such asid,name,examinetext, storecost,highalchandlowalchvalues andquest_itemassociation. Every item object in the item database has all of these properties. If you are parsing the raw JSON files all of these properties are in the root of the JSON document - so they are not nested. All of the properties available are listed in the table below including the property name, the data types used, a description of the property, if the property is required to be populated, and if the property is nullable (able to be set tonullorNone).PropertyData typeDescriptionRequiredNullableidintegerUnique OSRS item ID number.TrueFalsenamestringThe name of the item.TrueFalselast_updatedstringThe last time (UTC) the item was updated (in ISO8601 date format).TrueFalseincompletebooleanIf the item has incomplete wiki data.TrueFalsemembersbooleanIf the item is a members-only.TrueFalsetradeablebooleanIf the item is tradeable (between players and on the GE).TrueFalsetradeable_on_gebooleanIf the item is tradeable (only on GE).TrueFalsestackablebooleanIf the item is stackable (in inventory).TrueFalsestackedintegerIf the item is stacked, indicated by the stack count.TrueTruenotedbooleanIf the item is noted.TrueFalsenoteablebooleanIf the item is noteable.TrueFalselinked_id_itemintegerThe linked ID of the actual item (if noted/placeholder).TrueTruelinked_id_notedintegerThe linked ID of an item in noted form.TrueTruelinked_id_placeholderintegerThe linked ID of an item in placeholder form.TrueTrueplaceholderbooleanIf the item is a placeholder.TrueFalseequipablebooleanIf the item is equipable (based on right-click menu entry).TrueFalseequipable_by_playerbooleanIf the item is equipable in-game by a player.TrueFalseequipable_weaponbooleanIf the item is an equipable weapon.TrueFalsecostintegerThe store price of an item.TrueFalselowalchintegerThe low alchemy value of the item (cost * 0.4).TrueTruehighalchintegerThe high alchemy value of the item (cost * 0.6).TrueTrueweightfloatThe weight (in kilograms) of the item.TrueTruebuy_limitintegerThe Grand Exchange buy limit of the item.TrueTruequest_itembooleanIf the item is associated with a quest.TrueFalserelease_datestringDate the item was released (in ISO8601 format).TrueTrueduplicatebooleanIf the item is a duplicate.TrueFalseexaminestringThe examine text for the item.TrueTrueiconstringThe item icon (in base64 encoding).TrueFalsewiki_namestringThe OSRS Wiki name for the item.TrueTruewiki_urlstringThe OSRS Wiki URL (possibly including anchor link).TrueTrueequipmentdictThe equipment bonuses of equipable armour/weapons.TrueTrueweapondictThe weapon bonuses including attack speed, type and stance.TrueTrueItem EquipmentMany items in OSRS are equipable, this includes armor, weapons, and otherwearableitems. Any equipable item has additional properties stored as anItemEquipmentobject type - including attributes such asattack_slash,defence_crushandmelee_strengthvalues. TheItemEquipmentobject is nested within anItemProperties. If you are parsing the raw JSON files, this data is nested under theequipmentkey. It is very important to note that not all items in OSRS are equipable. Only items with theequipable_by_playerproperty set totrueare equipable. Theequipableproperty is similar, but this is the raw data extracted from the game cache - and can sometimes be incorrect (not equipable by a player). All of the properties available for equipable items are listed in the table below including the property name, the data types used, a description of the property, if the property is required to be populated, and if the property is nullable (able to be set tonullorNone).PropertyData typeDescriptionRequiredNullableattack_stabintegerThe attack stab bonus of the item.TrueFalseattack_slashintegerThe attack slash bonus of the item.TrueFalseattack_crushintegerThe attack crush bonus of the item.TrueFalseattack_magicintegerThe attack magic bonus of the item.TrueFalseattack_rangedintegerThe attack ranged bonus of the item.TrueFalsedefence_stabintegerThe defence stab bonus of the item.TrueFalsedefence_slashintegerThe defence slash bonus of the item.TrueFalsedefence_crushintegerThe defence crush bonus of the item.TrueFalsedefence_magicintegerThe defence magic bonus of the item.TrueFalsedefence_rangedintegerThe defence ranged bonus of the item.TrueFalsemelee_strengthintegerThe melee strength bonus of the item.TrueFalseranged_strengthintegerThe ranged strength bonus of the item.TrueFalsemagic_damageintegerThe magic damage bonus of the item.TrueFalseprayerintegerThe prayer bonus of the item.TrueFalseslotstringThe equipment slot associated with the item (e.g., head).TrueFalserequirementsdictAn object of requirements {skill: level}.TrueTrueItem WeaponA select number of items in OSRS are equipable weapons. Any equipable item that is a weapon has additional properties stored as anItemWeapontype object including attributes such asattack_speedandweapon_typesvalues. Additionally, each weapon has an array of combat stances associated with it to determine thecombat_style,attack_type,attack_styleand anybonusesor combatexperienceassociation. TheItemWeaponobject is nested within anItemPropertiesobject when using the Python API. If you are parsing the raw JSON files, this data is nested under theweaponkey.  It is very important to note that not all items in OSRS are equipable weapons. Only items with theequipable_weaponproperty set totrueare equipable. All of the properties available for equipable weapons are listed in the table below including the property name, the data types used, a description of the property, if the property is required to be populated, and if the property is nullable (able to be set tonullorNone).PropertyData typeDescriptionRequiredNullableattack_speedintegerThe attack speed of a weapon (in game ticks).TrueFalseweapon_typestringThe weapon classification (e.g., axes)TrueFalsestanceslistAn array of weapon stance information.TrueFalseItem: Python Object ExampleA description of the properties that each item in the database can have is useful, but sometimes it is simpler to provide an example. Below is a full example of an item as loaded in a Python object, specifically theAbyssal whipitem. Since this item is a type of equipment, there is anEquipmentPropertiesobject nested with combat bonuses. Additionally, this item is also a weapon, so there is aWeaponPropertiesobject with extra information. If the item was not equipable, theEquipmentPropertiesproperty would beNoneand theequipable_by_playerwould beFalse. If the item was not a weapon, theWeaponPropertieskey would beNoneand theequipable_weaponwould beFalse.ItemProperties(
    id=4151,
    name='Abyssal whip',
    last_updated='2020-12-27',
    incomplete=False,
    members=True,
    tradeable=True,
    tradeable_on_ge=True,
    stackable=False,
    stacked=None,
    noted=False,
    noteable=True,
    linked_id_item=None,
    linked_id_noted=4152,
    linked_id_placeholder=14032,
    placeholder=False,
    equipable=True,
    equipable_by_player=True,
    equipable_weapon=True,
    cost=120001,
    lowalch=48000,
    highalch=72000,
    weight=0.453,
    buy_limit=70,
    quest_item=False,
    release_date='2005-01-26',
    duplicate=False,
    examine='A weapon from the abyss.',
    icon='iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAABvUlEQVR4Xu2Xv26DMBDG4QEyZECKIkVCKIoyVR26dOrQpUOHDn3/V3F7nL7689kGAo6z9JNuiH1wP+6PIU3zr2Jq3bRVkQ/Y7feBvfcn93o8upfDwT11XQKwOGQMwfYx9O7rcnaf52GEezuFgNdfn4JQ7RjAQojZLAAMcPJbAOH73PcloBTIQiEAG8MB7Pt6MQ+wSW1QAs6Kh1A/NgtnHyKMcZMUCP3AIBw0XcqmgU9qb4W0JwTIwuRAYHETF4FSIMkORjn1xCnjayy8lN/vLVY7TglfvBRGTJpZrpXM+my1f6DhPRdJs8M3nAPibGDseY9hVgHxzbh3chC22dkPQ8EnufddpBgI69Lk3B8hnPrwOsPEw7FYqUzoOsqBUtps8XUASh0bYbxZxUCcJZzCNnjOBGgDDBRD8d4tQAVgRAqEs2jusLOGEhaCgTQTgApLp/s5A0RBGMg3shx2YZb0fZUz9issD4VpsR4PkJ+uYbczJQr94rW7KT3yDJcegLtqeuRlAFa+0bdoeuTxPV2538Ixt1D86Vutr8IR16CSndzfoSpQLIDh09dmscL5lJICMUClw3JKD8tGXiVgfgACr1tEhnw7UAAAAABJRU5ErkJggg==',
    wiki_name='Abyssal whip',
    wiki_url='https://oldschool.runescape.wiki/w/Abyssal_whip',
    equipment=ItemEquipment(
        attack_stab=0,
        attack_slash=82,
        attack_crush=0,
        attack_magic=0,
        attack_ranged=0,
        defence_stab=0,
        defence_slash=0,
        defence_crush=0,
        defence_magic=0,
        defence_ranged=0,
        melee_strength=82,
        ranged_strength=0,
        magic_damage=0,
        prayer=0,
        slot='weapon',
        requirements={'attack': 70}
    ),
    weapon=ItemWeapon(
        attack_speed=4,
        weapon_type='whip',
        stances=[
            {
                'combat_style': 'flick',
                'attack_type': 'slash',
                'attack_style': 'accurate',
                'experience': 'attack',
                'boosts': None
            },
            {
                'combat_style': 'lash',
                'attack_type': 'slash',
                'attack_style': 'controlled',
                'experience': 'shared',
                'boosts': None},
            {
                'combat_style': 'deflect',
                'attack_type': 'slash',
                'attack_style': 'defensive',
                'experience': 'defence',
                'boosts': None
            }
        ]
    )
)Item: JSON ExampleA description of the properties that each item in the database can have is useful, but sometimes it is simpler to provide an example. Below is a full example of an item, specifically theAbyssal whipitem. Since this item is a type of equipment, there is anequipmentkey with combat bonuses. Additionally, this item is also a weapon, so there is aweaponkey with extra information. If the item was not equipable, theequipmentkey would benulland theequipable_by_playerwould befalse. If the item was not a weapon, theweaponkey would benulland theequipable_weaponwould befalse.{
    "id": 4151,
    "name": "Abyssal whip",
    "last_updated": "2020-12-27",
    "incomplete": false,
    "members": true,
    "tradeable": true,
    "tradeable_on_ge": true,
    "stackable": false,
    "stacked": null,
    "noted": false,
    "noteable": true,
    "linked_id_item": null,
    "linked_id_noted": 4152,
    "linked_id_placeholder": 14032,
    "placeholder": false,
    "equipable": true,
    "equipable_by_player": true,
    "equipable_weapon": true,
    "cost": 120001,
    "lowalch": 48000,
    "highalch": 72000,
    "weight": 0.453,
    "buy_limit": 70,
    "quest_item": false,
    "release_date": "2005-01-26",
    "duplicate": false,
    "examine": "A weapon from the abyss.",
    "icon": "iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAABvUlEQVR4Xu2Xv26DMBDG4QEyZECKIkVCKIoyVR26dOrQpUOHDn3/V3F7nL7689kGAo6z9JNuiH1wP+6PIU3zr2Jq3bRVkQ/Y7feBvfcn93o8upfDwT11XQKwOGQMwfYx9O7rcnaf52GEezuFgNdfn4JQ7RjAQojZLAAMcPJbAOH73PcloBTIQiEAG8MB7Pt6MQ+wSW1QAs6Kh1A/NgtnHyKMcZMUCP3AIBw0XcqmgU9qb4W0JwTIwuRAYHETF4FSIMkORjn1xCnjayy8lN/vLVY7TglfvBRGTJpZrpXM+my1f6DhPRdJs8M3nAPibGDseY9hVgHxzbh3chC22dkPQ8EnufddpBgI69Lk3B8hnPrwOsPEw7FYqUzoOsqBUtps8XUASh0bYbxZxUCcJZzCNnjOBGgDDBRD8d4tQAVgRAqEs2jusLOGEhaCgTQTgApLp/s5A0RBGMg3shx2YZb0fZUz9issD4VpsR4PkJ+uYbczJQr94rW7KT3yDJcegLtqeuRlAFa+0bdoeuTxPV2538Ixt1D86Vutr8IR16CSndzfoSpQLIDh09dmscL5lJICMUClw3JKD8tGXiVgfgACr1tEhnw7UAAAAABJRU5ErkJggg==",
    "wiki_name": "Abyssal whip",
    "wiki_url": "https://oldschool.runescape.wiki/w/Abyssal_whip",
    "equipment": {
        "attack_stab": 0,
        "attack_slash": 82,
        "attack_crush": 0,
        "attack_magic": 0,
        "attack_ranged": 0,
        "defence_stab": 0,
        "defence_slash": 0,
        "defence_crush": 0,
        "defence_magic": 0,
        "defence_ranged": 0,
        "melee_strength": 82,
        "ranged_strength": 0,
        "magic_damage": 0,
        "prayer": 0,
        "slot": "weapon",
        "requirements": {
            "attack": 70
        }
    },
    "weapon": {
        "attack_speed": 4,
        "weapon_type": "whip",
        "stances": [
            {
                "combat_style": "flick",
                "attack_type": "slash",
                "attack_style": "accurate",
                "experience": "attack",
                "boosts": null
            },
            {
                "combat_style": "lash",
                "attack_type": "slash",
                "attack_style": "controlled",
                "experience": "shared",
                "boosts": null
            },
            {
                "combat_style": "deflect",
                "attack_type": "slash",
                "attack_style": "defensive",
                "experience": "defence",
                "boosts": null
            }
        ]
    }
}The Monster DatabaseEach monster is represented by Python objects when using the PyPiosrsboxpackage, specifically using Python dataclass objects. Additionally, the data is accessible directly by parsing the raw JSON files. There are two types of objects, or classifications of data, that can be used to represent part of an in-game OSRS monster, each outlined in the following subsections.Monster PropertiesAMonsterPropertiesobject type includes basic monster metadata such asid,name,examinetext,combat_level,attack_speedandhitpointsvalues and slayer association such asslayer_masterswho give this monster as a task. Every monster object in the monster database has all of these properties. If you are parsing the raw JSON files all of these properties are in the root of the JSON document - so they are not nested. All of the properties available are listed in the table below including the property name, the data types used, a description of the property, if the property is required to be populated, and if the property is nullable (able to be set tonullorNone).PropertyData typeDescriptionRequiredNullableidintegerUnique OSRS monster ID number.TrueFalsenamestringThe name of the monster.TrueFalselast_updatedstringThe last time (UTC) the monster was updated (in ISO8601 date format).TrueTrueincompletebooleanIf the monster has incomplete wiki data.TrueFalsemembersbooleanIf the monster is members only, or not.TrueFalserelease_datestringThe release date of the monster (in ISO8601 date format).TrueTruecombat_levelintegerThe combat level of the monster.TrueFalsesizeintegerThe size, in tiles, of the monster.TrueFalsehitpointsintegerThe number of hitpoints a monster has.TrueTruemax_hitintegerThe maximum hit of the monster.TrueTrueattack_typelistThe attack style (e.g., melee, magic, range) of the monster.TrueFalseattack_speedintegerThe attack speed (in game ticks) of the monster.TrueTrueaggressivebooleanIf the monster is aggressive, or not.TrueFalsepoisonousbooleanIf the monster poisons, or notTrueFalsevenomousbooleanIf the monster poisons using venom, or notTrueFalseimmune_poisonbooleanIf the monster is immune to poison, or notTrueFalseimmune_venombooleanIf the monster is immune to venom, or notTrueFalseattributeslistAn array of monster attributes.TrueFalsecategorylistAn array of monster category.TrueFalseslayer_monsterbooleanIf the monster is a potential slayer task.TrueFalseslayer_levelintegerThe slayer level required to kill the monster.TrueTrueslayer_xpfloatThe slayer XP rewarded for a monster kill.TrueTrueslayer_masterslistThe slayer masters who can assign the monster.TrueFalseduplicatebooleanIf the monster is a duplicate.TrueFalseexaminestringThe examine text of the monster.TrueFalsewiki_namestringThe OSRS Wiki name for the monster.TrueFalsewiki_urlstringThe OSRS Wiki URL (possibly including anchor link).TrueFalseattack_levelintegerThe attack level of the monster.TrueFalsestrength_levelintegerThe strength level of the monster.TrueFalsedefence_levelintegerThe defence level of the monster.TrueFalsemagic_levelintegerThe magic level of the monster.TrueFalseranged_levelintegerThe ranged level of the monster.TrueFalseattack_bonusintegerThe attack bonus of the monster.TrueFalsestrength_bonusintegerThe strength bonus of the monster.TrueFalseattack_magicintegerThe magic attack of the monster.TrueFalsemagic_bonusintegerThe magic bonus of the monster.TrueFalseattack_rangedintegerThe ranged attack of the monster.TrueFalseranged_bonusintegerThe ranged bonus of the monster.TrueFalsedefence_stabintegerThe defence stab bonus of the monster.TrueFalsedefence_slashintegerThe defence slash bonus of the monster.TrueFalsedefence_crushintegerThe defence crush bonus of the monster.TrueFalsedefence_magicintegerThe defence magic bonus of the monster.TrueFalsedefence_rangedintegerThe defence ranged bonus of the monster.TrueFalsedropslistAn array of monster drop objects.TrueFalseMonster DropsMost monsters in OSRS drop items when they have been defeated (killed). All monster drops are stored in thedropsproperty in an array containing properties about the item drop. When using the PyPiosrsboxpackage, these drops are represented by a list ofMonsterDropsobject type. When parsing the raw JSON files, the drops are stored in an array, that are nested under thedropskey. The data included with the monster drops are the itemid, itemname, the droprarity, whether the drop isnotedand anydrop_requirements. All of the properties available for item drops are listed in the table below including the property name, the data types used, a description of the property, if the property is required to be populated, and if the property is nullable (able to be set tonullorNone).PropertyData typeDescriptionRequiredNullableidintegerThe ID number of the item drop.TrueFalsenamestringThe name of the item drop.TrueFalsemembersbooleanIf the drop is a members-only item.TrueFalsequantitystringThe quantity of the item drop (integer, comma-separated or range).TrueTruenotedbooleanIf the item drop is noted, or not.TrueFalserarityfloatThe rarity of the item drop (as a float out of 1.0).TrueFalserollsintegerNumber of rolls from the drop.TrueFalseMonster: Python Object ExampleA description of the properties that each monster in the database can have is useful, but sometimes it is simpler to provide an example. Below is a full example of a monster, specifically theAbyssal demonmonster. Please note that the number of itemdropskey data has been reduced to make the data more readable.MonsterProperties(
    id=415,
    name='Abyssal demon',
    last_updated='2020-12-25',
    incomplete=False,
    members=True,
    release_date='2005-01-26',
    combat_level=124,
    size=1,
    hitpoints=150,
    max_hit=8,
    attack_type=['stab'],
    attack_speed=4,
    aggressive=False,
    poisonous=False,
    venomous=False,
    immune_poison=False,
    immune_venom=False,
    attributes=['demon'],
    category=['abyssal demon'],
    slayer_monster=True,
    slayer_level=85,
    slayer_xp=150.0,
    slayer_masters=[
        'vannaka',
        'chaeldar',
        'konar',
        'nieve',
        'duradel'
    ],
    duplicate=False,
    examine='A denizen of the Abyss!',
    wiki_name='Abyssal demon (Standard)',
    wiki_url='https://oldschool.runescape.wiki/w/Abyssal_demon#Standard',
    attack_level=97,
    strength_level=67,
    defence_level=135,
    magic_level=1,
    ranged_level=1,
    attack_bonus=0,
    strength_bonus=0,
    attack_magic=0,
    magic_bonus=0,
    attack_ranged=0,
    ranged_bonus=0,
    defence_stab=20,
    defence_slash=20,
    defence_crush=20,
    defence_magic=0,
    defence_ranged=20,
    drops=
    [
        MonsterDrop(
            id=592,
            name='Ashes',
            members=False,
            quantity='1',
            noted=False,
            rarity=1.0,
            rolls=1
        ),
        ...
        MonsterDrop(
            id=4151,
            name='Abyssal whip',
            members=True,
            quantity='1',
            noted=False,
            rarity=0.001953125,
            rolls=1
        )
    ]
)Monster: JSON ExampleA description of the properties that each monster in the database can have is useful, but sometimes it is simpler to provide an example. Below is a full example of a monster, specifically theAbyssal demonmonster. Please note that the number of itemdropskey data has been reduced to make the data more readable.{
    "id": 415,
    "name": "Abyssal demon",
    "last_updated": "2020-12-25",
    "incomplete": false,
    "members": true,
    "release_date": "2005-01-26",
    "combat_level": 124,
    "size": 1,
    "hitpoints": 150,
    "max_hit": 8,
    "attack_type": [
        "stab"
    ],
    "attack_speed": 4,
    "aggressive": false,
    "poisonous": false,
    "venomous": false,
    "immune_poison": false,
    "immune_venom": false,
    "attributes": [
        "demon"
    ],
    "category": [
        "abyssal demon"
    ],
    "slayer_monster": true,
    "slayer_level": 85,
    "slayer_xp": 150.0,
    "slayer_masters": [
        "vannaka",
        "chaeldar",
        "konar",
        "nieve",
        "duradel"
    ],
    "duplicate": false,
    "examine": "A denizen of the Abyss!",
    "wiki_name": "Abyssal demon (Standard)",
    "wiki_url": "https://oldschool.runescape.wiki/w/Abyssal_demon#Standard",
    "attack_level": 97,
    "strength_level": 67,
    "defence_level": 135,
    "magic_level": 1,
    "ranged_level": 1,
    "attack_bonus": 0,
    "strength_bonus": 0,
    "attack_magic": 0,
    "magic_bonus": 0,
    "attack_ranged": 0,
    "ranged_bonus": 0,
    "defence_stab": 20,
    "defence_slash": 20,
    "defence_crush": 20,
    "defence_magic": 0,
    "defence_ranged": 20,
    "drops": [
        {
            "id": 1623,
            "name": "Uncut sapphire",
            "members": true,
            "quantity": "1",
            "noted": false,
            "rarity": 0.009765625,
            "rolls": 1
        },
        ...
        {
            "id": 4151,
            "name": "Abyssal whip",
            "members": true,
            "quantity": "1",
            "noted": false,
            "rarity": 0.001953125,
            "rolls": 1
        }
    ]
}The Prayer DatabaseEach prayer is represented by Python objects when using the PyPiosrsboxpackage, specifically using Python dataclass objects Additionally, the data is accessible directly by parsing the raw JSON files. All prayer data is stored in a single object to represent the properties of an in-game OSRS prayer, which is outlined in the following subsection.Prayer PropertiesAPrayerPropertiesobject type includes basic prayer metadata such asid,name,descriptiontext,drain_per_minute,requirementsandbonusesvalues. Every prayer object in the prayer database has all of these properties. If you are parsing the raw JSON files all of these properties are in the root of the JSON document - so they are not nested. All of the properties available are listed in the table below including the property name, the data types used, a description of the property, if the property is required to be populated, and if the property is nullable (able to be set tonullorNone).PropertyData typeDescriptionRequiredNullableidintegerUnique prayer ID number.TrueFalsenamestringThe name of the prayer.TrueFalsemembersbooleanIf the prayer is members-only.TrueFalsedescriptionstringThe prayer description (as show in-game).TrueFalsedrain_per_minutefloatThe prayer point drain rate per minute.TrueFalsewiki_urlstringThe OSRS Wiki URL.TrueFalserequirementsdictThe stat requirements to use the prayer.TrueFalsebonusesdictThe bonuses a prayer provides.TrueFalseiconstringThe prayer icon.TrueFalsePrayer: Python Object ExampleA description of the properties that each prayer in the database can have is useful, but sometimes it is simpler to provide an example. Below is a full example of a prayer, specifically theRigourprayer, as loaded in theosrsboxPyPi Python package.PrayerProperties(
    id=28,
    name='Rigour',
    members=True,
    description='Increases your Ranged attack by 20% and damage by 23%, and your defence by 25%.',
    drain_per_minute=40.0,
    wiki_url='https://oldschool.runescape.wiki/w/Rigour',
    requirements={'prayer': 74, 'defence': 70},
    bonuses={'ranged': 20, 'ranged_strength': 25, 'defence': 23}, 
    icon='iVBORw0KGgoAAAANSUhEUgAAABwAAAAYCAYAAADpnJ2CAAABMklEQVR42rWW3Q0CIRCEjwJ8tgBrMPHZFmzAIny0gOvA+izAGjCYcMwNswucSrLJHT/7McvyM02bSojTfwo7Tv8h3h/PqKFfTSTEYqUuwTRQ9R8Erp0XdV79ANBWw7Y/7Mw2W7mhqDSGxTkC0vf5eqqg2I99CKAOVXZ0mY+Lw/SdgFjHk7DD3xE+hLZsINR2+BQMlXG7Gu8Cc2jyt4KketWWw22HWYTUWqcMsYzVcmIBMFQZqBSxmvl1+xj2Z7XdQByQHbKSDET1qNCB1uuHs1ZhY2NgQ2W9fpbCEaAT0jpLeZAKaQvmJI3OUs5QhHoZqoDuWcr7jDe4lURqL3bcIOsTxwJbxmvdcV0FeQPgPmydpZ3KJvcg904bVNi+GwegCPYgG2D1g6nXfvCu4cdRy9rlDXGzl98mKbMMAAAAAElFTkSuQmCC'
)Prayer: JSON ExampleA description of the properties that each prayer in the database can have is useful, but sometimes it is simpler to provide an example. Below is a full example of a prayer, specifically theRigourprayer, as a JSON object."id": 28,
    "name": "Rigour",
    "members": true,
    "description": "Increases your Ranged attack by 20% and damage by 23%, and your defence by 25%.",
    "drain_per_minute": 40.0,
    "wiki_url": "https://oldschool.runescape.wiki/w/Rigour",
    "requirements": {
        "prayer": 74,
        "defence": 70
    },
    "bonuses": {
        "ranged": 20,
        "ranged_strength": 25,
        "defence": 23
    },
    "icon": "iVBORw0KGgoAAAANSUhEUgAAABwAAAAYCAYAAADpnJ2CAAABMklEQVR42rWW3Q0CIRCEjwJ8tgBrMPHZFmzAIny0gOvA+izAGjCYcMwNswucSrLJHT/7McvyM02bSojTfwo7Tv8h3h/PqKFfTSTEYqUuwTRQ9R8Erp0XdV79ANBWw7Y/7Mw2W7mhqDSGxTkC0vf5eqqg2I99CKAOVXZ0mY+Lw/SdgFjHk7DD3xE+hLZsINR2+BQMlXG7Gu8Cc2jyt4KketWWw22HWYTUWqcMsYzVcmIBMFQZqBSxmvl1+xj2Z7XdQByQHbKSDET1qNCB1uuHs1ZhY2NgQ2W9fpbCEaAT0jpLeZAKaQvmJI3OUs5QhHoZqoDuWcr7jDe4lURqL3bcIOsTxwJbxmvdcV0FeQPgPmydpZ3KJvcg904bVNi+GwegCPYgG2D1g6nXfvCu4cdRy9rlDXGzl98mKbMMAAAAAElFTkSuQmCC"
}Project ContributionThis project would thoroughly benefit from contributions from additional developers. Please feel free to submit a pull request if you have code that you wish to contribute - I would thoroughly appreciate the helping hand. For any code contributions, the best method is toopen a new GitHub pull requestin the project repository. Also, feel free to contact me (e.g., on the Discord server) if you wish to discuss contribution before making a pull request. If you are not a software developer and want to contribute, even something as small asStaringthis repository really makes my day and keeps me motivated!Crowd Sourcing Item Skill RequirementsA really manual part of the item database is theitem.equipment.requirementsdata. So far, I have manually populated this data... for over 3,500 items! To keep this project alive, I have stopped adding in this data (as it takes a lot of time). Here is a summary of how the item skill requirements work:All item requirements are stored in theskill-requirements.jsonfileThey have a structure of:"item_id": {
        "skill_name": integer
    },For example, the Abyssal whip item:"4151": {
        "attack": 70
    },For theskill_name, theschema-items.jsonfile has a list of the allowed values - to help get the correct skill name. For example,runecraftand notrunecrafting!With some community help (by crowd sourcing) we could keep this data point fresh. If you find an error or want to add in a requirement, and want to contribute, here are the best ways to help:GitHub PR: Clone the project repo, make changes toskill-requirements.json, submit PRGitHub Issue: Submit an issue with the fix. It would really help me if you put the request in the correct JSON format as described above!FYI - there is currently no quest-associated requirements. This would be a great addition to the project, but seems to be a very complex thing to add.Additional Project InformationThis section contains additional information about the osrsbox-db project. For detailed information about the project see theosrsbox.comwebsite for the official project page, and theDatabasetag to find blog posts about the project:https://www.osrsbox.com/projects/osrsbox-db/https://www.osrsbox.com/blog/tags/Database/Project FeedbackI would thoroughly appreciate any feedback regarding the osrsbox-db project, especially problems with the inaccuracies of the data provided. So if you notice any problem with the accuracy of item property data, could you please let me know. The same goes for any discovered bugs, or if you have a specific feature request. The best method is toopen a new Github issuein the project repository.Project LicenseThe osrsbox-db project is released under the GNU General Public License version 3 as published by the Free Software Foundation. You can read theLICENSEfile for the full license, check theGNU GPLpage for additional information, or check thetl;drLegaldocumentation for the license explained in simple English. The GPL license is specified for all source code contained in this project. Other content is specified under GPL if not listed in theExceptions to GPLbelow.Exceptions to GPLOld School RuneScape (OSRS) content and materials are trademarks and copyrights of JaGeX or its licensors. All rights reserved. OSRSBox and the osrsbox-db project is not associated or affiliated with JaGeX or its licensors.Additional data to help build this project is sourced from theOSRS Wiki. This primarily includes item and monster metadata that is not available in the OSRS cache. As specified by theWeird Gloop Copyrightpage, this content is licensed under CC BY-NC-SA 3.0 -Attribution-NonCommercial-ShareAlike 3.0 Unportedlicense.Project AttributionThe osrsbox-db project is a labor of love. I put a huge amount of time and effort into the project, and I want people to use it. That is the entire reason for its existence. I am not too fussed about attribution guidelines... but if you want to use the project please adhere to the licenses used. Please feel free to link to this repository or myOSRSBox websiteif you use it in your project - mainly so others can find it, and hopefully use it too!