First Time Weapon Scripts

Post » Tue Jun 19, 2012 9:19 am

Hello everyone, thanks for taking the time to come here and view my topic. I hope someone will be able to help me.

I have no experience with scripting in Papyrus so I'm a bit lost as to where to start, but I've setup Notepad++ for compiling and I'm willing to learn!

I have what I hope is just a simple task, I'd like to add a script effect to a weapon that already exists in game.

What I would like to happen is that when a character kills an enemy with the Ebony Blade, their character scale increases in size by say... 0.005 until a max of 1.5.
This is sort of playing on the whole "absorbs lifrforce" part.

I don't know if it would be possible, but if so, I'd also like to be able to have the scale reset everytime that character enters a new cell or "re-zones".

Thanks for all your help and I look forward to your replies!
User avatar
Janette Segura
 
Posts: 3512
Joined: Wed Aug 22, 2007 12:36 am

Post » Tue Jun 19, 2012 10:55 am

Hi Spongeman131.

When thinking about how a script should be organised, there are two important things you need to think about:
  • How am I going to do what I want to do?
  • How am I going to detect when I should do it?
The answer to the first question would simply involve using the function http://www.creationkit.com/SetScale_-_ObjectReference to change the scale of something, but the answer to the second question is a bit trickier.

In order to detect when a character kills an enemy, your first thought might be to detect the http://www.creationkit.com/OnDeath_-_Actor event, but in order to detect that you either need a script on the http://www.creationkit.com/Actor_Script themselves, or you need to use the reference alias of a quest.

An easier way to go about it, which would only work for the player, would be to use a perk. One type of "Entry Point" perk entry is called "Add Leveled List On Death" (or something like that - I'm going from memory here), and you can use this to add an item to the inventory of every actor killed by the player. You can also use http://www.creationkit.com/GetEquipped as a condition to only add the item if the player has your weapon equipped.

If the item that you add to the actor's inventory has a script, you could use that to change the scale of the player in the item's http://www.creationkit.com/OnInit event, for example.

There will be other methods to do this, but I don't think any of them are simple. This is the one that I would try first, but someone else might be able to offer a better method. Hopefully I'm missing something simple and someone can come along and tell you a much easier way to do this, but I haven't thought of one.

Cipscis
User avatar
Leah
 
Posts: 3358
Joined: Wed Nov 01, 2006 3:11 pm

Post » Tue Jun 19, 2012 2:18 am

My first hope was to be able to modify the effects of the weapon's enchantment like I was able to usign the Construction Set back in Oblivion, where I could simply add a command line to the enchantment effect. I'm wondering if I could do the same here, although it's not looking like it.

I can look at and modify the enchantments for the weapon, and I think what I may be after is to be able to add another effect to it. That's easy enough, but I'm guessing I'd have to make a new one specifically for this purpose.
How can I make a new effect? I can play around with it from there and learn something I can hopefully bring back here once I can look at it, but I'm at a loss for where to even view their location. Let alone create or modify one.

Thanks for the quick reply by the way.
User avatar
sexy zara
 
Posts: 3268
Joined: Wed Nov 01, 2006 7:53 am

Post » Tue Jun 19, 2012 4:58 am

Aah, success, I've found the actual effect part of the weapon, I'll see if there's a way to create something new there.
User avatar
Ells
 
Posts: 3430
Joined: Thu Aug 10, 2006 9:03 pm

Post » Tue Jun 19, 2012 3:14 am

To create a new effect, I believe you'll want to look under "Enchantments", which should be under the "Magic" section of the object tree.

I've had the method I talked about in my post on my mind for a few days, and I'm sure there must be an easier way but my mind's feeling a bit slippery right now. Running on 2 hours' sleep doesn't come recommended :P

I don't quite remember, but there might be a way to apply certain effects via a weapon when it's used to kill an actor. Take a look and see what you're able to find.

Cipscis
User avatar
Terry
 
Posts: 3368
Joined: Mon Jul 09, 2007 1:21 am

Post » Tue Jun 19, 2012 7:00 am

Okay, well I've found a script that causes what I'm after only it applies to when you feed as a werewolf. Is there anyway I can apply the effects of werewolf feeding as an enchantment on the weapon?
User avatar
Ashley Clifft
 
Posts: 3468
Joined: Thu Jul 26, 2007 5:56 am

Post » Tue Jun 19, 2012 9:08 am

Still no luck on getting the feeding effect to work with the sword. I'm guessing it has something to do with me not being in werewolf form when I use it, but one is impossible while using the other so I'm at a loss. Hopefully someone with greater knowledge of this than me can shed some light or stumble accross what I'm looking for.
User avatar
Lovingly
 
Posts: 3414
Joined: Fri Sep 15, 2006 6:36 am


Return to V - Skyrim