CreationKit Multipack

Post » Tue Jun 19, 2012 6:55 pm

What is it ?



I aim to create a topic where all basic questions are listed and answered. If you have a common problem (in your opinion) or even better a solution to one of listed problems and you want to make life easier for the CK-Community post it here. I'll update this topic once in a while, adding your questions and solutions. I'll also contact the admin to make him take a look at this topic once in a while (hopefully he'll agree to do it :tongue:)


Hit CTRL+F and type a keyword(s) to easy find a question.





Important !


1. When you post a solution, please give a hint on its reliability. So if you think that your solution might work, but you haven't tested it, write it down.

2. If you are using a solution marked as full and it doesn't work, count to ten and try again. If it isn't working anyway, let us know about it.

3. Let us know if a proposed solution that has been marked as possible is working for you or not.

4. Please try to make your answer to look like a one of the already related.





Status colour


No solution yet
Full solution
Possible solution / not full








Questions


How can I add a script ?
Spoiler

Open properties of your object and find a "Script" section -> LMB on "Add" -> enter a name of your script -> LMB on "OK"
How can I change NPCs patrol route at certain quest stages ?
Spoiler

A patrol route is made inside an AI package and it is possible to create many AI packages for different routes. Now if you look at the AI package tab there is also a Conditions tab, there you can set the package to run only under determinated conditions, in this case under the quest stage condition.

So there add a condition as GetStage - Your quest name - stage number you want that to run.

Doing that the package will run only under the quest stage you give.
How can I change the quest status after activation of certain object ?
Spoiler

You need to add a script to the object that should change the status of your quest.
Scriptname *Name of your script* extends ObjectReference  Quest Property *Name of your quest*  Auto  Event OnActivate(ObjectReference akActionRef)	*Name of your quest*.SetStage(*Stage number*)endEvent

How can I make my scripts work under exact circumstances ?
Spoiler

Use the control structures :

- IF
if(*circumstance*)  *what should happen when if is true*else  *what should happen when if is false*endif
- WHILE
while(*circumstance when your script is working*)  *what should happen*endwhile

Question to you guys : Is "do while", "switch" and "for" also implemented ?
How can I make a trigger work only at certain quest stages ?
Spoiler

You need to add a script to the trigger you want to work this way.
Scriptname *Name of your script* extends ObjectReference  Quest Property *Name of your quest*  autoEvent OnTriggerEnter(ObjectReference akActivator)	if (akActivator == Game.GetPlayer())		if *Name of your quest*.GetStage() == *Stage number*		 *what should happen*	endifendifEndEvent
How do I change a Game Setting for the player in a script? Such as fJumpHeightMin (The default for fJumpHeightMin is 75.0).
Spoiler


Like the past bethesda games, you can't directly change a Game Setting trough script without a script extender.

It seems, that the only thing you can do is to get the value of a game setting as debug info. See if SKSE (or Script Dragon) have the script functions for that.

How can I activate an object at certain quest stage and what is so special in doors to consider ?
Spoiler

How can I force a NPC to talk with my character ?
Spoiler

Can I make my character killable at certain quest stages ?
Spoiler















Credits



Planteur, S_t_e_e_p, Neurological,



Thank you for your help !!!

User avatar
Alexis Estrada
 
Posts: 3507
Joined: Tue Aug 29, 2006 6:22 pm

Post » Tue Jun 19, 2012 3:28 pm

Question:
How can I force an NPC to talk with my character ?
Answer:

You can to create AI Package---Type: StartConversation
Then you must specify link on an actor, NPC have to come up to you and don't forget place the package on the actor
User avatar
naana
 
Posts: 3362
Joined: Fri Dec 08, 2006 2:00 pm

Post » Tue Jun 19, 2012 6:28 am

Could you make an example (code would be nice) that I can try in practice ?
User avatar
Mark
 
Posts: 3341
Joined: Wed May 23, 2007 11:59 am

Post » Tue Jun 19, 2012 8:29 pm

Sorry, but i don't have the Creation kit in my computer. I'm not at home. You can to try it to make and get more skill
User avatar
мistrєss
 
Posts: 3168
Joined: Thu Dec 14, 2006 3:13 am

Post » Tue Jun 19, 2012 4:43 pm

Q: How can I make a trigger work only at certain quest stages ?


ANSWER

Scriptname *Name of your script* extends ObjectReference  Quest Property *Name of your quest*  autoEvent OnTriggerEnter(ObjectReference akActivator)    if (akActivator == Game.GetPlayer())        if *Name of your quest*.GetStage() == *Stage number*       	 *what should happen*    endifendifEndEvent
User avatar
Cathrin Hummel
 
Posts: 3399
Joined: Mon Apr 16, 2007 7:16 pm

Post » Tue Jun 19, 2012 9:26 pm

Q: How can I change NPCs patrol route at certain quest stages ?

A: There is a simple way that doesn't involve scripting, a patrol route is made inside an AI package, it is possible to create many AI packages for different routes. Now if you look at the AI package tab there is also a Conditions tab, there you can set the package to run only under determinated conditions, in this case under the quest stage condition.

So there add a condition as GetStage - Your quest name - stage number you want that to run.

Doing that the package will run only under the quest stage you give.
User avatar
Trey Johnson
 
Posts: 3295
Joined: Thu Oct 11, 2007 7:00 pm

Post » Tue Jun 19, 2012 11:23 am

OK ! Now I have a real problem with my 1st post LOL :D
User avatar
Dalley hussain
 
Posts: 3480
Joined: Sun Jun 18, 2006 2:45 am

Post » Tue Jun 19, 2012 10:29 am

:whoops:
User avatar
Brandon Bernardi
 
Posts: 3481
Joined: Tue Sep 25, 2007 9:06 am

Post » Tue Jun 19, 2012 8:39 am

Ok. Post is working again.

To rememmber : NEVER EVER copy another users post directly to yours or use full editor for that !!!


I also added a "Important" section that shall make it easyier to edit.
User avatar
Mylizards Dot com
 
Posts: 3379
Joined: Fri May 04, 2007 1:59 pm

Post » Tue Jun 19, 2012 6:53 pm

Okay
User avatar
Melanie
 
Posts: 3448
Joined: Tue Dec 26, 2006 4:54 pm

Post » Tue Jun 19, 2012 9:29 am

1GurU0, can you explain what you exactly mean with that question? "How can I activate an object at certain quest stage and how does it affect doors ?"
User avatar
Laura Cartwright
 
Posts: 3483
Joined: Mon Sep 25, 2006 6:12 pm

Post » Tue Jun 19, 2012 3:57 pm

1GurU0, can you explain what you exactly mean with that question? "How can I activate an object at certain quest stage and how does it affect doors ?"

I have same question
User avatar
jessica robson
 
Posts: 3436
Joined: Mon Oct 09, 2006 11:54 am

Post » Tue Jun 19, 2012 10:04 am

Question: How do I change a Game Setting for the player in a script? Such as fJumpHeightMin (The default for fJumpHeightMin is 75.0)
User avatar
amhain
 
Posts: 3506
Joined: Sun Jan 07, 2007 12:31 pm

Post » Tue Jun 19, 2012 4:41 pm

Question: How do I change a Game Setting for the player in a script? Such as fJumpHeightMin (The default for fJumpHeightMin is 75.0)
Well I tried a lot of things to get that to work, but as like the past bethesda games, you can't directly change a Game Setting trough script without a script extender.

The only thing you can do it seems to get the value of a game setting as debug info. See if SKSE (or Script Dragon) have the script functions for that.
User avatar
Anna Beattie
 
Posts: 3512
Joined: Sat Nov 11, 2006 4:59 am

Post » Tue Jun 19, 2012 9:56 am

Well I tried a lot of things to get that to work, but as like the past bethesda games, you can't directly change a Game Setting trough script without a script extender.

The only thing you can do it seems to get the value of a game setting as debug info. See if SKSE (or Script Dragon) have the script functions for that.

Thanks mate. I'll take a look at both.
User avatar
Genevieve
 
Posts: 3424
Joined: Sun Aug 13, 2006 4:22 pm

Post » Tue Jun 19, 2012 8:55 am

1GurU0, can you explain what you exactly mean with that question? "How can I activate an object at certain quest stage and how does it affect doors ?"

Sry I've completely forgotten. I was working on this problem with S_t_e_e_p few days ago. I wanted to open a door at certain stage. We tried a bit and we've came to

Scriptname *name of the script* extends objectReferenceeventOnActivate (ObjectReference akActionRef)  if ( *quest name*.GetStage() == *stage number* )	SetOpen()  endifendEventQuest property *quest name* autoDoor property asd auto

It looks legit to me, but it doesn't work. I checked the reference pages on CK wiki and I found out that you can do it in three ways.
- SetOpen() = open door
- SetOpen(false) = close door
- activate() = change state


So what I mean in this question is how to use the "Activate" reference and why you should use "SetOpen" on the doors. As you can see the question is almost answered, but there is that little something that doesn't work in our script.


Update:
@S_t_e_e_p
What was "asd" in your script :P ?
User avatar
Neko Jenny
 
Posts: 3409
Joined: Thu Jun 22, 2006 4:29 am

Post » Tue Jun 19, 2012 9:23 am

Sry I've completely forgotten. I was working on this problem with S_t_e_e_p few days ago. I wanted to open a door at certain stage. We tried a bit and we've came to

Scriptname *name of the script* extends objectReferenceeventOnActivate (ObjectReference akActionRef)  if ( *quest name*.GetStage() == *stage number* )	SetOpen()  endifendEventQuest property *quest name* autoDoor property asd auto

It looks legit to me, but it doesn't work. I checked the reference pages on CK wiki and I found out that you can do it in three ways.
- SetOpen() = open door
- SetOpen(false) = close door
- activate() = change state


So what I mean in this question is how to use the "Activate" reference and why you should use "SetOpen" on the doors. As you can see the question is almost answered, but there is that little something that doesn't work in our script.


Update:
@S_t_e_e_p
What was "asd" in your script :tongue: ?

The script have few errors, first the door property is never called inside the script, and SetOpen() and Activate() are Object Reference functions, os they won't work with a Door property.

You would need the script this way:

Scriptname *your script name extends ObjectReference  Quest Property *your quest name* AutoObjectReference Property *your door reference* AutoEVENT OnActivate(ObjectReference akActionRef)    if (Game.GetPlayer())		   if ( *your quest name*.GetStage() == *stage number* )    *yourdoor reference*.Activate(Game.GetPlayer())   endIfendIfendEVENT

I'll explain what is all about the first like if (Game.GetPlayer()) is to chek if player is using the activator, without it the activator doesn't know what is activating it.
The door reference instead of Door property is used because the Activate() SetOpen() functions are usable only as object reference, otherwise the script won't compile it. Plus under the Object Reference properties you can select a door as reference instead of creating a custom one, so you wan't have too many custom ID for doors, but you can link directly in the render window.

Then the rest I think is self explanatory. I just tested it and it works all good.
User avatar
Nathan Barker
 
Posts: 3554
Joined: Sun Jun 10, 2007 5:55 am

Post » Tue Jun 19, 2012 6:52 am

*your door reference* is it the ID ? How can I refer to a door ?

Should I just add a property with type objectreference and value of the certain door ?
User avatar
Matt Terry
 
Posts: 3453
Joined: Sun May 13, 2007 10:58 am

Post » Tue Jun 19, 2012 5:07 pm

*your door reference* is it the ID ? How can I refer to a door ?
It's a properties, and in the properties you point reference the door
User avatar
Claire Mclaughlin
 
Posts: 3361
Joined: Mon Jul 31, 2006 6:55 am

Post » Tue Jun 19, 2012 7:25 am

Not the ID, but just the reference to any object. When you go the properties of the script you can select any object inside a cell you want.

If you want I can send you the test plugin I did so you can see.
User avatar
ijohnnny
 
Posts: 3412
Joined: Sun Oct 22, 2006 12:15 am

Post » Tue Jun 19, 2012 11:49 am

Sorry for double post but you want a script that works as remote button to open a door? Or you want a script to attach directly to a door?

Because my script is to open a door remotely.
User avatar
kristy dunn
 
Posts: 3410
Joined: Thu Mar 01, 2007 2:08 am

Post » Tue Jun 19, 2012 4:33 pm

I want to open a door / activate object remotely. I'll update the topic after trying it out. I'm afk for a while :)
User avatar
Bambi
 
Posts: 3380
Joined: Tue Jan 30, 2007 1:20 pm

Post » Tue Jun 19, 2012 7:07 am

:banana: :biggrin:
User avatar
LADONA
 
Posts: 3290
Joined: Wed Aug 15, 2007 3:52 am

Post » Tue Jun 19, 2012 12:49 pm

Why don't you add those tips to the http://www.creationkit.com/Category:Tutorials?

This thread will be forgotten in a couple of days.
User avatar
Cayal
 
Posts: 3398
Joined: Tue Jan 30, 2007 6:24 pm

Post » Tue Jun 19, 2012 3:54 pm

Why don't you add those tips to the http://www.creationkit.com/Category:Tutorials?

This thread will be forgotten in a couple of days.
Is it available?
User avatar
Marquis T
 
Posts: 3425
Joined: Fri Aug 31, 2007 4:39 pm

Next

Return to V - Skyrim