Quick Questions, Quick Answers, The 3'rd

Post » Thu Jun 21, 2012 12:32 am

Is there a way to tell via conditions if the player has a MiscItem in their inventory? (Specifically, one of the Totems of Hircine, CRTotem1, 2, and 3.) They don't show up in the list provided by the GetItemCount condition, nor GetInContainer, nor for that matter in the list of items that the "Player Add Item" Story Manager Event can track.
User avatar
pinar
 
Posts: 3453
Joined: Thu Apr 19, 2007 1:35 pm

Post » Thu Jun 21, 2012 1:15 am

How do I attach a script to the Player? I want to add an OnItemAdded event to the player. DO I have to create a quest?
Create a quest with a ReferenceAlias force-filled with PlayerREF as described below. So long as the quest is running and any conditions you add are met, the OnItemAdded() event will work. Keep in mind you can't call functions implicitly or use 'Self' from a ReferenceAlias script, so you'll need to use http://www.creationkit.com/GetActorReference_-_ReferenceAlias instead.
e.g.
Spoiler
ScriptName BagOfHoldingPlayerAliasScript extends ReferenceAliasImport InputFormList Property BagOfHoldingItemFLST AutoInt Property iAutoStashKey = 48 Auto ConditionalObjectReference Property BagOfHoldingREF AutoAuto State AutoStash	Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)		If BagOfHoldingItemFLST.HasForm(akBaseItem)		ElseIf IsKeyPressed(iAutoStashKey)			GetActorReference().RemoveItem(akBaseItem, aiItemCount, True, BagOfHoldingREF)		EndIf	EndEventEndState 
http://www.creationkit.com/GetBaseObject_-_ObjectReference: I've also found it unreliable and have been using a property pointed to the item instead.
Is there a way to tell via conditions if the player has a MiscItem in their inventory? (Specifically, one of the Totems of Hircine, CRTotem1, 2, and 3.) They don't show up in the list provided by the GetItemCount condition, nor GetInContainer, nor for that matter in the list of items that the "Player Add Item" Story Manager Event can track.
You need to set the condition's "Run on" field up to check Reference > Cell: (any) > Reference: PlayerREF before the dropdown list will show the items. If running on "Subject" the GetItemCount condition is inapplicable unless called implicitly (INFO). Also, if checking for all three, a FormList might come in handy to check instead of checking for each item individually.
User avatar
Chica Cheve
 
Posts: 3411
Joined: Sun Aug 27, 2006 10:42 pm

Post » Wed Jun 20, 2012 6:23 pm

Thanks! I think I was mostly just having an episode of temporary blindness and not finding the totems where I expected them to be alphabetized, because yes, thery're there now. And yes, a formlist is a good idea.
User avatar
Thema
 
Posts: 3461
Joined: Thu Sep 21, 2006 2:36 am

Post » Wed Jun 20, 2012 8:06 pm

Not sure if this counts as a quick question (been working at it, unsuccessfully, all afternoon), but if anyone knows the answer it's likely to be something simple I just can't get. I've made it so that EnchFortifyDestructionConstantSelf affects DestructionPowerMod rather than DestructionMod, so enchantments with this effect increase spell damage rather than magicka cost. But this, of course, also increases the power of destruction-effect enchants, which is an undesirable side-effect. I'm trying to find a way to prevent that. My guess is that a condition needs to be added to EnchFortifyDestructionConstantSelf to check whether the player is currently enchanting, and if so, turn off the effect (assuming that it works the way I think it does). The most likely way to do so would seem to be to use IsScenePlaying and then the crafting scene WICraftItemScene02, but that's not working. Any idea why? Or alternate suggestion for how to do this?
User avatar
Emma Copeland
 
Posts: 3383
Joined: Sat Jul 01, 2006 12:37 am

Post » Wed Jun 20, 2012 8:33 pm

How do I use the CK to change the visual and audio dection angle and range for a vannila npc or creature?
User avatar
Petr Jordy Zugar
 
Posts: 3497
Joined: Tue Jul 03, 2007 10:10 pm

Post » Wed Jun 20, 2012 8:54 pm

I want to make a spell that would be able to change the Armor Type (Light, Heavy, undefined) of any piece of armor in-game. Can spells affect that part of a piece of armor?

Example:

I have some Steel Armor. I want to change its type to Light Armor from Heavy Armor. But only for that one particular piece of Steel Armor (i.e. any further drops of Steel Armor or forging etc. are normal). So the spell applies like an Enchant.

Can a spell affect that part of the armor as an Enchant type spell?
User avatar
Sophie Morrell
 
Posts: 3364
Joined: Sat Aug 12, 2006 11:13 am

Post » Wed Jun 20, 2012 8:24 pm

Just a quick question about sound / music in the CK...

... is there a way to force the CK to default to .xwm instead of .wav when selecting music files, because it's really annoying to have to do the '*' search mask each and every time I want to import an xwm. <_<
User avatar
Glu Glu
 
