Meteors?

Post » Thu Jun 21, 2012 2:53 am

I'm making a Meteor Storm spell right now, and basically what I'm doing is using the StormCall script but modifying the properties such that it points to a spell with a projectile that looks like a burning rock.

Problem is, I don't know how to set the darn rock on fire, or otherwise make it look like a meteor. Any ideas?
User avatar
Chris Johnston
 
Posts: 3392
Joined: Fri Jul 07, 2006 12:40 pm

Post » Thu Jun 21, 2012 3:03 pm

isnt it an fx shader?


in any case, summoning Meteor should call a 15 minute unskippable cutscene each time... set to dramatic opera music.
User avatar
LijLuva
 
Posts: 3347
Joined: Wed Sep 20, 2006 1:59 am

Post » Thu Jun 21, 2012 12:31 am

Full on FF7 this thing?
And thanks, I'll go look for that shader.
How do you apply a shader to a projectile anyway?

Hmmm. The more I look at this the more troubled I am. I need to do damage with a script to every actor in the vicinity when the projectile reaches its target. Does anyone know how to make a true AOE scripted effect such that it happens whether an actor was hit or not?
User avatar
Sabrina Schwarz
 
Posts: 3538
Joined: Fri Jul 14, 2006 10:02 am

Post » Thu Jun 21, 2012 7:06 am

i havent messed with projectiles yet, but i imagine it would take a shader property.

as for the AOE, i would use an explosion for the visual effect and a chain of magic effects for the force + damage area


i created a semi-self-destruct spell that creates a MASSIVE explosion and sends all actors within a certain radius flying into the air from the point of origin (spell caster in this case) about 50 ft high bursting into flames. i remeber it was a super headache making the mgef chain but cannot recall off the top of my head what the exact steps were. i think you could do something similar and use point of impact as the epicenter for the chain reaction
User avatar
Amysaurusrex
 
Posts: 3432
Joined: Wed Aug 09, 2006 2:45 pm

Post » Thu Jun 21, 2012 1:04 am

Nevermind, I figured out how to make a really cool meteor storm. Basically here is the spell script:

Scriptname MeteorStormScript extends activemagiceffect Activator Property DungeonMasterCaster autoMiscObject Property Meteor auto	event OnEffectStart(Actor Target, Actor Caster)   ObjectReference DM = Target.PlaceAtMe(DungeonMasterCaster)   ObjectReference DM2 = Target.PlaceAtMe(DungeonMasterCaster)   DM.MoveTo(Target, 0, 0, 1500)   float initialX = DM.GetPositionX()   float initialY = DM.GetPositionY()   float initialZ = DM.GetPositionZ()	  int i = 0	  int randomX	  int randomY	  while i<8		 DM.SetPosition(initialX, initialY, initialZ)		 randomX = Utility.RandomInt(-512,512)		 randomY = Utility.RandomInt(-512,512)		 DM.MoveTo(DM, randomX, randomY, 0)				 DM2.MoveTo(DM2, randomX, randomY, 0)		 ObjectReference SpawnedMeteor = DM.PlaceAtMe(Meteor)		 SpawnedMeteor.SplineTranslateToRef(DM2, 1, 4000)		 Utility.Wait(0.30)		 i=i+1	  endwhileendEvent

And you just make a MiscObject that is a comet looking thing. OnTranslationAlmostComplete it just casts FireStorm on itself and then disables itself. Nifty tricks.

EDIT: Oops, looks like I forgot to do the same thing for DM2 that I did for DM1.
User avatar
Kirsty Collins
 
Posts: 3441
Joined: Tue Sep 19, 2006 11:54 pm

Post » Thu Jun 21, 2012 6:40 am

Now my question is, how would you make a meteor explode?

Here's what I've got on my meteor MiscObject, but it isn't making a bunch of little meteors and exploding them away the way I want. I've got it to spawn a bunch of meteors, but unfortunately I can't get them to budge. How do I make Havok physics rocks and pull them into the script?


Scriptname TranslationExplosion extends ObjectReference  SPELL Property ExplosionSpellSelf  Auto  EffectShader Property FireFXShader autoActivator Property DungeonMasterCaster autoSpell Property ExplosionSpell autoActorBase Property MeteoriteActor autoevent OnTranslationAlmostComplete()   ExplosionSpellSelf.Cast(self)endEventevent OnLoad()   FireFXShader.Play(self)endEventevent OnTranslationComplete()int i = 0while i<10ObjectReference Meteorite = self.PlaceAtMe(self.GetBaseObject())Meteorite.SetScale(0.10)float randomX = Utility.RandomFloat(0.0, 1.0)float randomY = Utility.RandomFloat(0.0, 1.0)float randomZ = Utility.RandomFloat(0.0, 1.0)Meteorite.ApplyHavokImpulse(randomX,randomY,randomZ,100000)i=i+1endWhileself.disable()endEvent

