Add mapFeature field to link quest objectives to map nodes#257
Add mapFeature field to link quest objectives to map nodes#257kirillsst wants to merge 2 commits intoRaidTheory:mainfrom
Conversation
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.
|
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 ?? |
|
The |
|
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 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.
|
Updated the structure based on your feedback — translations moved into |
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. |
|
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 |
Summary
Adds an optional
mapFeaturefield 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.jsonquest, linking two objectives to their corresponding Spaceport map features: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=52Next steps
If this approach looks good, the same field can be added to other quests that reference specific map locations.
Closes #99