Quick CK questions Thread #2

Post » Tue Jun 19, 2012 3:39 pm

Does any one with CK knowledge even look at this thread?
It's because it's only possible to assign one enchantment per item, although you could assign more than one effect per enchantment.. If you don't even know that, then that means you made no effort to do it yourself.

For a toggled power when you equip the enchanted item, you would need to have a scripted magic effect that adds and removes a lesser power when the effect starts and the effect ends.
User avatar
Rusty Billiot
 
Posts: 3431
Joined: Sat Sep 22, 2007 10:22 pm

Post » Tue Jun 19, 2012 11:55 am

It's because it's only possible to assign one enchantment per item, although you could assign more than one effect per enchantment.. If you don't even know that, then that means you made no effort to do it yourself.

For a toggled power when you equip the enchanted item, you would need to have a scripted magic effect that adds and removes a lesser power when the effect starts and the effect ends.

Yeah I've already figured that much out. I just need a script to add and remove a power upon equip and un equip.
User avatar
Vicky Keeler
 
Posts: 3427
Joined: Wed Aug 23, 2006 3:03 am

Post » Tue Jun 19, 2012 9:01 am

Has a TesFiles been released for Skyrim?
User avatar
Destinyscharm
 
Posts: 3404
Joined: Sun Jul 23, 2006 6:06 pm

Post » Tue Jun 19, 2012 1:44 pm

Yeah I've already figured that much out. I just need a script to add and remove a power upon equip and un equip.

Scriptname SomeEnchMagicEffectScript extends ActiveMagicEffectSpell property CoolPower autoEvent OnEffectStart(Actor akTarget, Actor akCaster)	akTarget.AddSpell(CoolPower)EndEventEvent OnEffectFinish(Actor akTarget, Actor akCaster)	akTarget.RemoveSpell(CoolPower)EndEvent


EDIT:

Has anyone been able to get the return value from RemoveSpell? I couldn't get this to work:

Function ToggleSpell(Spell MySpell, Actor MyActor)    if !(MyActor.RemoveSpell(MySpell))        MyActor.AddSpell(MySpell)    endifEndFunction
User avatar
maddison
 
Posts: 3498
Joined: Sat Mar 10, 2007 9:22 pm

Post » Tue Jun 19, 2012 9:02 pm

Has anyone been able to get the return value from RemoveSpell? I couldn't get this to work:

Function ToggleSpell(Spell MySpell, Actor MyActor)	if !(MyActor.RemoveSpell(MySpell))		MyActor.AddSpell(MySpell)	endifEndFunction

I don't know about the exclamation mark.
Wouldn't you do either:
if myactor.removespell(myspell) != true

or

if myactor.removespell(myspell)
User avatar
Nauty
 
Posts: 3410
Joined: Wed Jan 24, 2007 6:58 pm

Post » Tue Jun 19, 2012 9:56 pm

Exclamation mark in front represents NOT, its valid syntax for Papyrus.

http://www.creationkit.com/Operator_Reference
User avatar
Sarah Knight
 
Posts: 3416
Joined: Mon Jun 19, 2006 5:02 am

Post » Tue Jun 19, 2012 10:28 am

.
User avatar
nath
 
Posts: 3463
Joined: Mon Jan 22, 2007 5:34 am

Post » Tue Jun 19, 2012 10:57 am

Scriptname SomeEnchMagicEffectScript extends ActiveMagicEffectSpell property CoolPower autoEvent OnEffectStart(Actor akTarget, Actor akCaster)	akTarget.AddSpell(CoolPower)EndEventEvent OnEffectFinish(Actor akTarget, Actor akCaster)	akTarget.RemoveSpell(CoolPower)EndEvent

Ok so I'm guessing (kinda new at this), that anywhere it says "CoolPower" in that code is where i need to place the name of the power that will add the spell?
User avatar
James Wilson
 
Posts: 3457
Joined: Mon Nov 12, 2007 12:51 pm

Post » Tue Jun 19, 2012 6:35 am

Yes, but you don't have to. The name of the property itself doesn't matter at all. You set the value to the property outside of the script by right-clicking it and selecting properties. http://www.creationkit.com/Bethesda_Tutorial_Papyrus_Introduction_to_Properties#Hooking_up_the_message_boxes_to_the_properties_in_the_script
User avatar
Laura
 
Posts: 3456
Joined: Sun Sep 10, 2006 7:11 am

Post » Tue Jun 19, 2012 10:19 pm

