Jump to content

Cannot get this Transformation script to work right


Recommended Posts

Good. i'm trying to get this working too ...

That's why I asked .. what did you put in Explosion Property EndExplosion auto

 

 

these are consloe commands ...It's all comming back to me now how i did this via .bat file

player.addspell 00092c48 for the beast from itself and player.addspell 000a1a3e

As I remember it ... though I can't find the right command there was a way to set how long you were a werewolf.

So to change back I did the same thing but set the time to 2 seconds ... that changed me back right away.

 

also here is a console command to enchant a ring

PlayerEnchantObject 1CF2B 92C45 #Ring of Permanent Werewolf Form

Link to comment
Share on other sites

Good. i'm trying to get this working too ...

That's why I asked .. what did you put in Explosion Property EndExplosion auto

 

 

these are consloe commands ...It's all comming back to me now how i did this via .bat file

player.addspell 00092c48 for the beast from itself and player.addspell 000a1a3e

As I remember it ... though I can't find the right command there was a way to set how long you were a werewolf.

So to change back I did the same thing but set the time to 2 seconds ... that changed me back right away.

 

also here is a console command to enchant a ring

PlayerEnchantObject 1CF2B 92C45 #Ring of Permanent Werewolf Form

 

In Explosion Property EndExplosion auto I just put a random explosion effect fro the time being. ExplosionIllusionMassiveDark01 is the one I was playing with right now.

 

In one mod, Wrath of Nature,

http://www.nexusmods.com/skyrim/mods/31485/?

 

did something similar with the effect

 

 

 

EDIT: I Definitely seen mods that allow the user to transform by pressing Z and pressing it again reverts them back, without the need for doing quests. Quite a few actually so maybe doing that quest isn't necessary after all, which is good because it seems like overkill to do all that for one spell

Edited by Juebev
Link to comment
Share on other sites

give me a day ... i have to get the spell working to check it out 1st

 

Ok got the morph spell to work and I think i may have a way to change back

 

with

playerwerewolfchangescript property PlayerWerewolfQuest auto

 

and

PlayerWerewolfQuest.setstage(100)

(use auto fill)

 

I know this works from the console player.setstage 2ba16 100

I'm guessing that is calling the same thing (untested)

 

But I've ran into a slight problem ... Werewolves can't cast spells !!!

 

Werewolves are considered unarmored, therefore "skin" spells cast remain effective (such asDragonhide), but cannot be recast while in Beast Form.

 

Also I noticed the people don't react like they should to me being a werewolf.

Clearly there is more to this then just the morph ... as seen in the LINK from before.

factions need to be set and so on ... as in his script.

Edited by NexusComa
Link to comment
Share on other sites

OK guys, start from the beginning. What exactly are we trying to do here? Because right now it looks like you might be talking past each other. Are you trying to:

 

Allow the PC to turn into a vanilla werewolf

Allow NPCs to transform into vanilla werewolves

Allow a PC to transform into a custom race/non-werewolf race

Allow NPCs to transform into a custom race/non-werewolf race

 

And further do you wish it to be:

 

A timed effect

A toggle effect

 

and do you wish it to be compatible with vampirism? Also do you wish it to qualify as a werewolf for Companions quest conditions (e.g. access to Underforge)

 

I can tell you definitively that the lack of a global variable is not your issue here.

Link to comment
Share on other sites

OK guys, start from the beginning. What exactly are we trying to do here? Because right now it looks like you might be talking past each other. Are you trying to:

 

Allow the PC to turn into a vanilla werewolf

Allow NPCs to transform into vanilla werewolves

Allow a PC to transform into a custom race/non-werewolf race

Allow NPCs to transform into a custom race/non-werewolf race

 

And further do you wish it to be:

 

A timed effect

A toggle effect

 

and do you wish it to be compatible with vampirism? Also do you wish it to qualify as a werewolf for Companions quest conditions (e.g. access to Underforge)

 

I can tell you definitively that the lack of a global variable is not your issue here.

 

 

My goal is to allow the PC to

to transform into a custom race/non-werewolf race with a A toggle effect

 

So far I've been able to get the PC to transform but not revert back.

