csbx Posted March 11 Share Posted March 11 I'm looking to run some code whenever the player is close enough to a particular location marker that it would normally set the marker as 'discovered'. I have set the location marker for a location as disabled [for a reason]; and when the player approaches it, I want for it to be enabled and for the standard discovery / add to map process to proceed as normal. Obviously once this location's map marker is visible on the map, there is no longer a need to check for when the player has gotten close enough to that marker. I'm still a toddler when it comes to working with the CK and scripting, so I have vague ideas about how to do this, but am confused about where to start. Do I need an alias for the map marker with a quest attached to it ? Is there a cleaner way to do this ? Link to comment Share on other sites More sharing options...
dafydd99 Posted March 11 Share Posted March 11 I do something similar for my mod The Sidrat. You don't need a quest or an alias. You can have your mapmarker set as 'disabled' initially. Then you need to set up a 'trigger box' (or maybe better - a sphere). As the player enters, it would need to run a script to enable the mapmarker when it's entered by the player - the trigger would usually be 'linked' to the. You can create a trigger by selecting the mapmarker and clicking on the 'T' icon in the CK top bar. There's plenty of tutorials covering this so do check them out. You may find there's a script which covers this - if so it would probably be called something like 'defaultEnableLinkedOnPlayerEnter'. Hope this helps! Link to comment Share on other sites More sharing options...
csbx Posted March 11 Author Share Posted March 11 Doesn't skyrim handle that natively, though ? Ie. doesn't it check for player proximity to the marker so that it doesn't require some other mechanism [trigger] to accomplish ? The method you propose would definitely work in my case, but it would probably be too onerous if I have more than 1 marker (there could be a dozen or two dozen) to set up. But, yeah, it would definitely be doable using your method. Hopefully there's an easier way that doesn't involve adding objects to the cell view ! thanks for the suggestion ! Link to comment Share on other sites More sharing options...
AaronOfMpls Posted March 11 Share Posted March 11 (edited) 1 hour ago, csbx said: Doesn't skyrim handle that natively, though ? Ie. doesn't it check for player proximity to the marker so that it doesn't require some other mechanism [trigger] to accomplish ? Even if it does, some map markers have trigger boxes and such to cover a larger or differently-shaped area, so you don't have to go to the middle of a town to discover it. Edited March 11 by AaronOfMpls added "or differently-shaped" Link to comment Share on other sites More sharing options...
xkkmEl Posted March 11 Share Posted March 11 Trigger boxes and various types of invisible markers are common in Skyrim. You should try once turning on the setting that allows you to see them in game. In skyrim.ini: [Display] bShowMarkers=1 These objects take little memory, and your GPU provides more than sufficient compute power. You can pile on thousands of these before you can interfere with the loading of one more 40Mb texture file, or body mesh file. Link to comment Share on other sites More sharing options...
dafydd99 Posted March 12 Share Posted March 12 10 hours ago, csbx said: Doesn't skyrim handle that natively, though ? Ie. doesn't it check for player proximity to the marker so that it doesn't require some other mechanism [trigger] to accomplish ? The method you propose would definitely work in my case, but it would probably be too onerous if I have more than 1 marker (there could be a dozen or two dozen) to set up. But, yeah, it would definitely be doable using your method. Hopefully there's an easier way that doesn't involve adding objects to the cell view ! thanks for the suggestion ! The normal behaviour for a mapmarker is to not appear on the map until 'discovered', ie visited. The exception here is if the player is 'told' about a location, and it will appear greyed out on the map, and cannot be fast travelled to. However any 'undiscovered' locations will appear in the compass greyed out from a set distance away, until 'discovered', then they'll be filled in, and you can fast travel to them. I'm guessing the reason why you want it disabled is so that it doesn't appear on the compass, but when you're close enough it appears and is immediately discovered? This is not standard mapmarker behaviour, so you'll need to do as you said - have it disabled, and then enable it. You can have it 'discovered' simply by setting the discover ring (the circle around the mapmarker in the creation kit that can be resized) larger than 'trigger sphere' as described above, so when it is enabled it's immediately discovered. Or you could set its 'Can Travel To' flag in the creation kit to on. If you want to do ten or so, you can just select both the trigger sphere and the map marker, copy - and then paste where you want another one. It should mantain the 'linked ref' from the trigger box to the mapmarker. https://skyrimck.uesp.net/wiki/Map_Marker Link to comment Share on other sites More sharing options...
csbx Posted March 12 Author Share Posted March 12 (edited) 1 hour ago, xkkmEl said: Trigger boxes and various types of invisible markers are common in Skyrim. You should try once turning on the setting that allows you to see them in game. In skyrim.ini: [Display] bShowMarkers=1 These objects take little memory, and your GPU provides more than sufficient compute power. You can pile on thousands of these before you can interfere with the loading of one more 40Mb texture file, or body mesh file. That's really good to know - had no idea that was an option ! 54 minutes ago, dafydd99 said: The normal behaviour for a mapmarker is to not appear on the map until 'discovered', ie visited. The exception here is if the player is 'told' about a location, and it will appear greyed out on the map, and cannot be fast travelled to. However any 'undiscovered' locations will appear in the compass greyed out from a set distance away, until 'discovered', then they'll be filled in, and you can fast travel to them. I'm guessing the reason why you want it disabled is so that it doesn't appear on the compass, but when you're close enough it appears and is immediately discovered? This is not standard mapmarker behaviour, so you'll need to do as you said - have it disabled, and then enable it. You can have it 'discovered' simply by setting the discover ring (the circle around the mapmarker in the creation kit that can be resized) larger than 'trigger sphere' as described above, so when it is enabled it's immediately discovered. Or you could set its 'Can Travel To' flag in the creation kit to on. If you want to do ten or so, you can just select both the trigger sphere and the map marker, copy - and then paste where you want another one. It should mantain the 'linked ref' from the trigger box to the mapmarker. https://skyrimck.uesp.net/wiki/Map_Marker Yep - that's close to what I'm looking for. I want to disable the location marker(s) so they do not appear on the map UNLESS the player has visited them; so even if a quest 'unlocks' it, it doesn't show. The first part (disabling markers) was easy to do. The second part is the problem. The markers will be disabled so will not show on map EVER (until I do something about it). I want for them to show on the map if and only if the player is close to them. Using primitives as a trigger to enable the marker would work. But I'm very reluctant to proceed in that direction because: 1) most map markers I see in game don't need that to work--just the map marker with its radius and some native handling of them re: player position seems to cover that. 2) I will potentially have a hundred or so location markers to adjust. It's just not feasible for me to do that. I found these two Power of Three's Papyrus Extender functions: OnLocationDiscovery, RegisterForLocationDiscovery. But my guess is that they only look for when the player has met the proximity check of an ENABLED activator--so likely won't be helpful here. I essentially need to run the following: script attached to map marker that checks for distance to player. if distance < x, enable map marker and unregister the check, remove from alias. I'm just not equipped to figure out if that's something that's possible or not. Edited March 12 by csbx Link to comment Share on other sites More sharing options...
scorrp10 Posted March 12 Share Posted March 12 Ok, the MapMarker objects are a bit tricky. As you travel around and start getting close to any enabled map marker, it will start showing on your navigation bar. White if already discovered, black if not. I am not really sure what marker parameter dictates from how far away that marker begins appearing - but could be by type. However, marker has a 'radius' paramter, and once player steps inside that radius, the marker is considered 'discovered'. Now, you don't have to disable a map marker, just don't make it visible. I.e. in game, if someone tells you about Shrine of Azura, its map marker becomes visible on your map in black, but you still need to travel to it to discover it. If your quest requires the player to travel to some location, but you don't want to show that location on map, you A. Do not make that marker visible and B. Do not set it as a quest objective. You can still have it loaded as alias, but if not set as objective, it will not give a quest marker. That probably shall give you what you need. Another option you have is keep Player Alias, and in your script, implement OnLocationChange event. Have the destination location loaded as alias, and if OnLocationChange akNewLoc parameter equals that location, then you can enable the map market (and also potentially activate an objective pointing to it) Link to comment Share on other sites More sharing options...
csbx Posted March 12 Author Share Posted March 12 (edited) 1 hour ago, scorrp10 said: Now, you don't have to disable a map marker, just don't make it visible. I.e. in game, if someone tells you about Shrine of Azura, its map marker becomes visible on your map in black, but you still need to travel to it to discover it. Ok - this is interesting. Let me check this possibility out. EDIT: I've checked this and unless I'm mistaken, if someone tells you about the Shrine of Azura, the map marker becomes visible (but can't fast travel) and the only way to stop that is to disable that location marker beforehand. If I don't want any hint of a marker on my map for a location, disabling seems to be the only feasible way to do that. Radiant quests are pretty aggressive about getting their map markers on the map ! (B) - this approach is possible, but if I want to include some vanilla quests it gets very very ugly. The onlocationchange approach is interesting as well. I'll have a look ! Thanks for having a look at this. Edited March 12 by csbx Link to comment Share on other sites More sharing options...
csbx Posted March 12 Author Share Posted March 12 Just for clarity - what I have is a formlist of mapmarkers; at quest startup I disable all of them which indeed gets me the result that a radiant quest pointing to the locations associated with the map markers in my set does NOT create a map marker on the map. So far so good. But the problem obviously is that if you walk around, the map markers having been disabled means that no discovery via their radius is occurring. I still feel like there's a super slick way to accomplish this and maybe I've already been given the answer. It's also possible that my disabling map markers will create unintended consequences I'm unaware of. Atlas Map Markers offers a similar option so it seems like it should be ok. Link to comment Share on other sites More sharing options...
Recommended Posts