Creature Transformation Script

Post » Wed May 11, 2016 9:13 am

Hello!


Hope everyone is doing well.



I've been messing around with the Creative kit and been having a blast making stuff. So far I've made a small Island and home to retreat to after adventuring in Skyrim , I'd like to make a teleporting spell but thats a different story (and headache). Right now I'll like to make a transformation script to a monster I've made thanks to a Tutorial I found after searching on google on how to make these things, unfortunately the script seems alittle dated and although it allows me to transform, there's no way to revert back (without doing the companions quest) or use powers you can use only in your transformed state. (example Vampire lord)



I've tried messing around with the script but I'm no expert and needless to say my efforts failed. I've seen what I want done, and I've tried to look at the scripts of these mods but I didn't get very far. I can't post links but the name of the mods on youtubr are " Vasto Lorde Transformation Skyrim" and "Yamato Transformation and Summon" with the latter being pretty much exactly what I want with skeleton and all. Basically my Goal is to have a transformation spell that works like the Vampire lord but with a different skeleton



If someone can help me fix this script I would greatly appreciate it.




If you test the script, it works! but like mentioned before It's not like the vampire lord nor can I revert back. Once again many thanks for taking the time to read my post.



; PROPERTIES /

;=============/



Quest Property CompanionsTrackingQuest auto

Faction Property PlayerWerewolfFaction auto

Shout Property MonsterShout auto

Race Property PolymorphRace auto

Spell Property PolymorphSpell auto

Faction Property MonsterFaction auto

Weapon Property MonsterWeapon auto







;======================================================================================;

; EVENTS /

;=============/







Event OnEffectStart(Actor Target, Actor Caster)

if (Target.GetActorBase().GetRace() != PolymorphRace)

Target.SetRace(PolymorphRace)

Game.GetPlayer().SetHeadTracking(false)

Game.GetPlayer().UnequipAll()

Game.GetPlayer().AddSpell(SPELLCLEAR1)

Game.GetPlayer().EquipSpell(SPELLCLEAR1, 0)

Game.GetPlayer().AddSpell(SPELLCLEAR2)

Game.GetPlayer().EquipSpell(SPELLCLEAR2, 1)

Game.GetPlayer().AddItem(WEAPONCLEAR1)

Game.GetPlayer().EquipItem(WEAPONCLEAR1, 0)

Game.GetPlayer().AddItem(WEAPONCLEAR2)

Game.GetPlayer().EquipItem(WEAPONCLEAR2, 1)

Game.GetPlayer().EquipSpell(PolymorphSpell, 0)

Game.GetPlayer().AddSpell(PolymorphSpell)

Game.GetPlayer().EquipSpell(PolymorphSpell, 0)

Game.GetPlayer().AddToFaction(MonsterFaction)

Game.GetPlayer().AddItem(MonsterWeapon)

Game.GetPlayer().EquipItem(MonsterWeapon, 1)

Game.GetPlayer().AddItem(MonsterAmmo, 99)

Game.GetPlayer().EquipItem(MonsterAmmo)

Game.GetPlayer().AddItem(MonsterArmor)

Game.GetPlayer().EquipItem(MonsterArmor)

Game.DisablePlayerControls(false, false, false, false, false, true, false)

Game.SetPlayerReportCrime(false)

Game.GetPlayer().SetAttackActorOnSight(true)

Game.GetPlayer().AddToFaction(PlayerWerewolfFaction)

Game.GetPlayer().AddShout(MonsterShout)

Game.GetPlayer().EquipShout(MonsterShout)





endif



EndEvent







Event OnEffectFinish(Actor Target, Actor Caster)

; change back

Game.GetPlayer().RemoveSpell(PolymorphSpell)

Game.GetPlayer().UnEquipSpell(PolymorphSpell, 0)

Game.GetPlayer().RemoveFromFaction(MonsterFaction)

Game.GetPlayer().RemoveItem(MonsterWeapon)

Game.GetPlayer().UnEquipItem(MonsterWeapon, 1)

Game.GetPlayer().RemoveShout(MonsterShout)

Game.GetPlayer().UnEquipShout(MonsterShout)

Game.GetPlayer().RemoveItem(MonsterAmmo, 99)

Game.GetPlayer().UnEquipItem(MonsterAmmo)

Game.GetPlayer().RemoveItem(MonsterArmor)

Game.GetPlayer().UnEquipItem(MonsterArmor)

Game.GetPlayer().AddSpell(SPELLCLEAR1)

Game.GetPlayer().EquipSpell(SPELLCLEAR1, 0)

Game.GetPlayer().AddSpell(SPELLCLEAR2)

Game.GetPlayer().EquipSpell(SPELLCLEAR2, 1)

Game.GetPlayer().AddItem(WEAPONCLEAR1)

Game.GetPlayer().EquipItem(WEAPONCLEAR1, 0)

Game.GetPlayer().AddItem(WEAPONCLEAR2)

Game.GetPlayer().EquipItem(WEAPONCLEAR2, 1)

Game.EnablePlayerControls()

Game.SetPlayerReportCrime(true)

Game.GetPlayer().SetAttackActorOnSight(false)

Game.GetPlayer().RemoveFromFaction(PlayerWerewolfFaction)

Debug.Trace("WEREWOLF: Setting race " + (CompanionsTrackingQuest as CompanionsHousekeepingScript).PlayerOriginalRace + " on " + Game.GetPlayer())

Game.GetPlayer().SetRace((CompanionsTrackingQuest as CompanionsHousekeepingScript).PlayerOriginalRace)



endEvent







Ammo Property MonsterAmmo Auto







Armor Property MonsterArmor Auto

