Jump to content

Tutorial for creating a chest, box, etc. with specific items inside, or adding items in bulk?


Recommended Posts

Posted

Hi, I'd love to know if there is a really in-depth step-by-step tutorial for how to create some sort of container, put it in a particular location (namely the opening prison and/or the room with the mara statue for Live Another Life), and place a bunch of items into it, whether vanilla, mod-added or otherwise.

 

Basically, I'd like a sort of quick-access container when starting a game, which will allow me to add all of my favorite clothing items and weapons without having to use the addmenuitem mod to go and manually add them to my inventory one by one.

 

Alternatively, if there is a way to set up a spell or item to either spawn such a container wherever you are in the world, or simply auto-add all of the desired items to my inventory upon casting/using, I would love to know that as well.

 

Does anyone know where I can find a tutorial for beginners on how to do this sort of thing?

 

Thanks so much!

Posted (edited)

Not exactly beginner but is the best I can come up with off the top of my head...

 

Add chest to LAL start area with stuff pre-loaded:

  Reveal hidden contents

 

 

Use spell to access a container with pre-loaded stuff:

  Reveal hidden contents

 

 

Add all desired items directly to inventory:

  Reveal hidden contents

 

 

All that said, it is possible to script something that will add all the desired items to a container or to the player without needing to have all the various mods as parent masters and so that one or more mods could be removed for a new game without having to re-do anything. We can delve this route if you wish but I did not want to go into it now until you've gotten a feel for the other routes first.

Edited by IsharaMeradin
Posted

Thank you! A summonable chest would be the most fun but I think the last option for a bulk console command would be easiest, and also the easiest to edit/update, so I may go with that. Unless I can learn how to edit a player home to have such a chest and set a fast travel marker for the location and put my custom followers there too lol. I will go through all three of the options and see what I can manage and what makes the most sense. Thank you so much for taking the time to write all that out!

 

And if anyone knows of some really in-depth tutorials for someone who's barely opened CK, I would welcome any links too! There's no such thing as too many examples when you have no idea what you're doing :-)

Posted

Well, I was a little wrong. The batch file needs to have a TXT extension. It is ran in the console with the bat command. The file should be located in the Data folder. See the following for further instructions and example usage: http://en.uesp.net/wiki/Skyrim:Console#Using_Batch_Files_with_the_bat_Command

 

I'll update the previous post just so there is no confusion with anyone coming along later...

Posted (edited)

Hey, just thought I'd put in my 2 cents. Using a batch file will work, but only if your load order is exactly the same between saves. If you change your load order by adding or removing mods, the form IDs can change and then adding items with the batch file won't work, (I recently had a problem with this.) Since you're wanting to add items from different mods at the start of the game, I think using a script with GetFormFromFile would be the way to go, because that's not dependent on your load order. Since I was also wanting a simple way to do this, I wrote this script, which will find and print the form id's and mod names for all of the items currently in your inventory to a user log. User logs are in documents\My Games\Skyrim\Logs\Script\User.

 

I put the script on a custom spell. Note it does require SKSE but I figured this wouldn't be a problem because you have AddItemMenu.

 

  Reveal hidden contents

 

The printed log this script creates will look something like this:

 

 

  Reveal hidden contents

You'll have to edit the log to put it in a new script. Use a text editor like Notepad++ and use the replace all function to replace all of the dates with nothing, and replace all of the ' symbols with " (I'm not sure how to put quotes " in a string in papyrus), so that it looks like
  Reveal hidden contents
PlayerItemIDs log opened (PC)
PlayerRef.AddItem(Game.GetFormFromFile(0x033069, "Triple Triad Skyrim.esp"), 1) ;Triple Triad Info
PlayerRef.AddItem(Game.GetFormFromFile(0x013D99, "Recorder Follower Base.esp"), 1) ;Summon Recorder
PlayerRef.AddItem(Game.GetFormFromFile(0x027490, "Dragonborn.esm"), 1) ;Glowing Spider
PlayerRef.AddItem(Game.GetFormFromFile(0x064B2F, "Skyrim.esm"), 1) ;Green Apple
PlayerRef.AddItem(Game.GetFormFromFile(0x03EADE, "Skyrim.esm"), 1) ;Potion of Healing
PlayerRef.AddItem(Game.GetFormFromFile(0x013989, "Skyrim.esm"), 1) ;Steel Sword
PlayerRef.AddItem(Game.GetFormFromFile(0x0F6F23, "Skyrim.esm"), 1) ;Steel Imperial Gauntlets
PlayerRef.AddItem(Game.GetFormFromFile(0x0F6F24, "Skyrim.esm"), 1) ;Steel Horned Helmet
PlayerRef.AddItem(Game.GetFormFromFile(0x0F6F22, "Skyrim.esm"), 1) ;Steel Armor
PlayerRef.AddItem(Game.GetFormFromFile(0x0F6F21, "Skyrim.esm"), 1) ;Steel Shin Boots
PlayerRef.AddItem(Game.GetFormFromFile(0x005149, "Triple Triad Skyrim.esp"), 1) ;TT Alduin
PlayerRef.AddItem(Game.GetFormFromFile(0x1A4BF0, "Triple Triad Skyrim.esp"), 1) ;Gunblade
PlayerRef.AddItem(Game.GetFormFromFile(0x1A4BFE, "Triple Triad Skyrim.esp"), 1) ;Gunblade Bullet
PlayerRef.AddItem(Game.GetFormFromFile(0x0A7894, "Triple Triad Skyrim.esp"), 1) ;Triple Triad Cards
PlayerRef.AddItem(Game.GetFormFromFile(0x0D00B5, "Triple Triad Skyrim.esp"), 1) ;Triple Triad Card Pack
PlayerRef.AddItem(Game.GetFormFromFile(0x003A49, "Triple Triad Skyrim.esp"), 1) ;TT Albino Spider
PlayerRef.AddItem(Game.GetFormFromFile(0x003A4c, "Triple Triad Skyrim.esp"), 1) ;TT Bear
PlayerRef.AddItem(Game.GetFormFromFile(0x00515c, "Triple Triad Skyrim.esp"), 1) ;TT Felsaad Tern
PlayerRef.AddItem(Game.GetFormFromFile(0x0D00B3, "Triple Triad Skyrim.esp"), 1) ;Triple Triad Board
PlayerRef.AddItem(Game.GetFormFromFile(0x00000F, "Skyrim.esm"), 1) ;gold
Log closed

