My Long Thread of Spell Questions

Post » Wed Jun 20, 2012 7:17 pm

I'm about to make about 60+ spells, hopefully in the next few days. As such, I think it would be better for me to just ask my questions in one thread rather than flood the boards. So, if you see this thing pop up every once in a while, stop in and say hello.

All descriptions by Johnathan Chang.

My first question comes from Fists of Iron


FIST OF IRON
Range: Caster
Duration: (5 seconds / level) + 5 seconds
Speed: 1
Area of Effect: Nameless One only
Saving Throw: None

This spell gives the caster's fist the strength and durability of iron, turning
it into a living weapon. Any punches the caster does will do more damage than
normal.

This spell works only on the Nameless One. When cast, all his normal punch
attacks are +3 to hit and +6 to damage. The Nameless One cannot cast spells
while the Fist of Iron is in place.

My question is, would it be possible to have the OnEffectStart event launch an animation, and essentially what the animation does is apply a shader EXCLUSIVELY to the hands of the actor. I just don't know if you can retrieve the hands of an actor as a target...
User avatar
Motionsharp
 
Posts: 3437
Joined: Sun Aug 06, 2006 1:33 am

Post » Wed Jun 20, 2012 12:16 pm

I think that would be pretty complicated, you'd have better luck creating gloves that emit the shader instead.
User avatar
emily grieve
 
Posts: 3408
Joined: Thu Jun 22, 2006 11:55 pm

Post » Thu Jun 21, 2012 12:32 am

Clever. Yeah, I can just make some leather gloves with an iron ingot texture, additem, equip, wait, unequip, remove.
Thanks, should have though of that.
User avatar
Jason King
 
Posts: 3382
Joined: Tue Jul 17, 2007 2:05 pm

Post » Thu Jun 21, 2012 12:39 am

Okay, everyone knows what an Identify spell does, but how to implement it?

My thoughts are something that would work, but is worrisomely inelegant and I fear could be exploited by the player. Basically my idea is, the identify spell instead of operating on an inventory item (which would be unnecessarily complex I feel, though I could look at that one spell that transforms ore...) is just an aimed RegisterForSingleUpdate. Then the item has a script that OnUpdate would placeatme the real item, and disable/delete itself.
I just worry that an Update spell could probably be exploited on other things, since updates are a pretty frequently used thing. I guess I could have a HasKeyword DnDUnidentifiedItem check for the update...
Yeah. Just answered my own question. I guess that's how you make identify spells.
User avatar
El Khatiri
 
Posts: 3568
Joined: Sat Sep 01, 2007 2:43 am

Post » Wed Jun 20, 2012 9:42 pm

Well... uh... spells don't work on anything but actors. I mean, the projectiles and explosions can send things flying, but the magic effect script will only work on an actor. I think the only way to use it would be to have it be a self targeting spell, and search the player's inventory for unidentified items.
User avatar
Stephani Silva
 
Posts: 3372
Joined: Wed Jan 17, 2007 10:11 pm

Post » Wed Jun 20, 2012 5:25 pm

I have a funnier solution. When the item changes location from an inventory or something into the world, it has an event for that. Basically the event waits a few seconds (to make sure the item has settled wherever it landed) and then does a PlaceActorAtMe for a tiny invisible man and disables his AI, and it places this man on top of itself. There is a different tiny invisible man for each unidentified item, and each one has the same script that when it gets updated (and it has the UnidentifiedItem keyword) it in turn Updates the correct item (decided by a property).
Ta-Da!
User avatar
dean Cutler
 
Posts: 3411
Joined: Wed Jul 18, 2007 7:29 am

Post » Thu Jun 21, 2012 12:27 am

Okay, so I'm trying to make the pacify spell:

PACIFY Range: 180 feet Duration: 40 seconds + (5 seconds / level) Speed: 1 Area of Effect: 2-8 creatures (non-undead) Saving Throw: None Violence is not always the best solution. This spell seeks to quell the boiling blood, the anger and malice through peaceful means. As per the name, this spell will magically pacify 2-8 creatures of 6 HD or less in the area of effect; this affects all types of creatures except for undead. When cast, creatures must immediately make a saving throw vs. spell. If they fail, they stop all activities that require any exertion, including arguments, combat, etc. From here, the affected creatures will fall into a deep slumber. The affected creatures will remain in this state for the duration of the spell if left unharmed. If attacked, they automatically gain a new saving throw to try and break the spell.

Problem is, you can't just make an actor fall asleep as far as I'm aware. You need to make them use an AI package, and they need to have a bed nearby. Here is my attempt to solve this problem.

Scriptname DnDPacifyScript extends activemagiceffect Faction Property DnDSleepStatus autoFaction Property DnDCharLevel autoKeyword Property DnDUndead autoSTATIC Property ImaginaryBed autoEvent OnEffectStart(Actor akTarget, Actor akCaster)if akTarget.GetFactionRank(DnDCharLevel) as int <=6 && akTarget.HasKeyword(DnDUndead)==falsefloat height = akTarget.GetHeight()ObjectReference BedInstantiation = akTarget.PlaceAtMe(ImaginaryBed as Form)float BedHeight = BedInstantiation.GetHeight()float BedYPos = BedInstantiation.GetPositionY()float BedXPos = BedInstantiation.GetPositionX()float BedZPos = BedInstantiation.GetPositionZ()BedInstantiation.SetPosition(BedXPos, (BedYPos - BedHeight), BedZPos) ModDnDStat.ModStat(DnDSleepStatus, akTarget, 1)akTarget.EvaluatePackage()endIfendEvent

Basically, this just updates their SleepStatus, and all actors in my game have a peculiar set of package lists that have packages with conditions like "If GetFactionRank DnDSleepStatus==1" and the like which induce their status effects like this one. Trouble is, I can't figure out what property type a bed would be. Perplexing. Can you not summon furniture?
User avatar
Chase McAbee
 
Posts: 3315
Joined: Sat Sep 08, 2007 5:59 am


Return to V - Skyrim