SPELL Property SPELLCLEAR1 Auto



SPELL Property SPELLCLEAR2 Auto



WEAPON Property WEAPONCLEAR1 Auto



WEAPON Property WEAPONCLEAR2 Auto




User avatar
celebrity
 
Posts: 3522
Joined: Mon Jul 02, 2007 12:53 pm

Post » Wed May 11, 2016 8:31 am

If it was a script made for Skyrim, no way. Post the tutorial.


Did you fill the properties? Is CompanionsTrackingQuest from vanilla or did you make it? How long does the spell go for?

User avatar
LuCY sCoTT
 
Posts: 3410
Joined: Sun Feb 04, 2007 8:29 am

Post » Wed May 11, 2016 8:25 am


Heya Elias555, thanks for responding



Well what I mean by dated was that, there are other mods that have achieved the desired affect without having doing the companions quest. I didn't make the script , it was created by an author named jaredbangerter . I can't post links but on the page he says to copy the script into the game and it should work, and it does as I filled in the properties and it works. You can also set the duration through Magic effects in the Creation Kit, though I want something not on duration but on demand like the vampire lord, like activating the power once -> transform -> Press again - > Revert.



Since I can't post links, I'll show you the property part of the Tutorial that comes after the part I posted previously. The final part of the Tutorial is making a spell tome which is a fairly simple process and something I've already done. The name of the tutorial is called How to Create New Shape Shifting Spells In Skyrim With The Creation Kit



Creating a New Magic Effect Continued...

Click 'File > Save' to compile the script and save it. Make sure there are no errors. If there are, you most likely deleted or replace the text that was already there like I warned you not to. If this is the case, click cancel to discard the changes and try again.

Now, double click on the script you just created again and a dialogue box while pop up asking you for the following. Click on each of the following, then to the right, click 'edit value' to select a value as according to the list below:



1. CompanionsTrackingQuest > This MUST be set to C00.

2. MonsterAmmo > Does your monster use a ranged weapon like a bow or crossbow? If your monster uses a ranged weapon, select the ammo type from this list that you want to be equipped upon transformation.

3. MonsterFaction > This is the faction you will be allied to while shape shifted. If you're not sure which faction your monster is, you may need to switch over to 'actors' to have a look where it says the faction that the monster belongs to.

4. MonsterShout > If your monster is a dragon, for example, you'll want to select a shout. Most monsters don't use shouts so leave this blank if that's the case. The only other monster I know of that uses shouts is the draugr. This will only work with the draugr if you edit the animation behavior of shout to immediately cause the shouting animation. This is similar to how I taught you to enable attacks in part 1.

It's important to mention that you will only be able to use monster shouts, like dragon shouts, in game if you meet the two following conditions first.

You have PSB enabled (use the console to enter in 'psb' and hit enter).
You have shouted one specific monster shout (such as the dragon's fire breath) as your normal self at least once before.
I'm not sure why you must perform a monster shout as yourself first, but I was investigating and it seems it is a hard coded function that can not be changed. Anyway, just an important note. If you don't do this, none of the monsters you shape shift into will be able to do their monster shouts - such as the draugr's unrelenting force and various types of dragon breath.

5. MonsterWeapon > Do you want a weapon for your monster? If so, select which one. By default, the script has this weapon appear in your monster's right hand.

6. PlayerWerewolfFaction > If your monster is a type of creature that most guards and civilians would consider hostile, set this to 'PlayerWerewolfFaction.' Otherwise, if it's a bunny for example, leave it blank. Setting this to 'PlayerWerewolfFaction' causes NPCs to attack or flee from you on site, depending on which type of monster you are.

7. PolymorphRace > This is the monster you want to turn into. Select the race of themonster from the drop down list to the right, after clicking 'edit value.' You should seeeach variation of monster you created in Part 1 on this list.

9. PolymorphSpell > This is the spell that will that you will get while in your monster form,if you want one. By default it is set to 0, which is your left hand.

10. WEAPON AND SPELL CLEAR VALUES > Do not touch these. These are used to clear the weapon and spell cues of your character. Until I added these in my script, often you wouldn't be able to use the monster's spells upon transformation.

After filling all of that out, click OK on the script properties box, then click OK on the Magic Effect Box and save your mod.
User avatar
Kanaoka
 
Posts: 3416
Joined: Fri Jun 16, 2006 2:24 pm

Post » Wed May 11, 2016 6:47 pm

I see what you mean by dated. There are definitely far more simpler methods.


There might be a better way but I'd use these skse functions to revert forms:


http://www.creationkit.com/index.php?title=RegisterForControl_-_Form


and


http://www.creationkit.com/index.php?title=OnControlDown_-_Form


to check if the shout key has been pressed, then I'd shove the OnEffectFinish into the OnControlDown event. Of course, this would mean you wouldn't have access to the shout key unless you're trying to revert forms but it can work as a fix until someone gives you a better method.

User avatar
Joanne Crump
 
Posts: 3457
Joined: Sat Jul 22, 2006 9:44 am

Post » Wed May 11, 2016 7:12 pm

Heya



I tried it out and yeah this code is just too dated for me to work with. I found a mod with a script in it and it managed in work in my game very well, the only problem I'm having now is the creature I want to turn into , ends up invisible in-game. The script calls for a "Armor" Entry, so I put the Armor entry for the creature in but it didn't show up. The Armor+ Armor Addon works flawlessly when it's an NPC however as I already have several custom monsters in my mod already. If I can figure out why the armor shows up invisible in-game then I'm pretty much done with this mod part.

User avatar
Cat Haines
 
Posts: 3385
Joined: Fri Oct 27, 2006 9:27 am


Return to V - Skyrim