ExplosionSpellSelf is FireStorm (for now)

So what I'm hoping to get is a way of making the big meteor break apart into a bunch of little meteors that go flying when it impacts.

I'm wondering if maybe the Havok mass of an object is defined within the Nif. If so, does anyone know how to add mass to an object without Havok interaction cabability?
User avatar
Cody Banks
 
Posts: 3393
Joined: Thu Nov 22, 2007 9:30 am

Post » Thu Jun 21, 2012 11:49 am

One options is to make the meteor an activator with the model of a rock. Then add an effect shader that makes it burn in your script, and use translateto() to move it to the target, then Event OnTranslationComplete with Meteor.PlaceAtMe(Explosion) and Meteor.Delete().
User avatar
Ana Torrecilla Cabeza
 
Posts: 3427
Joined: Wed Jun 28, 2006 6:15 pm

Post » Thu Jun 21, 2012 7:45 am

That would just make an explosion, I want the explosion to be a bunch of small rocks flying everywhere. My script basically already does what you're suggesting, its just a MiscObject instead of activator.
User avatar
Tania Bunic
 
Posts: 3392
Joined: Sun Jun 18, 2006 9:26 am

Post » Thu Jun 21, 2012 12:35 am

This is a script I used to create "shards" of ice that fly in random directions when a magic effect on a target ends:



Spell Property ShrapnelSpell AutoInt Property NumShards AutoActivator Property Marker AutoPerk Property ShrapnelPerk AutoSpell Property BaseSpell AutoExplosion Property ExplosionProperty AutoFloat Property Duration AutoEffectShader Property Shader AutoObjectReference[] MarkerTargetArrayObjectReference[] MarkerSourceArrayInt SetupCount = 0Int FragmentsFired = 0ObjectReference SourceInt MarkersDeletedactor Targetactor Casterbool bWait = truebool Wa[censored] = falseFloat RandAngle = 0.0Event OnEffectStart(Actor akTarget, Actor akCaster)Target = akTargetCaster = akCasterShader.Play(Target, -1.0)RegisterForSingleUpdate(Duration)Utility.Wait(0.5)bWait = falseEndEventEvent OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)If !bWait  If !Wa[censored]   Wa[censored] = true;   If Caster.HasPerk(ShrapnelPerk)    FireShards();   EndIf   Dispel()  EndIfEndIfEndEventEvent OnUpdate()If !Wa[censored]  Wa[censored] = true;  If Caster.HasPerk(ShrapnelPerk)   FireShards();  EndIfEndIfDispel()EndEventFunction FireShards()MarkerTargetArray = new ObjectReference[15]MarkerSourceArray = new ObjectReference[15]While (SetupCount < NumShards)  RandAngle = Utility.RandomFloat(0, 360)  MarkerSourceArray[SetupCount] = Target.PlaceAtMe(Marker)  MarkerSourceArray[SetupCount].MoveTo(Target, ((Target.GetHeight() + 10) * Math.Sin(RandAngle)),  ((Target.GetHeight() + 10) * Math.Cos(RandAngle)), 10)  MarkerTargetArray[SetupCount] = Target.PlaceAtMe(Marker)  MarkerTargetArray[SetupCount].MoveTo(Target, (500 * Math.Sin(RandAngle)),  (500 * Math.Cos(RandAngle)), (Utility.RandomFloat(0,1.0) * 300))  SetupCount += 1 EndWhileTarget.PlaceAtMe(ExplosionProperty)Shader.Stop(Target)While (FragmentsFired < NumShards)  ShrapnelSpell.RemoteCast(MarkerSourceArray[FragmentsFired], Caster, MarkerTargetArray[FragmentsFired])  FragmentsFired += 1EndWhileWhile MarkersDeleted < NumShards  MarkerTargetArray[MarkersDeleted].DisableNoWait()  MarkerTargetArray[MarkersDeleted].Delete()  MarkerSourceArray[MarkersDeleted].DisableNoWait()  MarkerSourceArray[MarkersDeleted].Delete()  MarkersDeleted += 1EndWhileEndFunction




Take a look at that. It extends ActiveMagicEffect.


Also, find Aldiun's shout, the one that makes the meteors fall and hit the ground. Once you find it, look for the effect and find the impact data set that it points to, then look at the impact data inside there. Find those impact data forms and take a look at them, because some of them are responsible for flinging rocks when alduins meteors hit the ground.
User avatar
Prue
 
