FOR USE IN BAT FILES I need to deselect whatever is selected.

I know that for example prid 14 will select the player. Is there a command to deselect in this context?

prid, prid 0, and prid 14 again don't work.

I'm moving the player around in a custom situation. I had been using the little map flags as markers and using a bat to do player.moveto the flag, but that has a couple problems. What I wanted to do is unprid, tcl, prid 14, setpos <coords>, unprid... since tcl doesn't work if something is selected, I wanted to contain the entire thing from soup to nuts into a bat file.

However, I've discovered since posting this that prid in bat files doesn't work. It's ignored. So any unprid is likely to be as well.

What's close is to tcl ahead of time, and without prid just do player.setpos which is working ok, but will eventually become problematic.

  • May i ask why you want to deselect a target? Maybe theres a workaround for your problem
    – Tyrmos
    Oct 29, 2016 at 0:33
  • @Tyrmos I modded the op.
    – monsto
    Oct 29, 2016 at 0:46
  • 1
    Can you not do XXAABB.moveto player instead of prid XXAABB followed by moveto player? Oct 29, 2016 at 8:31
  • @LoreFriendly you've misunderstood. I need to unselect (deprid) whatever is selected in order for tcl to work. I was using player as an example. If I watned to just move stuff, that's not a problem, but activating tcl from a bat file can't be guaranteed unless I can unprid. I'm pretty sure it can't be done.
    – monsto
    Nov 6, 2016 at 22:59
  • @monsto I can not verify ATM but maybe prid null? Nov 7, 2016 at 3:29

1 Answer 1


See the following from the UESP wiki:

Many commands are targeted: this means that you may use player.command to affect the player character; for example, type player.setav carryweight 1000 will set the Player's Carry Weight at 1000. Or, you may want to target the NPC/actor, by first typing prid , Enter. Then, type the command by itself, setav carryweight 1000, to affect the NPC, specified by (Note: including the zeroes at the beginning of the RefID when targeting NPCs may produce a "command not found" error. That can be evaded though by placing the RefID in quotes, e.g. "000A2C94".setav carryweight 1000 will set Lydia's Carry Weight at 1000).


I tried it for a command I was running on game load using script dragon, and it worked like a charm. Just put quotes around your object ID and it will allow the use of targeted commands with dot syntax.

  • 1
    To be clear, I am fairly certain it needs to be double quotes. I recently attempted to do this again, and it failed to work with single quotes. Unfortunately I did not think to use double quotes or confirm the ID was correct before fixing the concern correctly with a quick remove in TES5Edit, so perhaps we will need someone to confirm this still behaves as I originally reported. Sep 2, 2021 at 15:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .