1 items

File information

Last updated

Original upload

Created by

Eudalus

Uploaded by

Eudalus

Virus scan

Safe to use

About this mod

SKSE framework that performs batch insertion, removal, and swapping into all targeted leveled lists. Supports targeting specific leveled lists for insertion and removal as well.

Share
Requirements
Permissions and credits
Changelogs
Donations
Description
Performs batch insertion, removal, and swapping into all targeted leveled lists to allow mod authors to easily create patches to target dozens or hundreds of leveled lists without worrying about compatibility conflicts or needing to create new patches for individual mods.

Want to insert your item into every leveled list that has an Iron Sword in every mod? Want to swap out all Steel Swords in every leveled list and replace them with a dozen of your own unique swords? You can do all of that and more with just a few lines in a config file.

You can check out the Patch Hub here.

Mod Details
You can use Leveled List Object Swapper by creating a .ini file with the suffix "_LLOS" (for example, SpecialSword_LLOS.ini).
The _LLOS.ini file can follow the format:
[SpecialSword01]
Target=0x012EB7~Skyrim.esm
Insert=0x0F8318~Skyrim.esm
Count=1
Level=1
Chance=100.0
UseAll=0
Protocol=0

The section [SpecialSword01] is an identifier that should be unique in your _LLOS.ini file. I'd recommend keeping its name similar to the item you're targeting or inserting.

The Target is the item or leveled list you want the Insert to be inserted alongside, swapped for, or removed from leveled lists (see Protocol).

The Insert is the item is the item you want to insert, swap into, or remove from leveled lists (see Protocol).

The Count is the number of times the item will be given to an npc or placed when the leveled list selects this item (you might want 100 gold or 10 arrows for example). Supports a random range with tilde, 5~10 would cause each leveled list to randomly have a count of 5 to 10 for the item. Optional and will default to 1. Can be overrode by Protocol to use Target count instead.

The Level is the minimum player level required for the leveled list to use the item (setting to 42 would require the player to be at least level 42 before the leveled list uses the item). Supports a random range with tilde, 7~14 would cause each leveled list to randomly have a level of 7 to 14 for the item. Optional and will default to 1. Can be overrode by Protocol to use Target level instead.

The Chance is the probability that the item will be inserted into each specific leveled list (setting to 50.0 would lead to approximately half of the desired leveled lists to not have the Insert occur. Optional and will default to 100.0.

The UseAll if set to 0, insertions, swaps, or removals will not occur on leveled lists that internally have the uncommon UseAll flag set. This could potentially stop a leveled list with the UseAll flag from spewing out dozens of item at a single time. Enabled with a value of 1. Optional and will default to 0.

The Protocol I'd personally recommend 3 for most cases:
; protocol determines how the insert will occur
; optional, default protocol 0
;
; ----- SINGLE PROTOCOLS WITH INSERTIONS -----
; 0 - insert into leveled lists once, default
; 1 - insert into leveled lists once and use same count as target once
; 2 - insert into leveled lists once and use same level as target once
; 3 - insert into leveled lists once and use same count and level as target once
;
; ----- MULTI PROTOCOLS WITH INSERTIONS -----
; 50 - insert into leveled lists for each time target is there
; 51 - insert into leveled lists for each time target is there, use same count as target
; 52 - insert into leveled lists for each time target is there, use same level as target
; 53 - insert into leveled lists for each time target is there, use same count and level as target
;
; ----- SINGLE PROTOCOLS WITH REMOVALS -----
; 100 - insert into leveled lists once and remove target once
; 101 - insert into leveled lists once, use same count as target once, and remove target once
; 102 - insert into leveled lists once, use same level as target once, and remove target once
; 103 - insert into leveled lists once, use same count and level as target once, and remove target once
; 104 - no insert, just remove target from leveled lists once
;
; ----- MULTI PROTOCOLS WITH REMOVALS -----
; 150 - insert into leveled lists for each time target is there and remove all instances of target
; 151 - insert into leveled lists for each time target is there, use same count as target, and remove all instances of target
; 152 - insert into leveled lists for each time target is there, use same level as target, and remove all instances of target
; 153 - insert into leveled lists for each time target is there, use same count and level as target, and remove all instances of target
; 154 - no insert, just remove each target from all leveled lists
;
; ----- SINGLE PROTOCOLS TARGET LEVELED LIST INSERT -----
; 200 - insert into a very specific leveled list target once
;
; ----- SINGLE PROTOCOLS TARGET LEVELED LIST WITH REMOVALS -----
; 300 - insert value is instead used to remove from a very specific leveled list target once
;
; ----- MULTI PROTOCOLS TARGET LEVELED LIST WITH REMOVALS -----
; 350 - insert value is instead used to remove from a very specific leveled list target for each time insert is there

; ----- MULTI PROTOCOLS OUTFIT LEVELED LIST SWAP
; 450 - generates a leveled list with all insert items that share the same target and swaps the generated leveled list for the target item in outfits
;
; ----- MULTI PROTOCOLS CONTAINER LEVELED LIST SWAP
; 750 - generates a leveled list with all insert items that share the same target and swaps the generated leveled list for the target item in containers


Protocol below 199 (0-3, 50-53, 100-104, 150-154) supports Target and Insert as leveled lists or items. For Protocol 200 and above, Target must be a leveled list.

I've included a misc file in the downloads with the above information in DetailedExample_LLOS.ini as well as a more streamlined version with almost no comments in EasyExample_LLOS.ini. Again, I'd recommend Protocol 3 for most batch insertion cases.

Requirements

Address Library for SKSE Plugins for SE/AE.
VR Address Library for SKSEVR for VR.

powerofthree's Tweaks optional, for SE/AE to use editor id instead of form id in _LLOS.ini files.
powerofthree's Tweaks VR optional, for VR to use editor id instead of form id in _LLOS.ini files.

Credits

Thanks to mrowrpurr for the SKSE video tutorials and example repositories

brofield for simpleini

CharmedBaryon for CommonLibSSE-NG

powerofthree for example code

Boost + MikePopoloski for boost's unordered_map

Source code