Oblivion
0 of 0

File information

Last updated

Original upload

Created by

PLRDLF

Uploaded by

PLRDLF

Virus scan

Safe to use

Documentation

Readme

View as plain text

Description:
The game only restores ingredients that are food after the corresponding cell has been restored. However all other items that can be picked up e.g. armor, potions etc. remain gone for good, after the corresponding cell has been restored. This plug-in changes this and restores even such items, after their corresponding cell has been restored.
However cells owned by the player's character or characters that are dead are not considered, in these cells items remain gone. In addition "unique items", quest items for example, also remain gone. And as long as the sanctuary of the Dark Brotherhood in Cheydinhal is vacant, not even food items will be restored there, and the guild hall of the Blackwood company in Leyawiin is also treated specially.

This plug-in originally started as a personal project of mine with the purpose to concern myself with the game mechanics more deeply. But in the end quite some work and time went into this plug-in and I'm believing, maybe some other people might be interested in it as well. So everybody who is interested might give it a try. There are exhaustive comments in the various scripts, however they are in German. I'm not in the mood to translate all of them back into English, and at the beginning I didn't plan to release this plug-in to the public. So in case you can understand German, it's your gain, if you can't, I can't do anything about that.

Introduction:
One of the most annoying aspects of "The Elder Scrolls IV: Oblivion" beside the lame main story for me was the fact that the game almost never restores items that have been taken by the player or any NPC. Food items, ingredients that have the "Food" flag set in the Construction Set are the only exception. However potions with he "Food" flag like beer, wine etc., do not belong into this category. For me it was always pretty illogical that for example shops do never restore the goods that have been bought by the player and that are not stored in a merchant container but are displayed outside in the shop. The same with the guild halls, in case the player is a member, he could basically take every and all item out of the guild hall and these items are never restored, pretty unrealistic eh?

Since I didn't have anything better to do in summer 2017, I was thinking theoretically it should be possible by using "Oblivion Script Extender" to develop a system which ensures that permanently taken items are restored when their corresponding cell is restored. After I've concerned myself a little with this thematic I recognized however that the documentation of the latest version 21 of OBSE is errorenous and many crucial functions I had planed to use, do not work the way the should, at least not in OBSE v21. Originally I had planned to use a very basic system that uses as little data as possible. I didn't want to test older versions of OBSE because they are missing other functions and the version 21 has been around for almost ten years now and the majority of nowadays OBSE plugins and mods depend on version 21. As a result I have not concerned myself with this problem for some time, but developed an alternative which restores at least potions that have the "Food" flag. However I had never been really satisfied with this system at all and so I've concerned my self again with the original problem using a different approach this time. Using this approach I've found an almost perfect solution for the "missing items" problem.

Why is it not perfect?
The reason is, some crucial functions of OBSE do not work as described in the documentation. These functions are, among others, "GetFirstRef" and "GetNextRef". Both functions should also include, with a set parameter up to version v13 and from v14 without any parameter, items that have been picked up, or being more accurate items for which the OBSE command "HasBeenPickedUp" returns 1. However this actually is not the case and "GetFirstRef" e.g. "GetNextRef" don't include such items, these functions only work for items that are still present in the game world.
The consequence of this issue is the fact that this mod CAN NOT restore any item which has been taken BEFORE this mod has been used for the first time. Starting from this moment this mod monitors all items in the currently loaded interior or exterior and frequently checks whether an item is still there or has been picked up.

So to get the maximum out of this mod it's best to use it from the start of a new game. Of course this mod can be used at anytime, but as already mentioned above, items that have been taken and are not food items, will not be restored.