Is there a way to level up an actor via Script?
User avatar
Aaron Clark
 
Posts: 3439
Joined: Fri Oct 26, 2007 2:23 pm

Post » Tue Jun 19, 2012 7:45 pm

I need an ear. No really, I do.

I want to extract the dark elf ears so that I can edit them, but they don't seem to actually be attached to the head. Been having some trouble figuring out just which file it is they're in. I'm pretty sure it's supposed to be linked to a HDPT file, like the other body parts, but that doesn't seem to be the case. Would by chance anyone know? >.>

EDIT: Nevermind, figured it out. The ears were attached to the face gen, but given names like 00013349. Which is... going to be interesting trying to edit.
User avatar
CHANONE
 
Posts: 3377
Joined: Fri Mar 30, 2007 10:04 am

Post » Tue Jun 19, 2012 6:30 am

Yes, but you don't have to. The name of the property itself doesn't matter at all. You set the value to the property outside of the script by right-clicking it and selecting properties. http://www.creationkit.com/Bethesda_Tutorial_Papyrus_Introduction_to_Properties#Hooking_up_the_message_boxes_to_the_properties_in_the_script

Ok i cant figure out which night eye is the right one. i tried night eye and night eye effect but neither seemed to give me the spell.
User avatar
Richard
 
Posts: 3371
Joined: Sat Oct 13, 2007 2:50 pm

Post » Tue Jun 19, 2012 8:51 am

Try PowerKhajiitNightEye.
User avatar
DAVId Bryant
 
Posts: 3366
Joined: Wed Nov 14, 2007 11:41 pm

Post » Tue Jun 19, 2012 5:42 pm

I didnt see it. the only power effect that would show up is something for the dark elves.
User avatar
James Smart
 
Posts: 3362
Joined: Sun Nov 04, 2007 7:49 pm

Post » Tue Jun 19, 2012 8:45 am

Is there a way to level up an actor via Script?

http://www.creationkit.com/AdvanceSkill_-_Game

Otherwise, no.

If you find a way to do it without changing skills though, tell me.
User avatar
Tina Tupou
 
Posts: 3487
Joined: Fri Mar 09, 2007 4:37 pm

Post » Tue Jun 19, 2012 9:20 am

is there a way to delete a script? I made one that seems to keep me from compiling a new one.
User avatar
Shelby Huffman
 
Posts: 3454
Joined: Wed Aug 08, 2007 11:06 am

Post » Tue Jun 19, 2012 4:56 pm

You can search your scripts folder and then delete them. Remember there is a psc (source) file and a pex (compiled) file.

Does anyone know how the spline translate functions work? I've been experimenting and I'm not sure I understand. This is what I think it does:

1. The preferred path that the object uses to travel to it's target is elliptical.
  • If the object is facing away from it's target, the path would be over half the ellipse, otherwise it's less than half.
  • The total distance covered by the path is the spline magnitude.
  • If the spline magnitude is too high, then the object will actually curve behind the target (eg instead of object starting at 1 o'clock and target is 5 o'clock, object starts at 1 o'clock and target is 4 o'clock).
2. If the spline magnitude is too low for the path to be elliptical, then the path is triangular.
  • The object will travel in the direction it was facing at the start until they manage to turn towards the target.
  • Then the object will travel straight towards the target.
3. Spline/ellipse is only on the XY plane.


EDIT: Well, I still don't know how the functions actually work, but I'm pretty satisfied with the curve I get when I use this:

Spoiler
Scriptname fg109TestMEScript extends ActiveMagicEffect  Float Property Speed = 100.0 AutoEvent OnEffectStart(Actor akTarget, Actor akCaster)    SmoothCurve(akTarget, akCaster)EndEventFunction SmoothCurve(ObjectReference A, ObjectReference B)    Float AngleZ = A.GetHeadingAngle(B)    if (AngleZ < -45)        Float OffsetAngle = -45.0 - AngleZ        AngleZ = -45.0        A.SetAngle(0, 0, A.GetAngleZ() + OffsetAngle)    elseif (AngleZ > 45)        Float OffsetAngle = 45.0 - AngleZ        AngleZ = 45.0        A.SetAngle(0, 0, A.GetAngleZ() + OffsetAngle)    endif    Float DistanceXY = Math.sqrt((B.X - A.X) * (B.X - A.X) + (B.Y - A.Y) * (B.Y - A.Y))    Float SplineMagnitude = DistanceXY / Math.Cos(AngleZ)    Float AngleZEnd = A.GetAngleZ() + (A.GetHeadingAngle(B) * 2)    A.SplineTranslateTo(B.X, B.Y, B.Z, 0, 0, AngleZEnd, Math.Abs(SplineMagnitude) * 0.75, Speed)EndFunction

