Skip to content

Add mapFeature field to link quest objectives to map nodes#257

Open
kirillsst wants to merge 2 commits intoRaidTheory:mainfrom
kirillsst:feature/quest-map-linking
Open

Add mapFeature field to link quest objectives to map nodes#257
kirillsst wants to merge 2 commits intoRaidTheory:mainfrom
kirillsst:feature/quest-map-linking

Conversation

@kirillsst
Copy link
Copy Markdown

Summary

Adds an optional mapFeature field to quest objectives, enabling direct linking from quest pages to interactive map features.

This is a proof-of-concept implementation for a_lay_of_the_land.json quest, linking two objectives to their corresponding Spaceport map features:

  • "Find the shipping notes in the foreman's office" → feature 52
  • "Locate the scanners in the Flight Control office of Control Tower A6" → feature 53

Format

The field is optional and only added to objectives that have a corresponding map location:

{
  "en": "Find the shipping notes in the foreman's office",
  "mapFeature": { "map": "the_spaceport", "feature": 52 },
  ...
}

This allows the frontend to construct links like:
/api/maps/the-spaceport?feature=52

Next steps

If this approach looks good, the same field can be added to other quests that reference specific map locations.

Closes #99

Add optional mapFeature field to objectives in a_lay_of_the_land.json
as a proof of concept for linking quest objectives to interactive map
features. This addresses RaidTheory#99 by enabling navigation from quest pages
to the corresponding map nodes.
@baschny
Copy link
Copy Markdown
Contributor

baschny commented Feb 27, 2026

I find the idea cool! I would not mix the map links in mids of the translations. There needs to be a structure here, like:

  "objectives": [
    ...
    {
      "description": {
        "da": "Find fragtsedlerne på formandens kontor",
        "de": "Finde die Versandnotizen im Büro des Vorarbeiters.",
        "en": "Find the shipping notes in the foreman’s office",
        ...
      },
      "mapFeature": {
        "map": "the_spaceport",
        "feature": 52
      }
  }

That of course requires a change in the structure and people using will have to adapt to that, but I think currently there is no flexibility inside each step of the objectives, and we might want to add more data to each step in future (i.e. the "Deliver" => "itemId" etc).

What do you think @mattmarcin ??

@baschny
Copy link
Copy Markdown
Contributor

baschny commented Feb 27, 2026

The mapFeature might even be an array, there might be multiple locations for one objective.

@uilson
Copy link
Copy Markdown
Contributor

uilson commented Feb 28, 2026

dont forget to account for different parts of the mission in different maps too, i can see this becoming very convoluted with all the data.

@baschny
Copy link
Copy Markdown
Contributor

baschny commented Mar 2, 2026

dont forget to account for different parts of the mission in different maps too, i can see this becoming very convoluted with all the data.

Thats why the mapFeature is
a) part of individual "objectives" (and not the whole quest")
b) is an array
c) each array item has a "map" (dam, spaceport etc) and a "feature" (the POI itself). So that multiple objectives can have multiple of these things.

Maybe "feature" should even be optional, because there might be objectives which just require to do certain thing on a map with no specific POI.

So basically:

  "objectives": [
    ...
    {
      "description": {
        "da": "Find fragtsedlerne på formandens kontor",
        "de": "Finde die Versandnotizen im Büro des Vorarbeiters.",
        "en": "Find the shipping notes in the foreman’s office",
        ...
      },
      "mapFeature": [
        {
          "map": "the_spaceport",
          "feature": 52
        },
        {
          ...
        },
        ]

  }

Move translations into a description object and make mapFeature
an array on each objective, supporting multiple map locations
per step. Addresses review feedback on RaidTheory#257.
@kirillsst
Copy link
Copy Markdown
Author

Updated the structure based on your feedback — translations moved into description, mapFeature is now an array with optional feature. Kept it as a single quest for now, can expand once you guys are happy with the approach.

@uilson
Copy link
Copy Markdown
Contributor

uilson commented Mar 3, 2026

  "mapFeature": [
    {
      "map": "the_spaceport",
      "feature": 52
    },
    {
      ...
    },
    ]

yeh this was want i was referring to, although I didn't express my self clearly.

There are single objectives that can be done on multiple maps and having "mapFeature" be an array makes more sense data structuring wise.

@baschny
Copy link
Copy Markdown
Contributor

baschny commented Mar 3, 2026

Brought this to @mattmarcin to discuss if this would be ok. Keep in mind that people using the data will have to adapt to the new structure, as this is not backwards compatible. Opening up the objectives items to other properties is a good opportunity for the future, so I think it's worth it.

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.

Let quest objectives link to the associated map node

3 participants