Features:
-Configuration using a dual-lingual (german/english) menu, hold down the "L-Alt" + "M" keys until it appears (starting with v1.3 it is possible to manually define the keys to access the menu).
(The menu can be accessed after the tutorial dungeon has been completed. It is not needed before since the tutorial dungeon can not be entered after the tutorial has been completed and therefore is completely ignored by this mod.)
-Items can be ignored manually from respawning:
I took great care when deciding which items are "unique" and therefore should not respawn after they had been taken. However when using 3-party mods the player has to decide whether an item should be considered "unique" and therefore should not respawn. Manually ignoring of items can be undone at anytime.
-Entire interior/exterior cells can be ignored:
Items taken from such cells will no longer respawn. Manually ignoring of cells can also be undone at anytime and taken items from such cells will respawn again.
-All information regarding the respawning of items or ignoring of items/cells can be displayed using the menu.
-Food items will not respawn any longer:
By default the game restores food items automatically, regardless to whom they belong. Now food items in the player's houses or belonging to a dead character will no longer respawn. An exception is the Rosethorn Hall with Eyja as housekeeper, there all food items (and drinks) will respawn automatically, regardless of the setting. By default this setting is enabled, but this can also be changed back to the vanilla Oblivion behavior, using the game menu.
-Script optimizing:
The scripts have been designed to use as less resources as possible.
-No "savegame bloats":
In addition invalid game data, e.g. references originating from un-installed mods, will be removed on a regular basis from the saved data. In that way, a savegame will always remain as clean as possible. And dynamical references (items having a Ref-ID of the form "FFXXXXXX") are not even considered by this plug-in, so they do not pollute the save data at all.
-This plug-in will also work without the "Shivering Isles" expansion, in case it has not been installed.

Requirements:
-Oblivion v1.2.0.416 or Oblivion + Shivering Isles v1.2.0.416 (older versions have not been tested)
-Oblivion Script Extender Version 21 or higher (in case there will ever be a newer version) (yet again: older versions have not been tested)

Optional:
The OBSE plugin "Conscribe".

Compatibility:
This mod should be compatible with everything that exits for this game, unless a mod uses exactly the same method to restore items. According to my knowledge, there is nothing like this around, at least not on the Nexus. Hence there should be no problems at all.

Installation/Update:
Simply copy/move the plug-in into the Data directory of the Oblivion root directory, overwrite any already existing plug-in. Afterward just activate the plug-in and it will take care of the rest. The load order is completely irrelevant, but in case you use a "Bashed Patch" place this plug-in just before it, since per definition a "Bashed Patch" should be the very last plug-in in the load order.

Un-Installing:
Before you de-activate this plug-in, you should use the un-install function in the menu to recover as many taken items as possible before un-installing the plug-in. Otherwise only taken food items will be restored by the game and the other taken items will be gone for good.
ATTENTION: Due the game mechanics it is not possible to recover taken items originating from master files (ESM-files), that are not currently loaded in the memory. Such items will be gone forever after this plug-in has been removed, food items are yet again an exception, since the game restores them automatically.
Even in case this mod is re-installed at a later time, the save data of the taken items will be lost, so always keep this in mind.
NOTE:
Starting from version 1.1, all info regarding not restored objects (ref-id, origin cell) will be dumped to the file "Data\ConScribe Logs\Static Log.log", in case the OBSE plugin "Conscribe" is installed. Using this info makes it possible to manually restore the objects at a later time, if desired.

Changelog:
2018-11-20 v1.0 - initial release
2019-02-14 v1.1
-Overworked the layout of all scripts, optimization, bug fixes and correction of spelling and grammar errors.

-Changes to the main script:
--Added compatibility for quest MS05.
--The activation of taken items e.g. the de-activation of food, that shall remain gone, should be less noticeable now.
--A message is now displayed after all taken ESM references in an interior cell have been restored.
--ALL items that belong to the player's character in an owned cell and the Imperial Arena are restored now. Previously this was only done for food items and drinks. There are only a handful of such objects in the original game, mostly clutter in inns.
--Removed dummy cells from the script.
--Added more unique items/places.
--ESP/modified ESM references that are dropped right after they have been picked up will no longer be restored (they are still there).
--Better handling of objects that have a so-called "parent reference".
--Objects that are disabled when the player's character enters a cell are now monitored as well. Such items may be enabled by a script later and would not be monitored in that case.

