0 of 0

File information

Last updated

Original upload

Created by


Uploaded by


Virus scan

Safe to use

Tags for this mod

About this mod

Contains scripts and a tutorial for implementing an automatic sorting system to containers. A test file is also available.

Permissions and credits
What this mod containes:
Within this zip-file, you'll find the scripts used in the Dawnspires auto-sorting and crafting auto-loot system, along with a test file. Bellow you'll find instructions for how to implement it into your mod.

To use this, you agree to:
- Not distribute it to other sites. Translating the tutorial is fine, but no files may be uploaded.
- Give me credit in your description.
- Place links back to this mod-page and my profile.

You are free to modify the scripts in any way you want. If you modify the scripts, I cannot be held responsible for any bugs that might arise.

Note that this mod will not give your house >9000 endorsements. The design is often more important than the features.

First of, things you need to know:

There are two different types of chests:
- Storage chests; these holds your items
- Sorting chests; These only sorts your items and cannot store items

There are three sub-types of Sorting Chests:
- Basic Sorting Chest; every item placed within by the player gets sorted.
- Lever Sorting Chest; same as the basic chest, but with a button attached to it. Pressing the button drags every item stored within the system into the linked chest. Press it again to sort items within.
- Master Sorting Chest; same as the basic chest, but also sorts items not placed by the player. Generally you only want one of these.

Users have reported that dumping to many items in a container may cause items to go missing. I've dumped hundreds of items at once without losing a single item, but try to not overload it. If you have 3000+ weight, dump some of the items in, wait for it to be sorted and repeat. This also applies to the button feature.

