Dissappointed with spell creation...

Post » Mon Jun 18, 2012 3:30 pm

I was really looking forward to creating a new item, like a "trinket" and create some new equip effects.
After reading the creation wiki and whatnot, there seems to be a limitation with creating new spells...

I learn a lot by reading whats already created... I go to see how fireball was scripted only to find out I can't find it. It leads back to a mg01questscript that makes zero sense.

Something I'm looking to create are like...

"Has a chance to increase damage by X amount on hit for 20 seconds, stacking up to 5 times."

Stuff like that.

Can anyone point me in the right direction ?
User avatar
Melung Chan
 
Posts: 3340
Joined: Sun Jun 24, 2007 4:15 am

Post » Mon Jun 18, 2012 10:43 am

All magic is static - at the moment. You create the Magic Effect > then the Spell, Ability, or Disease to use it > then apply / remove it from the actor.
That's it! Not until the trinity of ianpatt, behippo and scruggs release Skyrim Script Extender would I expect any way to create true dynamic effects.
User avatar
Kelsey Anna Farley
 
Posts: 3433
Joined: Fri Jun 30, 2006 10:33 pm

Post » Mon Jun 18, 2012 4:36 pm

What you want is possible. You just need to learn papyrus and usage of spell effect conditions.

HasPerk condition is very useful.
You make a effect. Call it Firedmg01
No conditions checked.
Second Effect. Firedmg02
condition HasPerk "perknamehere" == 1

Then you make your spell and add both these effects to it. The first effect will always happen. The second will check if the player has the named perk. If 1 is returned the second effect is done.

Note: You can make a spell effect check for any condtion an activate from any event that are listed within the condition drop down box.

Making it a random chance though requires papyrus. If you have any experience from TesIV/Fallout3 modding, or in writing code in Java or C/C++ then papyrus is fairly easy to pickup.

Also. The Spell Combination seen in the Bethesda GameJam was more than likely done via scripting+conditions. GetEquippedSpell function can be used to check what spells are equipped. Then it matches it up to a property and replaces the effects when dualcasting two different abilities. There is more to it, but thats the basic idea if youre using papyrus.

psuedocode

LHS = Game.GetPlayer().GetEquippedSpell(0)
RHS = Game.GetPlayer().GetEquippedSpell(1)
EVENT OnSpellCast(RHS)
if(LHS == Frostbite && RHS == Reanimate)
code to add new effect here
endif
endEVENT
User avatar
abi
 
Posts: 3405
Joined: Sat Nov 11, 2006 7:17 am

Post » Mon Jun 18, 2012 2:58 pm

OP, what you want to do is fairly easy to achieve using papyrus.

Spell>magic effect (20 second duration)-(script) > Spell > effect

Script has an "on hit" check and a dice roll comparison for the chance to fire its other spell.

Looking at the dragon mask Ultra enchantment spell effect will give you a really great bit of working script to learn from, it has a bit of everything needed to script some interesting spells.
User avatar
Star Dunkels Macmillan
 
Posts: 3421
Joined: Thu Aug 31, 2006 4:00 pm

Post » Mon Jun 18, 2012 5:44 pm

What do you people mean everything is static?! You can attach scripts to spells! What more could you want?
User avatar
saharen beauty
 
Posts: 3456
Joined: Wed Nov 22, 2006 12:54 am

Post » Mon Jun 18, 2012 8:19 pm

This is the first thread I have come across that has provided me with some sort of understanding of how spells work. I have been completely lost. We really need a tutorial on how to create a new spell from scratch. Something showing how to build a spell that summons something or causes an NPC to burst into flames. I would really appreciate it and thanks to all who are offering assistance in this thread.
User avatar
CORY
 
Posts: 3335
Joined: Sat Oct 13, 2007 9:54 pm

Post » Mon Jun 18, 2012 3:49 pm

I admit, it has been totaly lacking with regards to the wiki, I literaly have had to learn everything on my own from looking at how bethesda have done their spells. (and I had a lot of help with one of my posts earlier).

The general jist is that to make a basic spell, you need two things.

1. the "caller" be it a spell, enchantment, power, ability etc
2. the "effect", be it a summon, stat change etc etc.

