Skyrim Special Edition
0 of 0

File information

Last updated

Original upload

Created by

powerofthree

Uploaded by

powerofthree

Virus scan

Safe to use

About this mod

SKSE plugin and framework for swapping base objects and references, using config files.

Requirements
Permissions and credits
Changelogs
BASE OBJECT SWAPPER



Requirements 

SKSE64
Skyrim SE 1.5.39 onwards
meh's Address Library for SKSE Plugins
powerofthree's Tweaks

Description

SKSE utility plugin that allows modders to swap base objects with others, using config files.

With this mod, you could... 

  • assign different models to farmhouses in each region, without worrying about compatibility or patches.
  • make statics harvestable/lootable, like Dynamic Things Alternative, but without scripts.

and more!

How To Use

Distributed records should be written to an ini file containing the suffix "_SWAP", in the Data folder (for example, MyMod_SWAP.ini).
They should follow this general format:

[Forms]
origBaseID|swapBaseID|transformOverrides|chance
origBaseID|swapBaseID,swapBase2ID,swapBase3ID|transformOverrides|chance

[References]
origRefID|swapBaseID|transformOverrides|chance

[Forms|LocationEDID,CellEDID,KeywordEDID,RegionEDID]
origBaseID|swapBaseID|transformOverrides|chance

ID can be either formID or editorID of the object

ObjectFormID~ModName.esp OR ObjectEditorID

origBase is the base object you're trying to replace (eg. all farmhouse statics).
origRef is the specific object reference you're trying to replace (ie. a specific farmhouse in Riverwood).

swapBase is the replacement object you're replacing it with (eg. your farmhouse static with new model).

Locational replacements
  • Location based form swaps
  • Requires location/cell editorID or keyword editorID (for location) 

;this swaps all WalkwayBend02 statics in Riverwood and Falkreath for snow variants

[Forms|RiverwoodLocation,FalkreathLocation]
WalkwayBend02|WalkwayBend02Snow

;this swaps all caskets in locations with LocTypeInn keyword

[Forms|LocTypeInn]
Casket|CasketInn


Transform Overrides

  • Change the position, rotation and scale of swapped objects
  • pos - position
  • rot - rotation
  • scale - scale
  • units must be in floats (20.0)

  • A/R suffixes for setting relative vs absolute transform. For position/rotation
  • posR(1.0,5.0,100.0) will set new position relative to reference base position
  • posA(300.0,100.0,200.0) will override reference base position

  • scale is multiplicative. 
  • scale randomization is possible
  • eg. scale(1.0/2.0) will scale references between 1.0 and 2.0 units

  • Leave as NONE if you don't want transform overrides

;swaps WalkwayBend02 statics to snow variants with relative position + random Z position of 50 to 100, and random scale between 1.0 and 1.50.

[Forms]
WalkwayBend02|WalkwayBend02Snow|posR(10.0,5.0,50.0/100.0),scale(1.0/1.50)
  
  • It is also possible to directly set a transform override without swapping objects. Requires [Transforms] section
[Transforms]
origBaseID|transformOverrides|chance
origRefID|transformOverrides|chance

[Transforms|LocationEDID,CellEDID,KeywordEDID,RegionEDID]
origBaseID|transformOverrides|chance

  • Affects swapped objects

[Forms]
FarmBench|DestructibleFarmBench
Barrel|DestructibleBarrel|scale(2.0)

[Transforms]
;Works even though the farm bench was swapped for destructible bench
FarmBench|rotR(-90,0,0),scale(2.0)

;Does not work because the swapped object transform takes priority
Barrel|rotR(-90,0,0)

Chance

  • Randomly swap between multiple swap objects/percentage chance to not swap at all

  • chance (0 - 100)
  • Default is 100

  • S/R suffixes
  • chanceS(50) - fixed random chance (persists across game sessions; object refs will be always swapped or not)
  • chanceR(50) - chance is rerolled on each new game session (object ref may or may not be swapped each time you load the game)
  • Default is S

[Forms]
;Randomly swaps between Base1, Base2, Base3

Base|Base1,Base2,Base3

;50% chance to swap to Barrel2
;25% chance to swap to Barrel3

Barrel|Barrel2|NONE|chanceS(50)
Barrel|Barrel3|NONE|chanceS(25)

;50% chance (rerolls each game session)

Crate|Crate02|NONE|chanceR(50)

Examples


[Forms]

;Barrel02Static|Barrel02Dynamic
0x10C0E3~Skyrim.esm|0x800~DynamicObjectMod.esp

OR

;0x10C0E3~Skyrim.esm|0x800~DynamicObjectMod.esp
Barrel02Static|Barrel02Dynamic

[Forms|WinterholdLocation]

;swap all mammoth skulls in Winterhold, Z angle offset by 90.0 degrees and random scale between 1.0 and 1.50

;BoneMammothSkullSnowy|BoneMammothSkullDynamic
0x73CE8~Skyrim.esm|0x801~DynamicObjectMod.esp|rotR(0.0,0.0,90.0),scale(1.0/1.50)

[References]

;SomeSpecificMammothSkull|BoneMammothSkullDynamic
0x1234~Skyrim.esm|0x801~DynamicObjectMod.esp|scale(1.0/1.50)


Check po3_BaseObjectSwapper.log in My Documents/My Games/Skyrim Special Edition/SKSE, for more information about the process.

Installation

  • Install as normal with a mod manager. 

Credits

Source

  • Ryan (SniffleMan) for CommonLibSSE
  • alandtse for contributing to this project
  • wSkeever and r/skyrimmods for help with testing