Main
r1
Skyrim Creature & NPC Control Mod+ Via-AHK
This AutoHotkey script allows you to control NPCs(follow, attack, inventory, wait) via auto-completed console commands for the PC version of Skyrim with an enabled console via the F-keys.
! IMPORTANT: 1) YOU MUST HAVE AN NPC/CREATURE SELECTED BY OPENING CONSOLE WITH '' KEY AND CLICKING ON IT WITH MOUSE BE SURE CONSOLE IS CLOSED BEFORE EVER EXECUTING F1-F7 WHILE THIS IS RUNNING OR YOU WILL HAVE UNDESIRED AND UNKNOWN RESULTS/KEY PRESSES
- ALL SCRIPTS OPEN AND CLOSE CONSOLE BEFORE/AFTER USE ALWAYS ASSUMING IT BEGINS CLOSED!
2) YOU CAN ONLY HAVE 2 UNITS UNDER CONTROL AT ONCE!
- USING SHIFT+F5 WILL REPLACE ANY CURRENT FOLLOWER YOU HAVE!
- USING F5 WILL REPLACE ANY CURRENT ANIMAL FOLLOWER YOU HAVE!
COMMANDS: F1 - Repeast last console command (NOTE: This is much faster since it simply executes up-arrow + enter to repeat console command) F2 - Issue Follow(Cancel Wait) Command F3 - Issue Command to NPC(Attack/Wait/Interact at position) F4 - Issue Wait Command (NOTE: Issue F2 to stop waiting) F5(+SHIFT) - Issue Tame NPC as Animal(F5) or as Follower(Shift + F5) - Makes them friendly to your faction and removes all previous alliances + turns off attack on friendly hits + sets follow timers F6 - Instantly moves NPC/creature/object selected to your position F7 - Opens currently selected NPC/creature's Inventory F8 - Toggles control of unit (of left/right/looking movement anyways, not attacking atm if you know a way to attack with control let me know on Curse) ! WARNING: Do not attempt to control another unit in the middle of controlling another or it will likely bug out control of NPCs/Player. F9 - Increases Player's max carryweight to 9999 F10 - Toggles SetGhost(God Mode + Infinite Stamina) on Player
AHK Script(For those who don't want to download the .ahk file):
- SETTINGS
KeyDelayShort: SetKeyDelay 1 return
KeyDelayLong: Sleep 100 return
- F-HOT KEYS
- Repeat last issued command
- $F1:: SendInput ~ Gosub KeyDelayLong Gosub UseLastCommand Gosub KeyDelayLong SendInput ~ return
- Issue follow(cancel wait/wait position)
- $F2:: SendInput ~ Gosub KeyDelayLong Gosub Follow Gosub KeyDelayLong SendInput ~ return
- Issue Command
- $F3:: SendInput ~ Gosub KeyDelayLong Gosub IssueCommand Gosub KeyDelayLong SendInput ~ return
- Issue Wait
- $F4:: SendInput ~ Gosub KeyDelayLong Gosub Wait Gosub KeyDelayLong SendInput ~ return
- Setup and Tame NPC
- $F5:: GetKeyState, state, Shift SendInput ~ Gosub KeyDelayLong Gosub ClearFactions Gosub AddPlayerAlly Gosub IgnoreFriendlyHits Gosub StopCombat
- OLD
- Gosub SetFollowTimers
- NEW:
- ProcessCommand("ssq DialogueFollower") If state = U { Gosub TameAnimal } Else { Gosub TameFollower } Gosub KeyDelayLong SendInput ~ return
- Instant Move To Player
- $F6:: SendInput ~ Gosub KeyDelayLong Gosub MoveInstant Gosub KeyDelayLong SendInput ~ return
- Open NPC Inventory
- $F7:: SendInput ~ Gosub KeyDelayLong Gosub OpenInventory Gosub KeyDelayLong SendInput ~ return
- Toggle Move/Control NPC !WARNING
- Do not attempt to control multiple units at once or swap to another unit in middle of controlling another or fail $F8:: SendInput ~ Gosub KeyDelayLong Gosub TakeControl Gosub KeyDelayLong SendInput ~ return
- Increase player's maximum carryweight
- $F9:: SendInput ~ Gosub KeyDelayLong Gosub IncPlayerWeight Gosub KeyDelayLong SendInput ~ return
- SetGhost on Player(Gives infinite stamina + health)
- $F10:: SendInput ~ Gosub KeyDelayLong Gosub PlayerSetGhost Gosub KeyDelayLong SendInput ~ return
- Gosub Command Functions
ClearFactions: ProcessCommand("RemoveFromAllFactions") return
SetFollowTimers: ProcessCommand("set FavorTimer to -1") ProcessCommand("set FavorFollowTimerFriend to -1") return
IgnoreFriendlyHits: ProcessCommand("sifh 1") return
AddPlayerAlly:
- FACTION
- npcs ProcessCommand("Addfac 0005A1A4 0")
- FACTION
- lords of skyrim civillians ProcessCommand("Addfac 0004B58F 0")
- FACTION
- DA16 player ProcessCommand("Addfac 0007A50A 0") return
IncPlayerWeight: ProcessCommand("player.setav carryweight 9999") return
PlayerSetGhost: GhostToggle := GhostToggle<1 ? 1 : 0 If GhostToggle = 1 ProcessCommand("player.setghost 1") Else ProcessCommand("player.setghost 0") return
Wait:
- ALT
- ProcessCommand("tai")
- SetRestrained 1
- ProcessCommand("setav WaitingForPlayer 1") Waiting := 1 return
MoveInstant: ProcessCommand("MoveTo Player") return
StopCombat: ProcessCommand("StopCombat") return
- TODO?:
- setrace <name> - changes selected NPC/player's model to the name of one found via 'help race 0' in console
TameFollower: ProcessCommand("ForceRefIntoAlias Follower") return
TameAnimal: ProcessCommand("ForceRefIntoAlias Animal") return
IssueCommand: Waiting := 1 ProcessCommand("SetFavorstate 1") return
Follow: If Waiting = 1 { ProcessCommand("setav WaitingForPlayer 0") Waiting := 0 }
- OLD
- ProcessCommand("UseWeapon 1 player player -1 0 0 1 1 player") - forces no damage attack/follow, but adding player as follower/animal does this automatically and much better return
UseLastCommand: Send {Up down}{Up up}{enter down}{enter up} return
- Ability to take player control of unit(at least walking around) "tc" "ToggleControlsDriven"
- TakeControl: If TCToggle = 0 { ProcessCommand("tc") Gosub KeyDelayLong ProcessCommand("player.tc") } Else { ProcessCommand("player.tc") Gosub KeyDelayLong ProcessCommand("tc") } TCToggle := TCToggle<1 ? 1 : 0 return
OpenInventory:
- Change to "sbm" to Barter/purchase instead
- ProcessCommand("OpenActorContainer") return
- Functions
- Breaks down command into each letter issued up and down to help prevent data loss in Skyrim console
- ProcessCommand(cmdString) { Gosub KeyDelayShort
i := 1 len := StrLen(cmdString) While i <= len { letter := SubStr(cmdString, i, 1) If Asc(letter) = 32 Send {Space down}{Space up} Else Send {%letter% down}{%letter% up} i += 1 } Gosub KeyDelayLong Send {enter down}{enter up} }
Facts
- Date created
- Nov 16, 2011