Jump to content

Vampirism Mod


Jamisicus6

Recommended Posts

Basically, this script was written to extend Vampirism within Morrowind and make it more of a tool. It included revoming the vampirism effect on a player (so they could communicate with NPC normally), adding an age system (older you are the more powerful you are), a health based hunger system and several new spells. All of the spells/powers/abilities are in place and set up correctly, but when Vampirism is added (and the player goes over the three day incubation period) none of the abilities are added. According to the script, Vampireage1, vampirespeed and vampireagility should be added to the player (the latter two are powers, whilst the former is an ability, making it act like the vampire stat boosts from the stock game). This is not happening. The vampiredream script has been disabled on purpose to try to find out what is going wrong and the message box comes up with the whole buring thing, and the vampirespeed and vampireagility are added to the player's spellbook, but vampireage1 is not added to the player, and after seven days (the timer for the first age up) nothing happens. Help me guys.

 

begin Vampire_PC

 

float vampstartday

float currentday

float vampireage

short DayCount

float vampirelevel

Float Vampiredaycount

float currenthealth

float halfhealth

float hunger

 

if ( PCVampire != 0 ) ;return if PC is not normal, 1 = Vampire, -1 = Cured

 

StopScript Vampire_PC

return

 

endif

 

Player->RemoveSpell, "Vampire Blood Berne"

Player->RemoveSpell, "Vampire Blood Quarra"

Player->RemoveSpell, "Vampire Blood Aundae"

Player->AddSpell, "Vampire Attributes"

Player->AddSpell, "Vampire Skills"

Player->AddSpell, "Vampire Immunities"

Player->AddSpell, "Vampire Sun Damage"

Player->AddSpell, "Vampire Touch"

Player->AddSpell, "Vampire Specials"

Player->AddSpell, "Vampire Specials 2"

Player->AddSpell, "vampirespeed"

Player->addspell, "Vampireagility"

Player->addspell, "vampireage1"

set PCVampire to 1

;StartScript vampdreamScript

Messagebox "You dream that your body has been lit on fire. The fire slowly cools until only your throat is being scorched by the flames. You jolt awake to find that the fire has not left you. You realise what you are... A Vampire."

set Vampstartday to Day

set currentday to 0

set vampiredaycount to Day

set vampireage to 0

set vampirelevel to 0

endif

 

if ( Day != vampiredaycount )

set currentday to ( currentday + 1 )

set Vampiredaycount to Day

endif

 

if ( currentday >= 7 )

set vampirelevel to 1

elseif ( currentday >= 14 )

set vampirelevel to 2

elseif ( currentday >= 28 )

set vampirelevel to 3

elseif ( currentday >= 56 )

set vampirelevel to 4

elseif ( currentday >= 112 )

set vampirelevel to 5

endif

 

if ( vampirelevel == 1 )

wakeupPC

player->addspell "vampirecommand"

messagebox "A week as a vampire and you have learnt to persuade your victims to almost donate their blood. You have learnt to control your victim's very actions."

player->removespell "vampireage1"

player->addspell "vampireage2"

elseif ( vampirelevel == 2 )

wakeupPC

player->addspell "vampirefeed"

Messagebox "Two weeks since becoming a member of the undead and you can now control yourself whilst feeding... But do you want to?"

player->removespell "vampireage2"

player->addspell "vampireage3"

elseif ( vampireage == 3 )

wakeupPC

player->addspell "vampiresneak"

Messagebox "Four weeks since turning, you are finding out all about the Mortal's... distain for you people. You have learnt how and when to hide from their eyes."

player->removespell "vampireage3"

player->addspell "vampireage4"

elseif ( vampireage == 4 )

wakeupPC

player->addspell "vampirefury"

Messagebox "Nearly two months since your Vampiric Birth, you have learnt to control the hunger. But you have also learnt how to release it."

player->removespell "vampireage4"

player->addspell "vampireage5"

elseif ( vampireage == 5 )

wakeupPC

player->addspell "Vampirefear"

Messagebox "Mortals and Immortals alike tremble at whispers of your name. None who meet you live to tell tales of your fearsome strength and speed. You have become a living Legend, capable fo striking fear into any who you encounter."

player->removespell "vampireage5"

player->addspell "vampireage6"

endif

 

;Feeding/hunger scripts

 

set currenthealth to ( player->GetHealth )

set halfhealth to ( currenthealth * 0.5 )

 

if ( player->GetHealth <= halfhealth )

player->addspell "vampirism"

Messagebox "Your hunger breaks your concentration. People can see you for what you truly are now."

set hunger to 1

endif

endif

 

if ( player->Gethealth >> halfhealth )

if ( Hunger == 1 )

player->removespell "Vampirism"

Messagebox "Your hunger is back under control. You need not worry about being discovered for now."

set hunger to 0

endif

endif

 

 

 

end Vampire_PC

Edited by Jamisicus6
Link to comment
Share on other sites

Hello,

 

I just saw your post here and thought I'd help you out. First of all, I'm not the greatest scriptor, so I may not be able to help you out entirely. I'm just a beginner trying to learn and I like a challenge. :)

 

As far as the script is concerned, it looks sound, and it sounds like a great idea! This would breathe a bit of new life into being a vampire in Morrowind.

 