The interesting part, is that you can add scripts to an effect, which gives you a lot of freedom, for example you could have a spell whos effects cast other spells.

I have personaly used this to create constant effect spells which cast buffs under scripted circumstances :D

And I am still ana amature!
User avatar
Luis Reyma
 
Posts: 3361
Joined: Fri Nov 02, 2007 11:10 am

Post » Mon Jun 18, 2012 2:14 pm

Ah thanks for all the posts guys. Its nice to wake up and read some suggestions.

I was able to mimic the ULTRAmask script so far, haven't added my own touch to it yet.

The hardest thing for me to learn right now is the syntax. I found python real easy to learn, and they said this is something like ruby and python if I recall correctly...
User avatar
Chantel Hopkin
 
Posts: 3533
Joined: Sun Dec 03, 2006 9:41 am

Post » Mon Jun 18, 2012 8:56 pm

OP, what you want to do is fairly easy to achieve using papyrus.

Spell>magic effect (20 second duration)-(script) > Spell > effect

Script has an "on hit" check and a dice roll comparison for the chance to fire its other spell.

Looking at the dragon mask Ultra enchantment spell effect will give you a really great bit of working script to learn from, it has a bit of everything needed to script some interesting spells.

Please note. OnHit only works for actors, and the Cast function requires the aKSource MUST be able to cast the spell. A work-around is to make a new NPC and just stuff him in a unique cell and reference that actor as the source.
User avatar
Angus Poole
 
Posts: 3594
Joined: Fri Aug 03, 2007 9:04 pm

Post » Mon Jun 18, 2012 2:03 pm

I admit, it has been totaly lacking with regards to the wiki, I literaly have had to learn everything on my own from looking at how bethesda have done their spells. (and I had a lot of help with one of my posts earlier).

The general jist is that to make a basic spell, you need two things.

1. the "caller" be it a spell, enchantment, power, ability etc
2. the "effect", be it a summon, stat change etc etc.

The interesting part, is that you can add scripts to an effect, which gives you a lot of freedom, for example you could have a spell whos effects cast other spells.

I have personaly used this to create constant effect spells which cast buffs under scripted circumstances :biggrin:

And I am still ana amature!

Wow I had no clue you could do that. It sounds like mastering scripting is the key here. I'm going to have to learn the ins and outs of Papyrus at some point if I ever hope to acheive the spells I envision but thanks for simplifying it for me. It helps a lot have a simple high level explanation of how they work. I'd still love to see some tutorials on spells if anyone's up to the task.

Thanks!
User avatar
Rob
 
Posts: 3448
Joined: Fri Jul 13, 2007 12:26 am

Post » Mon Jun 18, 2012 8:13 pm

Here, have fun with this. It's a basic BoundArmor Script, free for use by anyone since it's pretty damn basic and easy in its implementation and missing some stuff from Oblivion that I haven't figured out how to replicate yet.

