Oblivion

This framework is open source and can be used as base for your own work or to expand on the original. Like making use of xOBSE functions to integrate it in a similar way as CSR using key bind events.

Due to the modular nature of the framework, it's fairly simple to implement new features and have it work with the mod as a plugin or merged as a unofficial extension over the original. I.e. Replacing the original framework vs an addon .esp that requires AFF as a master.

Performance wise this mod has a 0.1 - 0.9% impact on the script profiler from my tests.

Script functions in the main quest:

Refined horse use:
The reference information linked on the description page used to build this framework is dated and has a few misconceptions I'd like to address here.

  • The package flag "Continue if near PC" should be used while riding the horse to prevent, dismount/remount.
  • Do not use "Must reach location" flag while following on horse. This can lead to a weird glitch when you leave interiors.
  • "Skip fallout behavior" must be off for the mount horse package to allow NPC/Horse interaction
  • "Must complete" will ensure the NPC mounts the horse.

If (Follower01 == 5) && (Follower1REF.IsRidingHorse) ;Follower 1 is in horse state
Follower1REF.AddScriptPackage AFFPackageFollowPlayerHorse ;we are on horse follow player
ElseIf (Follower01 == 5) && (Follower1REF.IsRidingHorse == 0)
Follower1REF.AddScriptPackage AFFPackageMountHorse
ElseIf (Follower01 != 5) && (Follower1REF.IsRidingHorse) ;state is not on horse dismount now
Follower1REF.evp
EndIf

If followers are in combat, the override takes over and they will dismount and attack.


Sandbox AI:

If (Follower01 == 3) && (Follower1REF.GetDead == 0) ;Sandbox AI
If (GetGlobalValue GameHour >= 8) && (GetGlobalValue GameHour < 10) || (GetGlobalValue GameHour >= 20) && (GetGlobalValue GameHour < 22) ;eat
Follower1REF.AddScriptPackage AFFPackageEatAnytime
ElseIf (GetGlobalValue GameHour >= 13) && (GetGlobalValue GameHour < 18) ;read
Follower1REF.AddScriptPackage AFFPackageRead13x5
ElseIf (Follower1REF.GetIsCurrentPackage AFFPackageSleepDefault)
;do nothing, not return, we still want this script to process
ElseIf (GetGlobalValue GameHour > 0) && (GetGlobalValue GameHour < 8) ;sleep
Follower1REF.AddScriptPackage AFFPackageSleepDefault
ElseIf (Follower1REF.GetIsCurrentPackage AFFPackageEatAnytime
Else Follower1REF.AddScriptPackage AFFPackageWanderAny
EndIf
EndIf


Essentially this is a scripted package stack that update only within the game hours.
"GetIsCurrentPackage" is used to keep NPCs from looping on the activates. Keeps them sleeping instead of waking up every hour and going back to sleep.


There are plenty of features I'd like to have but are out of scope from the base framework.

Here is some ideas for addons to the framework:

-Anything that other frameworks do like sparing, auto cast passive spells (lighting, heal other, shielding)
-place a bedroll down for followers to sleep if no beds are around
-Infiltrate interior areas
-remove clothing items while swimming
-have them gather ingredients and do alchemy
-have them go farm and "cook" food or go hunting
-even setup a bard type follower to use custom animations from other mods
-setup a follower to be a full time merchant with a shop and share income
-send them into Oblivion gates to close and return with the sigil stone

Article information

Added on

Edited on

Written by

SpiderAkira

0 comments