Posts: 3352
Joined: Sun Apr 01, 2007 5:39 am

Post » Wed Jun 20, 2012 7:24 pm

How can i test perk modifiers ingame?

I've made some new perks which increase attack damage and spell magnitude with the condition that they have a 1h sword in right hand and any spell in the left hand.
I can unlock them on the perk trees ok but how do i find out if the modifiers I've set are working?
User avatar
Far'ed K.G.h.m
 
Posts: 3464
Joined: Sat Jul 14, 2007 11:03 pm

Post » Wed Jun 20, 2012 11:50 am

How do you get more than 2x2 cell radius for water in a new worldspace? Even if i drop a new water object outside the 2x2 cell limit, it disappears then reappears at 0,0
User avatar
Sunny Under
 
Posts: 3368
Joined: Wed Apr 11, 2007 5:31 pm

Post » Wed Jun 20, 2012 4:50 pm

Has anyone had any experience using the Description section when creating items? I'm wondering if there is any way to change the length, as it doesn't adjust to longer descriptions. I can fit about 15 words in there on average, before it gets cut off.
User avatar
Alister Scott
 
Posts: 3441
Joined: Sun Jul 29, 2007 2:56 am

Post » Thu Jun 21, 2012 2:49 am

The most likely way to do so would seem to be to use IsScenePlaying and then the crafting scene WICraftItemScene02, but that's not working. Any idea why? Or alternate suggestion for how to do this?

The WICraftItemScene02 is run off the SM event node "Craft Item" and the scene is only for making nearby actors comment on your enchanting. I think it only starts running after you successfully craft an item.

I want to make a spell that would be able to change the Armor Type (Light, Heavy, undefined) of any piece of armor in-game. Can spells affect that part of a piece of armor?

No.

I have a question of my own. Does anyone have any ideas on how to detect when an item has been removed from the world (ie added to someone's inventory)? Restrictions are that I cannot put a script on the item, I cannot fill a reference alias with the item, and that I cannot put a script on the player to detect OnItemAdded (or use the Add Item SM event node).

At the moment, I can only think of having a script fill an object reference property/variable with it, and then doing a Is3DLoaded check every so often.
User avatar
Emily Graham
 
Posts: 3447
Joined: Sat Jul 22, 2006 11:34 am

Post » Wed Jun 20, 2012 1:47 pm

I have 2 quick questions.

Question 1
I am getting an error when using "Self" to refer to the object a script is attached to. I have used it before without problem but it shows the following error and I can't determine why?
.Game.WhateverFunctionImUsing() - "" Line ?

Question 2
When referencing a node on the game.getplayer() It returns with:
error: Reference (0x00000014) does not have a node named Feet

Just as I pasted that in I realized that the player is in first person. Maybe I'll try it in 3rd person and see if it changes.
User avatar
Quick Draw
 
Posts: 3423
Joined: Sun Sep 30, 2007 4:56 am

Post » Wed Jun 20, 2012 6:03 pm

I have 2 quick questions.

1. What kind of script are you extending? What's the code that creates the error?

2. The names of the nodes are not the names you see when you check the race window in the CK. You'll need to load up the skeleton.nif in NifSkope and check out the nodes there. They look something like "NPC Head [Head]".
User avatar
Jessica Stokes
 
Posts: 3315
Joined: Fri Jul 28, 2006 11:01 am

Post » Wed Jun 20, 2012 7:33 pm

That was like 1 min response. Think for promptness.

I guess I will try Nifscope out. I guess every race has a different skeleton as well? NVM...I'll look thru it.

I was trying http://www.creationkit.com/AddHavokBallAndSocketConstraint_-_Game
and self would refer to an objecrt the player is standing on.
User avatar
Antony Holdsworth
 
Posts: 3387
Joined: Tue May 29, 2007 4:50 am

Post » Wed Jun 20, 2012 2:54 pm

You would use that like this:

Game.AddHavokBallAndSocketConstraint(Game.GetPlayer(), "Some node on the player", Self, "Some node on self")

I hope you manage to figure out how to get that to work. I tried and didn't see anything happening.
User avatar
Ann Church
 
Posts: 3450
Joined: Sat Jul 29, 2006 7:41 pm

Post » Wed Jun 20, 2012 5:58 pm

You would use that like this:

Game.AddHavokBallAndSocketConstraint(Game.GetPlayer(), "Some node on the player", Self, "Some node on self")

I hope you manage to figure out how to get that to work. I tried and didn't see anything happening.

Ya that is how I had it in the script and I also got NifSCope and the correct node name. I will use it to make sure I have the correct node for the the other object as well and give it another shot. Maybe it will react different with correct nodes....thanks
User avatar
Dan Wright
 
Posts: 3308
Joined: Mon Jul 16, 2007 8:40 am

Post » Thu Jun 21, 2012 3:29 am

Well that funcrion isn't any help. You propably didn't notice anything happening because it will remove contraints as in "Collision" so if you didn't try it on an object and try to walk through it nothing would happen. So it effects just to 2 objects until the RemoveHavocConstraints() function is used.

FYI to anyone involved with the wiki. The RemoveHavocConstraints() writeup is missing the "s" in the function name and says RemoveHavocConstraint().
User avatar
Khamaji Taylor
 
Posts: 3437
Joined: Sun Jul 29, 2007 6:15 am

Post » Wed Jun 20, 2012 11:11 pm

FYI to anyone involved with the wiki. The RemoveHavocConstraints() writeup is missing the "s" in the function name and says RemoveHavocConstraint().
*done
User avatar
Claire Jackson
 
Posts: 3422
Joined: Thu Jul 20, 2006 11:38 pm

Post » Wed Jun 20, 2012 4:19 pm

How do I go about implementing this in a spell script(not the Spell scriptobject)?

game.advanceskill

For my current script I have tried the following
Note: I'm not sure if writing the function out is necessary, so I did it as a precaution.

(Activemagiceffect)
Event OnEffectStart(Actor akTarget, Actor akCaster);do stuffEndEventFunction AdvanceSkill(string asSkillName, float afMagnitude)game.AdvanceSkill("Destruction", 100.0)EndFunctionEvent OnDying(Actor myKiller)	actorHealth = selfRef.GetAV("Health") as int	if  actorHealth <= 0		wait (2.0)		selfRef.PlaceAtMe(FXSoulSparkExplosion)		game.AdvanceSkill("Destruction", 100.0)endifEndEvent

It supposed to skill up destruction on each use, but it's not working. The rest of the script works as intended though.. I'm trying to create a workaround for custom magic effects as the skill use multi field for them is broken..and thus do not counts towards skilling up.
User avatar
Harinder Ghag
 
Posts: 3405
Joined: Wed Jan 17, 2007 11:26 am

Post » Wed Jun 20, 2012 12:25 pm

I just tested http://www.creationkit.com/AdvanceSkill_-_Game and it worked...

Also, no you don't need to create an AdvanceSkill function in your script.
User avatar
Austin England
 
Posts: 3528
Joined: Thu Oct 11, 2007 7:16 pm

Post » Wed Jun 20, 2012 2:43 pm

And may I ask how you got it to work? I didn't do it right D:.
User avatar
Erich Lendermon
 
Posts: 3322
Joined: Sat Nov 03, 2007 4:20 pm

Post » Wed Jun 20, 2012 12:18 pm

Two brief inquiries here:
1) For some reason my Show/Hide window won't let me select markers, which means I can't join rooms. Anyone know why this might be?
2) I can't remember how you join two navmesh triangles side to side. Its something like double clicking the first side and CTRL clicking the second, but that isn't working for me.
User avatar
Neil
 