Then you can easily create a script that adds all of those items to your inventory at the start of the game. Make a new script that extends quest, looks something like this:
  Reveal hidden contents
Scriptname AddItemsInitScript extends Quest 


Actor Property PlayerRef Auto 


Event OnInit()
    Utility.Wait(1)
    PlayerRef.AddItem(Game.GetFormFromFile(0x033069, "Triple Triad Skyrim.esp"), 1) ;Triple Triad Info
    PlayerRef.AddItem(Game.GetFormFromFile(0x013D99, "Recorder Follower Base.esp"), 1) ;Summon Recorder
    PlayerRef.AddItem(Game.GetFormFromFile(0x027490, "Dragonborn.esm"), 1) ;Glowing Spider
    PlayerRef.AddItem(Game.GetFormFromFile(0x064B2F, "Skyrim.esm"), 1) ;Green Apple
    PlayerRef.AddItem(Game.GetFormFromFile(0x03EADE, "Skyrim.esm"), 1) ;Potion of Healing
    PlayerRef.AddItem(Game.GetFormFromFile(0x013989, "Skyrim.esm"), 1) ;Steel Sword
    PlayerRef.AddItem(Game.GetFormFromFile(0x0F6F23, "Skyrim.esm"), 1) ;Steel Imperial Gauntlets
    PlayerRef.AddItem(Game.GetFormFromFile(0x0F6F24, "Skyrim.esm"), 1) ;Steel Horned Helmet
    PlayerRef.AddItem(Game.GetFormFromFile(0x0F6F22, "Skyrim.esm"), 1) ;Steel Armor
    PlayerRef.AddItem(Game.GetFormFromFile(0x0F6F21, "Skyrim.esm"), 1) ;Steel Shin Boots
    PlayerRef.AddItem(Game.GetFormFromFile(0x005149, "Triple Triad Skyrim.esp"), 1) ;TT Alduin
    PlayerRef.AddItem(Game.GetFormFromFile(0x1A4BF0, "Triple Triad Skyrim.esp"), 1) ;Gunblade
    PlayerRef.AddItem(Game.GetFormFromFile(0x1A4BFE, "Triple Triad Skyrim.esp"), 1) ;Gunblade Bullet
    PlayerRef.AddItem(Game.GetFormFromFile(0x0A7894, "Triple Triad Skyrim.esp"), 1) ;Triple Triad Cards
    PlayerRef.AddItem(Game.GetFormFromFile(0x0D00B5, "Triple Triad Skyrim.esp"), 1) ;Triple Triad Card Pack
    PlayerRef.AddItem(Game.GetFormFromFile(0x003A49, "Triple Triad Skyrim.esp"), 1) ;TT Albino Spider
    PlayerRef.AddItem(Game.GetFormFromFile(0x003A4c, "Triple Triad Skyrim.esp"), 1) ;TT Bear
    PlayerRef.AddItem(Game.GetFormFromFile(0x00515c, "Triple Triad Skyrim.esp"), 1) ;TT Felsaad Tern
    PlayerRef.AddItem(Game.GetFormFromFile(0x0D00B3, "Triple Triad Skyrim.esp"), 1) ;Triple Triad Board
    PlayerRef.AddItem(Game.GetFormFromFile(0x00000F, "Skyrim.esm"), 1) ;gold
    Utility.Wait(1) 
    Self.Stop() ;stops this quest.
EndEvent

Put the script on a new quest that's start game enabled.
Note that in order for this to work, you have to enable logging. Here's an explanation of how: https://www.nexusmods.com/skyrim/articles/368/
Edited by dylbill
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...