Skyrim Special Edition

File information

Last updated

Original upload

Created by

RavenKZP

Uploaded by

RavenKZP

Virus scan

Safe to use

Tags for this mod

About this mod

A framework created to track items, and replace them into another after some time.
Do nothing by it's own, but it's highly modular and expansionable in mid game, without issues.

Requirements
Permissions and credits
Changelogs
Mod Description

Just a framework for some my mods to work.
if you are just user and some mod is requiring this one, just install it and you are done.

If you are mod creator and want to use this framework then:
It's open for everyone so if you want to add something using this framework go to tech desc tab, where you will have all info what you need to implement new add-on.

It contain two global variables:
SSSF_Debug (default 0) - to Debug stuff
SSSF_SpoilageEnabled (default 1) - to Disable Spoilage

if you want to disable whole system just type in console "set SSSF_SpoilageEnabled to 0"


Compatibility

No vanilla edits, just happy little quest with happy little script (source may be scary, but trust me it's simple), that will run only when needed and super performance friendly.

For mod authors

SSSF_Debug variable will control what messages you will get into your face from this framework:

; 1 or more - Init and Tracked Player Items Message, every OnUpdateGameTime
; 2 or more - Tracked Containers Items Message, every OnUpdateGameTime
; 3 or more - Tracked Dropped Items Message, every OnUpdateGameTime
; 6 or more - Show when Next OnUpdateGameTime will happen
; 10 or more - OnItemAdded, OnItemRemoved messages
; 20 or more - Show FormLists on OnUpdateGameTime - Just usefoul for it's size


Whole system is working on keywords and FormLists, so KID and FLM are basically must have for this Framework to avoid conflicts.

How to add items to this system:

It's basically 4 things:

1. Create new items, that you want to be added as replacement for other items.
(It can be anything, what can be collected by player, Armor, weapon, Food, Misc Items, Potions etc)

2. Create Corresponding Keywords per new item. (SpoilageItem)

3. Create Global variable, containing number of days (but it's float, so 0.5 means 12hours), when item will change to another after first added to player inventory.

4. Create corresponding Keyword per Global Value. (Spoilage Category)

Next step is to:
a) Create 4 FormList containing paired values 1:1
like in the example below, and using FLM insert these lists into FormLists in this mod (RECOMENDED)
b) Using FLM inert all what's needed into FormLists in this mod (Should be also ok, but loner config file and easier for mistake).

Example of solution from a):


;Adding an asterisk before a FormList adds its contents instead of the list itself.

; Both list below MUST be same size
FormList = SpoilTableKeywords|*SFSS_Keywords_Spoilage_Food ;<- This list contain Keywords
FormList = SpoilTableItems|*SFSS_Spoilage_Food ;<- This list contain Forms (Food items)

; Both list below MUST be same size
FormList = SSSF_SpoilageCategory|*SFSS_Keywords_Spoilage_Categories ;<- This list contain Keywords
FormList = SSSF_SpoilDaysCat|*SFSS_DayValues_Spoilage_Categories ;<- This list contain GlobalVariables


Now you need to distribute the keywords to items you want to be affected:
Add "Spoilage Category" Keyword to item to make it change over time.
Add "Spoilage Item" keyword to show script what item need to be replaced for.

Best way is to do it with KID as in example:

MyMod_KID.ini
Keyword = SCSS_Hunterborn_CarcassSpoilageCategory|Misc Item|_DS_CarcassFresh_Deer
Keyword = SCSS_Hunterborn_Carcass_Deer|Misc Item|_DS_CarcassFresh_Deer


And that's it.

Some additional keywords to control the system:

SSSF_DoNotTrackInPlayerInventory <- item will no be tracked when in Player Inventory
SSSF_DoNotTrackWhenDropped <- item will no be tracked when dropped 
SSSF_DoNotTrackInContainers <- item will no be tracked when in container (including NPC inventory)
SSSF_NoRandom <- No random +/- 1 day until change
SSSF_PreventRemoval <- If item was equipped and morphed to another use this flag to disallow player to remove this item