Making Cursed items, whats the best way to go about it?

Post » Mon Nov 19, 2012 1:06 am

I want to see about adding some cursed items into the game, and I was wondering what would be the best approach? I thought of a couple of ways but not too sure what way would be best.

Did think about creating an enchantment that was on an item, but don't want that enchantment to be available to the player at enchanting stations. Also I'm not too sure about what to do editing enchantments to act like curses.

The other way I thought was to attach a script to the item. I was thinking of something specific at first - a copy of the ring given to you in oblivion as part of the mage guild quest.

I tried SetActorValue("SpeedMult" , 0.1) but that didn't seem to work (wondered if that interferred with walking animation)
Tried DisablePlayerControls(1) not really the result I wanted
Also used GetActorValue("CarryWeight", Float OldWeight) and then SetActorValue("CarryWeight", 0 ) and then restored Old carry weight on Unepuip. This gave a very undesirable effect of leaving the player character (the one I tested it on) with a carry weight of 106 and when the item was unequipped added the 106 to the original OldWeight.

The next approach I was planning on using when I get the time was to use Setweight(1000) when equipped. This may work in this particular case but for more interesting curses would it be better to implement a spell effect on the player and what functions can I use to achieve this?
User avatar
Melis Hristina
 
Posts: 3509
Joined: Sat Jun 17, 2006 10:36 pm

Post » Mon Nov 19, 2012 7:23 am

The carryweight thing will work if you use ModActorValue instead of set, as long as you mod it back when you're done.

For speedmult: The player has to change animation types (I think) after speedmult is set for it to apply... if they sprint it will be applied. I've been wondering if it's possible to play the sprinting animation or something for a very short time after setting it to force it to apply right away. I'll test this today and post the results if it works.
User avatar
le GraiN
 
Posts: 3436
Joined: Thu Mar 22, 2007 6:48 pm

Post » Mon Nov 19, 2012 3:00 pm

Yep the Carryweight with ModActorValue works well, nothing seems to work on followers but.

How do you go about forcing animations? The only luck I have ever had was re-assigning idle markers.
User avatar
Samantha hulme
 
Posts: 3373
Joined: Wed Jun 21, 2006 4:22 pm

Post » Mon Nov 19, 2012 12:59 am

  • Animations are either idle markers (which you found)
  • In Packages (last tab at the top) ... needs to be very short packages, or it's a bit pants (I think)
  • In Scenes (with markers/idles/dialogue)
  • In Dialogue (there's options to play idles whilst a line is said).
So it depends what you are trying to do, and when/how as to which - if any - is any good to you

(there's casting animations and all-sorts of other guff, too, like I say depends what you're trying to achieve?)

And see this: http://www.gamesas.com/topic/1400512-registering-for-a-specific-wolf-animation/



As for the curses ... reverse perks or long-duration magic-effect/spells is probably the best way. If it is a cursed item - like a sword - you could detect OnEquip and get a spell cast (or perk activated) when/if it was. Probably the easiest way?
User avatar
james tait
 
Posts: 3385
Joined: Fri Jun 22, 2007 6:26 pm

Post » Mon Nov 19, 2012 12:15 pm

Looking around I find that these animations are a pain in the [censor] and I had the thought. I wonder if it is possible on an event to spawn an idle marker with a desired animation already set and have it linked to a target.

For example a script on a ring that when equipped spawns an Idle Marker at the feet of the wearer and links to the wearer with an animation of un-controllable laughter.

I decided to have another look at SpeedMult and I'm getting some strange results, I have attached this script to a piece of armor.

Scriptname Slow extends ObjectReference  {slow actor down to snails pace}Import DebugImport GameFloat Property OldSpeed AutoFloat Property NewSpeed AutoEvent OnEquipped(Actor akActor)	If akActor == Game.GetPlayer()		OldSpeed = Game.Getplayer().getActorValue("SpeedMult")		NewSpeed = OldSpeed -  0.9*OldSpeed		Game.GetPlayer().SetActorValue("SpeedMult" , NewSpeed)	EndIF 	Debug.Notification("My Speed was " + OldSpeed)	Debug.Notification("My New Speed is " + NewSpeed)EndEventEvent OnUnequipped(Actor akActor)	If akActor == Game.GetPlayer()		Game.GetPlayer().SetActorValue("SpeedMult" , OldSpeed)	EndIF EndEvent

The player moves at normal speed but slows down when I unequip the armor, only returns to normal speed when I put it back on. I'm not sure If I should have a goto state on the OnEquipped Event. Also If I'm in 3rd person when I unequip the armor the player stops completely and can't move until I equip it again.

Oh and the standard running animation works you just run real slow.
User avatar
Miranda Taylor
 
Posts: 3406
Joined: Sat Feb 24, 2007 3:39 pm

Post » Mon Nov 19, 2012 2:15 am

Looking around I find that these animations are a pain in the [censor] and I had the thought. I wonder if it is possible on an event to spawn an idle marker with a desired animation already set and have it linked to a target.

For example a script on a ring that when equipped spawns an Idle Marker at the feet of the wearer and links to the wearer with an animation of un-controllable laughter.
...

If you setup the marker you want in the CK, you could add it to a holding cell (that you make, or whatever), then use placeatme() to move it wherever you need it, whenever you want - Maybe Force it into an Alias, if that's easiest for your script? - That works well.





Speedmult ... never played with it, but doing things to the player always seems to bring some oddities. Cipscis is the guy for help with states ... they wreck my head! (but I think you could make use of one ... but don't just believe me!)
User avatar
Miss Hayley
 
Posts: 3414
Joined: Tue Jun 27, 2006 2:31 am


Return to V - Skyrim