Scriptname aaBoundArmor extends activemagiceffect  {BoundArmorScript}; /Property Declarations; /Armor Property - Calls for a Armor Type form, linked in properties in the MagicEffect Form; /Perk Property - Calls for a Perk Type form; /MagicEffect Property - Calls for a MagicEffect Type formArmor Property pBoundHArmor AutoArmor Property pBoundHBoots AutoArmor Property pBoundHGauntlets AutoArmor Property pBoundHHelmet AutoArmor Property pBoundHHelmetMystic AutoArmor Property pBoundHArmorMystic AutoArmor Property pBoundHBootsMystic AutoArmor Property pBoundHGauntletsMystic AutoPerk Property MysticBinding AutoMagicEffect Property BoundArmorSelf  Auto; /this section starts the effect. When the spell is cast its linked magic effect is started; /this triggers the EVENT OnEffectStartEVENT OnEffectStart(Actor Target, Actor Caster);    debug.trace("BoundArmor - Effect Starting - add and equip bound armor")    ; /Checks for Perk MysticBinding  if it returns 1, MysticBinding=true    ; /Then the improved MysticBoundArmor is used, else regular Bound Armor is used    if (caster.HasPerk(MysticBinding) == 1)        caster.AddItem(pBoundHArmorMystic, 1, TRUE)        caster.equipitem(pBoundHArmorMystic, TRUE, TRUE)        caster.AddItem(pBoundHBootsMystic, 1, TRUE)        caster.equipitem(pBoundHBootsMystic, TRUE, TRUE)        caster.AddItem(pBoundHGauntletsMystic, 1, TRUE)        caster.equipitem(pBoundHGauntletsMystic, TRUE, TRUE)        caster.AddItem(pBoundHHelmetMystic, 1, TRUE)        caster.equipitem(pBoundHHelmetMystic, TRUE, TRUE)    else        caster.AddItem(pBoundHArmor, 1, TRUE)        caster.equipitem(pBoundHArmor, TRUE, TRUE)        caster.AddItem(pBoundHBoots, 1, TRUE)        caster.equipitem(pBoundHBoots, TRUE, TRUE)        caster.AddItem(pBoundHGauntlets, 1, TRUE)        caster.equipitem(pBoundHGauntlets, TRUE, TRUE)        caster.AddItem(pBoundHHelmet, 1, TRUE)        caster.equipitem(pBoundHHelmet, TRUE, TRUE)    endifendEVENT; /Error checking.  If script runs and cant find the magic effect it kills itselfEVENT onLoad();     debug.trace("Bound Armor caught Cell Attach")    if !(getCasterActor().hasMagicEffect(BoundArmorSelf));         debug.trace("Bound Armor - Cell Attached, script active, but effect not found on "+getCasterActor())        dispel()    endifendEVENT; /Once the Duration of the magic effect runs out it triggers thisEVENT OnEffectFinish(Actor Target, Actor Caster);    debug.trace("BoundArmor - Effect Finishing - remove bound armor")    ; /Again, Checking for the perk, if its there it removes the MysticBoundArmor    ; /Else it removes the regular    if (caster.HasPerk(MysticBinding) == 1)        caster.RemoveItem(pBoundHArmorMystic, 1, TRUE)        caster.RemoveItem(pBoundHBootsMystic, 1, TRUE)        caster.RemoveItem(pBoundHGauntletsMystic, 1, TRUE)        caster.RemoveItem(pBoundHHelmetMystic, 1, TRUE)    else        caster.RemoveItem(pBoundHArmor, 1, TRUE)        caster.RemoveItem(pBoundHBoots, 1, TRUE)        caster.RemoveItem(pBoundHGauntlets, 1, TRUE)        caster.RemoveItem(pBoundHHelmet, 1, TRUE)    endif    ; /Note.  I've looked for functions to preserve the armor worn prior to casting the spell but nothing seemed to be useful    ; /So it does not restore what was worn earlier on effect end.  Still trying to figureout a workaround.    ; /This is because all the GetEquipped functions only seem to call for what is in the hands or in the shield slot.    ; /The EquipItem function requires a formID when called so I have to poll for equipped armor, then grab their formIDs    ; /and preserve them in memory in a variable.  Then call them again OnEffectFinish.endEVENT
User avatar
Lizzie
 
Posts: 3476
Joined: Sun Nov 19, 2006 5:51 am

Post » Mon Jun 18, 2012 9:41 pm

Here, have fun with this. It's a basic BoundArmor Script, free for use by anyone since it's pretty damn basic and easy in its implementation and missing some stuff from Oblivion that I haven't figured out how to replicate yet.

