Quick Questions, Quick Answers Thread #8

Post » Mon Nov 19, 2012 6:21 pm

Sounds like the PSCs weren't packed in the BSA? If that's the case, we can only hope the next CK update will furnish them like was done for Dawnguard.
User avatar
KRistina Karlsson
 
Posts: 3383
Joined: Tue Jun 20, 2006 9:22 pm

Post » Mon Nov 19, 2012 8:18 am

Wow! Thanks a lot to both of you! And good that I found out soon about the too fast interval and RegisterForUpdate issues... I will try this right away. A lot of nifty tricks I'm learning here! :smile: And while I'm at it, and you both seem in the mood to help newbies, is there anywhere a tutorial about creating interrupt packages? (The wiki one doesn't seem newbie proof) I need one to check if armor in a specific slot is equipped or not, and let the surrounding NPC's react to it by stopping and watching. I got the package done, but I'm not sure I defined it correctly as an interrupt package (have it selected as an Spectator interrupt override). I need all NPC's to have acces to it, but don't know how to do this. Also, are the interrupt overrides predefined? Can a Spectator Package only run if there is combat???

The spectator interrupt overrides only occur during combat (http://www.creationkit.com/AI_Packages_Tab). The only way to dynamically push packages onto an NPC's package stack is to use quest aliases. Once an actor is in an alias all you have to do is add packages to the alias and those packages will be pushed onto the top of the actor's package stack. My attempt to help you with your LOS script should prove useful now! Here is what you should do (I will put it in a spoiler as it is mostly copypasta from your other thread):

Spoiler
Create a quest and in the quest data tab tick the Start Game Enabled box (it would be best to start the quest using the Story Manager for a number of reasons but for the moment try this), untick the Run Once box and give the quest a priority of 99. In the quest aliases tab create a new reference alias and tick the Optional, Find Matching Reference, In Loaded Area and Closest check boxes. In the match conditions tab create a condition that uses the condition function IsActor on the subject == 1. In the packages tab, add your package. In the scripts tab attach a script like this one:

Spoiler
ScriptName MyScript extends ReferenceAliasReferenceAlias Property MyRefAlias autoActor MyActorEvent OnInit()		 RegisterForSingleUpdate(1.0)EndEventEvent OnUpdate()		 MyActor=MyRefAlias.GetReference() as Actor		 MyActor.EvaluatePackage()		 RegisterForSingleUpdate(3.0)EndEvent

Actors tend to evaluate their packages every 10 seconds by default but this script forces them to evaluate their packages every 3 seconds. Now duplicate this alias until you have 15 aliases. Don't forget to set the properties properly. Remember that you must point each RefAlias property at the alias itself.

What this quest is doing is it will search the loaded area (5x5 cells surronding the player) for actors and will give the closest 15 actors in this area an alias (the alias gives these actors the package). Now create a second quest the same way as the first (you should refine this later by using the story manager to start these quests). You will also need to attach a script to this second quest in the scripts tab. This script should look like this:

Spoiler
ScriptName MyRefreshAliasScript extends QuestQuest Property MyFirstQuest  autoEvent OnInit()		 RegisterForSingleUpdate(1.0)EndEventEvent OnUpdate()		 MyFirstQuest.Stop()		 MyFirstQuest.Start()		 RegisterForSingleUpdate(10.0)EndEvent

This script will constantly stop and start the first quest which will refresh the first quest's aliases periodically.

Make sure your package has the conditions GetDetected==1 running on the subject and whatever condition you require on the player (check if armor in a specific slot is equipped, is there a condition that will do this?).
User avatar
Jessica Colville
 
Posts: 3349
Joined: Wed Oct 18, 2006 6:53 pm

Post » Mon Nov 19, 2012 1:06 pm

Does GetActorOwner() actually work? Is there any other way to detect if an item in the player's inventory is stolen?
User avatar
Joanne
 
Posts: 3357
Joined: Fri Oct 27, 2006 1:25 pm

Post » Mon Nov 19, 2012 9:10 pm

Thank you very much, Zartar.

I will try your method. I'm actually going to scrap the LOS spell and go with your method also for LOS checks. It might be more tedious to set up with so many aliases, but it sure seems more stable and easier to use. My LOS spell tends to misfire way too often, and it grabs everything on it's way, including stuff like dead chicken which I still couldn't filter out...

Also, I now understand better the method you described in my other thread, and I'll be going back to it for sure, so you did help there too!

So... On to rewriting my whole mod from scratch again, for the 4th time...
User avatar
Courtney Foren
 
Posts: 3418
Joined: Sun Mar 11, 2007 6:49 am

Post » Mon Nov 19, 2012 5:24 am

I've solved my first problem but I'm still having trouble figuring out how to prevent the player from absorbing the dragons souls. :(

...
Dragon dies -> dragonactorscript fires OnDeath -> MQKillDragonScript fires DeathSequence (timed effects) -> WIFunctionsScript fires PlayerIsCurrentlyAbsorbingPower (dragon death dialogue is made available) -> Dragon Souls is incremented -> WIFunctionsScript fires PlayerIsDoneAbsorbingPower (dragon death dialogue is disabled).
User avatar
Stace
 
Posts: 3455
Joined: Sun Jun 18, 2006 2:52 pm

Post » Mon Nov 19, 2012 7:11 am

this one for checking that i have a normal egg, the quest its meant to be as follows

Talk to npc
She request a Chicken egg (the ingridient)
once i have the egg i have to go to deliver the egg to the npc
the NPC will trade my chicken egg for a hatchable egg
after 3 days the egg will hatch and spawn a chicken wich we have to tal to to complete the quest

Edit:

Here are a couple of photos for better understanding

http://i1093.photobucket.com/albums/i437/necrogaz/Untitled1_zps62e68762.png
http://i1093.photobucket.com/albums/i437/necrogaz/Untitled2_zpsa0d1f121.png

No help yet? :S
User avatar
Life long Observer
 
Posts: 3476
Joined: Fri Sep 08, 2006 7:07 pm

Post » Mon Nov 19, 2012 12:28 pm

Sounds like the PSCs weren't packed in the BSA? If that's the case, we can only hope the next CK update will furnish them like was done for Dawnguard.
Oh, I haven't unpacked the Hearthfire bsa - didn't realise I had to. I'll do that - thanks.
User avatar
Amanda Leis
 
Posts: 3518
Joined: Sun Dec 24, 2006 1:57 am

Post » Mon Nov 19, 2012 2:42 pm

right, this is bugging me like mad.
I have the player come into a room, where there will be several nordic sconces that should fire up, with a few seconds intervals (ie set 1 fires 1 second after triggered, set 2 fires 2 seconds, ect) but i can not for the life of me figure that bit out.
I can make the light turn on when the player uses an activator but i can not rewrite it to work of a trigger box, let alone make the FX thing turn from a grey ash to a burning fire, Best i can figure is some kind of enable/disable script, and have been looking into that in the standard scripts but cant seam to get those to work proberly, let alone with a time delay.

Anyone who can help with some sort of script or modified script or basic script that i can build on, and some info on how i set it up (linkref, parent or otherwise)
Thank you
User avatar
Crystal Clarke
 
Posts: 3410
Joined: Mon Dec 11, 2006 5:55 am

Post » Mon Nov 19, 2012 8:05 pm

Hey, I had a previous question here that seems to have gotten a little buried:

What is the ini edit for forcing skyrim to draw objects near to the camera?

For example when in 3rd person and free camera mode, if I were to zoom in on the player's (or any actor's) face when I get reasonably close it turns invisible. I see in most ENB post screens of the camera very close to certain objects. How do they achieve this?

New question: When naming your property's in Papyrus (eg. ObjectReference MyProperty Auto) can the actual name of "MyProperty" cause any issues if its shared or happens to be exactly the same as in other scripts?
I've been a bit paranoid and prefixed all my properties, the downside to this is that I can't auto-fill. This is pretty minor, but still.
User avatar
Danielle Brown
 
Posts: 3380
Joined: Wed Sep 27, 2006 6:03 am

Post » Mon Nov 19, 2012 5:12 am

New question: When naming your property's in Papyrus (eg. ObjectReference MyProperty Auto) can the actual name of "MyProperty" cause any issues if its shared or happens to be exactly the same as in other scripts?
You don't have to worry about that. You could have a gazillion scripts, for instance, with PlayerREF properties and the properties won't conflict.
User avatar
Ashley Tamen
 
Posts: 3477
Joined: Sun Apr 08, 2007 6:17 am

Post » Mon Nov 19, 2012 5:56 am

I'm not sure how to get one script of mine to manipulate property's in another?

Script is here and is still rough draft and not quite complete:
Spoiler

Scriptname MDHRelockScript extends ObjectReference {Re-locks a container for the player to train lockpicking against};simply re-locking the container will only give the player experience from the first unlock.Actor Property PlayerRef autoObjectReference Property CopyMe autoObjectReference Property TargetMarker AutoInt OneCopyEvent OnLoad()  BlockActivation()EndEventEvent OnActivate(ObjectReference akActionRef)BlockActivation()  If akActionRef == PlayerRef    If OneCopy < 1     ObjectReference Dupe = TargetMarker.PlaceAtMe(CopyMe)     OneCopy = 1     Dupe.SetScale(0.0)     Dupe.Activate(akActionRef)endif  endifEndEvent;=============;SecondScript;=============;;Event OnLockStateChanged(Dupe)  ;fires when player unlocks container. Ignore syntax. How awesome if I could fire this from main script though?; Lock()       ;prevents container from opening after successful lockpick; Delete()	   ;wont delete whilst still property. Need to clear it here or the 1st script could check OneCopy for clearing the property somehow.; OneCopy = 0;EndEvent

You should be able to see what I'm trying to do. If not I'll be happy to clarify.
User avatar
Miranda Taylor
 
Posts: 3406
Joined: Sat Feb 24, 2007 3:39 pm

Post » Mon Nov 19, 2012 11:01 am

I've solved my first problem but I'm still having trouble figuring out how to prevent the player from absorbing the dragons souls. :(
Question is cancelled; I've found the solution by myself. :)
User avatar
Alexis Estrada
 
Posts: 3507
Joined: Tue Aug 29, 2006 6:22 pm

Post » Mon Nov 19, 2012 4:19 pm

Did you make any other changes in the CK after you hit the Ignore button? I find it only actually updates the file if I go into a cell, move something, save and exit with the bits Ignored that I want gone. The next time I load the file, they are indeed gone.

Now it works. Great. Thanks.
User avatar
Ray
 
Posts: 3472
Joined: Tue Aug 07, 2007 10:17 am

Post » Mon Nov 19, 2012 8:33 am

Is it possible to reference an alias inside it's own script (extends ReferenceAlias) without a property? Something like Self.somefunction...

I have several aliases that all need to run the same script, the only thing that changes is the property, as it has to point to itself... I don't want to create 15 scripts that are basically exactly the same and I can't find anything in the wiki...
User avatar
Siobhan Thompson
 
Posts: 3443
Joined: Sun Nov 12, 2006 10:40 am

Post » Mon Nov 19, 2012 9:05 am

How can I make it so that this furniture model has it's entry points from behind and not the front?
http://i101.photobucket.com/albums/m57/will_cuthill/Furniture01.png?t=1349608620
User avatar
Sophie Morrell
 
Posts: 3364
Joined: Sat Aug 12, 2006 11:13 am

Post » Mon Nov 19, 2012 1:03 pm

Is it possible to reference an alias inside it's own script (extends ReferenceAlias) without a property? Something like Self.somefunction...
ObjectReference kSelf = GetReference()kSelf.DoSomething()
...or if an actor...
Actor kSelf = GetReference() As ActorkSelf.DoSomething()
If not referencing itself more than once, there's no need to cache kSelf and you could just...
GetReference().DoSomething()
...or...
(GetReference() As Actor).DoSomething()
User avatar
Jose ordaz
 
Posts: 3552
Joined: Mon Aug 27, 2007 10:14 pm

Post » Mon Nov 19, 2012 7:57 pm

Wow, I did not know that. Are references in an alias flagged as persistent after the quest is stopped?
User avatar
Phoenix Draven
 
Posts: 3443
Joined: Thu Jun 29, 2006 3:50 am

Post » Mon Nov 19, 2012 9:49 am

Are references in an alias flagged as persistent after the quest is stopped?
If the only thing making it persistent is that it's filling an alias, it will cease to be persistent when the quest stops or the alias is cleared.
User avatar
David John Hunter
 
Posts: 3376
Joined: Sun May 13, 2007 8:24 am

Post » Mon Nov 19, 2012 2:15 pm

nvm
User avatar
SamanthaLove
 
Posts: 3565
Joined: Mon Dec 11, 2006 3:54 am

Post » Mon Nov 19, 2012 7:16 am

Great! Thank you JustinOther, makes it less of a script mess for me! Very useful...

[EDIT]: By the way... I never really took this topic seriously because I thought it was messy... Now I am really appreciating its use and functionality. It is giving me a lot of answers fast and is very friendly towards newbies or even stupid questions. I'm learning a lot. Thanks to all helpful people in here and great topic...
User avatar
m Gardner
 
Posts: 3510
Joined: Sun Jun 03, 2007 8:08 pm

Post » Mon Nov 19, 2012 3:48 pm

What is the ini edit for forcing skyrim to draw objects near to the camera?

For example when in 3rd person and free camera mode, if I were to zoom in on the player's (or any actor's) face when I get reasonably close it turns invisible. I see in most ENB post screens of the camera very close to certain objects. How do they achieve this?

This is done by changing fNearDistance in your Skyrim.ini. Default value is 15.000
User avatar
Javaun Thompson
 
Posts: 3397
Joined: Fri Sep 21, 2007 10:28 am

Post » Mon Nov 19, 2012 7:31 pm

(How) can I compile a single script that I've edited without opening the CK?
User avatar
Pete Schmitzer
 
Posts: 3387
Joined: Fri Sep 14, 2007 8:20 am

Post » Mon Nov 19, 2012 3:57 pm

(How) can I compile a single script that I've edited without opening the CK?
Sublime Text 2 or Notepad++, once set up, can compile. I never use the CK for scripting...
User avatar
Clea Jamerson
 
Posts: 3376
Joined: Tue Jun 20, 2006 3:23 pm

Post » Mon Nov 19, 2012 5:01 am

Sublime Text 2 or Notepad++, once set up, can compile. I never use the CK for scripting...

I don't write them in the CK, but somehow I missed the setup for using the compiler with Notepad++. I found the instructions now though.
User avatar
des lynam
 
Posts: 3444
Joined: Thu Jul 19, 2007 4:07 pm

Post » Mon Nov 19, 2012 8:05 am

I'm having issues with what appears to be corruptions occurring with my exterior world spaces. What happens is when I use the coc command to go to one of the interior cells, and then go out into the custom exterior world space, the terrain is broken apart into floating separated pieces, making navigation through the environment impossible, and if it is observed in the CK, there doesn't seem to be any way to correct the separated segments. Has anyone seen something like this happen before, and if so, is there any way to remedy the situation?

I should also mention that the terrain is showing up fine in the CK, and with saves that are in a cell directly connected to the new world space.
User avatar
xxLindsAffec
 
Posts: 3604
Joined: Sun Jan 14, 2007 10:39 pm

PreviousNext

Return to V - Skyrim