csbx Posted April 16 Share Posted April 16 I'm in the testing phase and eliminating edge cases. The biggest I have is the following: My mod grabs the alias map marker of a quest (e.g. BQ01) and does some stuff with it. But it assumes that the map marker being picked up is the one the system intends to pick up. Sometimes the alias is filled with the map marker of, say, a dungeon mod added to a vanilla named location. The BQ01 or whatever quest proceeds normally, but it confounds my mod's processing. MapMarker (M)odAdded isn't found in my system, which is looking for MapMarker (V)anilla. But what if I check the location of the map marker, then get its World Location Marker Ref. If I have MapMarker(M) that would get me back to MapMarker(V). IF theses are not the same then I would set the mapmarker = Mapmarker(V) and then run that through my code--essentially a normalization of the map marker, forcing it to the vanilla one. This would solve most of this edge case I believe. Conceptually this looks elegant enough, but I don't see how to get the World Location Marker Ref. Is this even possible ? Or is there some alternate way to accomplish this ? Link to comment Share on other sites More sharing options...
PeterMartyr Posted April 17 Share Posted April 17 Your travels are just beginning, I will tag @dylbill so can they can post some youtube video's on making SKSE plugins ; wayFinder.ddl : author csbx ; returns true if they are the same Bool CompareMapMarker(mapmarker A, mapmarker B) Native But you are ready now, this requires a proper editor which you now have. Link to comment Share on other sites More sharing options...
csbx Posted April 17 Author Share Posted April 17 3 minutes ago, PeterMartyr said: Your travels are just beginning, I will tag @dylbill so can they can post some youtube video's on making SKSE plugins ; wayFinder.ddl : author csbx ; returns true if they are the same Bool CompareMapMarker(mapmarker A, mapmarker B) Native But you are ready now, this requires a proper editor which you now have. Peter - I've already started looking at it, but it feels like stepping into the druid chamber of eyes wide shut, peeping through the mask at the ongoing ceremonies and listening deeply to the murmurings in the foreign language and knowing something great is happening but hardly grasping a phoneme. Link to comment Share on other sites More sharing options...
dylbill Posted April 17 Share Posted April 17 I'm not really sure what the issue is. Is this a papyrus script issue? Aren't the bounty quests repeatable? To get a reference you should just be able to use GetReference() Link to comment Share on other sites More sharing options...
PeterMartyr Posted April 17 Share Posted April 17 OK I did some searching myself Skyrim Scripting - YouTube Nothing like starting with easy hello world, the lady is an MO user too. 1 Link to comment Share on other sites More sharing options...
csbx Posted April 17 Author Share Posted April 17 35 minutes ago, dylbill said: I'm not really sure what the issue is. Is this a papyrus script issue? Aren't the bounty quests repeatable? To get a reference you should just be able to use GetReference() Papyrus issue, hopefully. The game errantly (randomly) chooses modded mapmarkers if they're in a vanilla Location. When I grab that alias mapmarker for the quest, my script fails because i'm indexing vanilla map markers--my script knows what to do with those. I though I could take the modded map marker intruder (given to me by being alias in the quest) and get the location of it (easy so far); but then I wanted to grab from the Location, the expected mapmarker for the Location. I noticed in the Location Form, there was a dropdown for World Location Marker Ref. -> it appears to yield the expected vanilla map marker for that location (e.g. if location = silent moons camp, its WLMR is the map marker objectref for silent moons camp. I'm giving up on this--I think it's deeply coded in the game and I don't have access to it. Thought there might be a roundabout way to get it, though. thanks for looking ! Link to comment Share on other sites More sharing options...
dylbill Posted April 17 Share Posted April 17 22 minutes ago, csbx said: Papyrus issue, hopefully. The game errantly (randomly) chooses modded mapmarkers if they're in a vanilla Location. When I grab that alias mapmarker for the quest, my script fails because i'm indexing vanilla map markers--my script knows what to do with those. I though I could take the modded map marker intruder (given to me by being alias in the quest) and get the location of it (easy so far); but then I wanted to grab from the Location, the expected mapmarker for the Location. I noticed in the Location Form, there was a dropdown for World Location Marker Ref. -> it appears to yield the expected vanilla map marker for that location (e.g. if location = silent moons camp, its WLMR is the map marker objectref for silent moons camp. I'm giving up on this--I think it's deeply coded in the game and I don't have access to it. Thought there might be a roundabout way to get it, though. thanks for looking ! Ah, so your script knows what to do with vanilla markers but not with mod added markers. What you can do is save the markers in an array and their locations in another array, make sure the indexes match, then find the vanilla marker by comparing the mod added marker's current location. Something like this: Location[] Property VanillaBountyLocations Auto ObjectReference[] Property VanillaBountyLocationMarkers Auto ObjectReference function GetVanillaMapMarkerForLocation(location akLocation) int index = VanillaBountyLocations.find(akLocation) if index > -1 return VanillaBountyLocationMarkers[index] else debug.trace("map marker for location " + akLocation + " not found", 2) return none Endif EndFunction ReferenceAlias property refAlias Auto Event OnSomeEvent() ObjectReference ref = refAlias.GetReference() if ref int index = VanillaBountyLocationMarkers.find(ref) if index == -1 ;ref not found in expected vanilla map markers location akLocation = ref.GetCurrentLocation() ref = GetVanillaMapMarkerForLocation(aklocation) if ref ;vanilla ref found Endif Endif Endif EndEvent Link to comment Share on other sites More sharing options...
Recommended Posts