Scriptname aaBoundArmor extends activemagiceffect  {BoundArmorScript}; /Property Declarations; /Armor Property - Calls for a Armor Type form, linked in properties in the MagicEffect Form; /Perk Property - Calls for a Perk Type form; /MagicEffect Property - Calls for a MagicEffect Type formArmor Property pBoundHArmor AutoArmor Property pBoundHBoots AutoArmor Property pBoundHGauntlets AutoArmor Property pBoundHHelmet AutoArmor Property pBoundHHelmetMystic AutoArmor Property pBoundHArmorMystic AutoArmor Property pBoundHBootsMystic AutoArmor Property pBoundHGauntletsMystic AutoPerk Property MysticBinding AutoMagicEffect Property BoundArmorSelf  Auto; /this section starts the effect. When the spell is cast its linked magic effect is started; /this triggers the EVENT OnEffectStartEVENT OnEffectStart(Actor Target, Actor Caster);	debug.trace("BoundArmor - Effect Starting - add and equip bound armor")	; /Checks for Perk MysticBinding  if it returns 1, MysticBinding=true	; /Then the improved MysticBoundArmor is used, else regular Bound Armor is used	if (caster.HasPerk(MysticBinding) == 1)		caster.AddItem(pBoundHArmorMystic, 1, TRUE)		caster.equipitem(pBoundHArmorMystic, TRUE, TRUE)		caster.AddItem(pBoundHBootsMystic, 1, TRUE)		caster.equipitem(pBoundHBootsMystic, TRUE, TRUE)		caster.AddItem(pBoundHGauntletsMystic, 1, TRUE)		caster.equipitem(pBoundHGauntletsMystic, TRUE, TRUE)		caster.AddItem(pBoundHHelmetMystic, 1, TRUE)		caster.equipitem(pBoundHHelmetMystic, TRUE, TRUE)	else		caster.AddItem(pBoundHArmor, 1, TRUE)		caster.equipitem(pBoundHArmor, TRUE, TRUE)		caster.AddItem(pBoundHBoots, 1, TRUE)		caster.equipitem(pBoundHBoots, TRUE, TRUE)		caster.AddItem(pBoundHGauntlets, 1, TRUE)		caster.equipitem(pBoundHGauntlets, TRUE, TRUE)		caster.AddItem(pBoundHHelmet, 1, TRUE)		caster.equipitem(pBoundHHelmet, TRUE, TRUE)	endifendEVENT; /Error checking.  If script runs and cant find the magic effect it kills itselfEVENT onLoad();	 debug.trace("Bound Armor caught Cell Attach")	if !(getCasterActor().hasMagicEffect(BoundArmorSelf));		 debug.trace("Bound Armor - Cell Attached, script active, but effect not found on "+getCasterActor())		dispel()	endifendEVENT; /Once the Duration of the magic effect runs out it triggers thisEVENT OnEffectFinish(Actor Target, Actor Caster);	debug.trace("BoundArmor - Effect Finishing - remove bound armor")	; /Again, Checking for the perk, if its there it removes the MysticBoundArmor	; /Else it removes the regular	if (caster.HasPerk(MysticBinding) == 1)		caster.RemoveItem(pBoundHArmorMystic, 1, TRUE)		caster.RemoveItem(pBoundHBootsMystic, 1, TRUE)		caster.RemoveItem(pBoundHGauntletsMystic, 1, TRUE)		caster.RemoveItem(pBoundHHelmetMystic, 1, TRUE)	else		caster.RemoveItem(pBoundHArmor, 1, TRUE)		caster.RemoveItem(pBoundHBoots, 1, TRUE)		caster.RemoveItem(pBoundHGauntlets, 1, TRUE)		caster.RemoveItem(pBoundHHelmet, 1, TRUE)	endif	; /Note.  I've looked for functions to preserve the armor worn prior to casting the spell but nothing seemed to be useful	; /So it does not restore what was worn earlier on effect end.  Still trying to figureout a workaround.	; /This is because all the GetEquipped functions only seem to call for what is in the hands or in the shield slot.	; /The EquipItem function requires a formID when called so I have to poll for equipped armor, then grab their formIDs	; /and preserve them in memory in a variable.  Then call them again OnEffectFinish.endEVENT

Store the previously equipped armor as forms/references in a Formlist, then iterate through that formlist and add the items back? There are a lot of things that you can do with the new data structures that you can't w/ Oblivion.
User avatar
Camden Unglesbee
 
Posts: 3467
Joined: Wed Aug 15, 2007 8:30 am

Post » Mon Jun 18, 2012 10:45 am

This thread utterly befuddles and bewilders me. All the misunderstanding, where does it all come from?

I don't really have time to fix all the issues in this thread right now, unfortunately. There's a lot of good information here, but also a lot of misinformation. Be careful about taking it to heart.

