Guild Wars 2 Wiki talk:Projects/NPC Coordinates

From Guild Wars 2 Wiki
Jump to: navigation, search

New possible map template/widget[edit]

moved from User talk:Chieftain Alex#New possible map template/widget

Hey, so following the previous reddit thread about wiki suggestions I was wondering if it was possible to make a map with a marker (and maybe a route from nearest WP?) given GW2 gps coordinates. Since a program like GW2 navi offers an easy way to find your current placement, it might be possible to make an even more accurate "NPC is here" section. So, since you "fucking love maps", I figured making this template might be something you enjoy? -Darqam 16:15, 16 December 2016 (UTC)

Alex is 'afk' until January 2nd of 2017, so you might have to wait a bit for him to reply. Feel free to make yourself comfortable. —Ventriloquist 21:08, 16 December 2016 (UTC)
I remembered seeing that after posting it. Regardless though I don't think anyone else would be comfortable with this task so it goes to him anyway. If I waited, I'd just forget. *pulls up a chair and sits in Chieftain's driveway* -Darqam 21:23, 16 December 2016 (UTC)
Doesn't the German wiki do this already/smiley had a sandbox suggestion with this on the German wiki. Maybe that was for poi location markers, not npcs. I'm not sure that we'd want to load a map on each npc page, but we could link to a map on a separate page to highlight the NPC's location. -217.43.191.90 13:20, 17 December 2016 (UTC)
Looking at the german wiki, it seems they have a manual file/map for each npc location. I imagine that isn't a bad idea either but would be a different task. I agree that it might be better to have the map on a separate page if it's going to have to load the full tyria map (which I guess it will need to if it's automated). The question is though, is it better to have it automated through user given gps coordinates, or just make a map manually in the first place. At this point I'm honestly not sure which of the 2 is the better/easier option. -Darqam 17:00, 17 December 2016 (UTC)
https://wiki.guildwars2.com/index.php?title=Guild_Wars_2_Wiki:Sandbox&oldid=1337678 -217.43.73.148 13:51, 18 December 2016 (UTC)
Cool! That actually ends up being much more fluid than I expected it to be. I guess when you don't load WPs, POIs, or even the whole map it's actually quick. The only extra thing I can think about is, would it be possible to have the base floor as default, but if needed be able to say that the npc is on floor -/+ 1 (say in the grove)? There's a few things I don't quite get with the preview code (notably how the hell you get {x}, {y}, and {z}; but running it on scratchpad tells me that it works.
I'll start gathering gps coords for npcs I encounter in game (with their map location image) in order to get a starting point. After I get a good batch of them, which will probably take a few days, I might want to run a trial run of this on mainspace pages. If it still works cleanly and people (i.e not wiki editors) find it useful, then I might start a project page for it as well since getting all npcs by myself would be... silly. I also imagine that NPCs that move will not get a map, and that's their own damn fault. -Darqam 14:55, 18 December 2016 (UTC)
We would spec the x,y in the infobox. X,y would then be passed to a wrapper template, whose entire content would be {{#Widget:NPC infobox map|x={{{x}}}|y={{{y}}}}}. Specifying the floor or continent is a possible option. -217.43.73.148 20:06, 18 December 2016 (UTC)
(Reset indent)
Okay initial version visible on Aesthetician Kristina. I don't have GW2 here, so I made the coordinates up. Probably more fun to test on an NPC in the Grove, where we can test map-x, map-y and map-floor. -Chieftain AlexUser Chieftain Alex sig.png 13:26, 20 December 2016 (UTC)
Hum... the marker is showing up as a broken image link on my end, both in chrome and FF. I also have a few coords User:Darqam/sandbox1, and will grab some from the grove today then. Also, for the infobox, the "map-floor" value, what words/numbers do we need to use? "basement", "floor 0", "One level closest to hell"? I imagine it's -1 to 2, and if that's the case it might be worth adding that documentation to the infobox template since that is not intuitive at all I believe. -Darqam 16:49, 20 December 2016 (UTC)
Aaaaaaaaand, I just noticed the documentation on Template:NPC infobox map. So in the end it might just be worthwile to copy-paste that. -Darqam 16:50, 20 December 2016 (UTC)
Interesting - the preview code in the sandbox showed the right marker, bit it is indeed broken in the widget version. Maybe I haven't included the correct CSS file. -149.254.235.20 17:23, 20 December 2016 (UTC)
Uploaded a local file, should be working okay now. -Chieftain AlexUser Chieftain Alex sig.png 11:29, 21 December 2016 (UTC)
Thanks for the work! I've got quite a few minor NPCs with locations figured out in the Grove, and a few other places. I'll start working on those, and then... THE WORLD!... well, will see. -Darqam 14:17, 21 December 2016 (UTC)
Hum, I think that the "floor" component doesn't work. You can check Faoi and see that the floor does nothing (I think). As a hint, she should be 1 floor down from the main floor. -Darqam 15:26, 21 December 2016 (UTC)
Don't worry about specifying the floor if it is already 1, but I named the parameter "map-floor" -217.43.73.148 15:38, 21 December 2016 (UTC)

(Reset indent) derp, yeah if things are called map-x, and map-y; I should have thought of map-floor. Thanks. -Darqam 15:50, 21 December 2016 (UTC)

I'll spam your talk page a bit more. Do you think there would be an easy (or at least clear) way of indicating to a wiki user which floor the map is showing? Not everyone might notice they are looking at the basement instead of the main floor. Maybe changing the map text from "Interactive map" to "Interactive map <Floor>"? -Darqam 16:14, 21 December 2016 (UTC)
Go for it. (spamwise)
Floor labels sounds like a good idea. How about you play around with the floor label text on {{Infobox map}} until you're happy? (the alternative would be allowing users to spec their own custom floor label but we'd surrender any conformity) -Chieftain AlexUser Chieftain Alex sig.png 19:51, 21 December 2016 (UTC)
So far what you did seems nice to me. I'm not very good at imagining pretty things, but it seems to convey the message properly on the pages I've already added the location to. Of course the Grove NPCs are kinda weird since "ground" is actually down one floor... but that's because the grove is weird. The only thing I don't know about, is would the text like "upper floor" should be capitalized. Would that be incorrect?
If anyone else has opinions to make it nicer, I'd say that would be fine as well. My aesthetics side is not very strong. -Darqam 20:04, 21 December 2016 (UTC)
I'd capitalise the floor orientation in the parentheses and switch out the marker for something that's more in line with the wiki and the game; i.e. File:Event Mark.png. Also, would it be possible to have that map show the nearest waypoints or other additional points of orientation? That said, nifty work! User Incarnazeus Signature.pngtalk 20:26, 21 December 2016 (UTC)
I made the capitalization changes, and also made this edit to change the floor names to in-game names (I think these are almost universal?). I do think the suggestions from Inc are good to have, but would it be possible to render few enough wp/hearts/pois to not slow down the map load time? I really think the map should stay quick to load. -Darqam 03:20, 22 December 2016 (UTC)

Coordinates format, moving NPCs and other map objects[edit]

Since we get the coordinates in the format [12345,54321] would it be easier to have a property "coordinates = [123,321]" and then use #explode to get the numbers out of it? Z can default to 1 unless stated otherwise, EG: [12345,54321,-1].

For moving NPCs we can make chain coordinates quite easily on GW2Navi or GW2Timer (double-click to add points to the chain). http://gw2timer.com/[[30014,12434],[30133,12469],[30144,12564]] Example. Is it possible to apply this to this project?

Waypoints and points of interest may not need a map of their own but having that data can help scale the NPC maps to include the nearest waypoint or PoI. J.Tesla (talk) 23:40, 25 December 2016 (UTC)

This would have to be asked to Chieftain Alex to be honest. I went with the format of template he gave, but yeah there would be nothing wrong with assuming a base form of [x,y,z] with z being default=1. Would make the process faster and a bit more fluid.
With regards to the chain, I do like the idea, not sure how easy that is to implement with the map widget... -Darqam 23:43, 25 December 2016 (UTC)
edit: Actually, if you feel comfortable enough, you could try to change the template: Template:NPC infobox map to that format. Me tinkering with it would probably be a painstaking long process. If you do manage to change it to that format, I can easily go over my previous edits with a bot and quickly change them to the new format, it wouldn't be too big of a time loss. -Darqam 23:47, 25 December 2016 (UTC)
I've modified {{NPC infobox}} for now. It will accept "[12345,54321]" to "[12345,54321,1,1]" where the 4th value is the continent. It'll also accept "12345,54321" but I'd advise keeping the square brackets on. Once the map-x,map-y and map-floor parameters are no longer used I can clean it up a bit more. Right now it'll look for "coordinates =" first and the originals after. J.Tesla (talk) 02:00, 26 December 2016 (UTC)
Alright, I've converted everything to the new format. Thank you so much for thinking about this and most of all implementing it in. This way will be much easier and quicker to proceed with.-Darqam 02:44, 26 December 2016 (UTC)

Questions[edit]

Why are we changing this from map-x, map-y, and map-floor to a arbitrary coordinates parameter in NPC infobox and NPC infobox map? That makes everything harder rather than easier. And why are these changes being discussed in a project instead of on {{NPC infobox}} or Guild Wars 2 Wiki:NPC formatting? As much as I love Alex's talk page and the 50 different map widgets we have now, having to find User_talk:Chieftain_Alex#New_possible_map_template.2Fwidget for why we have a specific widget and template for the NPC infobox isn't fun. Makes it hard to follow discussion on changes.

We currently only track the position of an NPC for an area. What are these coordinates referring to? We do allow listing multiple areas for NPCs. What I've suggested doing is using the initial or starting position of the NPC (like event NPCs) since that's the most likely way players will find the NPC, so the coordinates can be for that. Having coordinates would make no sense for general NPCs that have tons of locations. It would be more sensible for the NPC infobox to have a best-effort set of coordinates for NPCs with a single, fixed position and don't try to address every location of an NPC in the world. Which seems to be what we want to do, if we're using that for {{NPC infobox map}} to show the NPC's position.

If you want to create multiple coordinates for some reason, do it in a wiki template instead of some array notation:

{{coordinate|x=1|y=2|floor=1}}
{{coordinate|3|4}}
coordinates = {{coordinate|x=1|y=2|floor=1}}
              {{coordinate|3|4}}

None of this has been described in the project or documented in the template, but we've already added coordinates to the infobox. The wiki doesn't have a way to express an NPC being in multiple locations yet, although we've discussed it somewhat. We'd also like to use the Geographic coordinate property type for storing coordinates in SMW, where matching that syntax would make more sense. I'd hope to get this more refined before we start adding map coordinates to hundreds of NPC pages.--Relyk ~ talk < 03:30, 31 December 2016 (UTC)

At the moment, these is no way that I know of to make this show a chain of movements (like for example what J.Tesla showed above). I would like to have that for sure but have no clue how to, so for NPCs that move, I have so far not done aything with NPCs which moved around significantly.
As for the change to [12345, 54321], it was done since both GW2Navi and GW2Timer report the coordinates (taken from the map API I believe) in this way. As there is no other app doing this I think, it made sense to cater the template to the easiest method of recording this information.
No this isn't yet in the NPC template since I haven't gotten around to that (and hadn't thought about it). I think I had added it to NPC formatting guide, but not the template. If changes need to be made, I would be more than happy to do so. I've stated often that I'm not a great person to think of nice/pretty/efficient ideas, so any help in those territories are welcome.
For now, I will stop recording coordinates until you are happy this issue can be resolved and continued. -Darqam 03:40, 31 December 2016 (UTC)
The api and tools serializes data in JSON, but that doesn't mean dump JSON in our templates. We can have tools that can do the correct translation. For example, we can collect coordinates from the tools for the relevant NPCs in this project and then translate that to the NPC infobox.--Relyk ~ talk < 04:16, 31 December 2016 (UTC)
Sure, the format can be anything we want it to be. If another format is what it should be then it can be swapped to it. The reason why the current one was chosen was that J.Tesla and I did not see a reason why not to change it into this format. On my end, it simply means changing what I put into my notepad regex, so I personally really don't care. I would, however, like if we could keep it simple to use/input for any users. If we return to the previous version; or something similar to it, so be it. It was fairly simple to use, just slightly longer to format. -Darqam 04:27, 31 December 2016 (UTC)
It’s easier to copy/paste from the map tools and it will be compatible when support for chain coordinates are added in the form of [[123,321],[456,654],[789,987]]. We don’t need to make a new format for the coordinates to make the template look pretty. If the geographic coordinate property type can handle coordinates on a 2D plane and multiple coordinates then its fine otherwise we can create a new property. J.Tesla (talk) 12:23, 31 December 2016 (UTC)
If we do go down the "path" of wanting to document paths (hurr hurr pun #1 for 2017), i admit it does make sense to specify the coordinate as a pair. My current proposal is located on Widget:Test / User:Chieftain Alex/sandbox&oldid=1343296. Obviously formatting is still up to be changed. -Chieftain AlexUser Chieftain Alex sig.png 21:20, 1 January 2017 (UTC)
(Edit conflict) We can show NPC pathing on a map on an article, but that definitely won't be in the infobox. I'm not sure what you mean by new format for making the template look pretty, considering that's exactly what you did. It wouldn't be hard to create a form/widget to copypaste JSON coordinates into wikicode or simply copypaste JSON coordinates and do the conversion all at once later.--Relyk ~ talk < 21:31, 1 January 2017 (UTC)
Are there any significant NPCs who have a path around outposts other than the Tour Guide/Bounty targets? (those are the only ones I could think of) - most already have jpg maps anyway.
If there aren't, maybe it's a moot point and we can just decide upon the format for x and y. -Chieftain AlexUser Chieftain Alex sig.png 22:39, 1 January 2017 (UTC)
I'm not sure if these NPCs are "significant" but I've already come across a few that move around quite a bit. Notably : Captain Bren walks all over the housing area, Gamarien does a long trek in the swamps for event, Merchant Remi and Merchant Trundle continuously walk along a road. There is also Warden Deena and Warden Elye which only exist during events, and have a long walk after it finishes (perhaps when it starts too). This was only for Caledon forest, but I imagine there are more event/moving NPCs like that. -Darqam 22:45, 1 January 2017 (UTC)
We may have some confusion in regards to the format of the coordinates. While they are written as they would appear in JSON they are just a string. The {{NPC infobox map}} template doesn’t convert JSON into wikicode, it takes that string and extracts the numbers from it. We get the coordinates in the format of “[123,321]” and we copy it straight into the infobox. If we had to write in a new format then we would have to do that conversion ourselves every time. As for other uses of the path: meta events, dungeon (explorable/story), guild races, jumping puzzles, any chest or diving spot or achievement location that’s off the beaten path that will need directions to reach. J.Tesla (talk) 23:59, 1 January 2017 (UTC)
There was no confusion, you wrote wikicode using the string parser functions to de-serialize the JSON array. That is a pain in the ass to work with and not fun to look at, in particular because you lose any context for what value refers to x, y, level, and so on. It's a poor way to write the code. We have already wrote wikicode elsewhere that does the exact same thing, like {{skill fact}}, that doesn't require parsing a JSON array with string functions. I was looking for a better reason than "Because it seems like a good idea" if we're going to dump output (in whatever format) from tools directly into our templates.--Relyk ~ talk < 05:23, 6 January 2017 (UTC)
Continued below

(Reset indent) Since the issue seems to revolve around formatting (or at the very least something which is resolved around formatting) I will resume recording the coordinates. If a change needs to be done in the future, I will run through my entries with a bot to adjust them accordingly. I do not mean to dismiss the possible issue but also wish to continue with the project.-Darqam 22:14, 2 January 2017 (UTC)

I've made a few changes:
  • I've taken the current format and added the option of chain coordinates for paths, these appear as white circles.
  • Marker changed to orange circle as requested.
  • Added a single marker for the closest waypoint (which has a chatlink on it).
I considered plotting all waypoints, but this seems slow (if anyone has a better method of finding the closest waypoint marker feel free to propose it). -Chieftain AlexUser Chieftain Alex sig.png 20:55, 5 January 2017 (UTC)
After doing the path with a few npcs, I think I would prefer if the path didn't auto-complete itself back to the initial point. I may be wrong, but at the moment it seems like most NPCs will walk along a specific path to go somewhere, and then walk back along the same one to go back. The way it is now, I can still get it to work, but forces lots of coordinate inputs (see for example Outrunner Jankott'cha). -Darqam 22:10, 5 January 2017 (UTC)
I've changed polygon to polyline (no closed loops) - can you now remove the second half of the loop and see if that looks how you want it to? -Chieftain AlexUser Chieftain Alex sig.png 22:15, 5 January 2017 (UTC)
Cool, changed it on that page and on Sparkk. I think it looks much cleaner, thanks. -Darqam 22:25, 5 January 2017 (UTC)
Continued from above

(Reset indent) Coordinates are always in the order of X, Y and Z so it does not need labeling. This format has been chosen because it requires as little effort on the part of the editor as possible. All conversions and messy work is done by the parser functions in the templates. J.Tesla (talk) 18:19, 6 January 2017 (UTC)

NPCs with Paths[edit]

So far I've only found two, but for NPCs with paths like Jelanda you don't really get a good view of the path unless you zoom out in that little mini map. Otherwise it looks like a line of dots in the map with no distinguishable(wait I can spell that?!) start or end, and that's not particularly helpful. =c - Doodleplex 22:29, 9 January 2017 (UTC)

I'm not sure what you mean, I can zoom in and out and see the dots fine. The start/end are at either end of the dotted line. -Darqam 23:51, 9 January 2017 (UTC)
Hmm...maybe the best way of saying it is, I'm not sure showing the pathing is a good idea. I shouldn't have to zoom in and out to find where an NPC is upon loading a page, not to mention having to zoom in and out while mobile is a hassle. - Doodleplex 00:02, 10 January 2017 (UTC)
Given that the NPCs I have put a path on are NPCs that move a bunch, would you recommend just having no map at all then? I understand it being a bit sluggish, but I can't think of another way to show "NPC could be anywhere along this line". -Darqam 00:06, 10 January 2017 (UTC)
Since the map circles a small area and isn't a pin/marker location (unless I missed something) now, I think that should specify enough that they can be found in that small section, which I imagine would include their pathing. Sidenote, I think Jelanda's pathing is an event path. - Doodleplex 00:13, 10 January 2017 (UTC)
The issue with that circle, is that it is in no way big enough to cover something as big as say Jelanda's path. And yes her path is an event path, but she only exists for that event, therefore is documented as such. Now if there needs to be a choice of not documenting where NPCs are if they don't exist outside of events, well that can be another discussion, but things can be changed if need be. -Darqam 00:24, 10 January 2017 (UTC)
Well to be honest then, if the NPC only exists during an event, then no they shouldn't have a map because I'd assume then that they aren't an event only NPC, which wouldn't be the case. Otherwise, it might be better for NPCs with unusually large paths to perhaps just stick with a .jpg image (such as Suriel the Blazing Light or Edda) and use the circle for NPCs with small ones, as I feel that would be more user(and mobile) friendly. Unrelated, maybe you could do event pathing maps for events, that would be cool and nuke a lot of terrible event maps we have. *___* - Doodleplex 00:42, 10 January 2017 (UTC)

(Reset indent) Hum, that might be a good idea. I could see maybe putting a marker for "npc spawns here", and then just have a note saying it only exists for the event and follows said event chain. With regards to making maps for events, I'm not opposed to it, but won't be actively working on that (yet?). If I come across one, I might make note of the path but that's it.

I'll keep this in mind, and for the time being at the very least, not add anymore obscenely big paths (if event related or has a nice image). Reverting the changes might come, but I'd rather hear what a few other people think (in order to not have a format chosen with only the two of us). -Darqam 01:03, 10 January 2017 (UTC)

It would be nicer if when you loaded the page, it showed the whole path that it's supposed to be illustrating. Like if it detects it's drawing stuff off the edges of the screen, decreases the starting zoom level? Idk how hard that would be to code. —Azurem 01:14, 10 January 2017 (UTC)
Agreed with Azurem. Personally I'd prefer we keep the pathing of event NPCs - some might be tied to future collections, and it would be helpful to know where they go if they aren't at their starting location. Also, would it be possible to reduce the size of the pathing dots? That would put more focus on the starting and ending position, and less on the path they walk on. —Ventriloquist 15:40, 10 January 2017 (UTC)
I've made all of the dots a smaller diameter (8 units) compared to the distance between dots (12 units). The map now adjusts to the largest zoom factor that encompasses all markers.
Did you want the start/end markers to be different to the rest of the line/start end markers to be different to each other? -Chieftain AlexUser Chieftain Alex sig.png 20:45, 10 January 2017 (UTC)
Ooo thank you Alex! I'd like the start and end dots to be different, yes. - Doodleplex 20:54, 10 January 2017 (UTC)
Yeah, something that would differentiate the starting and ending locations from the walking dots at a quick glance. —Ventriloquist 21:09, 10 January 2017 (UTC)
I don't do design, tell me what icon/colour/shape you want. -Chieftain AlexUser Chieftain Alex sig.png 22:15, 10 January 2017 (UTC)
Black dots perhaps? I'd say red, but I think black might be better with colourblindness. - Doodleplex 22:18, 10 January 2017 (UTC)
(damn edit conflict) Make it a bright neon pink flower for the start, and a banana at the end. I'm sure everyone will agree with me. -Darqam 22:20, 10 January 2017 (UTC)
Thanks all for your extremely useful contributions ...wait, no. What?
Test example preview is over on Widget:Test. Make some sane suggestions and we can try them out. -Chieftain AlexUser Chieftain Alex sig.png 20:28, 11 January 2017 (UTC)

(Reset indent) The flags will be awesome for events is my thought, but I'm not sure if that's a good idea for NPCs. If they're going back and forth, maybe a something similar to a U-Turn arrow? - Doodleplex 20:33, 11 January 2017 (UTC)

I'd prefer two different icons that aren't specific to events or path npcs so that we don't need any logic to switch between icons, if that's possible. -Chieftain AlexUser Chieftain Alex sig.png 20:43, 11 January 2017 (UTC)

Order Instances[edit]

Just curious to know how it's gonna work for NPCs that are in an Orders of Tyria instance and not open world, such as ones in the Vigil Headquarters, Durmand Priory (instance) or Chantry of Secrets. Those three instances are in a lower level(or they were last I checked) and the rest of the instances are visible on the map(such as all the home instance and I think stuff in the Black Citadel?), so the coordinates might show them in the Open World location when they're not there at all. - Doodleplex 21:06, 25 April 2017 (UTC)

I should have caught that and shown they were in a lower level. That's entirely my fault if I didn't. The coordinates are made to support levels. That said, if the map doesn't have the proper levels (because instances are not the same map technically). I've so far decided to just throw them on the base level since it gives some idea of where they are. I could see an argument for something else, but building a custom map for each instance is just way more work than it's worth. It might be possible to fudge the numbers if map art exists on that map to place them on the right level, but I'll see if/when that happens I guess. -21:44, 25 April 2017 (UTC)

Can NPCs in Sun's Refuge be placed in map?[edit]

I was looking for Oshu and after finally finding him I recorded his coordinates, so I could come back to the wiki and add it. But it seems that since he is inside the Sun's Refuge instance putting the coordinates in the npc infobox will not work. Or at least I haven't been able to make it work. Is that so? Just wanted to confirm. Thanks! -- KillerRabbit 👯💬 03:46, 19 July 2019 (UTC)