-Changes to the "Shivering Isles" Add-On:
--Added cells where no items shall be restored by default, these are the "Sanctum of Decadence" in Dunroot Burrow and the cells in the haunted city Vitharn.

-Changes to the GUI:
--Added version number.
--The un-ignoring feature of objects/cells via console has been re-worked from the scratch. Now, you don't need to enter some reference-id, but only the items's/cell's index in the array it is stored in. I believe it is easier to remember just a single number ranging from 0 to something than a 8-digit hexadecimal string. And most important, for ESM references the reference-id only becomes valid if the reference is loaded in memory, meaning if it is not loaded, you can not enter the reference-id, it remains invalid. So, if you want to un-ignore an ESM-reference via console, you had to wait until you were in the same cell where you had picked up the item earlier. With the new system any item/cell can be un-ignored anytime.
--Adaption for objects that are disabled when the player's character enters a cell (disabled status will be displayed in the GUI).

-Changes to the un-install process:
--Adaption for the changes of version 1.1.
--In case the OBSE plugin "Conscribe" is installed, all info regarding not restored objects will be dumped to the console and by default to the file "Data\ConScribe Logs\Static Log.log".

-New:
--Better handling of NPCs with an eat AI package and drinks, a new script has been introduced to handle this.

2019-07-28 v1.2
-Changes to the main script:
--Small fixes and improvements.
-Fixed an issue with the activation/deactivation process of taken objects and the new script that handles eat AI packages for NPCS.
--When a cell contains taken non-food objects that were restored while entering, it was possible that objects in the current cell were not monitored. Re-entering the current cell or saving in the current cell and reloading the save did fix this tough.
--Checking whether a cell has already been reset will only be done after at least one game hour has passed since the last check has been done and not always while the script is running.
-Due the way the OBSE function "HasBeenPickedUp" does work, e.g. does not work depending on how one sees it, the feature introduced in v1.1 (ESP/modified ESM references that are dropped right after they have been picked up are no longer restored) did not work as expected. In the worst case this could result in the loose of ALL taken objects from the specific cell, in case the player did visit the cell again before its reset timer has reached 0.
--"HasBeenPickedUp" returns only the true status for a taken object in case the object has just been removed from the game world, either by picking up the object or by calling the OBSE function "SetHasBeenPickedUp 1" on the object. If the player leaves the cell and returns before the cell has been reset, "HasBeenPickedUp" will always return 0 for any taken object which is false. Instead of "HasBeenPickedUp" the OBSE function "GetBoundingRadius" is now used to check whether an object is still present in the game world or not. "GetBoundingRadius" will always return "-1" for any object whose 3D model is not currently visible in the game world, be it a disabled object or a taken object.

-Changes to the "Shivering Isles" Add-On:
-One of the variables in the script was of a wrong type, which caused troubles at the end of the SI main quest (probably missing objects in the quarter of the Mania/Dementia ruler, depending on which ruler the player has replaced during the main quest).
--This has been fixed together with some other corrections and improvements.
--All objects in the Mania Garden will be restored as well, previously this was only done for food items (the two wine bottles).

-Changes to the GUI:
--Fix to the ignoring/unignoring feature for objects if there were no objects left in the current cell.
--Better wording of some menu text.
--The OBSE function "HasBeenPickedUp" was removed due its unreliability and has been replaced by the OBSE function "GetBoundingRadius" e.g. when it's not possible to check the status of an object at all, the object will now be restored in any case, regardless of its current status.
--The manual ignoring process has been improved.

-English GUI only:
-Due an oversight some features regarding the ignoring/un-ignoring process of ESM references were missing in the GUI.
--This has been fixed.

-Changes to the uninstall process:
--The OBSE function "HasBeenPickedUp" was removed due its unreliability and has been replaced by the OBSE function "GetBoundingRadius" e.g. when it's not possible to check the status of an object at all, the object will now be restored in any case, regardless of its current status.