Since apparently the Wiki was incredibly confusing for so many people, I would like feedback on what has misled you. I personally found it trivial to understand how things worked between reading the Wiki and looking at the CK (though, of course, there are many details that I am not yet personally familiar with).
User avatar
WTW
 
Posts: 3313
Joined: Wed May 30, 2007 7:48 pm

Post » Mon Jun 18, 2012 2:33 pm

Store the previously equipped armor as forms/references in a Formlist, then iterate through that formlist and add the items back? There are a lot of things that you can do with the new data structures that you can't w/ Oblivion.

Wouldn't work. I'd still need to poll for the armor/clothes equipped in the first place to pass it to a form list to store. Thats the trouble. If I could grab the equipped item data already I'd be set. Im working through crude hack ideas right now involving, emptying the entire inventory silently to a hidden container, unequipping all then storing those, then moving the items back. In between that I'd have to poll the equipped weapons and spells and shouts, then reequip them. Which would cause an animation stutter once those are reequipped.
Very, Very messy.
User avatar
Amy Siebenhaar
 
Posts: 3426
Joined: Fri Aug 10, 2007 1:51 am

Post » Mon Jun 18, 2012 8:31 pm

The Wiki isn't confusing (at lease to me, but I've been coding for many years), but it is still lean on substance for the novice to intermediant modder and is sorely lacking on showing practical application.

For instance, I want to attach a dragonbreath spell (which uses the dragonbreath projectile) to an item or marker so I can set it off with an activator.
I know this should be possible through scripting, but once outside of the "norm" (using dragonbreath as the shout it was intended) there is no info whatsoever in the Wiki.