There are several global control variables implemented. This is so that the player can enable/disable the scripted systems if they want to. Disabling is done by the following console-command:
"set <name of global variable> <u>to</u> 1 to enable, 0 to disable &gt;" , without quotes of course.<br>Example:<br>"Set _autolootAllowAutoLoot to 1"<br>Note that there is a space between <em>Set</em> and <em>_autolootAllowAutoLoot</em>.<br><br>By default, the sorting categories are:<br>- Heavy Armor <br>- Light Armor<br>- Clothing<br>- Weapons, including Staffs and bows<br>- Arrows, including Dawnguard Bolts <br>- Jewelry<br>- Gems<br>- Books<br>- Scrolls<br>- Raw Food <br>- Cooked Food <br>- Poisons<br>- Potions <br>- Ingredients<br>- Soul Gems<br>- Keys <br>- Ore, including dwemer scrap<br>- Leather, including animal hides and leather stripes<br>- Ingots<br>- Gold coins<br>- Misc items<br><br>You do not need to create a unique chest for every category. Merging chests are possible without modifying th script, which I will get to later.<br><br><br><strong>What you need to create:</strong><br><br>- 1 to 21 Storage Chest container-entries, depending on how well sorted you want your items to be.<br>- One container entry for the Sorting Chest (Optional, but required for Crafting auto loot and pullbar functionality)<br>- One primitive Activator (the Master Activator)<br>- One button/lever Activator (Optional, but required for the pullbar functionality)<br>- Three Formlists<br>- Two Global variables<br>- One Spell (Optional, but required for Crafting auto loot)<br>- One Magic Effect (Optional, but required for Crafting auto loot)<br><br><strong>The scripts</strong><br>_sgaAutosortContainer : This script goes on every container, both Storage Chests and Sorting Chests.<br>_sgaAutosortMaster : This script goes on a the custom primitive activator.<br>_sgaAutosortLever : Must be attached to a button, pullbar or something else the player can activate.<br>_sgaCraftingAutoLoot : Attach it to the crafting stations you wish to include in the auto-loot system.<br>_sgaCraftingSpell : Attached on a Magic Effect<br><br>It is recomended that you try the system out before you start, This is done by oopening the console in the main menu and typing "coc AutoSortCell".<br><br><strong>First step: Creating containers</strong><br><br>To create containers, navigate to WorldObjects-&gt;Containers. Duplicate a container of choice, then double click it. In my test cell, I chose the <em>MerchantWCollegeTolfdirChest</em>.<br>Once the container window is open, type in something easy to reconize in the ID field, such as "autosort<what goes in the chest>" (e.g autosortIngredientsChest). In the name field, type what the chest is meant for (e.g Ingredient Chest). Clear the Item List and make sure the Respawns tick box is unchecked.<br>In the scripts section, press Add. Select _sgaAutosortContainer.<br>Press properties. There are three different entries here:<br>- BypassGlobalCheck : Setting this to TRUE turns this container into a Sorting Chest<br>- BypassPlayerCheck : Setting this to TRUE turns this container into a Master Sorting Chest if BypassGlobalCheck is also TRUE. You generally only want one of these.<br>- master : Must be set to the Master Activator. We will return to this later.<br><br>Repeat this step until you have <u>entries</u> for:<br>- 1 Storage Container per sorting category. Again, you do not need to create a unique entry for every category, merging categories are possible.<br>- 1 Sorting Chest (Optional, but required for Crafting auto loot and pullbar functionality)<br><br>Place the containers at desired locations around your house.<br><br><strong>Creating Formlists:</strong><br>Navigate to Miscellaneous-&gt;FormList in the ObjectWindow. Right click and select New. A new window will pop up. Drag and drop entries from the ObjectWindow into the Formlist window in order to add them to the list.<br>You need to create three different lists:<br>- One list for Ores and Dwarven scraps, i.e things that can be melted.<br>- One list for Cooked Food. This needs to be handpicked. Easiest way to do this is to go to Magic-&gt;Potions and then type "Food" in the filterbox.<br>- One list of special smithing items such as Dragon Bones and Dragon Scales.<br><br>You can find an example of how this looks in the test esp in the image section above.<br><br><br><strong>Creating the Master Activator</strong><br>Navigate to WorldObjects-&gt;Activators. Right click and select new.<br>In the ID-field, type in AutosortMaster. Press OK. Doubble-click it again. This time, the script section is not grayed out. Press Add and select _sgaAutosortMaster.<br>Press Properties. There's an example of how this looks in the test file in the image section.<br>- Assigning ObjectReferences: This can be tricky if you haven't done it before. Open your cell in the render window. Navigate to the chest you want to assign. Go back to the Script properties window, then press the "Select Reference in render window" button. Your cursor is now transformed into a crosshair. Double click your chest and you are done.<br><br><em>Merging chests</em><br>You can use the same chest multiple times. For example, you can set the ChestLightArmor and the ChestHeavyArmor to the same chest. In the Dawnspire, I chose to send shields and weapons to the same chest. In the test file, I send gold and jewelry to the same chest.<br><br>After you've assigned all the properties correctly, you need to place the activator somewhere in the world. Start of by assuring markers are turned on. In the toolbar, navigate to View. Halfway through the list you'll see "Markers". If it has a checked tickbox next to it, markers are on. Continue by selecting an object in your cell, then press the "Create Trigger"-button that looks like a "T" in a box. You'll find this in the toolbar in the main window.<br>A new window pops up. Select the AutosortMaster. Whatever object you've selected should be surounded by a red box. Move this box anywhere in your cell. Go back to the Object Window, WorldObjects-&gt;Containers. You now need to assign the AutosortMaster to the master-property in all your containers' script. That's it. You now have a working auto sorting system.<br><br><strong>Implementing Crafting autoloot</strong><br>In the Object Window, navigate to Magic-&gt;spells-&gt;abilities. Right-click and select new. In the ID-field, type in something like _autoLootCraftingSpell.<br>- Set the type to ability.<br>- Set casting type to Constant effect.<br>- Set delivery Type to self. Press OK.<br><br>Navigate to Magic-&gt;MagicEffects. Right-click and select new. In the ID field, type something like _autoLootCraftingEffect.<br>- Set archetype to Script.<br>- Set Casting Type to Constant Effect<br>- Set Delivery to Self<br>- Tick the No Area and No Magnitude tickboxes. Press OK.<br><br>Double-click you magic effect again. In the script section, press Add. Select _sgaCraftingSpell<br>- If you haven't already, place a Sorting Chest somewhere in you cell and turn it into a Master Sorting Chest. Instructions above.<br>- Press Properties to edit the script Properties.<br>- Set masterChest to your Master Sorting Chest.<br>- Set isCraftingSPell to _autoLootCraftingSpell. Press OK<br><br>Go back to your spell. In the effects field, right-click and select New. Select _autoLootCraftingEffect from the list. Press OK<br><br>Now you need to <strong>locally</strong> add the _sgaCraftingAutoLoot-script to all the crafting stations you want to link to the auto-loot system. Double-click your crafting bench in the render window. Find the Scripts tab. Add a new script and select _sgaCraftingAutoLoot. Right-click it and select Edit Properties.<br>- Fill the Containers-array with all chests you want to loot when activating the bench. Note that the auto loot will <strong>not</strong> re-sort Weapons, Armor, Books and Scrolls.<br>- Create a new Global Variable like we did before with the initial value 1. Set the AllowAutoLoot-property to this Global.<br>- Set the _sga_isCraftingSpell to the _autoLootCraftingSpell.<br><br>Repeat this for every crafting station you want to link to the system. It is not recommended that you edit the vanilla crafting stations as this might create mod conflicts. You can however create your own, custom crafting stations and add the script to the base entry.<br><br><strong>Creating a Sorting Chest with a pullbar</strong><br>In the Object Window, navigate to WorldObjects-&gt;Activators. There are two activators I suggest you choose between; GenPullbar01 and ImpButton01. Whichever you choose, right-click and select Duplicate. Doubleclick your new button/pullbar.<br>- In the ID-field, type in something like _autoSortButton / _autoSortPullbar.<br>- In the name field, type in something like "Auto Sort Pullbar/button". Press OK, the double-click the activator again.<br><br>Add the _sgaAutosortLever-script to your activator. Select edit properties like we did before.<br>- Set master to the AutosortMaster-activator.<br>- If you haven't already, place a Sorting Chest somewhere in you cell and turn it into a Master Sorting Chest. Instructions above.<br>- Set the mainChest to a Master Sorting Chest. Press OK.<br><br>Place your button/pullbar somewhere in your cell. Next to it, place a Sorting Chest. This must <u>not</u> be a Master Sorting Chest. Double-click your button/pullbar. In the Rinked Ref, right-click and select new. Pick the nearby sorting chest from the render window.<br><br>That's it. You now have a working Lever-chest. Remember that the button/pullbar doesn't resort items automatically. Using the button once drags in items, using it again sorts items. It is easy to forget the second activation, so I recommend you keep the Lever Sorting Chest-count low.<br><br>============================================<br><br>End of tutorial.<br><br>============================================<br><br>Got questions? Place them in the comments.<br><br>============================================<br><br><strong>Why am I releasing this?</strong><br>The auto-sorting and auto-loot makes crafting and storing very easy. However, my warrior cannot live in a mage tower nor can my archer. I hope that other mod-authors find this useful and are willing to implement it and share their creations.<br></what></name>