Braffel Posted March 5, 2012 Share Posted March 5, 2012 Hey ho, i'm making a spell that toggles the physical changes from vampirism, i.e. the eyes, the paleness and the general face changes. To accomplish this i made a really basic script spell included here: Scriptname CRCVampireDaywalkerChange extends activemagiceffect bool isvampire Event OnEffectStart(Actor akTarget, Actor Caster) Actor Target=Game.GetPlayer() Game.DisablePlayerControls() VampireTransformIncreaseISMD.applyCrossFade(2.0) ObjectReference myXmarker = Target.PlaceAtMe(Xmarker) MAGVampireTransform01.Play(myXmarker) myXmarker.Disable() if (Target.GetActorBase().GetRace() == ArgonianRace) Target.SetRace(ArgonianRaceVampire) elseif(Target.GetActorBase().GetRace() == ArgonianRaceVampire) Target.SetRace(ArgonianRace) elseif (Target.GetActorBase().GetRace() == BretonRace) Target.SetRace(BretonRaceVampire) elseif (Target.GetActorBase().GetRace() == BretonRaceVampire) Target.SetRace(BretonRace) elseif (Target.GetActorBase().GetRace() == DarkElfRace) Target.SetRace(DarkElfRaceVampire) elseif (Target.GetActorBase().GetRace() == DarkElfRaceVampire) Target.SetRace(DarkElfRace) elseif (Target.GetActorBase().GetRace() == HighELfRace) Target.SetRace(HighELfRaceVampire) elseif (Target.GetActorBase().GetRace() == HighELfRaceVampire) Target.SetRace(HighELfRace) elseif (Target.GetActorBase().GetRace() == ImperialRace) Target.SetRace(ImperialRaceVampire) elseif (Target.GetActorBase().GetRace() == ImperialRaceVampire) Target.SetRace(ImperialRace) elseif (Target.GetActorBase().GetRace() == KhajiitRace) Target.SetRace(KhajiitRaceVampire) elseif (Target.GetActorBase().GetRace() == KhajiitRaceVampire) Target.SetRace(KhajiitRace) elseif (Target.GetActorBase().GetRace() ==NordRace) Target.SetRace(NordRaceVampire) elseif (Target.GetActorBase().GetRace() == NordRaceVampire) Target.SetRace(NordRace) elseif (Target.GetActorBase().GetRace() == OrcRace) Target.SetRace(OrcRaceVampire) elseif (Target.GetActorBase().GetRace() == OrcRaceVampire) Target.SetRace(OrcRace) elseif (Target.GetActorBase().GetRace() == RedguardRace) Target.SetRace(RedguardRaceVampire) elseif (Target.GetActorBase().GetRace() == RedguardRaceVampire) Target.SetRace(RedguardRace) elseif (Target.GetActorBase().GetRace() == WoodElfRace) Target.SetRace(WoodElfRaceVampire) elseif (Target.GetActorBase().GetRace() == WoodElfRaceVampire) Target.SetRace(WoodElfRace) endif utility.wait(2.0) imageSpaceModifier.removeCrossFade() VampireChangeFX.stop(Target) Utility.Wait(1) Game.EnablePlayerControls() VampireChangeFX.stop(Target) EndEvent Static Property XMarker Auto Sound Property MagVampireTransform01 Auto imageSpaceModifier Property VampireTransformIncreaseISMD Auto imageSpaceModifier Property VampireTransformDecreaseISMD Auto effectShader property VampireChangeFX auto Race Property ArgonianRace Auto Race Property ArgonianRaceVampire Auto Race Property BretonRace Auto Race Property BretonRaceVampire Auto Race Property DarkElfRace Auto Race Property DarkElfRaceVampire Auto Race Property HighElfRace Auto Race Property HighElfRaceVampire Auto Race Property ImperialRace Auto Race Property ImperialRaceVampire Auto Race Property KhajiitRace Auto Race Property KhajiitRaceVampire Auto Race Property NordRace Auto Race Property NordRaceVampire Auto Race Property CVONordRace Auto Race Property OrcRace Auto Race Property OrcRaceVampire Auto Race Property RedguardRace Auto Race Property RedguardRaceVampire Auto Race Property WoodElfRace Auto Race Property WoodElfRaceVampire Auto The character i use to test this with is a nord and this script works perfect the way it is now, but the problem is if i change the NordRace entries to my custom CVONordRace entry, if i do that the details of my character gets washed out as i cast the spell, for instance the hair and eyebrows get reset to what they are set to in the raceitem instead of what my character originally had. To make the CVONordRace i duplicated the NordRace and set the copied data to NordRace and added it to the HeadPartsAllRacesMinusBeast and tagged the overlay head parts list, still tho the details reset if i use the custom race. Any ideas? Link to comment Share on other sites More sharing options...
Braffel Posted March 6, 2012 Author Share Posted March 6, 2012 I guess i somehow have to make my customrace CVONordRace act like the stock NordRace, but im not quite sure whats different about them. Anyway the reason i made the new race was to classify the "non vampire" changes version of the player still be a vampire and i making every nord a vampire seemed a bit exessive :) Link to comment Share on other sites More sharing options...
Braffel Posted March 7, 2012 Author Share Posted March 7, 2012 Minor bump here, still working the issue. Pretty frustrating! Works perfectly with the stock NordRace, but as soon as i use my custom one that is as far as i can tell almost identical it breaks. Link to comment Share on other sites More sharing options...
delfofthebla Posted March 7, 2012 Share Posted March 7, 2012 (edited) I've been somewhat curious at how all of this works myself so I do hope you figure this out. My findings so far regarding the matter might be able to help you. The Vampire race equivalant of each race base has the original set as a MorphRace. What all the "Morph Race" morphs is a mystery to me, but I believe the face data is at least one of the aspects. If you go to the Character/Headpart section within the creation kit, you will see several faces and other face data listed. Since you mentioned a custom nord race I'd recommend looking at the "MaleHeadNord" object. On this object, you have Model, Tri, Race Morph, and Chargen Morph sections. Everything except the model is a ".tri" filetype, and quite frankly, I have no idea what they are for. I am thinking that these are the files that control the morph data for the race, and just what pieces of the face are "transferred" once you change them to a Vampire. Really there's a helluva lot more crap there, but that's a good place to start if you haven't looked there already. Quite frankly it's looking super complex and I'm not really willing to research it any further myself, so you're on your own from there. :P Good luck. Edited March 7, 2012 by delfofthebla Link to comment Share on other sites More sharing options...
Braffel Posted March 7, 2012 Author Share Posted March 7, 2012 The only things that wont save now is the hair and the eyebrows, the face, scars and etc work perfectly. When i morph into the more human looking form i get the default hair and eyebrows, abd then when i morph into the vampire form again i am bald everywhere. The thing that it does when i use the custom race is that it reads the parts set in the "Face Data" tab, for some reason when the stock NordRace is in the mix the stuff that i have made in character generation takes higher prioroty and sticks. Currently looking into what you above me mentioned. Link to comment Share on other sites More sharing options...
Braffel Posted March 7, 2012 Author Share Posted March 7, 2012 (edited) Okay, for anyone interested i fixed it. Or rather i sidestepped the problem. Any time the stock NordRace was involved things worked fine, so in the end i went "well screw you too buddy" and did this: elseif (Target.GetActorBase().GetRace() == CVONordRace) Target.SetRace(NordRace) Target.SetRace(NordRaceVampire) elseif (Target.GetActorBase().GetRace() == NordRaceVampire) Target.SetRace(NordRace) Target.SetRace(CVONordRace) What it does is instead of switching directly between the two races it takes a pitstop in the stock NordRace race, its impossible to notice this happening ingame, but now all the face values save. Except face tan, but thats for another day. If everyone manages to get the skin tan back, post it here. Edited March 7, 2012 by Braffel Link to comment Share on other sites More sharing options...
Recommended Posts