HasVampireFed

Post » Mon Oct 18, 2010 1:45 am

hey all.
this post is in regard to HasVampireFed.

unfortunately, oblivion resets this variable to 0 once it is queried.
what this means is this can be queried once ONLY each time the player feeds.

is there another way of detecting when the player feeds?
i don't think OBSE has a variable for this that is unique in each script like GetGameRestarted.
User avatar
Jade Payton
 
Posts: 3417
Joined: Mon Sep 11, 2006 1:01 pm

Post » Sun Oct 17, 2010 10:32 pm

I can see why it was set up that way - so that the next time you query it, it will be for a new feeding session.

Do you have a "main" script that could be responsible for querying this? Then your other scripts could reference the variable that got set in that script.
User avatar
john palmer
 
Posts: 3410
Joined: Fri Jun 22, 2007 8:07 pm

Post » Sun Oct 17, 2010 11:37 pm

Hey andalaybay!

Unfortunately, for now, I'm trying to support the vanila Vampire quest.
And that doesn't save HasVampireFed value.
But even if it did, that variable will still need to be reset to 0 for it to be used as intentded.

I've suggested to the OBSE team to create a script-unique HasVampireFed variable similar to GetGameRestarted.
I think that this is the only way.

Detecting when the player feeds in Vampire mods are easy because they usually save the amount of blood the player consumes.
There is no reliable way of detecting when the player feeds in Oblivion's own vampire script, unfortunately.
User avatar
Marcia Renton
 
Posts: 3563
Joined: Fri Jan 26, 2007 5:15 am

Post » Sun Oct 17, 2010 10:12 pm

Hey andalaybay!

Unfortunately, for now, I'm trying to support the vanila Vampire quest.
And that doesn't save HasVampireFed value.
But even if it did, that variable will still need to be reset to 0 for it to be used as intentded.

I've suggested to the OBSE team to create a script-unique HasVampireFed variable similar to GetGameRestarted.
I think that this is the only way.

Detecting when the player feeds in Vampire mods are easy because they usually save the amount of blood the player consumes.
There is no reliable way of detecting when the player feeds in Oblivion's own vampire script, unfortunately.



Another thing to remember is that vanilla updates the player misc. stat. It's misc stat 24, so getPCMiscStat 24 is the running total. Oblivion XP uses that to award points to the player after they have fed. It keeps a running total in its scripts and compares the latest value from that misc. stat to detect when the player feeds. It works really well :) It's also pretty independent. I forgot all about that the first time I posted :blush:

Now why Oblivion XP awards points for feeding as a vampire is a different question entirely :)
User avatar
aisha jamil
 
Posts: 3436
Joined: Sun Jul 02, 2006 11:54 am

Post » Sun Oct 17, 2010 7:49 pm

Another thing to remember is that vanilla updates the player misc. stat. It's misc stat 24, so getPCMiscStat 24 is the running total. Oblivion XP uses that to award points to the player after they have fed. It keeps a running total in its scripts and compares the latest value from that misc. stat to detect when the player feeds. It works really well :) It's also pretty independent. I forgot all about that the first time I posted :blush:

Now why Oblivion XP awards points for feeding as a vampire is a different question entirely :)
Excellent! Thanks andalaybay!
User avatar
Dylan Markese
 
Posts: 3513
Joined: Sat Dec 01, 2007 11:58 am


Return to IV - Oblivion