Posts: 3357
Joined: Sat Jul 14, 2007 5:08 am

Post » Wed Jun 20, 2012 2:50 pm

And may I ask how you got it to work? I didn't do it right D:.

I just put this script on a magic effect for a lesser power and cast it on myself a couple of times:

Scriptname Example extends ActiveMagicEffectEvent OnEffectStart(Actor akTarget, Actor akCaster)    Game.AdvanceSkill("Destruction", 100.0)EndEvent

Maybe yours isn't working because your effect ends before the actor sends the OnDying event. Why don't you put a debug.notification in there to make sure it's actually firing?
User avatar
BRIANNA
 
Posts: 3438
Joined: Thu Jan 11, 2007 7:51 pm

Post » Thu Jun 21, 2012 1:46 am

How do I make a skeleton actor wear a damn helmet? In the creation kit, the only helmet that shows up on them when I check preview is the Iron helmet. In game, no helmets show up.

I would really, really like to get them to wear the draugr helmet. But if I can't I will settle for an iron helmet.
User avatar
biiibi
 
Posts: 3384
Joined: Sun Apr 08, 2007 4:39 am

Post » Wed Jun 20, 2012 11:41 am

How do I make a skeleton actor wear a damn helmet? In the creation kit, the only helmet that shows up on them when I check preview is the Iron helmet. In game, no helmets show up.

I would really, really like to get them to wear the draugr helmet. But if I can't I will settle for an iron helmet.

You may need to make a custom skeleton race and set the "Armor race" to a race that can wear the helmet, then add the "DefaultAddToLinkonLoadScript" to the helmet in the editor (put it on the ground or something next to the skellie, and set the Helmet's "Linked Ref" to the Skellie - In the properties of the script, set both properties (ForceEquip and ShouldEquip) to "True"
User avatar
Madeleine Rose Walsh
 
Posts: 3425
Joined: Wed Oct 04, 2006 2:07 am

PreviousNext

Return to V - Skyrim