Vampire Race

Post » Thu Feb 17, 2011 1:55 pm

So I just recently came across a mod that has a custom Vampire Race, but being the perfectionist that I am I'm having a hard time with the fact that the only thing that makes it a Vampire Race is the 5 abilities that vampires come to posses. What I'm trying to do is have it so when you choose the said race you will automatically start off as a vampire. My question is how would I do that without rewriting the entire script code to include something like

if GetIsRace == VampireRace then          PC = vampireend if


Also I know my coding isn't all that great, I'm going off of very basic programming skills, so I doubt that even the way I'm going about it is right.
Is there any way I could possibly pull this off, or should I just stick with giving myself the vampire's disease at as a race ability?
User avatar
Laura Elizabeth
 
Posts: 3454
Joined: Wed Oct 11, 2006 7:34 pm

Post » Thu Feb 17, 2011 4:15 pm

Is there any way I could possibly pull this off, or should I just stick with giving myself the vampire's disease at as a race ability?


It's certainly do-able, but I don't understand why you wouldn't just use the ability. It's much cleaner, overall.

short DoOnceBegin GameModeIf DoOnce == 0 && Player.GetIsRace VampireRace == 1	Set PCVampire to 1	Set DoOnce to 1EndIfEnd


PCVampire is a global variable the game uses to track player vampirism.

http://cs.elderscrolls.com/constwiki/index.php/Category:Scripting_Tutorials. Go play. :D


Edit: Oh, and you can also just use set PCVampire to 1 in the console.
User avatar
JeSsy ArEllano
 
Posts: 3369
Joined: Fri Oct 20, 2006 10:51 am

Post » Thu Feb 17, 2011 11:23 am

It's certainly do-able, but I don't understand why you wouldn't just use the ability. It's much cleaner, overall.

short DoOnceBegin GameModeIf DoOnce == 0 && Player.GetIsRace VampireRace == 1	Set PCVampire to 1	Set DoOnce to 1EndIfEnd




for the
Player.GetIsRace VampireRace
Do I put the EditorID, FormID, or the name?

Also,the main reason is that I don't want to just to be abilities, I want the person to actually be able to feed, and if they don't they get stronger, rather then just for it to stay as a solid vampire. I know it's a lot easier, but I like having all the abilities as the vampire.

Also this could be set to remove spells and such too on the game start, right?

Edit: Okay, so far I've gotten this far.

ScriptName VampireRaceScriptshort DoOnceBegin GameModeif ( player.IsInCombat == 0 ) && (getStage CharacterGen >= 88 ) && ( DoOnce == 0)     if ( player.GetIsRace VampireRace )          message "You're a vampire"          Set PCVampire to 1          player.SetAV Vampirism 25          Set DoOnce to 1     else          message "You are not a vampire"     endif     StopQuest VampireRaceQuestend ifend


My problem is that
Set PCVampire to 1 
is not actually setting my character as a vampire, and the
player.SetAV Vampirism 25
which was a long shot in the first place doesn't work either.
What does work however is I get the messages correctly stating when I am or when I'm not the VampireRace.
User avatar
Skivs
 
Posts: 3550
Joined: Sat Dec 01, 2007 10:06 pm

Post » Fri Feb 18, 2011 1:54 am

for the
Player.GetIsRace VampireRace
Do I put the EditorID, FormID, or the name?


The Editor ID. FormIDs and visible names aren't generally used in scripting, with rare exception, and functions that use them (usually OBSE) are documented as such at the CS Wiki.

Also,the main reason is that I don't want to just to be abilities, I want the person to actually be able to feed, and if they don't they get stronger, rather then just for it to stay as a solid vampire. I know it's a lot easier, but I like having all the abilities as the vampire.


Then it really just sounds like you need to give the player the disease, and let it take effect. If you want to customize further, you'll want to take a look at VampireScript (a vanilla quest script) and see how it's all laid out, and pull from there.

Also this could be set to remove spells and such too on the game start, right?


Yes.
User avatar
XPidgex Jefferson
 
Posts: 3398
Joined: Fri Sep 08, 2006 4:39 pm


Return to IV - Oblivion