Granted the Wiki info is building fast and is getting better all the time ... but you asked, DragonWraith. ;)
That being said, I really appreciate all the experienced modders on this forum who are helping out the new people. Thank you, and if you feel so inclined, help out on the wiki too (so we don't have to pester you as much).
User avatar
FABIAN RUIZ
 
Posts: 3495
Joined: Mon Oct 15, 2007 11:13 am

Post » Mon Jun 18, 2012 7:35 pm

The problem I had with the wiki, was that it was either geared toward absolute basic stuff (i.e., it summing up how to use paprus with a "hello world" script, which doesn't actually explain anything about actually using the language for practical applications), to over-complex (the primer, which is pretty impossible to understand unless you are an experienced programmer, or you've read it 20 times while experimenting for 20 hours in the CK).

Most of what I "know" about the CK was aquired from these forums. If I didn't have this as a resource, I'd be totally lost. The Wiki is very useful no doubt, but it's better as a reference manual than an ACTUAL manual or guide on how to learn it, or do things with it.
User avatar
stacy hamilton
 
Posts: 3354
Joined: Fri Aug 25, 2006 10:03 am

Post » Mon Jun 18, 2012 5:51 pm

The Wiki is very useful no doubt, but it's better as a reference manual than an ACTUAL manual or guide on how to learn it, or do things with it.

Agreed. I only use it at the moment to look up functions I can use, and events.
User avatar
lauren cleaves
 
Posts: 3307
Joined: Tue Aug 15, 2006 8:35 am

Post » Tue Jun 19, 2012 12:10 am

I think that the wiki should be open to user editing, so everyone can contribute their knowledge.
User avatar
sarah taylor
 
Posts: 3490
Joined: Thu Nov 16, 2006 3:36 pm

Post » Mon Jun 18, 2012 8:27 pm

What do you people mean everything is static?! You can attach scripts to spells! What more could you want?
Can't modify the magnitude of a spell at run-time, for e.g.
For a pratical use, several of my Oblivion mods apply the one Drain Enchantment that I manipulate the Magnitude of at run-time.
Can't do that with the CK at the moment.

A lot of things in the CK are static at run-time.
E.g. for a script to affect another reference in the game (i.e. a reference that the script is not attached to), it'll have to be linked to the script at the CK in the script's Property list.

In Oblivion, with OBSE, most of the properties of a reference can be changed dynamically at run-time.
Until you see what OBSE added to Bethesda's basic Construction Set, you can't begin to imagine how limitting the CS was.
It is very much the same with the CK - I can guess as SKSE doesn't have direct links to it yet.

Static. i.e. can't be manipulated at run-time.
User avatar
Katie Pollard
 
Posts: 3460
Joined: Thu Nov 09, 2006 11:23 pm

Post » Mon Jun 18, 2012 4:05 pm

I think that the wiki should be open to user editing, so everyone can contribute their knowledge.
The wiki is open, everyone with an account can edit.
User avatar
Eddie Howe
 
Posts: 3448
Joined: Sat Jun 30, 2007 6:06 am

Post » Mon Jun 18, 2012 9:59 pm

Can't modify the magnitude of a spell at run-time, for e.g.
For a pratical use, several of my Oblivion mods apply the one Drain Enchantment that I manipulate the Magnitude of at run-time.
Can't do that with the CK at the moment.

A lot of things in the CK are static at run-time.
E.g. for a script to affect another reference in the game (i.e. a reference that the script is not attached to), it'll have to be linked to the script at the CK in the script's Property list.

In Oblivion, with OBSE, most of the properties of a reference can be changed dynamically at run-time.
Until you see what OBSE added to Bethesda's basic Construction Set, you can't begin to imagine how limitting the CS was.
It is very much the same with the CK - I can guess as SKSE doesn't have direct links to it yet.

Static. i.e. can't be manipulated at run-time.

Im sure there is some sort of way to replicate that, whether its just applying stackable effects, or just scripting it all out, Im sure it can be done... Someone just needs to find out how.
And thanks for pointing that out. Didnt even cross my mind that people would need to change stuff like that. By "Static" I was thinking people were pissed at the limitations to the effects people could put on the spells limited to default stuff.
User avatar
Daddy Cool!
 
Posts: 3381
Joined: Tue Aug 21, 2007 5:34 pm

Post » Mon Jun 18, 2012 6:39 pm

I looked into same spell stacking also.
1stly, I don't think it works. i.e. playerRef.AddSpell (abilitySpell) 3 times will not stack on the player.
2ndly, If it did, it'll show 3 same entries in the player's Active Effects screen instead of showing the combined effect of that one Ability spell.

The only way to simulate stacking effects like this on the player (and other actors) is to use ModActorValue / DamageActorValue.
A method that I stay away from because I can guess that Skyrim will have the same bugs Oblivion did with these functions
i.e. modifications to AVs are pooled into one and several mods using them on one AV can easily get confused (if not built properly) and so produce corrupt, hard to fix, Actor Values.
Also, one modder who's built his mod properly with Mod / Damage AVs can get the blame for corrupting AVs because the user has used another mod that uses Mod / Damage AVs that wasn't built properly.

So, in my current upgrade process of my Oblivion mods Eat and sleep, Battle fatigue and injuries will use Magic Effects > Abilities similar to their Oblivion counterparts.
e.g. I'd had to create 24 separate Abilities with one effect but of small incremental Magnitudes each and remove old / apply new to the player at every hour of Exhaustion.
Stacking would be nice in this scenario.

Or simply giving us the ability to modify Magnitude from Papyrus would be much better.
I'm sure SKSE will give us this feature like OBSE did.
User avatar
meg knight
 
Posts: 3463
Joined: Wed Nov 29, 2006 4:20 am

Post » Mon Jun 18, 2012 12:59 pm

So, in my current upgrade process of my Oblivion mods Eat and sleep, Battle fatigue and injuries will use Magic Effects > Abilities similar to their Oblivion counterparts.
e.g. I'd had to create 24 separate Abilities with one effect but of small incremental Magnitudes each and remove old / apply new to the player at every hour of Exhaustion.
Stacking would be nice in this scenario.

Or simply giving us the ability to modify Magnitude from Papyrus would be much better.
I'm sure SKSE will give us this feature like OBSE did.

Thanks for your reply!!

This last bit should help me a lot actually. I never thought of it this way. So in other words, for me... I would create the buff 5 times and each buff will be better than the last, and script it that way. nice!
User avatar
Bethany Short
 
Posts: 3450
Joined: Fri Jul 14, 2006 11:47 am


Return to V - Skyrim