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

Add quest schema #133

Merged
merged 2 commits into from
Jul 18, 2019
Merged

Add quest schema #133

merged 2 commits into from
Jul 18, 2019

Conversation

osrsbox
Copy link
Owner

@osrsbox osrsbox commented Jul 16, 2019

The quest schema has been discussed in-depth in #115. This PR moves to add the authored and revised JSON quest schema into the master branch to allow others to more easily work towards adding in quest data into the project.

This PR also adds a pytest module named test/test_quests_database.py. The test can be run using: python -m pytest test/test_quests_database.py when in the root directory of the project. The test is disabled by default so that the project Travis build does not fail. To enable the test, temporarily remove or comment the following line: @pytest.mark.skip(reason="Skipped: The quest data is not currently populated.")

A final summary of a semi-populated OSRS quest in JSON format in provided below:

{
    "id": 136,
    "name": "Dragon Slayer 2",
    "type": "quest",
    "members": true,
    "release_date": "2018-01-04",
    "series": [ "Dragonkin" ],
    "developers": [ "Mod Ed" ],
    "start_point": "Speak to Alec Kincade outside the Myths' Guild.",
    "difficulty": "grandmaster",
    "length": "very_long",
    "description": "Some long winded description of the quest.",
    "url_quest_image": "https://oldschool.runescape.wiki/w/File:Dragon Slayer II.png"
    "url_quest_guide_full": "https://oldschool.runescape.wiki/w/Dragon_Slayer_II",
    "url_quest_guide_quick": "https://oldschool.runescape.wiki/w/Dragon_Slayer_II/Quick_guide",
    "required_for_completing": [],
    "quest_trivia": [
        "A log in screen competition was held...",
        "The first player to complete the quest..."
    ]
    "requirements": {
        "quest_points": 200,
        "quests": [
            50,
            126,
            87,
            117,
            71,
            132,
            131
        ],
        "skills": [
            {  
                "skill": "magic",
                "level": 75,
                "boostable": false
            },
            {
                "skill": "smithing",
                "level": 70,
                "boostable": false
            },
            {
                "skill": "mining",
                "level": 68,
                "boostable": false
            }
        ],
        "items_required": [
            {
                "id": 11920,
                "quantity": 1
            },
            {
                "id": 6739,
                "quantity": 1
            },
            {
                "id": 8778,
                "quantity": 8
            }
        ],
        "items_recommended": [
            {
                "id": 12625,
                "quantity": 4
            },
            {
                "id": 12931,
                "quantity": 1
            }
        ],
        "enemies_to_defeat": [
            8059,
            8056,
            8057
        ]
    },
    "rewards": {
        "quest_points": 5,
        "coins": 0,
        "items": [
            {
                "id": 21880,
                "quantity": 15
            },
            {
                "id": 21892,
                "quantity": 1
            }
        ],
        "skills": [
            {  
                "skill": "smithing",
                "xp": 25000
            },
            {
                "skill": "mining",
                "xp": 18000
            },
            {
                "skill": "agility",
                "xp": 15000
            }
        ],
        "misc": [
            "Ability to speak to cats without the Catspeak amulet.",
            "Access to the Myths' Guild.",
            "Lots of other *stuff*"
        ]
    }
}

@osrsbox osrsbox added enhancement tests Concerning any code testing quests Anything to do with the quest data, API or builder labels Jul 16, 2019
@osrsbox osrsbox self-assigned this Jul 16, 2019
@osrsbox osrsbox merged commit 3b67e3e into master Jul 18, 2019
@osrsbox osrsbox deleted the quest-schema branch July 19, 2019 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement quests Anything to do with the quest data, API or builder tests Concerning any code testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant