About this mod
Now your dog followers can sniff out the owner of objects and track them down.
No tracking protection for NPCs.
- Requirements
- Permissions and credits
-
Translations
- Portuguese
- Changelogs
This mod gives you the ability to command your dog followers to find the owner of any interactable object and trace them down.
I made this mod to give myself a more immersive way to find my lost followers who got stuck in the wild. I think it would also be potentially useful for quests so that players do not need to rely as much on quest markers.
V2 update: You can now grab something and give the dog to sniff, and you can ask the dog to run slower. Also, the search function is now Global so any other script can call this function as long as there is a dog follower nearby. powerofthree's Papyrus Extender is now required and it is safe to update mid game.
Video Showcase:
Usage:
The usage is basically the same as the vanilla "I need you to do something" command.
Searching for an NPC:
- Talk to your dog follower, select the option: "Come here, I need you to track someone." and now you can start giving commands to your dog. There are 30 seconds for you to pick objects before it automatically ends. You are not blocked to talk to other NPCs or interacting with doors, but you can/should only command one dog at one time.
- (New in V2) When commanding the dog, it is also possible to use the vanilla way of grab an object and hold it near the dog for them to sniff.
- Shortly after Interacting with any interactable object, a notification will occur to tell if the dog finds anything.
- If the dog finds an NPC, it will rush to them. By rush I mean you really have to run fast to catch up by default, but starting with V2, there will be a new dialogue when in this phase to change the dog's speed between running and jogging for all tracking missions. The dog will be distracted by other events on road, but they will resume once the event is over.
- When the dog gets to somewhere near the target, they will sit there waiting for your praise. If you forget to do so they will not follow up.
Cancelling the search:
You can cancel the searching by talking to the dog again anytime and choose "You've done well. Good dog.", or before the dog rush out you can press Tab key (Tween Menu key) to cancel it silently. If the dog is already on the go, I recommend use Remote Interactions to call them back and tell the dog they've done well.
There will be notifications indicating the searching results. You will see one of these notifications:
- [dog] finds something--the dog finds an NPC and you should follow up now.
- [dog] seems unable to find anyone--the object has no owner.
- [dog] seems confused by too many smells--the object has a faction owner, but no one is around in the same cell.
- [dog] searched around but doesn't know where to go--the object has an actor owner, but they are not in the same hold. You can bring the object to another hold and try again.
- [dog] doesn't seem to know the smell--the object has an actor owner, but they do not have a reference ID (yet). It might be by design, or it can be caused by errors.
The search result will also display in console, and if an actor is found, they will be selected in console. Double check what is selected when using console after searching.
There are some settings that can be changed through console commands, but I recommend not to change them.
set ld_bUseSmellAnimation to 1
When ld_bUseSmellAnimation is not 0, the dog will walk closer to the object you just selected for it to smell. It could increase immersion, but this often causes the dog to stuck halfway. If you tried the above command and doesn't like it, set it to 0 will revert it to default behavior.
set ld_bDogHasSuperPower to 1
If ld_bDogHasSuperPower is not 0, the dog will ignore the hold limitation and search the whole map. It can be a fun idea to travel across the map but in reality, the game's path finding can make things extremely confusing. If you tried the above command and doesn't like it, set it to 0 will revert it to default behavior.
Limitations:
The mod just works when things are clearly marked with an owner. Currently, only the following NPCs can be tracked:
- Unique actor owners in the same hold with the dog
- Unique actors linked to the selected object (usually furniture)
- Unique actors from the owner faction, who is also in the same cell with the dog
Details:
In game, not every object has its owner. For those with an owner, they are often owned by some factions rather than some specific NPC, and I have not found a general way to quickly determine which NPC in an owner faction is the better target. To maximize the possibility of finding an NPC, the search follows these rules:
- If the object has a unique NPC linked to it, then the dog will trace down this NPC.
- If the object is owned by a faction, then the dog will try to find a unique NPC in this faction that is also in current cell.
- If the object is owned by a unique NPC, and the NPC is in the current hold, then the dog will trace down this NPC.
When an actor owner is found, Skyrim Seach SE is used for finding a RefID of the actor, and the SQL in use is:
SELECT actor.form_id as ref_id FROM npc LEFT JOIN actor ON npc.form_id = actor.base_form_id WHERE npc.name = '" + OwnerName + "' ORDER BY ref_id DESC NULLS FIRST
In vanilla game, some NPCs are using the same name, and some NPCs have many RefIDs. The query above may return multiple RefIDs, and only the last one will be seen as the target which makes the result sometimes inaccurate. Also, this way of searching relies heavily on console commands. Please let me know if there are better ways to find RefIDs by BaseIDs or find ObjectReference by RefID string.
After the search is complete, an XMarker will be moved to the target's current position so that the dog can use a travel package and run to the quest mark. If the target NPC is moving, then the travel destination may not be accurate.
Requirements:
Skyrim Search SE
ConsoleUtilSSE NG or the original non-NG version if it works on your game.
powerofthree's Papyrus Extender is required for V2
Installation:
Install the required mods and this mod with your mod manager. It is safe to install whenever. Load order doesn't matter as there is no vanilla game edit, and the plugin is already ESL flagged.
Uninstalling should also be fine as long as your dog isn't waiting for your commands or tracking someone. Just make a backup save in case anything bad happens.
Compatibility:
It should be compatible with everything. For dogs from other mods if they are using non-vanilla dog voices (not using CrDogVoice, CrDogHusky, CrDogDeathHound), then a patch is needed.
Follower management mods should also be compatible. This mod will check if the dog is in PlayerFollowerFaction which is the vanilla . NFF is tested and works perfectly.
In case I didn't make a patch for mods that add new dog voicetypes in time, here is a tutorial for making a patch for such mods:
- In SSEEdit/Creation Kit, find the voicetype the modded dog is using, add it to the FormID List ld_DogVoiceTypes and save the plugin.
- Under the mod's data folder, make a new directory under Sound/Voices/DogDogGo.esp, and name it the exact name of the new voicetype.
- Pick 3 voice files from the mod with new dog voices (Either .fuz or .wav+.lip files will work. .wav can be compressed to .fuz with Unfuzer to save some disk space), paste them in the folder created in step 2, and re-name them to: ld_DogSear_ld_DogSearchAct_00000809_1, ld_DogSear_ld_DogSearchDia_00000805_1, ld_DogSear_ld_DogSearchPas_0000080A_1, ld_DogSear_ld_DogSearchGoF_00000817_1 and ld_DogSear_ld_DogSearchSlo_00000818_1. It is recommended to use a sad sound for ld_DogSear_ld_DogSearchPas_0000080A_1 as it indicates dog failed to track.
- It's done. Feel free to share the patch online.
Script Document:
The main search function Search() is defined in ld_DogSearchMain.psc. Starting with V2, all the searches in this mod are calling this function.
This may be changed. I may improve the searching and tracking.
; I feel this looks kind of ugly, but it just works.
Function Search(ObjectReference akTargetRef, Quest akDogCommandQst, ObjectReference akTargetMarker, bool abUseSmellAnimation, bool abDogHasSuperPower, Keyword akLocType, Topic akFailTopic) Global
- akTargetRef should be the object you give the dog to sniff.
- akDogCommandQst is the main quest that controls the whole tracking process. In this mod, it is ld_DogSearchDialogueQST in this mod.
- akTargetMarker is the marker for the owner. Whenever an owner is found, this will be moved to the owner's position. In this mod, it is ld_TargetMarker in the cell aaaMarkers.
- abUseSmellAnimation decides if the dog walks to the target. It enables a call of PathToReference() which often causes the dog to stack in my tests, so I recommend setting this to false.
- abDogHasSuperPower decides if the dog can track the whole map. The path can be weird when the distance is long.
- akLocType should be one of the vanilla keywords that defines the location type for searching range. In this mod it is always LocTypeHold [KYWD:00016771]. This will be ignored if abDogHasSuperPower == true.
- akFailTopic is the dialogue topic that will be triggered whenever search failed. In this mod it is always ld_DogSearchPassiveFinishTopic.
Special Thanks:
UESP Creation Kit Wiki, The Arcane University and DarkFox127 for providing so many valuable learning resources.
JaySerpa's Dynamic Activation Key for providing huge inspiration for the commanding dog mechanic.