To begin, I have to say that there are 3 Vampire scripts that came with the game. The most likely reason why your specific script isn't executing is probably because one of the other 3 are being executed. Since there are 3 Vampire clans in Morrowind; Aundae, Berne, and Quarra (each with their own script), I can presume that you edited one of these scripts and made your own custom script, but when you try to become a vampire, your own script isn't executing.

 

I just looked at the scripts that came with Morrowind. I do believe I have a solution that will work. There is another script that checks to see if the PC is a Vampire, and sets PCVampire to 1 if the PC has contracted the disease. The script is called:

 

VampireCheck

 

First, open "VampireCheck" and find the following lines:

 

________________________________________________

 

;check which one they have and give the goods.

if ( player->GetSpell "Vampire Blood Quarra" == 1 )

StartScript Vampire_Quarra_PC

 

elseif ( player->GetSpell "Vampire Blood Aundae" == 1 )

StartScript Vampire_Aundae_PC

 

elseif ( player->GetSpell "Vampire Blood Berne" == 1 )

StartScript Vampire_Berne_PC

________________________________________________

 

 

These commands are the reason why your script is not executing. It is executing the others instead. Change them to this:

 

________________________________________________

 

;check which one they have and give the goods.

if ( player->GetSpell "Vampire Blood Quarra" == 1 )

StartScript Vampire_PC

 

elseif ( player->GetSpell "Vampire Blood Aundae" == 1 )

StartScript Vampire_PC

 

elseif ( player->GetSpell "Vampire Blood Berne" == 1 )

StartScript Vampire_PC

________________________________________________

 

 

By adding the name of your script to the command lines, the "VampireCheck" script should now execute yours instead of one of the other 3.

 

To continue, I'm looking at the Feeding/hunger script. I don't know if what you have currently is correct. But, looking at the following line:

 

________________________________________________

 

if ( player->GetHealth <= halfhealth )

________________________________________________

 

 

I don't think you need to put in the "if player->GetHealth" commands. You already defined this as "currenthealth" in the lines above it. I recommend changing them to the following:

 

________________________________________________

 

set currenthealth to ( player->GetHealth )

set halfhealth to ( currenthealth * 0.5 )

 

if ( currenthealth <= halfhealth )

player->addspell "vampirism"

Messagebox "Your hunger breaks your concentration. People can see you for what you truly are now."

set hunger to 1

endif ;(There's no reason to put an endif here so just delete it to avoid problems)

endif ;leave this endif here

 

if ( currenthealth >> halfhealth )

if ( Hunger == 1 )

player->removespell "Vampirism"

Messagebox "Your hunger is back under control. You need not worry about being discovered for now."

set hunger to 0

endif

endif

________________________________________________

 

 

This should allow the script run and do what you want. However, I do recommend making this Feeding/Hunger script a Global one. Here's a script that you could try and feel free to use it if you wish.

 

________________________________________________

 

begin Feeding_PC

 

float currenthealth

float halfhealth

 

set currenthealth to ( player->GetHealth )

set halfhealth to ( currenthealth * 0.5 )

 

if ( PCVampire != 1 )

return

endif

 

if ( currenthealth <= halfhealth )

player->addspell "vampirism"

Messagebox "Your hunger breaks your concentration. People can see you for what you truly are now."

set hunger to 1

endif

 

if ( currenthealth >> halfhealth )

if ( Hunger == 1 )

player->removespell "Vampirism"

Messagebox "Your hunger is back under control. You need not worry about being discovered for now."

set hunger to 0

endif

endif

 

end Feeding_PC

________________________________________________

 

 

I hope this helps you out. Best of luck to you!

 

-Kain

Edited by KainReaver83
Link to comment
Share on other sites

 

;check which one they have and give the goods.

if ( player->GetSpell "Vampire Blood Quarra" == 1 )

StartScript Vampire_Quarra_PC

 

elseif ( player->GetSpell "Vampire Blood Aundae" == 1 )

StartScript Vampire_Aundae_PC

 

elseif ( player->GetSpell "Vampire Blood Berne" == 1 )

StartScript Vampire_Berne_PC

________________________________________________

 

 

This was one of the first things I changed. The script is properly referenced by all the vampire related scripts and should run fine. But it doesn't. I agree that the scripting is fine in the main section, which is why I can't understand what is going wrong. Could we please get some more experienced help on this?

 

if ( player->GetHealth <= halfhealth )

________________________________________________

 

 

I don't think you need to put in the "if player->GetHealth" commands. You already defined this as "currenthealth" in the lines above it. I recommend changing them to the following:

 

________________________________________________

 

set currenthealth to ( player->GetHealth )

set halfhealth to ( currenthealth * 0.5 )

 

if ( currenthealth <= halfhealth )

player->addspell "vampirism"

Messagebox "Your hunger breaks your concentration. People can see you for what you truly are now."

set hunger to 1

endif ;(There's no reason to put an endif here so just delete it to avoid problems)

endif ;leave this endif here

 

if ( currenthealth >> halfhealth )

if ( Hunger == 1 )

player->removespell "Vampirism"

Messagebox "Your hunger is back under control. You need not worry about being discovered for now."

set hunger to 0

endif

endif

 

Thanks for the advice with that bit Kain, I checked over it briefly after writing it, but I didn't think to set current health as part of it (mainly because I was setting the currenthealth value as the health at the beginning of the script, I can see where that could be confusing now). I am changing that now, but it was originally a separate script that I had left out and not referenced (this was back when I first started testing the main script), so this is not causing the problem.

 

Thanks Kain, good practice for you.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...