Oblivion

File information

Last updated

Original upload

Created by

Lytenian

Uploaded by

lyth

Virus scan

Safe to use

Tags for this mod

About this mod

Requires - Oblivion.esm
Tested to work with Oblivion 1.1

New version for Female Vampire PCs Available here:
https://www.nexusmods.com/oblivion/mods/6332

Quick Desc: This changes the Vampire script to do exactly what the comments in the script indicate it should do. It DOES NOT add or remove anything. It just fixes so

Permissions and credits
Requires - Oblivion.esm
Tested to work with Oblivion 1.1
Written by Lytenian

New version for Female Vampire PCs Available here:
http://tessource.net/files/file.php?id=6332
https://www.nexusmods.com/oblivion/mods/6332

Male PCs should continue to use this version

This fixes some bugs in the vampire script, and is intended for players who want to fix, not improve upon, the vampire script. This script will probably not work with other vampire mods, except those that do not make changes to the script. For example, texture/model mods will likely work.

The changes made to the script do exactly what the existing comments in the original script state. It DOES NOT add or remove any functionality beyond this.

This mod will not fix the issues with the wrong vampire face mesh on reloading a save. Version 2.0 has a rough workaround to that problem.

Details
--------
The script changed is "VampireScript"
Bugs & Fixes:
1. The first bug allowed the player to sleep multiple times (24 hours at a time) in a row shortly after feeding at certain times of day without resulting in a 'worsening' of the vampiric condition. This meant a PC could retain a lower level vampiric status while waiting (for example) 3 days for a quest to become available and not need to do any hunting.

This was caused by an error in the 24 hour variable checking section of the script (Line 115-136 in mod version). The check failed in a certain instance where the current day was at least 1 day after the last feeding, and the feeding hour was < 22 but higher than the current hour of the day. If you continued to sleep or wait during these periods, the flag for condition change would fail to trigger, resulting in no condition change at rest.

The fix involved starting the 24 hour check with a test to see if more than one GameDay had passed and triggering the flag if so. If not, it continued with checking to see if the time of day was later on the day after the initial feeding. The final check initially used was removed as all conditions it covered were now met by the combination of the first two.

2. The second bug was an issue with sleeping after 24 hours since the last feeding only sometimes resulting in a vampiric status change. Other times as much (or possibly more) than 25 hours were required to pass before resting forced the change upon the player character.

This appears to have been caused by a conversion of the float hour variable to an integer by adding one to it for the conditional check. The comparison was then a comparison between integer values 1-23 representing the hour of day rather than floats. As the original floats are decimals and thus indicate both the hour and minute of the day, the addition of the 1 is completely unnecessary and was removed. The comparison now checks to see if as little as 24 hours + whatever-the-smallest-unit-of-time-calculable-by-the engine-is has passed and if so sets the vampire condition change flag.

3. The third and final bug was a bug in the feeding script. As has been noted, sometimes with errors as to the conditions, a player would sometimes change state even shortly or immediately after feeding. What has been occurring is that every time the player fed, the status change flag was failing to reset to zero. The flag was only reset by a change occurring during rest/wait. Thus, a player could only avoid change by not resting/waiting or constantly being certain of feeding within 24 hours of the last occurring change. For if it was missed once, no amount of feeding after would prevent the change.

This was fixed by adding the line that resets the flag in the change script to the feed script where the other related counters are reset, resulting in the clearing of the flag everytime the player fed.


Relevant variables in script:
GameHour - float variable - the precise time of the current game day in decimal format: 1.75 = 01:45 (1:45 AM)

GameDay - integer variable - the current game day in integer format

vamphour - float variable - the exact time of day of the vampire PCs last blood feeding (or state change) in decimal format

vampday - integer variable - the day of the vampire PCs last feeding (or state change)

vampupdate - the trigger for a worsening of the vampire's status upon rest/wait
- set when the vampire character has gone more than 24 hours without feeding or changing status
- cleared (set to zero) when the character feeds or undergoes a status change