It's a magic effect because I was testing the function out using NPCs.
User avatar
Krystina Proietti
 
Posts: 3388
Joined: Sat Dec 23, 2006 9:02 pm

Post » Tue Jun 19, 2012 3:24 pm

I just deleted the .esp and i am going to start from scratch.
User avatar
Katie Louise Ingram
 
Posts: 3437
Joined: Sat Nov 18, 2006 2:10 am

Post » Tue Jun 19, 2012 7:25 pm

How would I go about making a spell effect that stacks with itself on the player?
Using the same MGEF would, if I am not mistaken, only reset the duration if it is reapplied.
However, I am thinking of a spell that will not have a cooldown, but instead apply a small debuff everytime it is used. For balance, this debuff should stack.

I can think of a way to script this with a global, but I try to avoid those when possible. Any ideas?
User avatar
Marnesia Steele
 
Posts: 3398
Joined: Thu Aug 09, 2007 10:11 pm

Post » Tue Jun 19, 2012 5:32 pm

Where are all the crops? I look in flora, which has all the mushrooms and those sorts of things, as well as other not-technically-flora things that you can harvest like flora, but I don't see any crops there. What is the directory to find things like wheat, cabbages etc. EDIT: Found it in trees. You'd think all the harvestable items would go under one category, rather than just some of them and having the rest in a section that also includes non-harvestable objects.
User avatar
Kate Norris
 
Posts: 3373
Joined: Mon Nov 27, 2006 6:12 pm

Post » Tue Jun 19, 2012 10:17 am

Does anyone know how to use the story manager to detect when the player sells something? I checked the CK wiki, and none of the types for Player Remove Item events seem to refer to item sales.

Reference:
http://www.creationkit.com/Player_Remove_Item
User avatar
Cash n Class
 
Posts: 3430
Joined: Wed Jun 28, 2006 10:01 am

Post » Tue Jun 19, 2012 9:19 am

Just finished making the test quest. After getting the sword from enemy, I should give this sword to my NPC. And the dialogue doesnt start, nothing opening.
Where the problem can be?
User avatar
Celestine Stardust
 
Posts: 3390
Joined: Fri Dec 01, 2006 11:22 pm

Post » Tue Jun 19, 2012 7:49 am

  • I can think of a way to script this with a global, but I try to avoid those when possible. Any ideas?
    If a global will work, why not use one? There's nothing wrong with globals...
  • Where are all the crops?
    World Objects > Trees > TreeFlora*
  • Does anyone know how to use the story manager to detect when the player sells something? I checked the CK wiki, and none of the types for Player Remove Item events seem to refer to item sales.
    An http://www.creationkit.com/OnSell_-_ObjectReference event for the item would do it. Not sure about covering that with the SM, however...
  • And the dialogue doesnt start, nothing opening. Where the problem can be?
    Is the quest running? Are the INFOs' conditions all met?
User avatar
..xX Vin Xx..
 
Posts: 3531
Joined: Sun Jun 18, 2006 6:33 pm

Post » Tue Jun 19, 2012 6:08 am

hi all! i'm making a mod that add new npcs to the game and i wanted to know how to make a npc go clear a dungeons and loot corpses.
i used the DefaultSandboxMultiLocation, set the npc travel to the boss in the dungeon, set 180 seconds to wait in the dungeon.

Then i use the console to teleport to the npc i created and then i see him start his attack against the boss.
Well i would like to create a package that make the npc enter the dungeon, attack the enemies just like the player, and not to teleport him directly to the boss making all the npcs nearby to attack him all at the same time.

then, is there a way to create a package to enable npcs to loot corpes?
thank you.
User avatar
Pat RiMsey
 
Posts: 3306
Joined: Fri Oct 19, 2007 1:22 am

Post » Tue Jun 19, 2012 2:58 pm

Is the quest running? Are the INFOs' conditions all met?
Yeah, it's running, I have sword and I need to give it to NPC (I have marker to my npc).
Just checked the conditions, id and quest stage are set, they are current (stage 20 is completed, now is stage 30, id belong to npc).
User avatar
Spencey!
 
Posts: 3221
Joined: Thu Aug 17, 2006 12:18 am

PreviousNext

Return to V - Skyrim