-New:
--Added a new feature, the option to prevent the re-spawning of containers located in ignored cells, or in cells belonging to dead characters. This new feature is disabled by default, if you want to use it, just enable it using the in-game menu. As it is the case with all other features of this plug-in, this can be reverted at any time, turning re-spawning containers back to their default behavior. This feature only affects re-spawning containers, non re-spawning containers in ignored cells, or in cells belonging to dead characters, will not be changed, they are still safe for storage.
Note: Re-spawning containers located at the Gweden farm near Anvil and re-spawning containers located in cells belonging to the Blackwood Company, will also be affected when this new feature is enabled, depending whether the corresponding quests have been completed.
--Adaption for the "Shivering Isles" Add-On to work with the new feature for ignored cells and re-spawning containers.

2019-12-18 v1.3
-Changes to the main script:
-Yet another problem with the script which controls the AI of NPCs while eating has been fixed.
--When NPCs were eating, indexing of objects in the current cell could be omitted, in case the game was saved at a "bad" moment.

-Changes to the main script and the uninstall process:
--The OBSE command "Update3D" is now used to update the 3D model of items that have been restored e.g. items that should remain gone for good. This procedure is more effective than the one which has been used until now. Including potential parent references is also no longer necessary when using this method.

-Changes to the uninstall process:
-In case the player has not changed the current cell for some time, it was possible that not all objects that theoretically could have been restored, were restored indeed.
--This has been corrected and all objects that can be restored are actually restored.

-New:
--It is now possible to manually define the keys that are used to access the menu. Just open the console and enter "set ItemsDoRespawn.Taste1 to " e.g. "set ItemsDoRespawn.Taste2 to ". The DirectX Key Scancodes can be found for example at https://cs.elderscrolls.com/index.php?title=IsKeyPressed2, but also in the OblivionReloaded.ini file in case OblivionRealoaded is installed.
By default the menu can still be accessed using the keys "M" + "L-Alt" (Taste1 = 50 and Taste2 = 56).
Note: If desired, the menu can be accessed with just one key, however in this case the first key must be set to "0", thus "set ItemsDoRespawn.Taste1 to 0".

2021-04-20 v1.4
-Changes to the main script:
--Adaption for the changed GUI.
--Other small changes

-Changes to the GUI:
--Better compatibility with the main script in case the cell was changed during the manual ignoring process. The main script is now stopped while the the GUI is shown.

-Changes to the script which controls the AI of NPCs while eating/drinking.
--This script is now used exclusively for NPCs that have nothing to eat/drink in their inventories.
--NPCs can now leave e.g. cross neighboring interior cells in case their AI package directs them somewhere else for eating/drinking.
-Applying this script to a dead NPC with an eat AI package would resurrect the dead NPC with 0 HP.
--This has been corrected, now the script is only applied to living NPCs.

-Changes to the Setup script:
--Better handling of the script processing in case the "Shivering Isles" expansion has been uninstalled (SI DLC has been unchecked and Oblivion.esm has not been rebuilt). Prior v1.4 there was only a warning in case the expansion has been uninstalled however the add-on for SI had still been processed. Normally this would not be an issue, however in case Oblivion was installed from the scratch WITHOUT the "Shivering Isles" expansion, this will cause serious troubles, causing the main script to freeze. This has been corrected, in case SI is uninstalled, the add-on will be stopped from being processed.

-Correction to the documentation.
--Fixed some typos.

2021-09-01 v1.4.1
-Changes to the script which controls the AI of NPCs while eating/drinking.
--There are a few packages in the game that are treated as "eat packages" but aren't in fact true "eat packages", because they lack a location. Although this has no negative influence on the script, it causes unwanted debug messages to appear in the console when the script processes such packages. This has been fixed and debug messages are no longer displayed.

Credits:
Bethesda for developing the game
The OBSE team, for creating the script extender
The user "shademe" for the OBSE plugin "Conscribe".

PLRDLF