Jump to content


Need help with batch files

bat batch script pickpocket npc inventory reset

  • Please log in to reply
1 reply to this topic




  • Supporter
  • PipPip
  • 80 posts
I'm trying to write a batch file that resets NPCs inventories (as they never refill,
allowing me to pick pocket the same NPCs again after a given time when I would execute the
bat file).
This is what I planned to do : 
- resetInventories.txt
prid 0001A67C
prid 000D15B0
prid 0001A681
[... and so on with all NPC's]
Problem is the resetInventory command only applies to the last NPC selected in my script. So in this case, only Elrindir's (0001A681) inventory
is refilled, the previous commands have no effect. Any idea why ?
I've found a workaround making 1 file for each NPC :
- resetAdrianne.txt
prid 0001a67c
bat resetUlfberth
- resetUlfberth.txt
prid 000d15b0
bat resetElrindir
- resetElrindir.txt
prid 0001a681
bat resetJenassa
It actually works (except for the very last NPC) but I'd prefer not have hundreds of 3-line text file in my game folder
Btw no mod seems to do this very simple thing. any idea and comment welcome.



Edit 3/9/17 :

I've got some ideas : 

- Several scripts for reset inventories for each City/region if you just want to reset a specific area

- The "main" script would call each "city" script

- Each "city" script would call 1 script for each NPC to reset

- Optional script that resets chests and strongboxes


But if I don't find a way to merge all bat files in one, there will be hundreds separate files (as much as chests & NPCs to reset)


I'm curently, along with my playthrough, building an excel file with the NPCs that I pickpocket, with the items stolen in order to sort wich ones are worth reseting their inventory (or maybe should I take ALL npcs ?). I'm using Larceny - pickpocket remastered wich increase NPCs items and thus bring more value to pickpocket, and my script seems to work along with the mod. I also include Interesting NPCs and Better fast travel NPCs for the time being, and may consider others.


When the excel file is complete, i'll start to write the cascading scripts. But it will fit for my game, so if ppl are interested i'll have to make several versions, as if a single NPC script does'nt work because the NPC is missing or whatever, all those who come after wont work either, unless I find another way to do it. It's gonna be lot of work for at last a tedious result. 

Edited by filosophem, 04 September 2017 - 05:09 AM.



    Hell is Empty

  • Premium Member
  • 2,473 posts

I would be interested to know the answer to this as well. A mass inventory reset would make my life a bit simpler - as many NPC's in my game need to have their inventories reset due to some mod changes I've made.

Also tagged with one or more of these keywords: bat, batch, script, pickpocket, npc, inventory, reset

IPB skins by Skinbox
Page loaded in: 1.126 seconds