Yes it can be compatible with vampirism, (though it doesn't really matter at this point) and it really doesn't matter when ti comes with the companions.

Edited by Juebev
Link to comment
Share on other sites

OK, that's kind of what I thought. So what you need now is either a new spell that the polymorph race can cast in order to return to normal or to make the same spell also turn you back. If you want to use the same spell, the basic structure of the script would be like so:

Scriptname TransF_1 extends activemagiceffect 

{Toggle the Spell}

;--PROPS--
RACE PROPERTY PolymorphRace auto
Faction Property MonsterFaction auto
Spell Property PolymorphSpell auto
Explosion Property EndExplosion auto
PolymorphQuestScript property MyPolyMorphQuest auto 
{This is a new quest that you create. It should have a script attached that has the following line:

race property CasterOriginalRace auto hidden

The script can be called anything you want,
and you should replace "PolyMorphQuestScript" above with the name of your quest script
and "MyPolyMorphQuest" with the Editor ID of your quest.

The quest should be set as "Start Game Enabled" and "Run Once"

Otherwise the quest can be entirely blank.}

;--EVENTS--
 
Event OnEffectStart(Actor Target, Actor Caster)
	;Removed the check to ensure Target != none. This event will not fire unless there is a target.
	ObjectReference eFX
	If (Target.GetRace() != PolymorphRace) ;Changed GetActorBase().GetRace() to just GetRace(). We want the actor's current race, not the base actor's race.
		MyPolyMorphQuest.CasterOriginalRace = Target.GetRace() ;This will store the caster's current race in your quest variable. Using GetRace() instead of GetActorBase().GetRace() will allow vampires to use this ability too.
		;The rest of this section is good, except I replaced GetCasterActor() with Target. No need to run the GetCasterActor() function when we already have access to the caster variable, and besides we want the spell to be cast on the target.
		Target.UnequipAll()
		
		Game.ShakeCamera(afStrength = 0.5,afDuration = 1)
		eFX = Target.placeAtMe(EndExplosion)
		Utility.Wait(1.5)
		Target.SetRace(PolymorphRace)
		
		Target.AddSpell(PolymorphSpell)
		Target.EquipSpell(PolymorphSpell, 0)
		Target.EquipSpell(PolymorphSpell, 0)
	Else
		;Here is where we should turn back.
		Target.UnequipAll()
		Utility.Wait(1.5)
		Game.ShakeCamera(afStrength = 0.5,afDuration = 1)
		eFX = Target.placeAtMe(EndExplosion)
		Utility.Wait(1.5)
		Target.UnEquipSpell(PolymorphSpell, 1)
		Target.UnEquipSpell(PolymorphSpell, 0)
		Target.RemoveSpell(PolymorphSpell)
		Target.SetRace(MyPolyMorphQuest.CasterOriginalRace) ;This line was your main issue before. Caster's original race has to be stored outside of this script so that it isn't forgotten when this script ends. I also placed it last so that we can be sure all of the spells have been properly removed before the player reverts.
	Endif
	
	if(eFX)
		;This is just to guarantee the explosion gets removed. Shouldn't be necessary strictly speaking but it's helpful to guarantee we don't cause save bloat.
		eFX.Disable()
		eFX.Delete()
		eFX = none
	endif
EndEvent
Link to comment
Share on other sites

Thanks again for helping me out with this thing, I'm really excited for this. I want to thank you for reminding me about save bloat, I totally forgot about that while working on the script. This script compiled smoothy however I think I have one of my settings wrong, I think it may be my Magic effect settings? For some reason I'm still not reverting back. I also discovered that the spell disappears from my inventory once used

 

First I made the Quest , I made sure that both Start Game Enabled and Run Once were checked.

 

 

NEVERMIND

I FORGOT TO SET THE PROPERTIES IN THE SCRIPT, I'm so dumb.

I MANAGED TO REVERT BACK

 

I"M SO FREAKING HAPPY

 

THANK YOU GUYS SO MUCH :dance: :dance: :dance:

 

I'll tell you guys one thing, this was one HECK of a learning experience. The possibilities with scripting is really impressive, I think I'm seriously gonna start learning this skill. It's amazing what you can do once you have a script, and support from a awesome modding community.

 

Thanks a lot for this

 

 

Update: GAAH Spoke too soon it seems. The spell keeps disappearing after I used it once and the only way to get it back is through console again. Is this a problem with the magic effect maybe? I'll mess around with this some more maybe I can sort this out.

Edited by Juebev
Link to comment
Share on other sites

The spell should not disappear after a single use if it is a lesser power. Greater powers disappear for 24 hours after use, and lesser powers disappear for about 3 seconds.

 

You're not filling the PolymorphSpell property in your script with this spell, right?

 

Also you don't need the OnInit() event in your quest script. Literally all you need aside from the script name line is that race property. The OnInit() won't hurt anything but it's not necessary.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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