Scripted Weapon Effects

Post » Mon Nov 19, 2012 1:12 am

How do enchanting stations work exactly? Do we even have the code for that?


What I want to do is make a special workbench where status effects can be applied to weapons using various types of ores. These status effects have nothing to do with enchantments or health% of the weapon, but are a third category. Sort of like making your own veneer of another metal, like silver, to your weapon. Silver for instance would give a 5% chance of causing fear in undead, with another 5 damage per level to a vampire or werewold.
Here's the structure I have in mind:
There is a book that gives you perks for each material such that if the weapon has the enchantment, or keyword (I don't think there's a way to add keywords though...) on hits is applies another enchantment to enemies, with OnEffectStart effects that act as is you just got hit by a spell.

I may have to do some stuff in SkyProc...dunno. We'll see. Lemme know if you guys have ideas, I'm just brainstorming.
EDIT: Maybe I can do it by adding weapons to a list...we'll see...
User avatar
Naughty not Nice
 
Posts: 3527
Joined: Sat Nov 04, 2006 6:14 am

Post » Sun Nov 18, 2012 3:42 pm

I do not think there's a good way to do that. Because I am pretty sure enchanting is fully "hard-coded". And, since we can't add our on properties to stuff and there's nothing like "actor values" for weapons, there is not much to work with. You can't add keywords with a script.

But I have one (bad/hackish) solution:
Use existing properties, but use very low values so it won't make a visible difference in gameplay. Example: When the user does the workbench thingy, increase the weapon's reach by 0.0005 with the SKSE weapon functions, and let 5 be a value that represents "silver" (or whatever you want). Should work because I think all of those values are floats, and if they're ever increased/decreased, it's probably taking their existing value into account, so I THINK yours will be left in tact. Also... I don't think any perks modify reach, so that's why I suggest that one. Weight would probably work too. Then just multiply by 1000 or 10000 and cut off any digits higher than the one(s) you're using. You can probably find a function to do that pretty easily by searching online. Anyway, then you can make an array of values with corresponding magic effects, and then you at least have SOME way to check if the effect should be applied by that weapon or not. How you want to apply it is up to you, there are a lot of ways you could do that.
User avatar
Dj Matty P
 
Posts: 3398
Joined: Sat Jun 09, 2007 12:31 am

Post » Sun Nov 18, 2012 2:14 pm

I do not think there's a good way to do that. Because I am pretty sure enchanting is fully "hard-coded". And, since we can't add our on properties to stuff and there's nothing like "actor values" for weapons, there is not much to work with. You can't add keywords with a script.

But I have one (bad/hackish) solution:
Use existing properties, but use very low values so it won't make a visible difference in gameplay. Example: When the user does the workbench thingy, increase the weapon's reach by 0.0005 with the SKSE weapon functions, and let 5 be a value that represents "silver" (or whatever you want). Should work because I think all of those values are floats, and if they're ever increased/decreased, it's probably taking their existing value into account, so I THINK yours will be left in tact. Also... I don't think any perks modify reach, so that's why I suggest that one. Weight would probably work too. Then just multiply by 1000 or 10000 and cut off any digits higher than the one(s) you're using. You can probably find a function to do that pretty easily by searching online. Anyway, then you can make an array of values with corresponding magic effects, and then you at least have SOME way to check if the effect should be applied by that weapon or not. How you want to apply it is up to you, there are a lot of ways you could do that.

Nope, I know how I'm gonna do it. It's easier than that actually.
User avatar
ANaIs GRelot
 
Posts: 3401
Joined: Tue Dec 12, 2006 6:19 pm

Post » Mon Nov 19, 2012 3:48 am

Nope, I know how I'm gonna do it. It's easier than that actually.

Tell me?
Maybe I am not understanding what you wanted to do.
User avatar
Eddie Howe
 
Posts: 3448
Joined: Sat Jun 30, 2007 6:06 am

Post » Sun Nov 18, 2012 10:56 pm

I'll tell you after I make it.
User avatar
Richard Thompson
 
Posts: 3302
Joined: Mon Jun 04, 2007 3:49 am


Return to V - Skyrim