Posts: 3425
Joined: Sun Feb 11, 2007 4:27 am

Post » Thu Jun 21, 2012 1:14 pm

what if at the point of impact,after the meteor explodes, it places a handful of smaller rocks slightly above itself just after it self-deletes. then the force from the explosion objects will send those rocks flying into the air.

i don't know where you would find havok-enabled rocks by default (although i would look into the falling rock traps to see if you can isolate a rock from the nif) or you can maybe just create a rock mesh and swap it in place of an existing misc object so that it inherits that objects physics (you would need to use nifskope)
User avatar
Setal Vara
 
Posts: 3390
Joined: Thu Nov 16, 2006 1:24 pm

Post » Thu Jun 21, 2012 2:16 am

http://youtu.be/-WURxLqSUSQ

1. Player casts target location spell.
2. Spell's projectile links to custom explosion.
3. Explosion spawns activator:
Spoiler
Scriptname ExampleActivatorScript extends ObjectReferenceActivator Property DummyObject AutoActivator[] Property Meteors AutoFloat Property fSpellRadius = 512.0 AutoFloat Property fDuration = 30.0 AutoFloat Property fPulseRateBase = 1.0 AutoFloat Property fPulseRateRandOffset = 0.5 AutoObjectReference SpellSourceFloat fPosXFloat fPosYFunction CleanUp()	UnregisterForUpdate()	SpellSource.Disable()	SpellSource.Delete()	SpellSource = None	Disable()	Delete()EndFunctionEvent OnInit()	SpellSource = PlaceAtMe(DummyObject)	fPosX = X	fPosY = Y	RegisterForSingleUpdate(0.01)EndEventAuto State WaitingEvent OnUpdate()	GoToState("Busy")	RegisterForSingleUpdate(0.01)	Utility.Wait(fDuration)	CleanUp()EndEventEndStateState BusyEvent OnUpdate()	SetPosition(fPosX + Utility.RandomFloat(-fSpellRadius, fSpellRadius), fPosY + Utility.RandomFloat(-fSpellRadius, fSpellRadius), Z)	SpellSource.MoveTo(Self, Utility.RandomFloat(-fSpellRadius, fSpellRadius), Utility.RandomFloat(-fSpellRadius, fSpellRadius), 3000.0)	ObjectReference FlamingRock = SpellSource.PlaceAtMe(Meteors[Utility.RandomInt(0, Meteors.Length - 1)])	(FlamingRock as ExampletMeteorScript).Shoot(Self)	RegisterForSingleUpdate(fPulseRateBase + Utility.RandomFloat(-fPulseRateRandOffset, fPulseRateRandOffset))EndEventEndState
4. Activator spawns meteors with this script:
Spoiler
Scriptname ExampleMeteorScript extends ObjectReference  EffectShader Property FireCloakFXShader AutoSpell Property MeteorDamageSpell AutoFloat Property Speed AutoFloat PosXFloat PosYFloat PosZFunction Shoot(ObjectReference akTarget)	PosX = akTarget.X	PosY = akTarget.Y	PosZ = akTarget.Z	FireCloakFXShader.Play(Self)	RegisterForSingleUpdate(0.01)EndFunctionEvent OnUpdate()	SetAngle(-180, 0, 0)	TranslateTo(PosX, PosY, PosZ, 0, 0, Utility.RandomFloat(-180.0, 180.0), Speed)EndEventEvent OnTranslationAlmostComplete()	MeteorDamageSpell.RemoteCast(Self, Game.GetPlayer(), Self)	Disable()	Delete()EndEvent
[

The meteors are rotated upside down because the nif models for most of the large rocks are hollow, with no bottom. Also, they don't actually play the effect shader.

"MeteorDamageSpell" is just a self targeting area of effect spell that applies stagger and fire damage in a 15 foot area.
User avatar
SUck MYdIck
 
Posts: 3378
Joined: Fri Nov 30, 2007 6:43 am

Post » Thu Jun 21, 2012 6:31 am

This thread appears to be done, but i wanted to tell you that there's already 'meteors' in the game.

Well, not meteors, but flaming rocks tossed by catapult/trebuchet during the siege of whiterun and windhelm/solitude.

Scale that to "huge" to fall out of the sky, then 'normal sized' for post explosion debris.
User avatar
Vickey Martinez
 
Posts: 3455
Joined: Thu Apr 19, 2007 5:58 am

Post » Thu Jun 21, 2012 8:31 am

Isn't there a meteor storm spell already? Used by Alduin?
User avatar
Julie Serebrekoff
 
Posts: 3359
Joined: Sun Dec 24, 2006 4:41 am


Return to V - Skyrim